mirror of
https://github.com/moodle/moodle.git
synced 2025-06-05 23:55:21 +02:00
Fixed last Explorer popup bug and added user score view
This commit is contained in:
parent
0d8a590a0b
commit
02f5d4390c
@ -145,8 +145,13 @@
|
|||||||
$startbold = '';
|
$startbold = '';
|
||||||
$endbold = '';
|
$endbold = '';
|
||||||
if ($sco->id == $currentSCO) {
|
if ($sco->id == $currentSCO) {
|
||||||
$startbold = '-> <b><u>';
|
$startbold = '-> <b>';
|
||||||
$endbold = '</u></b> <-';
|
$endbold = '</b> <-';
|
||||||
|
}
|
||||||
|
if (($currentSCO == "") && ($mode != "normal")) {
|
||||||
|
$currentSCO = $sco->id;
|
||||||
|
$startbold = '-> <b>';
|
||||||
|
$endbold = '</b> <-';
|
||||||
}
|
}
|
||||||
if ($sco_user=get_record("scorm_sco_users","scoid",$sco->id,"userid",$USER->id)) {
|
if ($sco_user=get_record("scorm_sco_users","scoid",$sco->id,"userid",$USER->id)) {
|
||||||
if ( $sco_user->cmi_core_lesson_status == "")
|
if ( $sco_user->cmi_core_lesson_status == "")
|
||||||
@ -156,15 +161,18 @@
|
|||||||
if ($currentSCO == "") {
|
if ($currentSCO == "") {
|
||||||
$incomplete = true;
|
$incomplete = true;
|
||||||
$currentSCO = $sco->id;
|
$currentSCO = $sco->id;
|
||||||
$startbold = '-> <b><u>';
|
$startbold = '-> <b>';
|
||||||
$endbold = '</u></b> <-';
|
$endbold = '</b> <-';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
echo " <img src=\"pix/notattempted.gif\" alt=\"".get_string("notattempted","scorm")."\" />";
|
echo " <img src=\"pix/notattempted.gif\" alt=\"".get_string("notattempted","scorm")."\" />";
|
||||||
$incomplete = true;
|
$incomplete = true;
|
||||||
}
|
}
|
||||||
echo " $startbold<a href=\"javascript:playSCO(".$sco->id.");\">$sco->title</a>$endbold\n </li>\n";
|
$score = "";
|
||||||
|
if (($sco_user->cmi_core_lesson_status == "passed") || ($sco_user->cmi_core_lesson_status == "failed"))
|
||||||
|
$score = "(".get_string("score","scorm").": ".$sco_user->cmi_core_score_raw.")";
|
||||||
|
echo " $startbold<a href=\"javascript:playSCO(".$sco->id.");\">$sco->title</a> $score$endbold\n </li>\n";
|
||||||
} else {
|
} else {
|
||||||
echo " $sco->title\n </li>\n";
|
echo " $sco->title\n </li>\n";
|
||||||
}
|
}
|
||||||
@ -218,7 +226,6 @@
|
|||||||
if ($scorm->popup != "") {
|
if ($scorm->popup != "") {
|
||||||
?>
|
?>
|
||||||
<script language="Javascript">
|
<script language="Javascript">
|
||||||
top.main = window.open('','main','<?php echo $scorm->popup ?>');
|
|
||||||
SCOInitialize();
|
SCOInitialize();
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
@ -234,8 +241,8 @@
|
|||||||
echo "<head><title>$course->shortname: $scorm->name</title></head>\n";
|
echo "<head><title>$course->shortname: $scorm->name</title></head>\n";
|
||||||
echo "<script id=\"scormAPI\" language=\"JavaScript\" type=\"text/javascript\" src=\"scormAPI.php?id=$cm->id&mode=".$mode.$scoid."\"></script>\n";
|
echo "<script id=\"scormAPI\" language=\"JavaScript\" type=\"text/javascript\" src=\"scormAPI.php?id=$cm->id&mode=".$mode.$scoid."\"></script>\n";
|
||||||
echo "<frameset rows=\"$CFG->scorm_framesize,*\" onLoad=\"SCOInitialize();\">\n";
|
echo "<frameset rows=\"$CFG->scorm_framesize,*\" onLoad=\"SCOInitialize();\">\n";
|
||||||
echo " <frame name=\"nav\" src=\"playscorm.php?id=$cm->id&mode=".$mode."&frameset=top\">\n";
|
echo "\t <frame name=\"nav\" src=\"playscorm.php?id=$cm->id&mode=".$mode."&frameset=top\">\n";
|
||||||
echo " <frame name=\"main\" src=\"\">\n";
|
echo "\t <frame name=\"main\" src=\"\">\n";
|
||||||
echo "</frameset>\n";
|
echo "</frameset>\n";
|
||||||
echo "</html>\n";
|
echo "</html>\n";
|
||||||
}
|
}
|
||||||
|
@ -158,10 +158,14 @@ function SCOInitialize() {
|
|||||||
print "\t".$navObj."document.navform.next.style.display = 'none';\n";
|
print "\t".$navObj."document.navform.next.style.display = 'none';\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
top.main.location="<?php echo $result; ?>";
|
<?php
|
||||||
<?php if ($scorm->popup == "") { ?>
|
if ($scorm->popup == "") {
|
||||||
hilightcurrent(<?php echo $navObj ?>document.navform.courseStructure);
|
echo "\t top.main.location=\"$result\";\n";
|
||||||
<?php } ?>
|
echo "\t hilightcurrent(".$navObj."document.navform.courseStructure);\n";
|
||||||
|
} else {
|
||||||
|
echo "\t top.main = window.open('$result','main','$scorm->popup');\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeSco(direction) {
|
function changeSco(direction) {
|
||||||
|
@ -129,7 +129,10 @@
|
|||||||
echo " <img src=\"pix/notattempted.gif\" alt=\"".get_string("notattempted","scorm")."\" />";
|
echo " <img src=\"pix/notattempted.gif\" alt=\"".get_string("notattempted","scorm")."\" />";
|
||||||
$incomplete = true;
|
$incomplete = true;
|
||||||
}
|
}
|
||||||
echo " <a href=\"javascript:playSCO(".$sco->id.")\">$sco->title</a>\n </li>\n";
|
$score = "";
|
||||||
|
if (($sco_user->cmi_core_lesson_status == "passed") || ($sco_user->cmi_core_lesson_status == "failed"))
|
||||||
|
$score = "(".get_string("score","scorm").": ".$sco_user->cmi_core_score_raw.")";
|
||||||
|
echo " <a href=\"javascript:playSCO(".$sco->id.")\">$sco->title</a> $score\n </li>\n";
|
||||||
} else {
|
} else {
|
||||||
echo " $sco->title\n </li>\n";
|
echo " $sco->title\n </li>\n";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user