Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]

Lib functions, mostly callbacks.

Copyright: 2017 Juan Leyva
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 266 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 7 functions


Functions that are not part of a class:

tool_mobile_before_standard_html_head()   X-Ref
Callback to add head elements.

return: str valid html head content

tool_mobile_create_app_download_url()   X-Ref
Generate the app download url to promote moodle mobile.

return: moodle_url|void App download moodle_url object or return if setuplink is not set.

tool_mobile_get_token($userid)   X-Ref
Return the user mobile app WebService access token.

param: int $userid the user to return the token from
return: stdClass|false the token or false if the token doesn't exists

tool_mobile_user_has_token($userid)   X-Ref
Checks if the given user has a mobile token (has used recently the app).

param: int $userid the user to check
return: bool true if the user has a token, false otherwise.

tool_mobile_myprofile_navigation(\core_user\output\myprofile\tree $tree, $user, $iscurrentuser)   X-Ref
User profile page callback.

Used add a section about the moodle mobile app.

param: \core_user\output\myprofile\tree $tree My profile tree where the setting will be added.
param: stdClass $user The user object.
param: bool $iscurrentuser Is this the current user viewing
return: void Return if the mobile web services setting is disabled or if not the current user.

tool_mobile_standard_footer_html()   X-Ref
Callback to add footer elements.

return: str valid html footer content

tool_mobile_pre_processor_message_send($procname, $data)   X-Ref
Callback to be able to change a message/notification data per processor.

param: str $procname    processor name
param: stdClass $data   message or notification data