Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Static Public Member Functions | Public Attributes | List of all members
tool_mobile\api Class Reference

API exposed by tool_mobile, to be used mostly by external functions and the plugin settings. More...

Static Public Member Functions

static check_autologin_prerequisites ($userid)
 
static get_autologin_key ()
 Creates an auto-login key for the current user, this key is restricted by time and ip address. More...
 
static get_config ($section)
 Returns a list of site configurations, filtering by section. More...
 
static get_features_list ()
 Get a list of the Mobile app features. More...
 
static get_plugins_supporting_mobile ()
 Returns a list of Moodle plugins supporting the mobile app. More...
 
static get_potential_config_issues ()
 This function check the current site for potential configuration issues that may prevent the mobile app to work. More...
 
static get_public_config ()
 Returns a list of the site public settings, those not requiring authentication. More...
 

Public Attributes

int const LOGIN_KEY_TTL = 60
 seconds an auto-login key will expire.
 
int const LOGIN_VIA_APP = 1
 to identify the login via app.
 
int const LOGIN_VIA_BROWSER = 2
 to identify the login via browser.
 
int const LOGIN_VIA_EMBEDDED_BROWSER = 3
 to identify the login via an embedded browser.
 
string const MOODLE_APPS_PORTAL_URL = 'https://apps.moodle.com'
 URL of the Moodle Apps Portal.
 

Detailed Description

API exposed by tool_mobile, to be used mostly by external functions and the plugin settings.

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

Member Function Documentation

◆ get_autologin_key()

static tool_mobile\api::get_autologin_key ( )
static

Creates an auto-login key for the current user, this key is restricted by time and ip address.

Return values
stringthe key
Since
Moodle 3.2

◆ get_config()

static tool_mobile\api::get_config (   $section)
static

Returns a list of site configurations, filtering by section.

Parameters
string$sectionsection name
Return values
stdClassobject containing the settings

◆ get_features_list()

static tool_mobile\api::get_features_list ( )
static

Get a list of the Mobile app features.

Return values
arrayarray with the features grouped by theirs ubication in the app.
Since
Moodle 3.3

◆ get_plugins_supporting_mobile()

static tool_mobile\api::get_plugins_supporting_mobile ( )
static

Returns a list of Moodle plugins supporting the mobile app.

Return values
arrayan array of objects containing the plugin information

◆ get_potential_config_issues()

static tool_mobile\api::get_potential_config_issues ( )
static

This function check the current site for potential configuration issues that may prevent the mobile app to work.

Return values
arraylist of potential issues
Since
Moodle 3.4

◆ get_public_config()

static tool_mobile\api::get_public_config ( )
static

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

Return values
arraywith the settings and warnings

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