Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

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

External functions

Copyright: 2012 Jerome Mouneyrac <jerome@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 388 lines (14 kb)
Included or required:0 times
Referenced: 6 times
Includes or requires: 0 files

Defines 1 class


Class: message_airnotifier_external  - X-Ref

External API for airnotifier web services

is_system_configured_parameters()   X-Ref
Returns description of method parameters


is_system_configured()   X-Ref
Tests whether the airnotifier settings have been configured


is_system_configured_returns()   X-Ref
Returns description of method result value

return: external_single_structure

are_notification_preferences_configured_parameters()   X-Ref
Returns description of method parameters


are_notification_preferences_configured($userids)   X-Ref
Check if the users have notification preferences configured for the airnotifier plugin

param: array $userids Array of user ids

are_notification_preferences_configured_returns()   X-Ref
Returns description of method result value

return: external_single_structure

get_user_devices_parameters()   X-Ref
Returns description of method parameters


get_user_devices($appid, $userid = 0)   X-Ref
Return the list of mobile devices that are registered in Moodle for the given user.

param: string  $appid  app unique id (usually a reversed domain)
param: integer $userid the user id, 0 for current user
return: array warnings and devices

get_user_devices_returns()   X-Ref
Returns description of method result value

return: external_single_structure

enable_device_parameters()   X-Ref
Returns description of method parameters


enable_device($deviceid, $enable)   X-Ref
Enables or disables a registered user device so it can receive Push notifications

param: integer $deviceid the device id
param: bool $enable whether to enable the device
return: array warnings and success status

enable_device_returns()   X-Ref
Returns description of method result value

return: external_single_structure