Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Class: mod_scorm_external  - X-Ref

SCORM module external functions

view_scorm_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

view_scorm($scormid)   X-Ref
Trigger the course module viewed event.

return: array of warnings and status result
param: int $scormid the scorm instance id

view_scorm_returns()   X-Ref
Returns description of method result value

return: external_description

get_scorm_attempt_count_parameters()   X-Ref
Describes the parameters for get_scorm_attempt_count.

return: external_function_parameters

get_scorm_attempt_count($scormid, $userid, $ignoremissingcompletion = false)   X-Ref
Return the number of attempts done by a user in the given SCORM.

return: array of warnings and the attempts count
param: int $scormid the scorm id
param: int $userid the user id
param: bool $ignoremissingcompletion ignores attempts that haven't reported a grade/completion

get_scorm_attempt_count_returns()   X-Ref
Describes the get_scorm_attempt_count return value.

return: external_single_structure

get_scorm_scoes_parameters()   X-Ref
Describes the parameters for get_scorm_scoes.

return: external_function_parameters

get_scorm_scoes($scormid, $organization = '')   X-Ref
Returns a list containing all the scoes data related to the given scorm id

return: array warnings and the scoes data
param: int $scormid the scorm id
param: string $organization the organization id

get_scorm_scoes_returns()   X-Ref
Describes the get_scorm_scoes return value.

return: external_single_structure

get_scorm_user_data_parameters()   X-Ref
Describes the parameters for get_scorm_user_data.

return: external_function_parameters

get_scorm_user_data($scormid, $attempt)   X-Ref
Retrieves user tracking and SCO data and default SCORM values

return: array warnings and the scoes data
param: int $scormid the scorm id
param: int $attempt the attempt number

get_scorm_user_data_returns()   X-Ref
Describes the get_scorm_user_data return value.

return: external_single_structure

insert_scorm_tracks_parameters()   X-Ref
Describes the parameters for insert_scorm_tracks.

return: external_function_parameters

insert_scorm_tracks($scoid, $attempt, $tracks)   X-Ref
Saves a SCORM tracking record.
It will overwrite any existing tracking data for this attempt.
Validation should be performed before running the function to ensure the user will not lose any existing attempt data.

return: array warnings and the scoes data
param: int $scoid the SCO id
param: string $attempt the attempt number
param: array $tracks the track records to be stored

insert_scorm_tracks_returns()   X-Ref
Describes the insert_scorm_tracks return value.

return: external_single_structure

get_scorm_sco_tracks_parameters()   X-Ref
Describes the parameters for get_scorm_sco_tracks.

return: external_function_parameters

get_scorm_sco_tracks($scoid, $userid, $attempt = 0)   X-Ref
Retrieves SCO tracking data for the given user id and attempt number

return: array warnings and the scoes data
param: int $scoid the sco id
param: int $userid the user id
param: int $attempt the attempt number

get_scorm_sco_tracks_returns()   X-Ref
Describes the get_scorm_sco_tracks return value.

return: external_single_structure

get_scorms_by_courses_parameters()   X-Ref
Describes the parameters for get_scorms_by_courses.

return: external_function_parameters

get_scorms_by_courses($courseids = array()   X-Ref
Returns a list of scorms in a provided list of courses,
if no list is provided all scorms that the user can view will be returned.

return: array the scorm details
param: array $courseids the course ids

get_scorms_by_courses_returns()   X-Ref
Describes the get_scorms_by_courses return value.

return: external_single_structure

launch_sco_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

launch_sco($scormid, $scoid = 0)   X-Ref
Trigger the course module viewed event.

return: array of warnings and status result
param: int $scormid the SCORM instance id
param: int $scoid the SCO id

launch_sco_returns()   X-Ref
Returns description of method result value

return: external_description

get_scorm_access_information_parameters()   X-Ref
Describes the parameters for get_scorm_access_information.

return: external_external_function_parameters

get_scorm_access_information($scormid)   X-Ref
Return access information for a given scorm.

return: array of warnings and the access information
param: int $scormid scorm instance id

get_scorm_access_information_returns()   X-Ref
Describes the get_scorm_access_information return value.

return: external_single_structure