Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/scorm/locallib.php File Reference

Go to the source code of this file.

Data Structures

class  scorm_package_file_info

Namespaces

namespace  mod
 

Local Library of functions for module scorm.


Enumerations

enum  SCORM_UPDATE_NEVER
 Constants and settings for module scorm. More...
enum  SCORM_UPDATE_EVERYDAY
enum  SCORM_UPDATE_EVERYTIME
enum  SCO_ALL
enum  SCO_DATA
enum  SCO_ONLY
enum  GRADESCOES
enum  GRADEHIGHEST
enum  GRADEAVERAGE
enum  GRADESUM
enum  HIGHESTATTEMPT
enum  AVERAGEATTEMPT
enum  FIRSTATTEMPT
enum  LASTATTEMPT
enum  TOCJSLINK
enum  TOCFULLURL

Functions

 scorm_get_popup_options_array ()
 scorm_get_grade_method_array ()
 scorm_get_what_grade_array ()
 scorm_get_skip_view_array ()
 scorm_get_hidetoc_array ()
 scorm_get_updatefreq_array ()
 scorm_get_popup_display_array ()
 scorm_get_attempts_array ()
 scorm_parse ($scorm, $full)
 scorm_array_search ($item, $needle, $haystacks, $strict=false)
 scorm_repeater ($what, $times)
 scorm_external_link ($link)
 scorm_get_sco ($id, $what=SCO_ALL)
 scorm_get_scoes ($id, $organisation=false)
 scorm_insert_track ($userid, $scormid, $scoid, $attempt, $element, $value, $forcecompleted=false)
 scorm_get_tracks ($scoid, $userid, $attempt='')
 scorm_get_sco_runtime ($scormid, $scoid, $userid, $attempt=1)
 scorm_get_user_data ($userid)
 scorm_grade_user_attempt ($scorm, $userid, $attempt=1)
 scorm_grade_user ($scorm, $userid)
 scorm_count_launchable ($scormid, $organization='')
 scorm_get_last_attempt ($scormid, $userid)
 scorm_get_last_completed_attempt ($scormid, $userid)
 scorm_course_format_display ($user, $course)
 scorm_view_display ($user, $scorm, $action, $cm)
 scorm_simple_play ($scorm, $user, $context, $cmid)
 scorm_get_count_users ($scormid, $groupingid=null)
 scorm_reconstitute_array_element ($sversion, $userdata, $element_name, $children)
 scorm_element_cmp ($a, $b)
 scorm_get_attempt_status ($user, $scorm, $cm='')
 scorm_get_attempt_count ($userid, $scorm, $attempts_only=false)
 scorm_debugging ($scorm)
 scorm_delete_responses ($attemptids, $scorm)
 scorm_delete_attempt ($userid, $scorm, $attemptid)
 scorm_format_duration ($duration)
 scorm_get_toc ($user, $scorm, $cmid, $toclink=TOCJSLINK, $currentorg='', $scoid='', $mode='normal', $attempt='', $play=false, $tocheader=false)

Enumeration Type Documentation

Definition at line 35 of file locallib.php.

Definition at line 36 of file locallib.php.

Definition at line 31 of file locallib.php.

Definition at line 30 of file locallib.php.

enum GRADESCOES

Definition at line 29 of file locallib.php.

enum GRADESUM

Definition at line 32 of file locallib.php.

Definition at line 34 of file locallib.php.

Definition at line 37 of file locallib.php.

enum SCO_ALL

Definition at line 25 of file locallib.php.

enum SCO_DATA

Definition at line 26 of file locallib.php.

enum SCO_ONLY

Definition at line 27 of file locallib.php.

Definition at line 22 of file locallib.php.

Definition at line 23 of file locallib.php.

Constants and settings for module scorm.

Definition at line 21 of file locallib.php.

enum TOCFULLURL

Definition at line 40 of file locallib.php.

enum TOCJSLINK

Definition at line 39 of file locallib.php.


Function Documentation

scorm_array_search ( item,
needle,
haystacks,
strict = false 
)

Definition at line 286 of file locallib.php.

Here is the caller graph for this function:

scorm_count_launchable ( scormid,
organization = '' 
)

Definition at line 631 of file locallib.php.

Here is the caller graph for this function:

scorm_course_format_display ( user,
course 
)

Definition at line 673 of file locallib.php.

Here is the call graph for this function:

scorm_debugging ( scorm)

Figure out with this is a debug situation

Parameters:
object$scorma moodle scrom object - mdl_scorm
Returns:
boolean - debugging true/false

Definition at line 1157 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

scorm_delete_attempt ( userid,
scorm,
attemptid 
)

Delete Scorm tracks for selected users

Parameters:
int$useridID of User
int$scormidID of Scorm
int$attemptiduser attempt that need to be deleted

return bool true suceeded

Definition at line 1218 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

scorm_delete_responses ( attemptids,
scorm 
)

Delete Scorm tracks for selected users

Parameters:
array$attemptidslist of attempts that need to be deleted
int$scorminstance

return bool true deleted all responses, false failed deleting an attempt - stopped here

Definition at line 1183 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

scorm_element_cmp ( a,
b 
)

Build up the JavaScript representation of an array element

Parameters:
string$aleft array element
string$bright array element
Returns:
comparator - 0,1,-1

Definition at line 990 of file locallib.php.

scorm_external_link ( link)

Definition at line 314 of file locallib.php.

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

Parameters:
$durationstring SCORM duration
Returns:
string human-readable date/time

Definition at line 1233 of file locallib.php.

Here is the caller graph for this function:

scorm_get_attempt_count ( userid,
scorm,
attempts_only = false 
)

Get SCORM attempt count

Parameters:
object$userCurrent context user
object$scorma moodle scrom object - mdl_scorm
bool$attemptsreturn the list of attempts
Returns:
int - no. of attempts so far

Definition at line 1131 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

scorm_get_attempt_status ( user,
scorm,
cm = '' 
)

Generate the user attempt status string

Parameters:
object$userCurrent context user
object$scorma moodle scrom object - mdl_scorm
Returns:
string - Attempt status string

Definition at line 1032 of file locallib.php.

Here is the call graph for this function:

Returns an array of the array of attempt options

Returns:
array an array of attempt options

Definition at line 155 of file locallib.php.

Here is the caller graph for this function:

scorm_get_count_users ( scormid,
groupingid = null 
)

Definition at line 861 of file locallib.php.

Returns an array of the array of what grade options

Returns:
array an array of what grade options

Definition at line 87 of file locallib.php.

Here is the caller graph for this function:

Returns an array of the array of hide table of contents options

Returns:
array an array of hide table of contents options

Definition at line 122 of file locallib.php.

Here is the caller graph for this function:

scorm_get_last_attempt ( scormid,
userid 
)

Find the last attempt number for the given user id and scorm id

Definition at line 643 of file locallib.php.

Here is the caller graph for this function:

scorm_get_last_completed_attempt ( scormid,
userid 
)

Find the last attempt number for the given user id and scorm id

Definition at line 658 of file locallib.php.

Here is the caller graph for this function:

Returns an array of the array of popup display options

Returns:
array an array of popup display options

Definition at line 145 of file locallib.php.

Here is the caller graph for this function:

Returns an array of the popup options for SCORM and each options default value

Returns:
array an array of popup options as the key and their defaults as the value

Definition at line 69 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

scorm_get_sco ( id,
what = SCO_ALL 
)

Returns an object containing all datas relative to the given sco ID

Parameters:
integer$idThe sco ID
Returns:
mixed (false if sco id does not exists)

Definition at line 334 of file locallib.php.

Here is the caller graph for this function:

scorm_get_sco_runtime ( scormid,
scoid,
userid,
attempt = 1 
)

Definition at line 502 of file locallib.php.

Here is the caller graph for this function:

scorm_get_scoes ( id,
organisation = false 
)

Returns an object (array) containing all the scoes data related to the given sco ID

Parameters:
integer$idThe sco ID
integer$organisationan organisation ID - defaults to false if not required
Returns:
mixed (false if there are no scoes or an array)

Definition at line 359 of file locallib.php.

Here is the caller graph for this function:

Returns an array of the array of skip view options

Returns:
array an array of skip view options

Definition at line 111 of file locallib.php.

Here is the caller graph for this function:

scorm_get_toc ( user,
scorm,
cmid,
toclink = TOCJSLINK,
currentorg = '',
scoid = '',
mode = 'normal',
attempt = '',
play = false,
tocheader = false 
)

Definition at line 1265 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

scorm_get_tracks ( scoid,
userid,
attempt = '' 
)

Gets all tracks of specified sco and user

Definition at line 433 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Returns an array of the array of update frequency options

Returns:
array an array of update frequency options

Definition at line 134 of file locallib.php.

Here is the caller graph for this function:

scorm_get_user_data ( userid)

Gets user info required to display the table of scorm results for report.php

Definition at line 526 of file locallib.php.

Here is the call graph for this function:

Returns an array of the array of what grade options

Returns:
array an array of what grade options

Definition at line 99 of file locallib.php.

Here is the caller graph for this function:

scorm_grade_user ( scorm,
userid 
)

Definition at line 588 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

scorm_grade_user_attempt ( scorm,
userid,
attempt = 1 
)

Definition at line 534 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

scorm_insert_track ( userid,
scormid,
scoid,
attempt,
element,
value,
forcecompleted = false 
)

Definition at line 383 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

scorm_parse ( scorm,
full 
)

Extracts scrom package, sets up all variables. Called whenever scorm changes

Parameters:
object$scorminstance - fields are updated and changes saved into database
bool$fullforce full update if true
Returns:
void

Definition at line 172 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

scorm_reconstitute_array_element ( sversion,
userdata,
element_name,
children 
)

Build up the JavaScript representation of an array element

Parameters:
string$sversionSCORM API version
array$userdataUser track data
string$element_nameName of array element to get values for
array$childrenlist of sub elements of this array element that also need instantiating
Returns:
None

Definition at line 892 of file locallib.php.

Here is the call graph for this function:

scorm_repeater ( what,
times 
)

Definition at line 303 of file locallib.php.

Here is the caller graph for this function:

scorm_simple_play ( scorm,
user,
context,
cmid 
)

Definition at line 819 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

scorm_view_display ( user,
scorm,
action,
cm 
)

Definition at line 727 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

 All Data Structures Namespaces Files Functions Variables Enumerations