◆ 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 | $coursecontext | Course context where the activity or course would be shared from. |
int | $userid | The user ID being checked. |
string | $type | The type of resource being checked (either 'activity' or 'course'). |
- Return values
-
- Exceptions
-
◆ 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 | $userid | The user id to query |
- Return values
-
string | Returns 'yes' if capability found, 'no' if not |
◆ get_support_url()
static core\moodlenet\utilities::get_support_url |
( |
| ) |
|
|
static |
Get the support url.
- Return values
-
◆ 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 | $issuer | The OAuth 2 issuer being validated. |
- Return values
-
bool | true if the issuer is enabled and available to share to. |
The documentation for this class was generated from the following file:
- lib/classes/moodlenet/utilities.php