Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 400 and 403] [Versions 401 and 403]

   1  <?php
   2  // This file is part of Moodle - http://moodle.org/
   3  //
   4  // Moodle is free software: you can redistribute it and/or modify
   5  // it under the terms of the GNU General Public License as published by
   6  // the Free Software Foundation, either version 3 of the License, or
   7  // (at your option) any later version.
   8  //
   9  // Moodle is distributed in the hope that it will be useful,
  10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12  // GNU General Public License for more details.
  13  //
  14  // You should have received a copy of the GNU General Public License
  15  // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
  16  
  17  /**
  18   * Capabilities for BigBlueButton.
  19   *
  20   * @package   mod_bigbluebuttonbn
  21   * @copyright 2010 onwards, Blindside Networks Inc
  22   * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  23   * @author    Jesus Federico  (jesus [at] blindsidenetworks [dt] com)
  24   * @author    Fred Dixon  (ffdixon [at] blindsidenetworks [dt] com)
  25   * @author    Darko Miletic  (darko.miletic@gmail.com)
  26   */
  27  
  28  defined('MOODLE_INTERNAL') || die();
  29  
  30  $capabilities = [
  31  
  32      // Ability to add a new bigbluebuttonbn instance.
  33      'mod/bigbluebuttonbn:addinstance' => [
  34          'riskbitmask' => RISK_XSS,
  35          'captype' => 'write',
  36          'contextlevel' => CONTEXT_COURSE,
  37          'archetypes' => [
  38              'manager' => CAP_ALLOW,
  39              'editingteacher' => CAP_ALLOW,
  40          ],
  41          'clonepermissionsfrom' => 'moodle/course:manageactivities',
  42      ],
  43  
  44      // Ability to create instances with live meeting capabilities.
  45      'mod/bigbluebuttonbn:addinstancewithmeeting' => [
  46          'captype' => 'write',
  47          'contextlevel' => CONTEXT_MODULE,
  48          'archetypes' => [
  49              'manager' => CAP_ALLOW,
  50              'editingteacher' => CAP_ALLOW,
  51          ],
  52          'clonepermissionsfrom' => 'moodle/course:manageactivities',
  53      ],
  54  
  55      // Ability to create instances with recording capabilities.
  56      'mod/bigbluebuttonbn:addinstancewithrecording' => [
  57          'captype' => 'write',
  58          'contextlevel' => CONTEXT_MODULE,
  59          'archetypes' => [
  60              'manager' => CAP_ALLOW,
  61              'editingteacher' => CAP_ALLOW,
  62          ],
  63          'clonepermissionsfrom' => 'moodle/course:manageactivities',
  64      ],
  65  
  66      // Ability to join a meeting.
  67      'mod/bigbluebuttonbn:join' => [
  68          'captype' => 'read',
  69          'contextlevel' => CONTEXT_MODULE,
  70          'archetypes' => [
  71              'manager' => CAP_ALLOW,
  72              'editingteacher' => CAP_ALLOW,
  73              'teacher' => CAP_ALLOW,
  74              'student' => CAP_ALLOW,
  75              'guest' => CAP_ALLOW,
  76          ],
  77      ],
  78  
  79      // Ability to access instances, regardless of the type.
  80      'mod/bigbluebuttonbn:view' => [
  81          'captype' => 'read',
  82          'contextlevel' => CONTEXT_MODULE,
  83          'archetypes' => [
  84              'student' => CAP_ALLOW,
  85              'teacher' => CAP_ALLOW,
  86              'editingteacher' => CAP_ALLOW,
  87              'manager' => CAP_ALLOW
  88          ]
  89      ],
  90  
  91      // Ability to manage recordings.
  92      'mod/bigbluebuttonbn:managerecordings' => [
  93          'captype' => 'write',
  94          'contextlevel' => CONTEXT_MODULE,
  95          'archetypes' => [
  96              'manager' => CAP_ALLOW,
  97              'editingteacher' => CAP_ALLOW,
  98          ],
  99      ],
 100  
 101      // Ability to view all recordings formats (if not user can only see the formats
 102      // defined in bigbluebuttonbn_recording_safe_formats).
 103      'mod/bigbluebuttonbn:viewallrecordingformats' => [
 104          'captype' => 'read',
 105          'contextlevel' => CONTEXT_MODULE,
 106          'archetypes' => [
 107              'manager' => CAP_ALLOW,
 108              'editingteacher' => CAP_ALLOW,
 109          ],
 110      ],
 111  
 112      // Ability to publish recordings.
 113      'mod/bigbluebuttonbn:publishrecordings' => [
 114          'captype' => 'write',
 115          'contextlevel' => CONTEXT_MODULE,
 116          'archetypes' => [
 117              'manager' => CAP_ALLOW,
 118              'editingteacher' => CAP_ALLOW,
 119          ],
 120      ],
 121  
 122      // Ability to unpublish recordings.
 123      'mod/bigbluebuttonbn:unpublishrecordings' => [
 124          'captype' => 'write',
 125          'contextlevel' => CONTEXT_MODULE,
 126          'archetypes' => [
 127              'manager' => CAP_ALLOW,
 128              'editingteacher' => CAP_ALLOW,
 129          ],
 130      ],
 131  
 132      // Ability to protect recordings.
 133      'mod/bigbluebuttonbn:protectrecordings' => [
 134          'captype' => 'write',
 135          'contextlevel' => CONTEXT_MODULE,
 136          'archetypes' => [
 137              'manager' => CAP_ALLOW,
 138              'editingteacher' => CAP_ALLOW,
 139          ],
 140      ],
 141  
 142      // Ability to unprotect recordings.
 143      'mod/bigbluebuttonbn:unprotectrecordings' => [
 144          'captype' => 'write',
 145          'contextlevel' => CONTEXT_MODULE,
 146          'archetypes' => [
 147              'manager' => CAP_ALLOW,
 148              'editingteacher' => CAP_ALLOW,
 149          ],
 150      ],
 151  
 152      // Ability to delete recordings.
 153      'mod/bigbluebuttonbn:deleterecordings' => [
 154          'captype' => 'write',
 155          'contextlevel' => CONTEXT_MODULE,
 156          'archetypes' => [
 157              'manager' => CAP_ALLOW,
 158              'editingteacher' => CAP_ALLOW,
 159          ],
 160      ],
 161  
 162      // Ability to import recordings.
 163      'mod/bigbluebuttonbn:importrecordings' => [
 164          'captype' => 'write',
 165          'contextlevel' => CONTEXT_MODULE,
 166          'archetypes' => [
 167              'manager' => CAP_ALLOW,
 168              'editingteacher' => CAP_ALLOW,
 169          ],
 170      ],
 171  ];