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

Go to the source code of this file.

Namespaces

namespace  mod
 

Local Library of functions for module scorm.


Functions

 lti_supports ($feature)
 lti_add_instance ($lti, $mform)
 lti_update_instance ($lti, $mform)
 lti_delete_instance ($id)
 lti_get_coursemodule_info ($coursemodule)
 lti_user_outline ($course, $user, $mod, $basiclti)
 lti_user_complete ($course, $user, $mod, $basiclti)
 lti_print_recent_activity ($course, $isteacher, $timestart)
 lti_cron ()
 lti_grades ($basicltiid)
 lti_get_participants ($basicltiid)
 lti_scale_used ($basicltiid, $scaleid)
 lti_scale_used_anywhere ($scaleid)
 lti_install ()
 lti_uninstall ()
 lti_get_lti_types ()
 lti_grade_item_update ($basiclti, $grades=null)
 lti_grade_item_delete ($basiclti)
 lti_extend_settings_navigation ($settings, $parentnode)

Function Documentation

lti_add_instance ( lti,
mform 
)

Given an object containing all the necessary data, (defined by the form in mod.html) this function will create a new instance and return the id number of the new instance.

Parameters:
object$instanceAn object from the form in mod.html
Returns:
int The id of the newly inserted basiclti record

Definition at line 82 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

lti_cron ( )

Function to be run periodically according to the moodle cron This function searches for things that need to be done, such as sending out mail, toggling flags etc ...

$CFG

Returns:
boolean

Definition at line 250 of file lib.php.

Given an ID of an instance of this module, this function will permanently delete the instance and any data that depends on it.

Parameters:
int$idId of the module instance
Returns:
boolean Success/Failure

Definition at line 151 of file lib.php.

Here is the call graph for this function:

lti_extend_settings_navigation ( settings,
parentnode 
)

Definition at line 408 of file lib.php.

Here is the call graph for this function:

lti_get_coursemodule_info ( coursemodule)

Given a coursemodule object, this function returns the extra information needed to print this activity in various places. For this module we just need to support external urls as activity icons

Parameters:
cm_info$coursemodule
Returns:
cached_cm_info info

Definition at line 175 of file lib.php.

Here is the call graph for this function:

Returns available Basic LTI types

Returns:
array of basicLTI types

Definition at line 355 of file lib.php.

lti_get_participants ( basicltiid)

Must return an array of user records (all data) who are participants for a given instance of basiclti. Must include every user involved in the instance, independient of his role (student, teacher, admin...) See other modules as example.

Parameters:
int$basicltiidID of an instance of this module
Returns:
mixed boolean/array of students

: implement this moodle function

Definition at line 284 of file lib.php.

lti_grade_item_delete ( basiclti)

Delete grade item for given basiclti

Parameters:
object$basicltiobject
Returns:
object basiclti

Definition at line 401 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

lti_grade_item_update ( basiclti,
grades = null 
)

Create grade item for given basiclti

Parameters:
object$basicltiobject with extra cmidnumber
mixedoptional array/object of grade(s); 'reset' means reset grades in gradebook
Returns:
int 0 if ok, error code otherwise

Definition at line 368 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

lti_grades ( basicltiid)

Must return an array of grades for a given instance of this module, indexed by user. It also returns a maximum allowed grade.

Example: $return->grades = array of grades; $return->maxgrade = maximum allowed grade;

return $return;

Parameters:
int$basicltiidID of an instance of this module
Returns:
mixed Null or object with an array of grades and with the maximum grade

: implement this moodle function (if needed)

Definition at line 269 of file lib.php.

Execute post-install custom actions for the module This function was added in 1.9

Returns:
boolean true if success, false on error

Definition at line 336 of file lib.php.

lti_print_recent_activity ( course,
isteacher,
timestart 
)

Given a course and a time, this module should find recent activity that has occurred in basiclti activities and print it out. Return true if there was output, or false is there was none.

$CFG

Returns:
boolean : implement this moodle function

Definition at line 238 of file lib.php.

lti_scale_used ( basicltiid,
scaleid 
)

This function returns if a scale is being used by one basiclti it it has support for grading and scales. Commented code should be modified if necessary. See forum, glossary or journal modules as reference.

Parameters:
int$basicltiidID of an instance of this module
Returns:
mixed

: implement this moodle function (if needed)

Definition at line 299 of file lib.php.

lti_scale_used_anywhere ( scaleid)

Checks if scale is being used by any instance of basiclti. This function was added in 1.9

This is used to find out if scale used anywhere

Parameters:
$scaleidint
Returns:
boolean True if the scale is used by any basiclti

Definition at line 320 of file lib.php.

lti_supports ( feature)

List of features supported in URL module

Parameters:
string$featureFEATURE_xx constant for requested feature
Returns:
mixed True if module supports feature, false if not, null if doesn't know

Definition at line 57 of file lib.php.

Execute post-uninstall custom actions for the module This function was added in 1.9

Returns:
boolean true if success, false on error

Definition at line 346 of file lib.php.

lti_update_instance ( lti,
mform 
)

Given an object containing all the necessary data, (defined by the form in mod.html) this function will update an existing instance with new data.

Parameters:
object$instanceAn object from the form in mod.html
Returns:
boolean Success/Fail

Definition at line 115 of file lib.php.

Here is the call graph for this function:

lti_user_complete ( course,
user,
mod,
basiclti 
)

Print a detailed representation of what a user has done with a given particular instance of this module, for user activity reports.

Returns:
boolean : implement this moodle function (if needed)

Definition at line 225 of file lib.php.

lti_user_outline ( course,
user,
mod,
basiclti 
)

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. $return->time = the time they did it $return->info = a short text description

Returns:
null : implement this moodle function (if needed)

Definition at line 214 of file lib.php.

 All Data Structures Namespaces Files Functions Variables Enumerations