Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
|
Topics | |
backup | |
external | |
grade | |
log | |
task | |
test | |
Directories | |
directory | analytics |
| |
directory | backup |
| |
Namespaces | |
namespace | mod_scorm |
| |
namespace | mod_scorm\analytics\indicator |
Activity base class. | |
namespace | mod_scorm\cache |
| |
namespace | mod_scorm\completion |
| |
namespace | mod_scorm\event |
The mod_scorm attempt deleted event. | |
namespace | mod_scorm\output |
| |
namespace | mod_scorm\plugininfo |
Subplugin info class. | |
namespace | mod_scorm\privacy |
| |
namespace | mod_scorm\search |
Search area for mod_scorm activities. | |
namespace | mod_scorm\task |
A scheduled task for scorm cron. | |
Classes | |
class | backup_scorm_activity_structure_step |
Define all the backup steps that will be used by the backup_scorm_activity_task. More... | |
class | mod_scorm\analytics\indicator\activity_base |
Activity base class. More... | |
class | mod_scorm\analytics\indicator\cognitive_depth |
Cognitive depth indicator - scorm. More... | |
class | mod_scorm\analytics\indicator\social_breadth |
Social breadth indicator - scorm. More... | |
class | mod_scorm\cache\elements |
Cache data source for the scorm elements. More... | |
class | mod_scorm\completion\custom_completion |
Activity custom completion subclass for the scorm activity. More... | |
class | mod_scorm\dates |
Class for fetching the important dates in mod_scorm for a given module instance and a user. More... | |
class | mod_scorm\event\cmielement_submitted |
The mod_scorm generic CMI element submitted event class. More... | |
class | mod_scorm\event\course_module_instance_list_viewed |
The mod_scorm instance list viewed event class. More... | |
class | mod_scorm\event\course_module_viewed |
The mod_scorm course module viewed event class. More... | |
class | mod_scorm\event\report_viewed |
The mod_scorm report viewed event class. More... | |
class | mod_scorm\event\scoreraw_submitted |
The mod_scorm raw score submitted event class. More... | |
class | mod_scorm\event\status_submitted |
The mod_scorm status submitted event class. More... | |
class | mod_scorm\event\tracks_viewed |
The mod_scorm tracks viewed event class. More... | |
class | mod_scorm\output\actionbar |
Render HTML elements for tertiary nav for scorm. More... | |
class | mod_scorm\output\userreportsactionbar |
Render HTML elements for reports page on tertiary nav. More... | |
class | mod_scorm\plugininfo\scormreport |
class | mod_scorm\privacy\provider |
Privacy class for requesting user data. More... | |
class | mod_scorm\report |
class | mod_scorm\search\activity |
Search area for mod_scorm activities. More... | |
class | mod_scorm\task\cron_task |
A cron_task class to be used by Tasks API. More... | |
class | mod_scorm\task\update_grades |
Adhoc task for recalculating grades. More... | |
class | mod_scorm_attempt_bar |
Component representing a SCORM attempts bar. More... | |
class | mod_scorm_renderer |
The renderer for the scorm module. More... | |
class | moodle1_mod_scorm_handler |
Scorm conversion handler. More... | |
class | restore_scorm_activity_structure_step |
Define all the restore steps that will be used by the restore_scorm_activity_task. More... | |
class | restore_scorm_activity_task |
scorm restore task that provides all the settings and steps to perform one complete restore of the activity More... | |
class | scorm_package_file_info |
class | xml2Array |
Functions | |
get_scorm_default (&$userdata, $scorm, $scoid, $attempt, $mode) | |
Sets up $userdata array and default values for AICC package. | |
get_scorm_question_count ($scormid) | |
Returns The maximum numbers of Questions associated with an Scorm Pack. | |
scorm_add_time ($a, $b) | |
functions used by AICC packages. | |
scorm_aicc_confirm_hacp_session ($hacpsession) | |
Check the hacp_session for whether it is valid. | |
scorm_aicc_generate_simple_sco ($scorm) | |
generate a simple single activity AICC object structure to wrap around and externally linked AICC package URL | |
scorm_aicc_get_hacp_session ($scormid) | |
Given a scormid creates an AICC Session record to allow HACP. | |
scorm_array_search ($item, $needle, $haystacks, $strict=false) | |
scorm_check_launchable_sco ($scorm, $scoid) | |
Check if the current sco is launchable If not, find the next launchable sco. | |
scorm_check_url ($url) | |
Check for the availability of a resource by URL. | |
scorm_count_launchable ($scormid, $organization='') | |
scorm_debugging ($scorm) | |
Figure out with this is a debug situation. | |
scorm_delete_attempt ($userid, $scorm, $attemptornumber) | |
Delete Scorm tracks for selected users. | |
scorm_delete_responses ($attemptids, $scorm) | |
Delete Scorm tracks for selected users. | |
scorm_delete_tracks ($scormid, $scoid=null, $userid=null, $attemptid=null) | |
Function to delete user tracks from tables. | |
scorm_element_cmp ($a, $b) | |
Build up the JavaScript representation of an array element. | |
scorm_eval_prerequisites ($prerequisites, $usertracks) | |
This is really a little language parser for AICC_SCRIPT evaluates the expression and returns a boolean answer see 2.3.2.5.1. | |
scorm_external_link ($link) | |
scorm_find_common_ancestor ($ancestors, $sco) | |
scorm_forge_cols_regexp ($columns, $remodule='(".*")?,') | |
Given a colums array return a string containing the regular expression to match the columns in a text row. | |
scorm_format_duration ($duration) | |
Converts SCORM duration notation to human-readable format The function works with both SCORM 1.2 and SCORM 2004 time formats. | |
scorm_format_interactions ($trackdata) | |
helper function to return a formatted list of interactions for reports. | |
scorm_format_toc_for_droplist ($scorm, $scoes, $usertracks, $currentorg='', $organizationsco=null, $children=false, $level=0, $tocmenus=array()) | |
scorm_format_toc_for_treeview ($user, $scorm, $scoes, $usertracks, $cmid, $toclink=TOCJSLINK, $currentorg='', $attempt='', $play=false, $organizationsco=null, $children=false) | |
scorm_get_adlnav_json ($scoes, &$adlnav=array(), $parentscoid=null) | |
scorm_get_aicc_columns ($row, $mastername='system_id') | |
Take the header row of an AICC definition file and returns sequence of columns and a pointer to the sco identifier column. | |
scorm_get_all_attempts ($scormid, $userid) | |
Returns the full list of attempts a user has made. | |
scorm_get_ancestors ($sco) | |
scorm_get_attempt ($userid, $scormid, $attempt, $create=true) | |
Get attempt record, allow one to be created if doesn't exist. | |
scorm_get_attempt_count ($userid, $scorm, $returnobjects=false, $ignoremissingcompletion=false) | |
Get SCORM attempt count. | |
scorm_get_attempt_status ($user, $scorm, $cm='') | |
Generate the user attempt status string. | |
scorm_get_attempts_array () | |
Returns an array of the array of attempt options. | |
scorm_get_attemptstatus_array () | |
Returns an array of the attempt status options. | |
scorm_get_availability_status ($scorm, $checkviewreportcap=false, $context=null, $userid=null) | |
Check if a SCORM is available for the current user. | |
scorm_get_available_children ($sco) | |
scorm_get_available_descendent ($descend, $sco) | |
scorm_get_children ($sco) | |
scorm_get_completion_state () | |
List of deprecated mod_scorm functions. | |
scorm_get_count_users ($scormid, $groupingid=null) | |
scorm_get_elementid ($elementname) | |
Get Scorm element id from cache, allow one to be created if doesn't exist. | |
scorm_get_first_attempt ($scormid, $userid) | |
Returns the first attempt used - if no attempts yet, returns 1 for first attempt. | |
scorm_get_forceattempt_array () | |
Returns an array of the force attempt options. | |
scorm_get_grade_method_array () | |
Returns an array of the array of what grade options. | |
scorm_get_hidetoc_array () | |
Returns an array of the array of hide table of contents options. | |
scorm_get_last_attempt ($scormid, $userid) | |
Returns the last attempt used - if no attempts yet, returns 1 for first attempt. | |
scorm_get_last_completed_attempt ($scormid, $userid) | |
Returns the last completed attempt used - if no completed attempts yet, returns 1 for first attempt. | |
scorm_get_manifest ($blocks, $scoes) | |
scorm_get_navigation_display_array () | |
Returns an array of the array of navigation buttons display options. | |
scorm_get_parent ($sco) | |
scorm_get_popup_display_array () | |
Returns an array of the array of popup display options. | |
scorm_get_popup_options_array () | |
Returns an array of the popup options for SCORM and each options default value. | |
scorm_get_preorder (&$preorder=array(), $sco=null) | |
scorm_get_resources ($blocks) | |
functions used by SCORM 1.2/2004 packages. | |
scorm_get_sco ($id, $what=SCO_ALL) | |
Returns an object containing all datas relative to the given sco ID. | |
scorm_get_sco_and_launch_url ($scorm, $scoid, $context) | |
Return a SCO object and the SCO launch URL. | |
scorm_get_sco_runtime ($scormid, $scoid, $userid, $attempt=1) | |
scorm_get_sco_value ($scoid, $userid, $element, $attempt=null) | |
Get specific scorm track data. | |
scorm_get_scoes ($id, $organisation=false) | |
Returns an object (array) containing all the scoes data related to the given sco ID. | |
scorm_get_siblings ($sco) | |
scorm_get_skip_view_array () | |
Returns an array of the array of skip view options. | |
scorm_get_toc ($user, $scorm, $cmid, $toclink=TOCJSLINK, $currentorg='', $scoid='', $mode='normal', $attempt='', $play=false, $tocheader=false) | |
scorm_get_toc_get_parent_child (&$result, $currentorg) | |
scorm_get_toc_object ($user, $scorm, $currentorg='', $scoid='', $mode='normal', $attempt='', $play=false, $organizationsco=null) | |
scorm_get_tracks ($scoid, $userid, $attempt='') | |
scorm_get_updatefreq_array () | |
Returns an array of the array of update frequency options. | |
scorm_get_what_grade_array () | |
Returns an array of the array of what grade options. | |
scorm_grade_user ($scorm, $userid) | |
scorm_grade_user_attempt ($scorm, $userid, $attempt=1) | |
scorm_has_tracks ($scormid, $userid) | |
simple quick function to return true/false if this user has tracks in this scorm | |
scorm_insert_track ($userid, $scormid, $scoid, $attemptornumber, $element, $value, $forcecompleted=false, $trackdata=null) | |
Insert SCORM track into db. | |
scorm_is_leaf ($sco) | |
scorm_isset ($userdata, $param, $ifempty='') | |
Check for a parameter in userdata and return it if it's set or return the value from $ifempty if its empty. | |
scorm_launch_sco ($scorm, $sco, $cm, $context, $scourl) | |
Trigger the scorm_launched event. | |
scorm_optionals_data ($item, $standarddata) | |
scorm_parse ($scorm, $full) | |
Extracts scrom package, sets up all variables. | |
scorm_parse_aicc (&$scorm) | |
Sets up AICC packages Called whenever package changes. | |
scorm_parse_scorm (&$scorm, $manifest) | |
Sets up SCORM 1.2/2004 packages using the manifest file. | |
scorm_print_launch ($user, $scorm, $action, $cm) | |
Displays the entry form and toc if required. | |
scorm_reconstitute_array_element ($sversion, $userdata, $elementname, $children) | |
Build up the JavaScript representation of an array element. | |
scorm_repeater ($what, $times) | |
scorm_report_list ($context) | |
scorm_require_available ($scorm, $checkviewreportcap=false, $context=null) | |
Requires a SCORM package to be available for the current user. | |
scorm_simple_play ($scorm, $user, $context, $cmid) | |
scorm_update_calendar (stdClass $scorm, $cmid) | |
Update the calendar entries for this scorm activity. | |
moodle_database | xmldb_scorm_upgrade ($oldversion) |
$DB | |
Variables | |
$capabilities | |
global | mod_scorm\privacy::$CFG |
$definitions | |
$plugin = 2023100400 | |
const | AVERAGEATTEMPT '1' |
$plugin | component = 'mod_scorm' |
const | FIRSTATTEMPT '2' |
const | GRADEAVERAGE '2' |
const | GRADEHIGHEST '1' |
const | GRADESCOES '0' |
const | GRADESUM '3' |
const | HIGHESTATTEMPT '0' |
const | LASTATTEMPT '3' |
const | SCO_ALL 0 |
const | SCO_DATA 1 |
const | SCO_ONLY 2 |
const | SCORM_FORCEATTEMPT_ALWAYS 2 |
const | SCORM_FORCEATTEMPT_NO 0 |
const | SCORM_FORCEATTEMPT_ONCOMPLETE 1 |
const | SCORM_SKIPVIEW_ALWAYS '2' |
const | SCORM_SKIPVIEW_FIRST '1' |
const | SCORM_SKIPVIEW_NEVER '0' |
const | SCORM_UPDATE_EVERYDAY '2' |
const | SCORM_UPDATE_EVERYTIME '3' |
const | SCORM_UPDATE_NEVER '0' |
Library of internal classes and functions for module SCORM. | |
const | TOCFULLURL 2 |
const | TOCJSLINK 1 |
$plugin | version = 2023100901 |
get_scorm_default | ( | & | $userdata, |
$scorm, | |||
$scoid, | |||
$attempt, | |||
$mode ) |
Sets up $userdata array and default values for AICC package.
stdClass | $userdata | an empty stdClass variable that should be set up with user values |
object | $scorm | package record |
string | $scoid | SCO Id |
string | $attempt | attempt number for the user |
string | $mode | scorm display mode type |
array | The default values that should be used for AICC package |
get_scorm_question_count | ( | $scormid | ) |
Returns The maximum numbers of Questions associated with an Scorm Pack.
int | Scorm ID |
int | an integer representing the question count |
scorm_add_time | ( | $a, | |
$b ) |
functions used by AICC packages.
scorm_aicc_confirm_hacp_session | ( | $hacpsession | ) |
Check the hacp_session for whether it is valid.
string | $hacpsession | The hacpsession value to check (optional). Normally leave this blank and this function will do required_param('sesskey', ...). |
mixed | - false if invalid, otherwise returns record from scorm_aicc_session table. |
scorm_aicc_generate_simple_sco | ( | $scorm | ) |
generate a simple single activity AICC object structure to wrap around and externally linked AICC package URL
object | $scorm | package record |
scorm_aicc_get_hacp_session | ( | $scormid | ) |
Given a scormid creates an AICC Session record to allow HACP.
int | $scormid | - id from scorm table |
string | hacpsession |
scorm_check_launchable_sco | ( | $scorm, | |
$scoid ) |
Check if the current sco is launchable If not, find the next launchable sco.
stdClass | $scorm | Scorm object |
integer | $scoid | id of scorm_scoes record. |
integer | scoid of correct sco to launch or empty if one cannot be found, which will trigger first sco. |
scorm_check_url | ( | $url | ) |
Check for the availability of a resource by URL.
Check is performed using an HTTP HEAD call.
$url | string A valid URL |
bool|string | True if no issue is found. The error string message, otherwise |
scorm_debugging | ( | $scorm | ) |
Figure out with this is a debug situation.
object | $scorm | a moodle scrom object - mdl_scorm |
boolean | - debugging true/false |
scorm_delete_attempt | ( | $userid, | |
$scorm, | |||
$attemptornumber ) |
Delete Scorm tracks for selected users.
int | $userid | ID of User |
stdClass | $scorm | Scorm object |
int | stdClass | $attemptornumber | user attempt that need to be deleted |
bool | true suceeded |
scorm_delete_responses | ( | $attemptids, | |
$scorm ) |
Delete Scorm tracks for selected users.
array | $attemptids | list of attempts that need to be deleted |
stdClass | $scorm | instance |
bool | true deleted all responses, false failed deleting an attempt - stopped here |
scorm_delete_tracks | ( | $scormid, | |
$scoid = null, | |||
$userid = null, | |||
$attemptid = null ) |
Function to delete user tracks from tables.
int | $scormid | - id from scorm. |
int | $scoid | - id of sco that needs to be deleted. |
int | $userid | - userid that needs to be deleted. |
int | $attemptid | - attemptid that should be deleted. |
scorm_element_cmp | ( | $a, | |
$b ) |
Build up the JavaScript representation of an array element.
string | $a | left array element |
string | $b | right array element |
comparator | - 0,1,-1 |
scorm_eval_prerequisites | ( | $prerequisites, | |
$usertracks ) |
This is really a little language parser for AICC_SCRIPT evaluates the expression and returns a boolean answer see 2.3.2.5.1.
Sequencing/Navigation Today - from the SCORM 1.2 spec (CAM). Also used by AICC packages.
string | $prerequisites | the aicc_script prerequisites expression |
array | $usertracks | the tracked user data of each SCO visited |
boolean |
scorm_forge_cols_regexp | ( | $columns, | |
$remodule = '(".*")?, | |||
' | ) |
Given a colums array return a string containing the regular expression to match the columns in a text row.
array | $column | The header columns |
string | $remodule | The regular expression module for a single column |
string |
scorm_format_duration | ( | $duration | ) |
Converts SCORM duration notation to human-readable format The function works with both SCORM 1.2 and SCORM 2004 time formats.
$duration | string SCORM duration |
string | human-readable date/time |
scorm_format_interactions | ( | $trackdata | ) |
helper function to return a formatted list of interactions for reports.
array | $trackdata | the user tracking records from the database |
object | formatted list of interactions |
scorm_get_aicc_columns | ( | $row, | |
$mastername = 'system_id' ) |
Take the header row of an AICC definition file and returns sequence of columns and a pointer to the sco identifier column.
string | $row | AICC header row |
string | $mastername | AICC sco identifier column |
mixed |
scorm_get_all_attempts | ( | $scormid, | |
$userid ) |
Returns the full list of attempts a user has made.
int | $scormid | the id of the scorm. |
int | $userid | the id of the user. |
array | array of attemptids |
scorm_get_attempt | ( | $userid, | |
$scormid, | |||
$attempt, | |||
$create = true ) |
Get attempt record, allow one to be created if doesn't exist.
int | $userid | - user id. |
int | $scormid | - SCORM id. |
int | $attempt | - attempt number. |
boolean | $create | - should an attempt record be created if it does not exist. |
stdclass |
scorm_get_attempt_count | ( | $userid, | |
$scorm, | |||
$returnobjects = false, | |||
$ignoremissingcompletion = false ) |
Get SCORM attempt count.
object | $user | Current context user |
object | $scorm | a moodle scrom object - mdl_scorm |
bool | $returnobjects | if true returns a object with attempts, if false returns count of attempts. |
bool | $ignoremissingcompletion | - ignores attempts that haven't reported a grade/completion. |
int | - no. of attempts so far |
scorm_get_attempt_status | ( | $user, | |
$scorm, | |||
$cm = '' ) |
Generate the user attempt status string.
object | $user | Current context user |
object | $scorm | a moodle scrom object - mdl_scorm |
string | - Attempt status string |
scorm_get_attempts_array | ( | ) |
Returns an array of the array of attempt options.
array | an array of attempt options |
scorm_get_attemptstatus_array | ( | ) |
Returns an array of the attempt status options.
array | an array of attempt status options |
scorm_get_availability_status | ( | $scorm, | |
$checkviewreportcap = false, | |||
$context = null, | |||
$userid = null ) |
Check if a SCORM is available for the current user.
stdClass | $scorm | SCORM record |
boolean | $checkviewreportcap | Check the scorm:viewreport cap |
stdClass | $context | Module context, required if $checkviewreportcap is set to true |
int | $userid | User id override |
array | status (available or not and possible warnings) |
scorm_get_completion_state | ( | ) |
List of deprecated mod_scorm functions.
scorm_get_elementid | ( | $elementname | ) |
Get Scorm element id from cache, allow one to be created if doesn't exist.
string | $elementname | - name of element that is being requested. |
int | - element id. |
scorm_get_first_attempt | ( | $scormid, | |
$userid ) |
Returns the first attempt used - if no attempts yet, returns 1 for first attempt.
int | $scormid | the id of the scorm. |
int | $userid | the id of the user. |
int | The first attempt number. |
scorm_get_forceattempt_array | ( | ) |
Returns an array of the force attempt options.
array | an array of attempt options |
scorm_get_grade_method_array | ( | ) |
Returns an array of the array of what grade options.
array | an array of what grade options |
scorm_get_hidetoc_array | ( | ) |
Returns an array of the array of hide table of contents options.
array | an array of hide table of contents options |
scorm_get_last_attempt | ( | $scormid, | |
$userid ) |
Returns the last attempt used - if no attempts yet, returns 1 for first attempt.
int | $scormid | the id of the scorm. |
int | $userid | the id of the user. |
int | The attempt number to use. |
scorm_get_last_completed_attempt | ( | $scormid, | |
$userid ) |
Returns the last completed attempt used - if no completed attempts yet, returns 1 for first attempt.
int | $scormid | the id of the scorm. |
int | $userid | the id of the user. |
int | The attempt number to use. |
scorm_get_navigation_display_array | ( | ) |
Returns an array of the array of navigation buttons display options.
array | an array of navigation buttons display options |
scorm_get_popup_display_array | ( | ) |
Returns an array of the array of popup display options.
array | an array of popup display options |
scorm_get_popup_options_array | ( | ) |
Returns an array of the popup options for SCORM and each options default value.
array | an array of popup options as the key and their defaults as the value |
scorm_get_resources | ( | $blocks | ) |
functions used by SCORM 1.2/2004 packages.
scorm_get_sco | ( | $id, | |
$what = SCO_ALL ) |
Returns an object containing all datas relative to the given sco ID.
integer | $id | The sco ID |
mixed | (false if sco id does not exists) |
scorm_get_sco_and_launch_url | ( | $scorm, | |
$scoid, | |||
$context ) |
Return a SCO object and the SCO launch URL.
stdClass | $scorm | SCORM object |
int | $scoid | The SCO id in database |
stdClass | $context | context object |
array | the SCO object and URL |
scorm_get_sco_value | ( | $scoid, | |
$userid, | |||
$element, | |||
$attempt = null ) |
Get specific scorm track data.
Note: the $attempt var is optional as SCORM 2004 code doesn't always use it, probably a bug, but we do not want to change SCORM 2004 behaviour right now.
int | $scoid | - scoid. |
int | $userid | - user id of user. |
string | $element | - name of element being requested. |
int | $attempt | - attempt number (not id) |
mixed |
scorm_get_scoes | ( | $id, | |
$organisation = false ) |
Returns an object (array) containing all the scoes data related to the given sco ID.
integer | $id | The sco ID |
integer | $organisation | an organisation ID - defaults to false if not required |
mixed | (false if there are no scoes or an array) |
scorm_get_skip_view_array | ( | ) |
Returns an array of the array of skip view options.
array | an array of skip view options |
scorm_get_updatefreq_array | ( | ) |
Returns an array of the array of update frequency options.
array | an array of update frequency options |
scorm_get_what_grade_array | ( | ) |
Returns an array of the array of what grade options.
array | an array of what grade options |
scorm_has_tracks | ( | $scormid, | |
$userid ) |
simple quick function to return true/false if this user has tracks in this scorm
integer | $scormid | The scorm ID |
integer | $userid | the users id |
boolean | (false if there are no tracks) |
scorm_insert_track | ( | $userid, | |
$scormid, | |||
$scoid, | |||
$attemptornumber, | |||
$element, | |||
$value, | |||
$forcecompleted = false, | |||
$trackdata = null ) |
Insert SCORM track into db.
int | $userid | The userid |
int | $scormid | The id from scorm table |
int | $scoid | The scoid |
int | stdClass | $attemptornumber | - number of attempt or attempt record from scorm_attempt table. |
string | $element | The element being saved |
string | $value | The value of the element |
boolean | $forcecompleted | Force this sco as completed |
stdclass | $trackdata | - existing tracking data |
int | - the id of the record being saved. |
scorm_isset | ( | $userdata, | |
$param, | |||
$ifempty = '' ) |
Check for a parameter in userdata and return it if it's set or return the value from $ifempty if its empty.
stdClass | $userdata | Contains user's data |
string | $param | parameter that should be checked |
string | $ifempty | value to be replaced with if $param is not set |
string | value from $userdata->$param if its not empty, or $ifempty |
scorm_launch_sco | ( | $scorm, | |
$sco, | |||
$cm, | |||
$context, | |||
$scourl ) |
Trigger the scorm_launched event.
stdClass | $scorm | scorm object |
stdClass | $sco | sco object |
stdClass | $cm | course module object |
stdClass | $context | context object |
string | $scourl | SCO URL |
scorm_parse | ( | $scorm, | |
$full ) |
Extracts scrom package, sets up all variables.
Called whenever scorm changes
object | $scorm | instance - fields are updated and changes saved into database |
bool | $full | force full update if true |
void |
scorm_parse_aicc | ( | & | $scorm | ) |
Sets up AICC packages Called whenever package changes.
object | $scorm | instance - fields are updated and changes saved into database |
bool |
scorm_parse_scorm | ( | & | $scorm, |
$manifest ) |
Sets up SCORM 1.2/2004 packages using the manifest file.
Called whenever SCORM changes
object | $scorm | instance - fields are updated and changes saved into database |
stored_file | string | $manifest | - path to manifest file or stored_file. |
bool |
scorm_print_launch | ( | $user, | |
$scorm, | |||
$action, | |||
$cm ) |
Displays the entry form and toc if required.
stdClass | $user | user object |
stdClass | $scorm | scorm object |
string | $action | base URL for the organizations select box |
stdClass | $cm | course module object |
scorm_reconstitute_array_element | ( | $sversion, | |
$userdata, | |||
$elementname, | |||
$children ) |
Build up the JavaScript representation of an array element.
string | $sversion | SCORM API version |
array | $userdata | User track data |
string | $elementname | Name of array element to get values for |
array | $children | list of sub elements of this array element that also need instantiating |
Javascript | array elements |
scorm_require_available | ( | $scorm, | |
$checkviewreportcap = false, | |||
$context = null ) |
Requires a SCORM package to be available for the current user.
stdClass | $scorm | SCORM record |
boolean | $checkviewreportcap | Check the scorm:viewreport cap |
stdClass | $context | Module context, required if $checkviewreportcap is set to true |
moodle_exception |
scorm_update_calendar | ( | stdClass | $scorm, |
$cmid ) |
Update the calendar entries for this scorm activity.
stdClass | $scorm | the row from the database table scorm. |
int | $cmid | The coursemodule id |
bool |
moodle_database xmldb_scorm_upgrade | ( | $oldversion | ) |
$DB
int | $oldversion |
bool |
$definitions |
const SCORM_UPDATE_NEVER '0' |
Library of internal classes and functions for module SCORM.