MDL-50837 mod_scorm: include locallib to access function
authorrajesh Taneja <rajesh@moodle.com>
Thu, 5 Nov 2015 02:02:45 +0000 (10:02 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Thu, 5 Nov 2015 02:23:31 +0000 (10:23 +0800)
mod/scorm/lib.php

index 66c6926..fa43530 100644 (file)
@@ -943,6 +943,8 @@ function scorm_pluginfile($course, $cm, $context, $filearea, $args, $forcedownlo
 
     // Check SCORM availability.
     if (!$canmanageactivity) {
+        require_once($CFG->dirroot.'/mod/scorm/locallib.php');
+
         $scorm = $DB->get_record('scorm', array('id' => $cm->instance), 'id, timeopen, timeclose', MUST_EXIST);
         list($available, $warnings) = scorm_get_availability_status($scorm);
         if (!$available) {