Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 402 and 403]

(no description)

File Size: 56 lines (2 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

utilities:: (2 methods):
  is_valid_instance()
  can_user_share()


Class: utilities  - X-Ref

Class containing static utilities (such as various checks) required by the MoodleNet API.

is_valid_instance(issuer $issuer)   X-Ref
Check whether the specified issuer is configured as a MoodleNet instance that can be shared to.

param: issuer $issuer The OAuth 2 issuer being validated.
return: bool true if the issuer is enabled and available to share to.

can_user_share(\core\context\course $coursecontext, int $userid)   X-Ref
Check whether a user has the capabilities required to share activities from a given course to MoodleNet.

param: \core\context\course $coursecontext Course context where the activity would be shared from.
param: int $userid The user ID being checked.
return: boolean