Utility class for all roles routines helper.  
 More...
|  | 
| static | get_participant_data (context $context, ?stdClass $bbactivity=null) | 
|  | Returns an array to populate a list of participants used in mod_form.js. 
 | 
|  | 
| static | get_participant_list (?stdClass $bigbluebuttonbn, context $context) | 
|  | Returns an array to populate a list of participants used in mod_form.php. 
 | 
|  | 
| static | get_participant_selection_data () | 
|  | Returns an array to populate a list of participant_selection used in mod_form.php. 
 | 
|  | 
| static | get_roles (?context $context=null, ?bool $onlyviewableroles=true) | 
|  | Returns an array containing all the roles in a context. 
 | 
|  | 
| static | get_user_roles (context $context, int $userid) | 
|  | Returns user roles in a context. 
 | 
|  | 
| static | get_users_array (context_course $context, $bbactivity=null) | 
|  | Returns an array containing all the users in a context wrapped for html select element. 
 | 
|  | 
| static | has_capability_in_course (int $courseid, string $capability) | 
|  | Can do some administration in this course, likely manage recordings. 
 | 
|  | 
| static | import_get_courses_for_select (instance $instance) | 
|  | Helper function returns a list of courses a user has access to, wrapped in an array that can be used by a html select. 
 | 
|  | 
| static | is_moderator (context $context, array $participantlist, ?int $userid=null) | 
|  | Evaluate if a user in a context is moderator based on roles and participation rules. 
 | 
|  | 
| static | participant_joined (string $meetingid, bool $ismoderator) | 
|  | Updates the meeting info cached object when a participant has joined. 
 | 
|  | 
|  | 
| string const | ROLE_MODERATOR = 'moderator' | 
|  | The bigbluebutton moderator role. 
 | 
|  | 
| int const | ROLE_VIEWER = 'viewer' | 
|  | The bigbluebutton viewer role. 
 | 
|  | 
|  | 
| static | get_guest_role () | 
|  | Returns guest role wrapped in an array. 
 | 
|  | 
| static | get_participant_list_default (context $context, ?int $ownerid=null) | 
|  | Returns an array to populate a list of participants used in mod_form.php with default values. 
 | 
|  | 
| static | get_participant_rules_encoded (array $rules) | 
|  | Returns an array to populate a list of participants used in mod_form.php with bigbluebuttonbn values. 
 | 
|  | 
| static | get_role ($id) | 
|  | Returns role that corresponds to an id. 
 | 
|  | 
| static | get_roles_select (context $context=null, bool $onlyviewableroles=true) | 
|  | Returns an array containing all the roles in a context wrapped for html select element. 
 | 
|  | 
| static | is_moderator_validate_rule (array $participant, int $userid, array $userroles) | 
|  | Evaluate if a user is moderator based on roles and a particular participation rule. 
 | 
|  | 
| static | is_moderator_validator (array $participantlist, int $userid, array $userroles) | 
|  | Iterates participant list rules to evaluate if a user is moderator. 
 | 
|  | 
Utility class for all roles routines helper. 
- Copyright
- 2021 onwards, Blindside Networks Inc 
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 
◆ get_guest_role()
  
  | 
        
          | static mod_bigbluebuttonbn\local\helpers\roles::get_guest_role | ( |  | ) |  |  | staticprotected | 
 
Returns guest role wrapped in an array. 
- Return values
- 
  
  
 
 
◆ get_participant_data()
  
  | 
        
          | static mod_bigbluebuttonbn\local\helpers\roles::get_participant_data | ( | context | $context, |  
          |  |  | ?stdClass | $bbactivity = null ) |  | static | 
 
Returns an array to populate a list of participants used in mod_form.js. 
- Parameters
- 
  
    | context | $context |  |  | null | stdClass | $bbactivity |  |  
 
- Return values
- 
  
  
 
 
◆ get_participant_list()
  
  | 
        
          | static mod_bigbluebuttonbn\local\helpers\roles::get_participant_list | ( | ?stdClass | $bigbluebuttonbn, |  
          |  |  | context | $context ) |  | static | 
 
Returns an array to populate a list of participants used in mod_form.php. 
- Parameters
- 
  
    | stdClass | null | $bigbluebuttonbn |  |  | context | $context |  |  
 
- Return values
- 
  
  
 
 
◆ get_participant_list_default()
  
  | 
        
          | static mod_bigbluebuttonbn\local\helpers\roles::get_participant_list_default | ( | context | $context, |  
          |  |  | ?int | $ownerid = null ) |  | staticprotected | 
 
Returns an array to populate a list of participants used in mod_form.php with default values. 
- Parameters
- 
  
    | context | $context |  |  | int | null | $ownerid |  |  
 
- Return values
- 
  
  
 
 
◆ get_participant_rules_encoded()
  
  | 
        
          | static mod_bigbluebuttonbn\local\helpers\roles::get_participant_rules_encoded | ( | array | $rules | ) |  |  | staticprotected | 
 
Returns an array to populate a list of participants used in mod_form.php with bigbluebuttonbn values. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ get_participant_selection_data()
  
  | 
        
          | static mod_bigbluebuttonbn\local\helpers\roles::get_participant_selection_data | ( |  | ) |  |  | static | 
 
Returns an array to populate a list of participant_selection used in mod_form.php. 
- Return values
- 
  
  
 
 
◆ get_role()
  
  | 
        
          | static mod_bigbluebuttonbn\local\helpers\roles::get_role | ( |  | $id | ) |  |  | staticprotected | 
 
Returns role that corresponds to an id. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ get_roles()
  
  | 
        
          | static mod_bigbluebuttonbn\local\helpers\roles::get_roles | ( | ?context | $context = null, |  
          |  |  | ?bool | $onlyviewableroles = true ) |  | static | 
 
Returns an array containing all the roles in a context. 
- Parameters
- 
  
    | context | null | $context | $context |  | bool | null | $onlyviewableroles |  |  
 
- Return values
- 
  
  
 
 
◆ get_roles_select()
  
  | 
        
          | static mod_bigbluebuttonbn\local\helpers\roles::get_roles_select | ( | context | $context = null, |  
          |  |  | bool | $onlyviewableroles = true ) |  | staticprotected | 
 
Returns an array containing all the roles in a context wrapped for html select element. 
- Parameters
- 
  
    | context | null | $context | $context |  | bool | $onlyviewableroles |  |  
 
- Return values
- 
  
  
 
 
◆ get_user_roles()
  
  | 
        
          | static mod_bigbluebuttonbn\local\helpers\roles::get_user_roles | ( | context | $context, |  
          |  |  | int | $userid ) |  | static | 
 
Returns user roles in a context. 
- Parameters
- 
  
    | context | $context |  |  | int | $userid |  |  
 
- Return values
- 
  
  
 
 
◆ get_users_array()
  
  | 
        
          | static mod_bigbluebuttonbn\local\helpers\roles::get_users_array | ( | context_course | $context, |  
          |  |  |  | $bbactivity = null ) |  | static | 
 
Returns an array containing all the users in a context wrapped for html select element. 
- Parameters
- 
  
    | context_course | $context |  |  | null | $bbactivity |  |  
 
- Return values
- 
  
  
 
 
◆ has_capability_in_course()
  
  | 
        
          | static mod_bigbluebuttonbn\local\helpers\roles::has_capability_in_course | ( | int | $courseid, |  
          |  |  | string | $capability ) |  | static | 
 
Can do some administration in this course, likely manage recordings. 
- Parameters
- 
  
    | int | $courseid |  |  | string | $capability |  |  
 
 
 
◆ import_get_courses_for_select()
  
  | 
        
          | static mod_bigbluebuttonbn\local\helpers\roles::import_get_courses_for_select | ( | instance | $instance | ) |  |  | static | 
 
Helper function returns a list of courses a user has access to, wrapped in an array that can be used by a html select. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ is_moderator()
  
  | 
        
          | static mod_bigbluebuttonbn\local\helpers\roles::is_moderator | ( | context | $context, |  
          |  |  | array | $participantlist, |  
          |  |  | ?int | $userid = null ) |  | static | 
 
Evaluate if a user in a context is moderator based on roles and participation rules. 
- Parameters
- 
  
    | context | $context |  |  | array | $participantlist |  |  | int | $userid |  |  
 
- Return values
- 
  
  
 
 
◆ is_moderator_validate_rule()
  
  | 
        
          | static mod_bigbluebuttonbn\local\helpers\roles::is_moderator_validate_rule | ( | array | $participant, |  
          |  |  | int | $userid, |  
          |  |  | array | $userroles ) |  | staticprotected | 
 
Evaluate if a user is moderator based on roles and a particular participation rule. 
- Parameters
- 
  
    | array | $participant |  |  | int | $userid |  |  | array | $userroles |  |  
 
- Return values
- 
  
  
 
 
◆ is_moderator_validator()
  
  | 
        
          | static mod_bigbluebuttonbn\local\helpers\roles::is_moderator_validator | ( | array | $participantlist, |  
          |  |  | int | $userid, |  
          |  |  | array | $userroles ) |  | staticprotected | 
 
Iterates participant list rules to evaluate if a user is moderator. 
- Parameters
- 
  
    | array | $participantlist |  |  | int | $userid |  |  | array | $userroles |  |  
 
- Return values
- 
  
  
 
 
◆ participant_joined()
  
  | 
        
          | static mod_bigbluebuttonbn\local\helpers\roles::participant_joined | ( | string | $meetingid, |  
          |  |  | bool | $ismoderator ) |  | static | 
 
Updates the meeting info cached object when a participant has joined. 
- Parameters
- 
  
    | string | $meetingid |  |  | bool | $ismoderator |  |  
 
- Return values
- 
  
  
 
 
The documentation for this class was generated from the following file:
- mod/bigbluebuttonbn/classes/local/helpers/roles.php