From ec88010b2ee7e8e7a8577d540cbe6387f3451a30 Mon Sep 17 00:00:00 2001 From: piers Date: Wed, 6 Aug 2008 05:06:00 +0000 Subject: [PATCH] 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.9. --- mod/scorm/player.php | 28 +++++++++++----------------- mod/scorm/rd.js | 16 +++++++++++++++- mod/scorm/report.php | 2 +- mod/scorm/view.php | 2 +- 4 files changed, 28 insertions(+), 20 deletions(-) diff --git a/mod/scorm/player.php b/mod/scorm/player.php index f3ea4be894b..36c1be19240 100755 --- a/mod/scorm/player.php +++ b/mod/scorm/player.php @@ -101,7 +101,7 @@ } } - 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; @@ -183,8 +183,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; @@ -201,8 +201,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; @@ -269,8 +269,8 @@
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 = '&scoid='.$sco->previd; $url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr; @@ -287,8 +287,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 = '&scoid='.$sco->nextid; $url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr; @@ -374,11 +374,5 @@ ?>
- - customcorners)) { - print_container_end(); - } ?> - - - - \ No newline at end of file + + \ No newline at end of file diff --git a/mod/scorm/rd.js b/mod/scorm/rd.js index f54dc52665b..e4c3f3d1dcc 100644 --- a/mod/scorm/rd.js +++ b/mod/scorm/rd.js @@ -73,5 +73,19 @@ function scorm_resize () { 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'; + } } ---> +--> \ No newline at end of file diff --git a/mod/scorm/report.php b/mod/scorm/report.php index 661eac7c4c5..b4dc1a43256 100755 --- a/mod/scorm/report.php +++ b/mod/scorm/report.php @@ -47,7 +47,7 @@ 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); diff --git a/mod/scorm/view.php b/mod/scorm/view.php index cbfe4b16bde..1f185037f65 100755 --- a/mod/scorm/view.php +++ b/mod/scorm/view.php @@ -54,7 +54,7 @@ } $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;