Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
core\moodlenet\utilities Class Reference

Static Public Member Functions

static can_user_share (\core\context\course $coursecontext, int $userid, string $type='activity')
 Check whether a user has the capabilities required to share activities or courses to MoodleNet.
 
static does_user_have_capability_in_any_course (int $userid)
 Check the user has a valid capability in any course they are enrolled in.
 
static get_support_url ()
 Get the support url.
 
static is_valid_instance (issuer $issuer)
 Check whether the specified issuer is configured as a MoodleNet instance that can be shared to.
 

Member Function Documentation

◆ can_user_share()

static core\moodlenet\utilities::can_user_share ( \core\context\course $coursecontext,
int $userid,
string $type = 'activity' )
static

Check whether a user has the capabilities required to share activities or courses to MoodleNet.

Parameters
core\context\course$coursecontextCourse context where the activity or course would be shared from.
int$useridThe user ID being checked.
string$typeThe type of resource being checked (either 'activity' or 'course').
Return values
boolean
Exceptions
coding_exceptionIf an invalid resource type is provided.

◆ does_user_have_capability_in_any_course()

static core\moodlenet\utilities::does_user_have_capability_in_any_course ( int $userid)
static

Check the user has a valid capability in any course they are enrolled in.

Parameters
int$useridThe user id to query
Return values
stringReturns 'yes' if capability found, 'no' if not

◆ get_support_url()

static core\moodlenet\utilities::get_support_url ( )
static

Get the support url.

Return values
string

◆ is_valid_instance()

static core\moodlenet\utilities::is_valid_instance ( issuer $issuer)
static

Check whether the specified issuer is configured as a MoodleNet instance that can be shared to.

Parameters
issuer$issuerThe OAuth 2 issuer being validated.
Return values
booltrue if the issuer is enabled and available to share to.

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