MDL-44548 mod_scorm: force an external sync to check for updated files.
authorDan Marsden <dan@danmarsden.com>
Thu, 14 Aug 2014 08:33:05 +0000 (20:33 +1200)
committerDan Marsden <dan@danmarsden.com>
Fri, 10 Oct 2014 02:10:08 +0000 (15:10 +1300)
also remove some globals no longer needed (not used in function or in required files.

mod/scorm/locallib.php

index 06f1863..2afe218 100644 (file)
@@ -848,9 +848,9 @@ function scorm_get_all_attempts($scormid, $userid) {
 }
 
 function scorm_view_display ($user, $scorm, $action, $cm) {
-    global $CFG, $DB, $PAGE, $OUTPUT, $COURSE;
+    global $CFG, $DB, $OUTPUT;
 
-    if ($scorm->scormtype != SCORM_TYPE_LOCAL && $scorm->updatefreq == SCORM_UPDATE_EVERYTIME) {
+    if ($scorm->updatefreq == SCORM_UPDATE_EVERYTIME) {
         scorm_parse($scorm, false);
     }
 
@@ -952,7 +952,7 @@ function scorm_simple_play($scorm, $user, $context, $cmid) {
         return $result;
     }
 
-    if ($scorm->scormtype != SCORM_TYPE_LOCAL && $scorm->updatefreq == SCORM_UPDATE_EVERYTIME) {
+    if ($scorm->updatefreq == SCORM_UPDATE_EVERYTIME) {
         scorm_parse($scorm, false);
     }
     $scoes = $DB->get_records_select('scorm_scoes', 'scorm = ? AND '.