Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 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: 1 time
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