Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

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

Lib functions, mostly callbacks.

Copyright: 2017 Juan Leyva
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 267 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.

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

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

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

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.

return: void Return if the mobile web services setting is disabled or if not the current user.
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

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