Moodle APIs 4.2
Moodle 4.2.7 (Build: 20240422)
Files | Namespaces | Classes | Functions | Variables
tool_mobile

Files

file  api.php
 Class for Moodle Mobile tools.
 
file  caches.php
 Mobile cache definitions.
 
file  event_handler.php
 Event handler for tool_mobile.
 
file  events.php
 tool_mobile plugin event handler definition.
 
file  external.php
 This is the external API for this tool.
 
file  lib.php
 Lib functions, mostly callbacks.
 
file  provider.php
 Privacy Subsystem implementation for tool_mobile.
 
file  renderer.php
 Renderer.
 
file  services.php
 Moodle Mobile tools webservice definitions.
 
file  settings.php
 Settings.
 
file  subscription.php
 Subscription page.
 
file  upgrade.php
 Mobile app support.
 
file  version.php
 Plugin version info.
 

Namespaces

namespace  tool_mobile
  
 
namespace  tool_mobile\output
  
 
namespace  tool_mobile\privacy
  
 

Classes

class  tool_mobile\api
 API exposed by tool_mobile, to be used mostly by external functions and the plugin settings. More...
 
class  tool_mobile\event_handler
 
class  tool_mobile\external
 This is the external API for this tool. More...
 
class  tool_mobile\output\renderer
 Renderer class. More...
 
class  tool_mobile\output\subscription
 Subscription page. More...
 
class  tool_mobile\privacy\provider
 Privacy provider for tool_mobile. More...
 

Functions

 tool_mobile_before_http_headers ()
 Callback to add headers before the HTTP headers are sent.
 
 tool_mobile_before_standard_html_head ()
 Callback to add head elements.
 
 tool_mobile_create_app_download_url ()
 Generate the app download url to promote moodle mobile.
 
 tool_mobile_get_token ($userid)
 Return the user mobile app WebService access token.
 
 tool_mobile_myprofile_navigation (\core_user\output\myprofile\tree $tree, $user, $iscurrentuser)
 User profile page callback.
 
 tool_mobile_pre_processor_message_send ($procname, $data)
 Callback to be able to change a message/notification data per processor.
 
 tool_mobile_standard_footer_html ()
 Callback to add footer elements.
 
 tool_mobile_user_has_token ($userid)
 Checks if the given user has a mobile token (has used recently the app).
 
 xmldb_tool_mobile_upgrade ($oldversion)
 Upgrade the plugin.
 

Variables

 $definitions
 
 $functions
 
 $observers
 
 $plugin = 2023041800
 
$plugin component = 'tool_mobile'
 
$plugin dependencies
 
$plugin version = 2023042401
 

Detailed Description

Function Documentation

◆ tool_mobile_before_standard_html_head()

tool_mobile_before_standard_html_head ( )

Callback to add head elements.

Return values
strvalid html head content
Since
Moodle 3.3

◆ tool_mobile_create_app_download_url()

tool_mobile_create_app_download_url ( )

Generate the app download url to promote moodle mobile.

Return values
moodle_url|voidApp download moodle_url object or return if setuplink is not set.

◆ tool_mobile_get_token()

tool_mobile_get_token (   $userid)

Return the user mobile app WebService access token.

Parameters
int$useridthe user to return the token from
Return values
stdClass|falsethe token or false if the token doesn't exists
Since
3.10

◆ tool_mobile_myprofile_navigation()

tool_mobile_myprofile_navigation ( \core_user\output\myprofile\tree  $tree,
  $user,
  $iscurrentuser 
)

User profile page callback.

Used add a section about the moodle mobile app.

Parameters
core_user::output::myprofile::tree$treeMy profile tree where the setting will be added.
stdClass$userThe user object.
bool$iscurrentuserIs this the current user viewing
Return values
voidReturn if the mobile web services setting is disabled or if not the current user.

◆ tool_mobile_pre_processor_message_send()

tool_mobile_pre_processor_message_send (   $procname,
  $data 
)

Callback to be able to change a message/notification data per processor.

Parameters
str$procnameprocessor name
stdClass$datamessage or notification data

◆ tool_mobile_standard_footer_html()

tool_mobile_standard_footer_html ( )

Callback to add footer elements.

Return values
strvalid html footer content
Since
Moodle 3.4

◆ tool_mobile_user_has_token()

tool_mobile_user_has_token (   $userid)

Checks if the given user has a mobile token (has used recently the app).

Parameters
int$useridthe user to check
Return values
booltrue if the user has a token, false otherwise.

◆ xmldb_tool_mobile_upgrade()

xmldb_tool_mobile_upgrade (   $oldversion)

Upgrade the plugin.

Parameters
int$oldversion
Return values
boolalways true

Variable Documentation

◆ $definitions

$definitions
Initial value:
= array(
'plugininfo' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 1
),
'subscriptiondata' => array(
'mode' => cache_store::MODE_SESSION,
'simplekeys' => true,
'simpledata' => false,
),
)

◆ $observers

$observers
Initial value:
= [
[
'eventname' => '\core\event\user_loggedin',
'callback' => '\tool_mobile\event_handler::handle_user_loggedin',
],
]

◆ dependencies

$plugin dependencies
Initial value:
= array(
'webservice_rest' => 2023041800
)