Differences Between: [Versions 402 and 403]
(no description)
File Size: | 123 lines (5 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
utilities:: (4 methods):
is_valid_instance()
can_user_share()
get_support_url()
does_user_have_capability_in_any_course()
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, string $type = 'activity') X-Ref |
Check whether a user has the capabilities required to share activities or courses to MoodleNet. param: \core\context\course $coursecontext Course context where the activity or course would be shared from. param: int $userid The user ID being checked. param: string $type The type of resource being checked (either 'activity' or 'course'). return: boolean |
get_support_url() X-Ref |
Get the support url. return: string |
does_user_have_capability_in_any_course(int $userid) X-Ref |
Check the user has a valid capability in any course they are enrolled in. param: int $userid The user id to query return: string Returns 'yes' if capability found, 'no' if not |