Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
|
Functions | |
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. | |
lti_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. | |
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 ... | |
lti_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. | |
lti_get_course_content_items (\core_course\local\entity\content_item $defaultmodulecontentitem, stdClass $user, stdClass $course) | |
Return the preconfigured tools which are configured for inclusion in the activity picker. | |
lti_get_coursemodule_info ($coursemodule) | |
Given a coursemodule object, this function returns the extra information needed to print this activity in various places. | |
lti_get_lti_types () | |
Returns available Basic LTI types. | |
lti_get_lti_types_from_proxy_id ($toolproxyid) | |
Returns available Basic LTI types that match the given tool proxy id. | |
lti_get_post_actions () | |
Log post actions. | |
lti_get_view_actions () | |
Log view actions. | |
lti_grade_item_delete ($basiclti) | |
Delete grade item for given basiclti. | |
lti_grade_item_update ($basiclti, $grades=null) | |
Create grade item for given basiclti. | |
lti_grades ($basicltiid) | |
Must return an array of grades for a given instance of this module, indexed by user. | |
lti_install () | |
Execute post-install custom actions for the module This function was added in 1.9. | |
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. | |
lti_scale_used () | |
lti_scale_used_anywhere ($scaleid) | |
Checks if scale is being used by any instance of basiclti. | |
lti_supports ($feature) | |
List of features supported in URL module. | |
lti_uninstall () | |
Execute post-uninstall custom actions for the module This function was added in 1.9. | |
lti_update_grades ($basiclti, $userid=0, $nullifnone=true) | |
Update activity grades. | |
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. | |
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. | |
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. | |
lti_view ($lti, $course, $cm, $context) | |
Mark the activity completed (if required) and trigger the course_module_viewed event. | |
mod_lti_core_calendar_provide_event_action (calendar_event $event, core_calendar\action_factory $factory, int $userid=0) | |
This function receives a calendar event and returns the action associated with it, or null if there is none. | |
mod_lti_extend_navigation_course ($navigation, $course, $context) | |
Extend the course navigation with an "LTI External tools" link which redirects to a list of all tools available for course use. | |
mod_lti_get_all_content_items (\core_course\local\entity\content_item $defaultmodulecontentitem) | |
Return all content items which can be added to any course. | |
mod_lti_get_fontawesome_icon_map () | |
Get icon mapping for font-awesome. | |
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.
object | $instance | An object from the form in mod.html |
int | The id of the newly inserted basiclti record |
lti_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.
cm_info | $cm | course module data |
int | $from | the time to check updates from |
array | $filter | if we need to check only specific updates |
stdClass | an object with the different type of areas indicating if they were updated or not |
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 ...
@uses $CFG
boolean |
lti_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.
int | $id | Id of the module instance |
boolean | Success/Failure |
lti_get_course_content_items | ( | \core_course\local\entity\content_item | $defaultmodulecontentitem, |
stdClass | $user, | ||
stdClass | $course ) |
Return the preconfigured tools which are configured for inclusion in the activity picker.
core_course\local\entity\content_item | $defaultmodulecontentitem | reference to the content item for the LTI module. |
stdClass | $user | the user object, to use for cap checks if desired. |
stdClass | $course | the course to scope items to. |
array | the array of content items. |
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
stdClass | $coursemodule |
cached_cm_info | info |
lti_get_lti_types | ( | ) |
Returns available Basic LTI types.
array | of basicLTI types |
lti_get_lti_types_from_proxy_id | ( | $toolproxyid | ) |
Returns available Basic LTI types that match the given tool proxy id.
int | $toolproxyid | Tool proxy id |
array | of basicLTI types |
lti_get_post_actions | ( | ) |
Log post actions.
array |
lti_get_view_actions | ( | ) |
Log view actions.
array |
lti_grade_item_delete | ( | $basiclti | ) |
Delete grade item for given basiclti.
object | $basiclti | object |
object | basiclti |
lti_grade_item_update | ( | $basiclti, | |
$grades = null ) |
Create grade item for given basiclti.
object | $basiclti | object with extra cmidnumber |
mixed | optional array/object of grade(s); 'reset' means reset grades in gradebook |
int | 0 if ok, error code otherwise |
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;
int | $basicltiid | ID of an instance of this module |
mixed | Null or object with an array of grades and with the maximum grade |
@TODO: implement this moodle function (if needed)
lti_install | ( | ) |
Execute post-install custom actions for the module This function was added in 1.9.
boolean | true if success, false on error |
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.
@uses $CFG
boolean | @TODO: implement this moodle function |
lti_scale_used | ( | ) |
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
$scaleid | int |
boolean | True if the scale is used by any basiclti |
lti_supports | ( | $feature | ) |
List of features supported in URL module.
string | $feature | FEATURE_xx constant for requested feature |
mixed | True if module supports feature, false if not, null if doesn't know or string for the module purpose. |
lti_uninstall | ( | ) |
Execute post-uninstall custom actions for the module This function was added in 1.9.
boolean | true if success, false on error |
lti_update_grades | ( | $basiclti, | |
$userid = 0, | |||
$nullifnone = true ) |
Update activity grades.
stdClass | $basiclti | The LTI instance |
int | $userid | Specific user only, 0 means all. |
bool | $nullifnone | Not used |
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.
object | $instance | An object from the form in mod.html |
boolean | Success/Fail |
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.
boolean | @TODO: implement this moodle function (if needed) |
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
null | @TODO: implement this moodle function (if needed) |
lti_view | ( | $lti, | |
$course, | |||
$cm, | |||
$context ) |
Mark the activity completed (if required) and trigger the course_module_viewed event.
stdClass | $lti | lti object |
stdClass | $course | course object |
stdClass | $cm | course module object |
stdClass | $context | context object |
mod_lti_core_calendar_provide_event_action | ( | calendar_event | $event, |
core_calendar\action_factory | $factory, | ||
int | $userid = 0 ) |
This function receives a calendar event and returns the action associated with it, or null if there is none.
This is used by block_myoverview in order to display the event appropriately. If null is returned then the event is not displayed on the block.
calendar_event | $event | |
core_calendar\action_factory | $factory | |
int | $userid | User id to use for all capability checks, etc. Set to 0 for current user (default). |
core_calendar\local\event\entities\action_interface|null |
mod_lti_extend_navigation_course | ( | $navigation, | |
$course, | |||
$context ) |
Extend the course navigation with an "LTI External tools" link which redirects to a list of all tools available for course use.
settings_navigation | $navigation | The settings navigation object |
stdClass | $course | The course |
stdclass | $context | Course context |
void |
mod_lti_get_all_content_items | ( | \core_course\local\entity\content_item | $defaultmodulecontentitem | ) |
Return all content items which can be added to any course.
core_course\local\entity\content_item | $defaultmodulecontentitem |
array | the array of content items. |