|
| static | format_group_room_name (string $baseroomname, string $groupname) |
| | Format a group communication room name with the following syntax: 'Group A (Course 1)'.
|
| |
| static | get_course (int $courseid) |
| | Communication api call to create room for a group if course has group mode enabled.
|
| |
| static | get_course_communication_status_notification (\stdClass $course) |
| | Get the course communication status notification for course.
|
| |
| static | get_course_communication_url (stdClass $course) |
| | Get the course communication url according to course setup.
|
| |
| static | get_enrolled_users_for_course (stdClass $course, bool $onlyactive=true) |
| | Get the enrolled users for course.
|
| |
| static | get_users_has_access_to_all_groups (array $userids, int $courseid) |
| | Get users with the capability to access all groups.
|
| |
| static | is_group_mode_enabled_for_course (stdClass $course) |
| | Is group mode enabled for the course.
|
| |
| static | load_by_course (int $courseid, context $context, ?string $provider=null,) |
| | Load the communication instance for course id.
|
| |
| static | load_by_group (int $groupid, context $context) |
| | Load the communication instance for group id.
|
| |
| static | update_course_communication_instance (stdClass $course, bool $changesincoursecat) |
| | Update course communication according to course data.
|
| |
| static | update_course_communication_room_membership (stdClass $course, array $userids, string $memberaction,) |
| | Helper to update room membership according to action passed.
|
| |
| static | update_group_communication_instances_for_course (stdClass $course, string $provider,) |
| | Update the group communication instances.
|
| |
◆ format_group_room_name()
| static core_communication\helper::format_group_room_name |
( |
string | $baseroomname, |
|
|
string | $groupname ) |
|
static |
Format a group communication room name with the following syntax: 'Group A (Course 1)'.
- Parameters
-
| string | $baseroomname | The base room name. |
| string | $groupname | The group name. |
◆ get_course()
| static core_communication\helper::get_course |
( |
int | $courseid | ) |
|
|
static |
Communication api call to create room for a group if course has group mode enabled.
- Parameters
-
| int | $courseid | The course id. |
- Return values
-
◆ get_course_communication_status_notification()
| static core_communication\helper::get_course_communication_status_notification |
( |
\stdClass | $course | ) |
|
|
static |
Get the course communication status notification for course.
- Parameters
-
| stdClass | $course | The course object. |
◆ get_course_communication_url()
| static core_communication\helper::get_course_communication_url |
( |
stdClass | $course | ) |
|
|
static |
Get the course communication url according to course setup.
- Parameters
-
| stdClass | $course | The course object. |
- Return values
-
| string | The communication room url. |
◆ get_enrolled_users_for_course()
| static core_communication\helper::get_enrolled_users_for_course |
( |
stdClass | $course, |
|
|
bool | $onlyactive = true ) |
|
static |
Get the enrolled users for course.
- Parameters
-
| stdClass | $course | The course object. |
| bool | $onlyactive | Only enrolments that are active (e.g. not suspended). |
- Return values
-
◆ get_users_has_access_to_all_groups()
| static core_communication\helper::get_users_has_access_to_all_groups |
( |
array | $userids, |
|
|
int | $courseid ) |
|
static |
Get users with the capability to access all groups.
- Parameters
-
| array | $userids | user ids to check the permission |
| int | $courseid | course id |
- Return values
-
◆ is_group_mode_enabled_for_course()
| static core_communication\helper::is_group_mode_enabled_for_course |
( |
stdClass | $course | ) |
|
|
static |
Is group mode enabled for the course.
- Parameters
-
| stdClass | $course | The course object |
◆ load_by_course()
| static core_communication\helper::load_by_course |
( |
int | $courseid, |
|
|
context | $context, |
|
|
?string | $provider = null ) |
|
static |
Load the communication instance for course id.
- Parameters
-
| int | $courseid | The course id |
| context | $context | The context |
| string | null | $provider | The provider name |
- Return values
-
| api | The communication instance |
◆ load_by_group()
| static core_communication\helper::load_by_group |
( |
int | $groupid, |
|
|
context | $context ) |
|
static |
Load the communication instance for group id.
- Parameters
-
| int | $groupid | The group id |
| context | $context | The context, to make sure any instance using group can load the communication instance |
- Return values
-
| api | The communication instance. |
◆ update_course_communication_instance()
| static core_communication\helper::update_course_communication_instance |
( |
stdClass | $course, |
|
|
bool | $changesincoursecat ) |
|
static |
Update course communication according to course data.
Course can have course or group rooms. Group mode enabling will create rooms for groups.
- Parameters
-
| stdClass | $course | The course data |
| bool | $changesincoursecat | Whether the course moved to a different category |
◆ update_course_communication_room_membership()
| static core_communication\helper::update_course_communication_room_membership |
( |
stdClass | $course, |
|
|
array | $userids, |
|
|
string | $memberaction ) |
|
static |
Helper to update room membership according to action passed.
This method will help reduce a large amount of duplications of code in different places in core.
- Parameters
-
| stdClass | $course | The course object. |
| array | $userids | The user ids to add to the communication room. |
| string | $memberaction | The action to perform on the communication room. |
◆ update_group_communication_instances_for_course()
| static core_communication\helper::update_group_communication_instances_for_course |
( |
stdClass | $course, |
|
|
string | $provider ) |
|
static |
Update the group communication instances.
- Parameters
-
| stdClass | $course | The course object. |
| string | $provider | The provider name. |
The documentation for this class was generated from the following file:
- communication/classes/helper.php