Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Functions | Variables
lib.php File Reference

Functions

 mod_scorm_core_calendar_event_timestart_updated (\calendar_event $event, stdClass $scorm)
 This function will update the scorm module according to the event that has been modified. More...
 
 mod_scorm_core_calendar_get_valid_event_timestart_range (\calendar_event $event, stdClass $instance)
 This function calculates the minimum and maximum cutoff values for the timestart of the given event. More...
 
 mod_scorm_core_calendar_provide_event_action (calendar_event $event, core_calendar\action_factory $factory, $userid=null)
 This function receives a calendar event and returns the action associated with it, or null if there is none. More...
 
 mod_scorm_get_completion_active_rule_descriptions ($cm)
 Callback which returns human-readable strings describing the active completion custom rules for the module instance. More...
 
 mod_scorm_get_fontawesome_icon_map ()
 Get icon mapping for font-awesome.
 
 mod_scorm_get_path_from_pluginfile (string $filearea, array $args)
 Given an array with a file path, it returns the itemid and the filepath for the defined filearea. More...
 
stdClass scorm_add_instance ($scorm, $mform=null)
 Given an object containing all the necessary data, (defined by the form in mod_form.php) this function will create a new instance and return the id number of the new instance. More...
 
 scorm_check_mode ($scorm, &$newattempt, &$attempt, $userid, &$mode)
 Check and set the correct mode and attempt when entering a SCORM package. More...
 
 scorm_check_updates_since (cm_info $cm, $from, $filter=array())
 Check if the module has any update that affects the current user since a given time. More...
 
stdClass scorm_cron_scheduled_task ()
 Function to be run periodically according to the moodle Tasks API This function searches for things that need to be done, such as sending out mail, toggling flags etc ... More...
 
 scorm_debug_log_filename ($type, $scoid)
 Get the filename for a temp log file. More...
 
 scorm_debug_log_remove ($type, $scoid)
 Remove debug log file. More...
 
 scorm_debug_log_write ($type, $text, $scoid)
 writes log output to a temp log file More...
 
stdClass scorm_delete_instance ($id)
 Given an ID of an instance of this module, this function will permanently delete the instance and any data that depends on it. More...
 
 scorm_dndupload_handle ($uploadinfo)
 Handle a file that has been uploaded. More...
 
 scorm_dndupload_register ()
 Register the ability to handle drag and drop file uploads. More...
 
 scorm_get_completion_state ($course, $cm, $userid, $type)
 Obtains the automatic completion state for this scorm based on any conditions in scorm settings. More...
 
 scorm_get_coursemodule_info ($coursemodule)
 Add a get_coursemodule_info function in case any SCORM type wants to add 'extra' information for the course (see resource). More...
 
 scorm_get_file_areas ($course, $cm, $context)
 Lists all file areas current user may browse. More...
 
 scorm_get_file_info ($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename)
 
 scorm_get_post_actions ()
 List the actions that correspond to a post of this module. More...
 
stdClass scorm_get_user_grades ($scorm, $userid=0)
 Return grade for given user or all users. More...
 
 scorm_get_view_actions ()
 List the actions that correspond to a view of this module. More...
 
 scorm_grade_item_delete ($scorm)
 
 scorm_grade_item_update ($scorm, $grades=null)
 
 scorm_option2text ($scorm)
 
 scorm_page_type_list ($pagetype, $parentcontext, $currentcontext)
 Return a list of page types. More...
 
 scorm_pluginfile ($course, $cm, $context, $filearea, $args, $forcedownload, array $options=array())
 
 scorm_print_overview ()
 
 scorm_refresh_events ($courseid=0, $instance=null, $cm=null)
 This standard function will check all instances of this module and make sure there are up-to-date events created for each of them. More...
 
 scorm_reset_course_form_defaults ($course)
 Course reset form defaults. More...
 
 scorm_reset_course_form_definition (&$mform)
 Implementation of the function for printing the form elements that control whether the course reset functionality affects the scorm. More...
 
stdClass scorm_reset_gradebook ($courseid, $type='')
 Removes all grades from gradebook. More...
 
stdClass scorm_reset_userdata ($data)
 Actual implementation of the reset course functionality, delete all the scorm attempts for course $data->courseid. More...
 
 scorm_set_completion ($scorm, $userid, $completionstate=COMPLETION_COMPLETE, $grades=array())
 Sets activity completion state. More...
 
 scorm_status_options ($withstrings=false)
 Return an array of status options. More...
 
 scorm_supports ($feature)
 @uses FEATURE_GROUPS @uses FEATURE_GROUPINGS @uses FEATURE_MOD_INTRO @uses FEATURE_COMPLETION_TRACKS_VIEWS @uses FEATURE_COMPLETION_HAS_RULES @uses FEATURE_GRADE_HAS_GRADE @uses FEATURE_GRADE_OUTCOMES More...
 
 scorm_update_grades ($scorm, $userid=0, $nullifnone=true)
 
stdClass scorm_update_instance ($scorm, $mform=null)
 Given an object containing all the necessary data, (defined by the form in mod_form.php) this function will update an existing instance with new data. More...
 
stdClass scorm_user_complete ($course, $user, $mod, $scorm)
 Print a detailed representation of what a user has done with a given particular instance of this module, for user activity reports. More...
 
stdClass scorm_user_outline ($course, $user, $mod, $scorm)
 Return a small object with summary information about what a user has done with a given particular instance of this module Used for user activity reports. More...
 
 scorm_validate_package ($file)
 Check that a Zip file contains a valid SCORM package. More...
 
 scorm_version_check ($scormversion, $version='')
 Returns the SCORM version used. More...
 
 scorm_view ($scorm, $course, $cm, $context)
 Trigger the course_module_viewed event. More...
 

Variables

const SCORM_12 1
 
const SCORM_13 2
 
const SCORM_AICC 3
 
const SCORM_DISPLAY_ATTEMPTSTATUS_ALL 1
 
const SCORM_DISPLAY_ATTEMPTSTATUS_ENTRY 3
 
const SCORM_DISPLAY_ATTEMPTSTATUS_MY 2
 
const SCORM_DISPLAY_ATTEMPTSTATUS_NO 0
 
const SCORM_EVENT_TYPE_CLOSE 'close'
 
const SCORM_EVENT_TYPE_OPEN 'open'
 
const SCORM_NAV_DISABLED 0
 
const SCORM_NAV_FLOATING 2
 
const SCORM_NAV_UNDER_CONTENT 1
 
const SCORM_TOC_DISABLED 3
 
const SCORM_TOC_HIDDEN 1
 
const SCORM_TOC_POPUP 2
 
const SCORM_TOC_SIDE 0
 
const SCORM_TYPE_AICCURL 'aiccurl'
 SCORM_TYPE_AICCURL = external AICC url.
 
const SCORM_TYPE_EXTERNAL 'external'
 SCORM_TYPE_EXTERNAL = external.
 
const SCORM_TYPE_LOCAL 'local'
 SCORM_TYPE_LOCAL = local.
 
const SCORM_TYPE_LOCALSYNC 'localsync'
 SCORM_TYPE_LOCALSYNC = localsync.
 

Detailed Description

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later