Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 402] [Versions 310 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   * Define capabilities for plugin.
  19   *
  20   * @package    quizaccess_seb
  21   * @author     Andrew Madden <andrewmadden@catalyst-au.net>
  22   * @copyright  2019 Catalyst IT
  23   * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  24   */
  25  
  26  defined('MOODLE_INTERNAL') || die();
  27  
  28  $capabilities = array(
  29      'quizaccess/seb:managetemplates' => array(
  30          'captype' => 'write',
  31          'contextlevel' => CONTEXT_SYSTEM,
  32          'archetypes' => array(
  33              'manager' => CAP_ALLOW,
  34          )
  35      ),
  36      'quizaccess/seb:bypassseb' => array(
  37          'captype' => 'read',
  38          'contextlevel' => CONTEXT_MODULE,
  39          'archetypes' => array(
  40              'manager' => CAP_ALLOW,
  41              'editingteacher' => CAP_ALLOW
  42          )
  43      ),
  44      'quizaccess/seb:manage_seb_requiresafeexambrowser' => array(
  45          'captype' => 'write',
  46          'contextlevel' => CONTEXT_MODULE,
  47          'archetypes' => array(
  48              'manager' => CAP_ALLOW,
  49              'editingteacher' => CAP_ALLOW
  50          )
  51      ),
  52      'quizaccess/seb:manage_seb_templateid' => array(
  53          'captype' => 'read',
  54          'contextlevel' => CONTEXT_MODULE,
  55          'archetypes' => array(
  56              'manager' => CAP_ALLOW,
  57              'editingteacher' => CAP_ALLOW
  58          )
  59      ),
  60      'quizaccess/seb:manage_filemanager_sebconfigfile' => array(
  61          'captype' => 'write',
  62          'contextlevel' => CONTEXT_MODULE,
  63          'archetypes' => array(
  64              'manager' => CAP_ALLOW,
  65              'editingteacher' => CAP_ALLOW
  66          )
  67      ),
  68      'quizaccess/seb:manage_seb_showsebdownloadlink' => array(
  69          'captype' => 'write',
  70          'contextlevel' => CONTEXT_MODULE,
  71          'archetypes' => array(
  72              'manager' => CAP_ALLOW,
  73              'editingteacher' => CAP_ALLOW
  74          )
  75      ),
  76      'quizaccess/seb:manage_seb_allowedbrowserexamkeys' => array(
  77          'captype' => 'write',
  78          'contextlevel' => CONTEXT_MODULE,
  79          'archetypes' => array(
  80              'manager' => CAP_ALLOW,
  81              'editingteacher' => CAP_ALLOW
  82          )
  83      ),
  84      'quizaccess/seb:manage_seb_linkquitseb' => array(
  85          'captype' => 'write',
  86          'contextlevel' => CONTEXT_MODULE,
  87          'archetypes' => array(
  88              'manager' => CAP_ALLOW,
  89              'editingteacher' => CAP_ALLOW
  90          )
  91      ),
  92      'quizaccess/seb:manage_seb_userconfirmquit' => array(
  93          'captype' => 'write',
  94          'contextlevel' => CONTEXT_MODULE,
  95          'archetypes' => array(
  96              'manager' => CAP_ALLOW,
  97              'editingteacher' => CAP_ALLOW
  98          )
  99      ),
 100      'quizaccess/seb:manage_seb_allowuserquitseb' => array(
 101          'captype' => 'write',
 102          'contextlevel' => CONTEXT_MODULE,
 103          'archetypes' => array(
 104              'manager' => CAP_ALLOW,
 105              'editingteacher' => CAP_ALLOW
 106          )
 107      ),
 108      'quizaccess/seb:manage_seb_quitpassword' => array(
 109          'captype' => 'write',
 110          'contextlevel' => CONTEXT_MODULE,
 111          'archetypes' => array(
 112              'manager' => CAP_ALLOW,
 113              'editingteacher' => CAP_ALLOW
 114          )
 115      ),
 116      'quizaccess/seb:manage_seb_allowreloadinexam' => array(
 117          'captype' => 'write',
 118          'contextlevel' => CONTEXT_MODULE,
 119          'archetypes' => array(
 120              'manager' => CAP_ALLOW,
 121              'editingteacher' => CAP_ALLOW
 122          )
 123      ),
 124      'quizaccess/seb:manage_seb_showsebtaskbar' => array(
 125          'captype' => 'write',
 126          'contextlevel' => CONTEXT_MODULE,
 127          'archetypes' => array(
 128              'manager' => CAP_ALLOW,
 129              'editingteacher' => CAP_ALLOW
 130          )
 131      ),
 132      'quizaccess/seb:manage_seb_showreloadbutton' => array(
 133          'captype' => 'write',
 134          'contextlevel' => CONTEXT_MODULE,
 135          'archetypes' => array(
 136              'manager' => CAP_ALLOW,
 137              'editingteacher' => CAP_ALLOW
 138          )
 139      ),
 140      'quizaccess/seb:manage_seb_showtime' => array(
 141          'captype' => 'write',
 142          'contextlevel' => CONTEXT_MODULE,
 143          'archetypes' => array(
 144              'manager' => CAP_ALLOW,
 145              'editingteacher' => CAP_ALLOW
 146          )
 147      ),
 148      'quizaccess/seb:manage_seb_showkeyboardlayout' => array(
 149          'captype' => 'write',
 150          'contextlevel' => CONTEXT_MODULE,
 151          'archetypes' => array(
 152              'manager' => CAP_ALLOW,
 153              'editingteacher' => CAP_ALLOW
 154          )
 155      ),
 156  
 157      'quizaccess/seb:manage_seb_showwificontrol' => array(
 158          'captype' => 'write',
 159          'contextlevel' => CONTEXT_MODULE,
 160          'archetypes' => array(
 161              'manager' => CAP_ALLOW,
 162              'editingteacher' => CAP_ALLOW
 163          )
 164      ),
 165      'quizaccess/seb:manage_seb_enableaudiocontrol' => array(
 166          'captype' => 'write',
 167          'contextlevel' => CONTEXT_MODULE,
 168          'archetypes' => array(
 169              'manager' => CAP_ALLOW,
 170              'editingteacher' => CAP_ALLOW
 171          )
 172      ),
 173      'quizaccess/seb:manage_seb_muteonstartup' => array(
 174          'captype' => 'write',
 175          'contextlevel' => CONTEXT_MODULE,
 176          'archetypes' => array(
 177              'manager' => CAP_ALLOW,
 178              'editingteacher' => CAP_ALLOW
 179          )
 180      ),
 181      'quizaccess/seb:manage_seb_allowspellchecking' => array(
 182          'captype' => 'write',
 183          'contextlevel' => CONTEXT_MODULE,
 184          'archetypes' => array(
 185              'manager' => CAP_ALLOW,
 186              'editingteacher' => CAP_ALLOW
 187          )
 188      ),
 189      'quizaccess/seb:manage_seb_activateurlfiltering' => array(
 190          'captype' => 'write',
 191          'contextlevel' => CONTEXT_MODULE,
 192          'archetypes' => array(
 193              'manager' => CAP_ALLOW,
 194              'editingteacher' => CAP_ALLOW
 195          )
 196      ),
 197      'quizaccess/seb:manage_seb_filterembeddedcontent' => array(
 198          'captype' => 'write',
 199          'contextlevel' => CONTEXT_MODULE,
 200          'archetypes' => array(
 201              'manager' => CAP_ALLOW,
 202              'editingteacher' => CAP_ALLOW
 203          )
 204      ),
 205      'quizaccess/seb:manage_seb_expressionsallowed' => array(
 206          'captype' => 'write',
 207          'contextlevel' => CONTEXT_MODULE,
 208          'archetypes' => array(
 209              'manager' => CAP_ALLOW,
 210              'editingteacher' => CAP_ALLOW
 211          )
 212      ),
 213      'quizaccess/seb:manage_seb_regexallowed' => array(
 214          'captype' => 'write',
 215          'contextlevel' => CONTEXT_MODULE,
 216          'archetypes' => array(
 217              'manager' => CAP_ALLOW,
 218              'editingteacher' => CAP_ALLOW
 219          )
 220      ),
 221      'quizaccess/seb:manage_seb_expressionsblocked' => array(
 222          'captype' => 'write',
 223          'contextlevel' => CONTEXT_MODULE,
 224          'archetypes' => array(
 225              'manager' => CAP_ALLOW,
 226              'editingteacher' => CAP_ALLOW
 227          )
 228      ),
 229      'quizaccess/seb:manage_seb_regexblocked' => array(
 230          'captype' => 'write',
 231          'contextlevel' => CONTEXT_MODULE,
 232          'archetypes' => array(
 233              'manager' => CAP_ALLOW,
 234              'editingteacher' => CAP_ALLOW
 235          )
 236      ),
 237  );