MDL-50837 mod_scorm: include locallib to access function
[moodle.git] / 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) {