MDL-15950 MDL-15640 MDL-15943 - SCORM player.php not inserting footer, Showing SCORM participation report. (thanks Urs Hunkler and Mitsuhiro Yoshida). Warning are displayed in a SCORM activity (thanks Dan). Backport to 1.8.

This commit is contained in:
piers
2008-08-06 05:09:15 +00:00
parent b5655a6578
commit 5f75ca701e
4 changed files with 30 additions and 17 deletions
+11 -11
View File
@@ -100,8 +100,8 @@
}
}
add_to_log($course->id, 'scorm', 'view', "player.php?id=$cm->id&scoid=$sco->id", "$scorm->id");
add_to_log($course->id, 'scorm', 'view', "player.php?id=$cm->id&scoid=$sco->id", "$scorm->id", $cm->id);
$scoidstr = '&scoid='.$sco->id;
$scoidpop = '&scoid='.$sco->id;
$modestr = '&mode='.$mode;
@@ -180,8 +180,8 @@
$orgstr = '&currentorg='.$currentorg;
if (($scorm->hidenav == 0) && ($sco->previd != 0) && ($sco->previous == 0)) {
if (($scorm->hidenav == 0) && ($sco->previd != 0) && (!isset($sco->previous) || $sco->previous == 0)) {
// Print the prev LO button
$scostr = '&scoid='.$sco->previd;
@@ -198,8 +198,8 @@
if (($scorm->hidenav == 0) && ($sco->nextid != 0) && ($sco->next == 0)) {
if (($scorm->hidenav == 0) && ($sco->nextid != 0) && (!isset($sco->next) || $sco->next == 0)) {
// Print the next LO button
$scostr = '&scoid='.$sco->nextid;
@@ -266,8 +266,8 @@
<div id="scormnav" class="scorm-right">
<?php
$orgstr = '&amp;currentorg='.$currentorg;
if (($scorm->hidenav == 0) && ($sco->previd != 0) && ($sco->previous == 0) && (($scorm->hidetoc == 2) || ($scorm->hidetoc == 1)) ) {
if (($scorm->hidenav == 0) && ($sco->previd != 0) && (!isset($sco->previous) || $sco->previous == 0) && (($scorm->hidetoc == 2) || ($scorm->hidetoc == 1)) ) {
// Print the prev LO button
$scostr = '&amp;scoid='.$sco->previd;
$url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr;
@@ -284,8 +284,8 @@
if ($scorm->hidetoc == 2) {
echo $result->tocmenu;
}
if (($scorm->hidenav == 0) && ($sco->nextid != 0) && ($sco->next == 0) && (($scorm->hidetoc == 2) || ($scorm->hidetoc == 1))) {
if (($scorm->hidenav == 0) && ($sco->nextid != 0) && (!isset($sco->next) || $sco->next == 0) && (($scorm->hidetoc == 2) || ($scorm->hidetoc == 1))) {
// Print the next LO button
$scostr = '&amp;scoid='.$sco->nextid;
$url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr;
@@ -372,4 +372,4 @@
</div> <!-- SCORM object -->
</div> <!-- SCORM box -->
</div> <!-- SCORM content -->
<?php print_footer(); ?>
<?php print_footer('none'); ?>
+15 -2
View File
@@ -72,6 +72,19 @@ function scorm_resize () {
var scoframe2 = document.getElementById('scoframe1');
document.getElementById('scormobject').style.height = (winheight - totalheight) + 'px';
}
// resize the content container too to move the footer below the SCORM content
var contenti3 = document.getElementById('content-i3');
if (contenti3) {
contenti3.style.height = (winheight - totalheight + 30) + 'px';
} else {
document.getElementById('content').style.height = (winheight - totalheight + 30) + 'px';
}
// resize the content container too to move the footer below the SCORM content
var contenti3 = document.getElementById('content-i3');
if (contenti3) {
contenti3.style.height = (winheight - totalheight + 30) + 'px';
} else {
document.getElementById('content').style.height = (winheight - totalheight + 30) + 'px';
}
}
-->
-->
+2 -2
View File
@@ -47,8 +47,8 @@
error('You are not allowed to use this script');
}
add_to_log($course->id, 'scorm', 'report', 'report.php?id='.$cm->id, $scorm->id);
add_to_log($course->id, 'scorm', 'report', 'report.php?id='.$cm->id, $scorm->id, $cm->id);
if (!empty($user)) {
$userdata = scorm_get_user_data($user);
} else {
+2 -2
View File
@@ -57,8 +57,8 @@
$pagetitle = strip_tags($course->shortname.': '.format_string($scorm->name));
add_to_log($course->id, 'scorm', 'pre-view', 'view.php?id='.$cm->id, "$scorm->id");
add_to_log($course->id, 'scorm', 'pre-view', 'view.php?id='.$cm->id, "$scorm->id", $cm->id);
if ((has_capability('mod/scorm:skipview', get_context_instance(CONTEXT_MODULE,$cm->id))) && scorm_simple_play($scorm,$USER)) {
exit;
}