Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
tool_mobile\external Class Reference

This is the external API for this tool. More...

Inheritance diagram for tool_mobile\external:

Static Public Member Functions

static call_external_functions ($requests)
 Call multiple external functions and return all responses.
 
static call_external_functions_parameters ()
 Returns description of method parameters.
 
static call_external_functions_returns ()
 Returns description of method result value.
 
static get_autologin_key ($privatetoken)
 Creates an auto-login key for the current user.
 
static get_autologin_key_parameters ()
 Returns description of get_autologin_key() parameters.
 
static get_autologin_key_returns ()
 Returns description of get_autologin_key() result value.
 
static get_config ($section='')
 Returns a list of site settings, filtering by section.
 
static get_config_parameters ()
 Returns description of get_config() parameters.
 
static get_config_returns ()
 Returns description of get_config() result value.
 
static get_content ($component, $method, $args=array())
 Returns a piece of content to be displayed in the Mobile app, it usually returns a template, javascript and other structured data that will be used to render a view in the Mobile app.
 
static get_content_parameters ()
 Returns description of get_content() parameters.
 
static get_content_returns ()
 Returns description of get_content() result value.
 
static get_plugins_supporting_mobile ()
 Returns a list of Moodle plugins supporting the mobile app.
 
static get_plugins_supporting_mobile_parameters ()
 Returns description of get_plugins_supporting_mobile() parameters.
 
static get_plugins_supporting_mobile_returns ()
 Returns description of get_plugins_supporting_mobile() result value.
 
static get_public_config ()
 Returns a list of the site public settings, those not requiring authentication.
 
static get_public_config_parameters ()
 Returns description of get_public_config() parameters.
 
static get_public_config_returns ()
 Returns description of get_public_config() result value.
 
static get_tokens_for_qr_login ($qrloginkey, $userid)
 Returns a WebService token (and private token) for QR login.
 
static get_tokens_for_qr_login_parameters ()
 Returns description of get_tokens_for_qr_login() parameters.
 
static get_tokens_for_qr_login_returns ()
 Returns description of get_tokens_for_qr_login() result value.
 
static validate_subscription_key (string $key)
 Check if the given site subscription key is valid.
 
static validate_subscription_key_parameters ()
 Returns description of validate_subscription_key() parameters.
 
static validate_subscription_key_returns ()
 Returns description of validate_subscription_key() result value.
 

Detailed Description

This is the external API for this tool.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ call_external_functions()

static tool_mobile\external::call_external_functions ( $requests)
static

Call multiple external functions and return all responses.

Parameters
array$requestsList of requests.
Return values
arrayResponses.
Since
Moodle 3.7

◆ call_external_functions_parameters()

static tool_mobile\external::call_external_functions_parameters ( )
static

Returns description of method parameters.

Return values
external_function_parameters
Since
Moodle 3.7

◆ call_external_functions_returns()

static tool_mobile\external::call_external_functions_returns ( )
static

Returns description of method result value.

Return values
external_single_structure
Since
Moodle 3.7

◆ get_autologin_key()

static tool_mobile\external::get_autologin_key ( $privatetoken)
static

Creates an auto-login key for the current user.

Is created only in https sites and is restricted by time and ip address.

Please note that it only works if the request comes from the Moodle mobile or desktop app.

Parameters
string$privatetokenthe user private token for validating the request
Return values
arraywith the settings and warnings
Since
Moodle 3.2

◆ get_autologin_key_parameters()

static tool_mobile\external::get_autologin_key_parameters ( )
static

Returns description of get_autologin_key() parameters.

Return values
external_function_parameters
Since
Moodle 3.2

◆ get_autologin_key_returns()

static tool_mobile\external::get_autologin_key_returns ( )
static

Returns description of get_autologin_key() result value.

Return values
core_external\external_description
Since
Moodle 3.2

◆ get_config()

static tool_mobile\external::get_config ( $section = '')
static

Returns a list of site settings, filtering by section.

Parameters
string$sectionsettings section name
Return values
arraywith the settings and warnings
Since
Moodle 3.2

◆ get_config_parameters()

static tool_mobile\external::get_config_parameters ( )
static

Returns description of get_config() parameters.

Return values
external_function_parameters
Since
Moodle 3.2

◆ get_config_returns()

static tool_mobile\external::get_config_returns ( )
static

Returns description of get_config() result value.

Return values
core_external\external_description
Since
Moodle 3.2

◆ get_content()

static tool_mobile\external::get_content ( $component,
$method,
$args = array() )
static

Returns a piece of content to be displayed in the Mobile app, it usually returns a template, javascript and other structured data that will be used to render a view in the Mobile app.

Callbacks (placed in $component\output\mobile) that are called by this web service are responsible for doing the appropriate security checks to access the information to be returned.

Parameters
string$componentname of the component.
string$methodfunction method name in class $component\output\mobile.
array$argsoptional arguments for the method.
Return values
arrayHTML, JavaScript and other required data and information to create a view in the app.
Since
Moodle 3.5
Exceptions
coding_exception

◆ get_content_parameters()

static tool_mobile\external::get_content_parameters ( )
static

Returns description of get_content() parameters.

Return values
external_function_parameters
Since
Moodle 3.5

◆ get_content_returns()

static tool_mobile\external::get_content_returns ( )
static

Returns description of get_content() result value.

Return values
array
Since
Moodle 3.5

◆ get_plugins_supporting_mobile()

static tool_mobile\external::get_plugins_supporting_mobile ( )
static

Returns a list of Moodle plugins supporting the mobile app.

Return values
arrayan array of warnings and objects containing the plugin information
Since
Moodle 3.1

◆ get_plugins_supporting_mobile_parameters()

static tool_mobile\external::get_plugins_supporting_mobile_parameters ( )
static

Returns description of get_plugins_supporting_mobile() parameters.

Return values
external_function_parameters
Since
Moodle 3.1

◆ get_plugins_supporting_mobile_returns()

static tool_mobile\external::get_plugins_supporting_mobile_returns ( )
static

Returns description of get_plugins_supporting_mobile() result value.

Return values
core_external\external_description
Since
Moodle 3.1

◆ get_public_config()

static tool_mobile\external::get_public_config ( )
static

Returns a list of the site public settings, those not requiring authentication.

Return values
arraywith the settings and warnings
Since
Moodle 3.2

◆ get_public_config_parameters()

static tool_mobile\external::get_public_config_parameters ( )
static

Returns description of get_public_config() parameters.

Return values
external_function_parameters
Since
Moodle 3.2

◆ get_public_config_returns()

static tool_mobile\external::get_public_config_returns ( )
static

Returns description of get_public_config() result value.

Return values
core_external\external_description
Since
Moodle 3.2

◆ get_tokens_for_qr_login()

static tool_mobile\external::get_tokens_for_qr_login ( $qrloginkey,
$userid )
static

Returns a WebService token (and private token) for QR login.

Parameters
string$qrloginkeythe user key generated and embedded into the QR code for validating the request
int$useridthe user the key belongs to
Return values
arraywith the tokens and warnings
Since
Moodle 3.9

◆ get_tokens_for_qr_login_parameters()

static tool_mobile\external::get_tokens_for_qr_login_parameters ( )
static

Returns description of get_tokens_for_qr_login() parameters.

Return values
external_function_parameters
Since
Moodle 3.9

◆ get_tokens_for_qr_login_returns()

static tool_mobile\external::get_tokens_for_qr_login_returns ( )
static

Returns description of get_tokens_for_qr_login() result value.

Return values
core_external\external_description
Since
Moodle 3.9

◆ validate_subscription_key()

static tool_mobile\external::validate_subscription_key ( string $key)
static

Check if the given site subscription key is valid.

Parameters
string$keysubscriptiion temporary key
Return values
arraywith the settings and warnings
Since
Moodle 3.9

◆ validate_subscription_key_parameters()

static tool_mobile\external::validate_subscription_key_parameters ( )
static

Returns description of validate_subscription_key() parameters.

Return values
external_function_parameters
Since
Moodle 3.9

◆ validate_subscription_key_returns()

static tool_mobile\external::validate_subscription_key_returns ( )
static

Returns description of validate_subscription_key() result value.

Return values
core_external\external_description
Since
Moodle 3.9

The documentation for this class was generated from the following file: