2009-11-01 11:31:16 +00:00
|
|
|
<?php
|
2010-08-03 08:07:49 +00:00
|
|
|
// This file is part of Moodle - http://moodle.org/
|
2006-08-08 05:13:06 +00:00
|
|
|
//
|
2010-08-03 08:07:49 +00:00
|
|
|
// Moodle is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
2006-08-08 05:13:06 +00:00
|
|
|
//
|
2010-08-03 08:07:49 +00:00
|
|
|
// Moodle is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
2006-08-08 05:13:06 +00:00
|
|
|
//
|
2010-08-03 08:07:49 +00:00
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Capability definitions for Moodle core.
|
|
|
|
*
|
|
|
|
* The capabilities are loaded into the database table when the module is
|
|
|
|
* installed or updated. Whenever the capability definitions are updated,
|
|
|
|
* the module version number should be bumped up.
|
|
|
|
*
|
|
|
|
* The system has four possible values for a capability:
|
|
|
|
* CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT, and inherit (not set).
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* CAPABILITY NAMING CONVENTION
|
|
|
|
*
|
|
|
|
* It is important that capability names are unique. The naming convention
|
|
|
|
* for capabilities that are specific to modules and blocks is as follows:
|
|
|
|
* [mod/block]/<plugin_name>:<capabilityname>
|
|
|
|
*
|
|
|
|
* component_name should be the same as the directory name of the mod or block.
|
|
|
|
*
|
|
|
|
* Core moodle capabilities are defined thus:
|
|
|
|
* moodle/<capabilityclass>:<capabilityname>
|
|
|
|
*
|
|
|
|
* Examples: mod/forum:viewpost
|
|
|
|
* block/recent_activity:view
|
|
|
|
* moodle/site:deleteuser
|
|
|
|
*
|
|
|
|
* The variable name for the capability definitions array is $capabilities
|
|
|
|
*
|
2012-04-01 22:48:17 +02:00
|
|
|
* For more information, take a look to the documentation available:
|
2023-08-22 16:44:10 +02:00
|
|
|
* - Access API: {@link https://moodledev.io/docs/apis/subsystems/access}
|
|
|
|
* - Upgrade API: {@link https://moodledev.io/docs/guides/upgrade}
|
2012-04-01 22:48:17 +02:00
|
|
|
*
|
|
|
|
* @package core_access
|
|
|
|
* @category access
|
|
|
|
* @copyright 2006 onwards Martin Dougiamas http://dougiamas.com
|
|
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
2010-08-03 08:07:49 +00:00
|
|
|
*/
|
2006-08-08 05:13:06 +00:00
|
|
|
|
2010-08-03 08:07:49 +00:00
|
|
|
defined('MOODLE_INTERNAL') || die();
|
2006-08-08 05:13:06 +00:00
|
|
|
|
2009-11-04 19:24:12 +00:00
|
|
|
$capabilities = array(
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/site:config' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2008-07-24 21:59:13 +00:00
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG | RISK_DATALOSS,
|
2006-09-18 21:32:49 +00:00
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2016-10-31 13:39:34 +08:00
|
|
|
'moodle/site:configview' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
2016-12-08 13:51:55 +08:00
|
|
|
'coursecreator' => CAP_ALLOW,
|
2016-10-31 13:39:34 +08:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-08 08:46:26 +00:00
|
|
|
'moodle/site:readallmessages' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-10-24 08:02:26 +00:00
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
|
2006-09-08 08:46:26 +00:00
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW,
|
2007-03-14 01:37:07 +00:00
|
|
|
'editingteacher' => CAP_ALLOW
|
2006-09-08 08:46:26 +00:00
|
|
|
)
|
|
|
|
),
|
2008-10-08 13:23:35 +00:00
|
|
|
|
2016-10-25 14:40:36 +08:00
|
|
|
'moodle/site:manageallmessaging' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2015-03-24 18:28:08 -07:00
|
|
|
'moodle/site:deleteanymessage' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_DATALOSS,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2007-11-21 07:53:42 +00:00
|
|
|
'moodle/site:sendmessage' => array(
|
|
|
|
|
2008-07-23 16:10:06 +00:00
|
|
|
'riskbitmask' => RISK_SPAM,
|
2007-11-21 07:53:42 +00:00
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW,
|
2007-11-21 07:53:42 +00:00
|
|
|
'user' => CAP_ALLOW
|
|
|
|
)
|
2008-10-08 13:23:35 +00:00
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2020-05-05 17:00:22 +10:00
|
|
|
'moodle/site:senderrormessage' => [
|
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
'user' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
],
|
|
|
|
|
2015-03-24 18:28:08 -07:00
|
|
|
'moodle/site:deleteownmessage' => array(
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
'user' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2006-09-08 08:46:26 +00:00
|
|
|
'moodle/site:approvecourse' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-10-24 08:02:26 +00:00
|
|
|
'riskbitmask' => RISK_XSS,
|
|
|
|
|
2006-09-08 08:46:26 +00:00
|
|
|
'captype' => 'write',
|
2019-09-23 16:37:23 +02:00
|
|
|
'contextlevel' => CONTEXT_COURSECAT,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-09-08 08:46:26 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2010-02-19 17:50:14 +00:00
|
|
|
'moodle/backup:backupcourse' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-18 21:32:49 +00:00
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
2008-07-24 21:59:13 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-10-10 02:52:08 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2010-02-19 17:50:14 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
'clonepermissionsfrom' => 'moodle/site:backup'
|
2006-08-08 05:13:06 +00:00
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2010-05-01 16:42:29 +00:00
|
|
|
'moodle/backup:backupsection' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-05-01 16:42:29 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
|
|
|
|
'clonepermissionsfrom' => 'moodle/backup:backupcourse'
|
|
|
|
),
|
|
|
|
|
|
|
|
'moodle/backup:backupactivity' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_MODULE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-05-01 16:42:29 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
|
|
|
|
'clonepermissionsfrom' => 'moodle/backup:backupcourse'
|
|
|
|
),
|
|
|
|
|
|
|
|
'moodle/backup:backuptargetimport' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
|
|
|
|
|
2020-04-29 08:11:17 +12:00
|
|
|
'captype' => 'read',
|
2010-05-01 16:42:29 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-05-01 16:42:29 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
|
|
|
|
'clonepermissionsfrom' => 'moodle/backup:backupcourse'
|
|
|
|
),
|
|
|
|
|
2010-02-19 18:33:26 +00:00
|
|
|
'moodle/backup:downloadfile' => array(
|
2008-07-31 22:15:30 +00:00
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2008-07-31 22:15:30 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2008-07-31 22:15:30 +00:00
|
|
|
),
|
|
|
|
|
2010-02-19 18:33:26 +00:00
|
|
|
'clonepermissionsfrom' => 'moodle/site:backupdownload'
|
2008-07-31 22:15:30 +00:00
|
|
|
),
|
|
|
|
|
2010-05-01 16:42:29 +00:00
|
|
|
'moodle/backup:configure' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-05-01 16:42:29 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2010-02-19 18:33:26 +00:00
|
|
|
'moodle/backup:userinfo' => array(
|
2008-07-31 22:15:30 +00:00
|
|
|
|
2010-02-19 18:33:26 +00:00
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
2008-07-31 22:15:30 +00:00
|
|
|
|
2010-02-19 18:33:26 +00:00
|
|
|
'captype' => 'read',
|
2008-07-31 22:15:30 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2010-02-19 18:33:26 +00:00
|
|
|
)
|
2008-07-31 22:15:30 +00:00
|
|
|
),
|
|
|
|
|
2010-05-01 16:42:29 +00:00
|
|
|
'moodle/backup:anonymise' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-05-01 16:42:29 +00:00
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2010-02-19 18:33:26 +00:00
|
|
|
'moodle/restore:restorecourse' => array(
|
2009-11-18 19:38:51 +00:00
|
|
|
|
2010-02-19 18:33:26 +00:00
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
|
2009-11-18 19:38:51 +00:00
|
|
|
|
2010-02-19 18:33:26 +00:00
|
|
|
'captype' => 'write',
|
2009-11-18 19:38:51 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-02-19 18:33:26 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2010-02-19 18:33:26 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
'clonepermissionsfrom' => 'moodle/site:restore'
|
2009-11-18 19:38:51 +00:00
|
|
|
),
|
|
|
|
|
2010-05-01 16:42:29 +00:00
|
|
|
'moodle/restore:restoresection' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-05-01 16:42:29 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
|
|
|
|
'clonepermissionsfrom' => 'moodle/restore:restorecourse'
|
|
|
|
),
|
|
|
|
|
|
|
|
'moodle/restore:restoreactivity' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
2010-09-05 16:58:30 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-05-01 16:42:29 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
|
|
|
|
'clonepermissionsfrom' => 'moodle/restore:restorecourse'
|
|
|
|
),
|
|
|
|
|
backup MDL-22184 Scheduled backups are now possible again through cron.
AMOS BEGIN
MOV [move scheduledsetup,core_backup],[automatedsetup,core_backup]
MOV [scheduledsettings,core_backup],[automatedsettings,core_backup]
MOV [scheduledstorage,core_backup],[automatedstorage,core_backup]
MOV [scheduledstoragehelp,core_backup],[automatedstoragehelp,core_backup]
MOV [scheduledbackupsinactive,core],[automatedbackupsinactive,core_backup]
MOV [scheduledbackupstatus,core],[automatedbackupstatus,core_backup]
CPY [schedule,core],[automatedbackupschedule,core_backup]
MOV [backupschedulehelp,core],[automatedbackupschedulehelp,core_backup]
AMOS END
2010-11-10 06:07:43 +00:00
|
|
|
'moodle/restore:viewautomatedfilearea' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2017-09-21 11:36:23 +08:00
|
|
|
'archetypes' => array(
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
backup MDL-22184 Scheduled backups are now possible again through cron.
AMOS BEGIN
MOV [move scheduledsetup,core_backup],[automatedsetup,core_backup]
MOV [scheduledsettings,core_backup],[automatedsettings,core_backup]
MOV [scheduledstorage,core_backup],[automatedstorage,core_backup]
MOV [scheduledstoragehelp,core_backup],[automatedstoragehelp,core_backup]
MOV [scheduledbackupsinactive,core],[automatedbackupsinactive,core_backup]
MOV [scheduledbackupstatus,core],[automatedbackupstatus,core_backup]
CPY [schedule,core],[automatedbackupschedule,core_backup]
MOV [backupschedulehelp,core],[automatedbackupschedulehelp,core_backup]
AMOS END
2010-11-10 06:07:43 +00:00
|
|
|
),
|
|
|
|
|
2010-02-19 19:11:06 +00:00
|
|
|
'moodle/restore:restoretargetimport' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-18 21:32:49 +00:00
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
2008-07-24 21:59:13 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-10-10 02:52:08 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2010-02-19 17:50:14 +00:00
|
|
|
),
|
|
|
|
|
2010-02-19 19:11:06 +00:00
|
|
|
'clonepermissionsfrom' => 'moodle/site:import'
|
2006-08-08 05:13:06 +00:00
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2010-02-19 19:11:06 +00:00
|
|
|
'moodle/restore:uploadfile' => array(
|
2009-12-30 17:35:36 +00:00
|
|
|
|
2010-02-19 19:11:06 +00:00
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
|
2009-12-30 17:35:36 +00:00
|
|
|
|
|
|
|
'captype' => 'write',
|
2010-02-19 19:11:06 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-02-19 19:11:06 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2010-02-19 19:11:06 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
'clonepermissionsfrom' => 'moodle/site:backupupload'
|
2009-12-30 17:35:36 +00:00
|
|
|
),
|
|
|
|
|
2010-05-01 16:42:29 +00:00
|
|
|
'moodle/restore:configure' => array(
|
2009-11-20 00:32:16 +00:00
|
|
|
|
2010-05-01 16:42:29 +00:00
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
|
2009-11-20 00:32:16 +00:00
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-05-01 16:42:29 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2009-11-20 00:32:16 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2010-05-01 16:42:29 +00:00
|
|
|
'moodle/restore:rolldates' => array(
|
2010-02-19 19:11:06 +00:00
|
|
|
|
|
|
|
'captype' => 'write',
|
2010-05-01 16:42:29 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-05-01 16:42:29 +00:00
|
|
|
'coursecreator' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2010-02-19 19:11:06 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2010-05-01 16:42:29 +00:00
|
|
|
'moodle/restore:userinfo' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG,
|
2009-10-06 01:14:47 +00:00
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-05-01 16:42:29 +00:00
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
'moodle/restore:createuser' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2009-10-06 01:14:47 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/site:manageblocks' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-18 21:32:49 +00:00
|
|
|
'riskbitmask' => RISK_SPAM | RISK_XSS,
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
2008-07-24 21:59:13 +00:00
|
|
|
'contextlevel' => CONTEXT_BLOCK,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-09-13 04:09:31 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-08 06:45:25 +00:00
|
|
|
'moodle/site:accessallgroups' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-08 06:45:25 +00:00
|
|
|
'captype' => 'read',
|
2018-10-30 12:00:12 +00:00
|
|
|
'contextlevel' => CONTEXT_MODULE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-08 06:45:25 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 06:45:25 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2019-07-23 11:35:08 +01:00
|
|
|
'moodle/site:viewanonymousevents' => array(
|
|
|
|
|
2020-01-14 16:42:26 +01:00
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
|
2019-07-23 11:35:08 +01:00
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_MODULE,
|
|
|
|
'archetypes' => array(
|
2020-01-14 16:42:26 +01:00
|
|
|
'manager' => CAP_ALLOW,
|
2019-07-23 11:35:08 +01:00
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2006-08-09 09:16:35 +00:00
|
|
|
'moodle/site:viewfullnames' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-09 09:16:35 +00:00
|
|
|
'captype' => 'read',
|
2018-10-30 12:00:12 +00:00
|
|
|
'contextlevel' => CONTEXT_MODULE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-09 09:16:35 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-09 09:16:35 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2011-04-13 14:28:23 +01:00
|
|
|
// In reports that give lists of users, extra information about each user's
|
|
|
|
// identity (the fields configured in site option showuseridentity) will be
|
|
|
|
// displayed to users who have this capability.
|
|
|
|
'moodle/site:viewuseridentity' => array(
|
|
|
|
|
|
|
|
'captype' => 'read',
|
2018-10-30 12:00:12 +00:00
|
|
|
'contextlevel' => CONTEXT_MODULE,
|
2011-04-13 14:28:23 +01:00
|
|
|
'archetypes' => array(
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2006-08-15 04:13:22 +00:00
|
|
|
'moodle/site:viewreports' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-18 21:32:49 +00:00
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
|
2006-08-15 04:13:22 +00:00
|
|
|
'captype' => 'read',
|
2008-07-24 21:59:13 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-15 04:13:22 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-15 04:13:22 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-26 13:00:07 +00:00
|
|
|
'moodle/site:trustcontent' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-18 21:32:49 +00:00
|
|
|
'riskbitmask' => RISK_XSS,
|
|
|
|
|
2006-08-26 13:00:07 +00:00
|
|
|
'captype' => 'write',
|
2018-10-30 12:00:12 +00:00
|
|
|
'contextlevel' => CONTEXT_MODULE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-26 13:00:07 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-26 13:00:07 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-24 12:54:53 +00:00
|
|
|
'moodle/site:uploadusers' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-18 21:32:49 +00:00
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2009-04-13 06:54:11 +00:00
|
|
|
// Permission to manage filter setting overrides in subcontexts.
|
|
|
|
'moodle/filter:manage' => array(
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2009-04-13 06:54:11 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW,
|
2009-04-13 06:54:11 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-24 12:54:53 +00:00
|
|
|
|
|
|
|
'moodle/user:create' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-24 12:54:53 +00:00
|
|
|
'moodle/user:delete' => array(
|
2006-09-24 12:31:49 +00:00
|
|
|
|
2017-08-30 11:29:42 +08:00
|
|
|
'riskbitmask' => RISK_PERSONAL | RISK_DATALOSS,
|
2006-10-24 08:02:26 +00:00
|
|
|
|
2006-09-24 12:31:49 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-09-24 12:31:49 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2006-09-24 12:54:53 +00:00
|
|
|
'moodle/user:update' => array(
|
2006-09-24 12:31:49 +00:00
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
|
2006-09-18 21:32:49 +00:00
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/user:viewdetails' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-15 14:39:16 +00:00
|
|
|
'captype' => 'read',
|
2008-07-24 21:59:13 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-12-07 06:14:52 +00:00
|
|
|
'guest' => CAP_ALLOW,
|
|
|
|
'student' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-15 14:39:16 +00:00
|
|
|
|
2010-11-05 06:55:43 +00:00
|
|
|
'moodle/user:viewalldetails' => array(
|
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/user:update'
|
|
|
|
),
|
|
|
|
|
2013-07-29 11:21:38 -03:00
|
|
|
'moodle/user:viewlastip' => array(
|
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/user:update'
|
|
|
|
),
|
|
|
|
|
2006-09-15 14:39:16 +00:00
|
|
|
'moodle/user:viewhiddendetails' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-18 21:32:49 +00:00
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
|
2006-09-15 14:39:16 +00:00
|
|
|
'captype' => 'read',
|
2008-07-24 21:59:13 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-09-15 14:39:16 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-09-15 14:39:16 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-10-01 05:46:55 +00:00
|
|
|
'moodle/user:loginas' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-10-01 05:46:55 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2010-05-04 13:04:35 +00:00
|
|
|
// can the user manage the system default profile page?
|
|
|
|
'moodle/user:managesyspages' => array(
|
|
|
|
|
|
|
|
'riskbitmap' => RISK_SPAM | RISK_PERSONAL | RISK_CONFIG,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-05-04 13:04:35 +00:00
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
// can the user manage another user's profile page?
|
|
|
|
'moodle/user:manageblocks' => array(
|
|
|
|
|
|
|
|
'riskbitmap' => RISK_SPAM | RISK_PERSONAL,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER
|
|
|
|
),
|
|
|
|
|
|
|
|
// can the user manage their own profile page?
|
|
|
|
'moodle/user:manageownblocks' => array(
|
|
|
|
|
|
|
|
'riskbitmap' => RISK_SPAM | RISK_PERSONAL,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-07-22 09:05:13 +00:00
|
|
|
'user' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
// can the user manage their own files?
|
|
|
|
'moodle/user:manageownfiles' => array(
|
|
|
|
|
|
|
|
'riskbitmap' => RISK_SPAM | RISK_PERSONAL,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
'user' => CAP_ALLOW
|
2010-05-04 13:04:35 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2012-10-31 15:48:43 +08:00
|
|
|
// Can the user ignore the setting userquota?
|
|
|
|
// The permissions are cloned from ignorefilesizelimits as it was partly used for that purpose.
|
|
|
|
'moodle/user:ignoreuserquota' => array(
|
|
|
|
'riskbitmap' => RISK_SPAM,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:ignorefilesizelimits'
|
|
|
|
),
|
|
|
|
|
2010-05-04 13:04:35 +00:00
|
|
|
// can the user manage the system default dashboard page?
|
|
|
|
'moodle/my:configsyspages' => array(
|
|
|
|
|
|
|
|
'riskbitmap' => RISK_SPAM | RISK_PERSONAL | RISK_CONFIG,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-05-04 13:04:35 +00:00
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/role:assign' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2008-07-23 16:10:06 +00:00
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
2008-07-24 21:59:13 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-09-21 16:02:39 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-18 08:01:16 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2010-03-07 09:28:54 +00:00
|
|
|
'moodle/role:review' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-07 09:28:54 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2010-03-07 09:28:54 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2021-08-02 17:38:53 +01:00
|
|
|
// The ability to override the permissions for any capability.
|
2006-08-18 08:01:16 +00:00
|
|
|
'moodle/role:override' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-10-24 08:02:26 +00:00
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
|
|
|
|
|
2006-08-18 08:01:16 +00:00
|
|
|
'captype' => 'write',
|
2008-07-24 21:59:13 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2021-08-02 17:38:53 +01:00
|
|
|
// The ability to override the permissions for 'safe' capabilities (those without risks).
|
|
|
|
// If a user has moodle/role:override then you should not check this capability.
|
2008-07-23 16:10:06 +00:00
|
|
|
'moodle/role:safeoverride' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
2008-07-24 21:59:13 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2008-07-23 16:10:06 +00:00
|
|
|
'editingteacher' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/role:manage' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-10-24 08:02:26 +00:00
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-07 08:35:30 +00:00
|
|
|
|
2006-09-21 07:44:53 +00:00
|
|
|
'moodle/role:switchroles' => array(
|
2006-10-24 08:02:26 +00:00
|
|
|
|
2008-07-23 16:10:06 +00:00
|
|
|
'riskbitmask' => RISK_XSS | RISK_PERSONAL,
|
2006-10-24 08:02:26 +00:00
|
|
|
|
2006-09-21 07:44:53 +00:00
|
|
|
'captype' => 'read',
|
2008-07-24 21:59:13 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-09-21 07:44:53 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-09-21 07:44:53 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
|
course categories: Fix many bugs with category editing and permissions. Clean up code.
Bugs: MDL-17479, MDL-16426, MDL-16063, MDL-16013, MDL-15658, MDL-15556, MDL-15161, MDL-14925, MDL-13742, MDL-11557.
* Simplify category editing permissions to just moodle/category:manage and moodle/category:seehiddencategories.
* Enforce those correctly. (Note MDL 17502 is still outstanding.)
* Don't screw up category sort order when you just edit name or description.
* Niceties like where redirects go when you cancel or submit forms.
* Make sure a global course creator can see the site admin block.
* Don't allow a category to be made the child of one of its children!
* General code cleanup to bring key files more in line with best pracitice.
Apologies for the fact it is one big patch, rather than a series of smaller patches. However, categoryedit.php, category.php and index.php where in pretty bad shape and needed significant cleaning up. categoryedit.php, in particular, was almost completely rewritten.
Merged from MOODLE_19_STABLE.
2008-12-04 08:53:10 +00:00
|
|
|
// Create, update and delete course categories. (Deleting a course category
|
|
|
|
// does not let you delete the courses it contains, unless you also have
|
|
|
|
// moodle/course: delete.) Creating and deleting requires this permission in
|
|
|
|
// the parent category.
|
|
|
|
'moodle/category:manage' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2007-06-10 19:35:05 +00:00
|
|
|
'riskbitmask' => RISK_XSS,
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSECAT,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
course categories: Fix many bugs with category editing and permissions. Clean up code.
Bugs: MDL-17479, MDL-16426, MDL-16063, MDL-16013, MDL-15658, MDL-15556, MDL-15161, MDL-14925, MDL-13742, MDL-11557.
* Simplify category editing permissions to just moodle/category:manage and moodle/category:seehiddencategories.
* Enforce those correctly. (Note MDL 17502 is still outstanding.)
* Don't screw up category sort order when you just edit name or description.
* Niceties like where redirects go when you cancel or submit forms.
* Make sure a global course creator can see the site admin block.
* Don't allow a category to be made the child of one of its children!
* General code cleanup to bring key files more in line with best pracitice.
Apologies for the fact it is one big patch, rather than a series of smaller patches. However, categoryedit.php, category.php and index.php where in pretty bad shape and needed significant cleaning up. categoryedit.php, in particular, was almost completely rewritten.
Merged from MOODLE_19_STABLE.
2008-12-04 08:53:10 +00:00
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/category:update'
|
2006-08-08 05:13:06 +00:00
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2019-04-15 11:58:58 +08:00
|
|
|
'moodle/category:viewcourselist' => array(
|
2018-06-21 13:34:59 +08:00
|
|
|
|
|
|
|
'captype' => 'read',
|
2019-04-15 11:58:58 +08:00
|
|
|
'contextlevel' => CONTEXT_COURSECAT,
|
2018-06-21 13:34:59 +08:00
|
|
|
'archetypes' => array(
|
|
|
|
'guest' => CAP_ALLOW,
|
|
|
|
'user' => CAP_ALLOW,
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
course categories: Fix many bugs with category editing and permissions. Clean up code.
Bugs: MDL-17479, MDL-16426, MDL-16063, MDL-16013, MDL-15658, MDL-15556, MDL-15161, MDL-14925, MDL-13742, MDL-11557.
* Simplify category editing permissions to just moodle/category:manage and moodle/category:seehiddencategories.
* Enforce those correctly. (Note MDL 17502 is still outstanding.)
* Don't screw up category sort order when you just edit name or description.
* Niceties like where redirects go when you cancel or submit forms.
* Make sure a global course creator can see the site admin block.
* Don't allow a category to be made the child of one of its children!
* General code cleanup to bring key files more in line with best pracitice.
Apologies for the fact it is one big patch, rather than a series of smaller patches. However, categoryedit.php, category.php and index.php where in pretty bad shape and needed significant cleaning up. categoryedit.php, in particular, was almost completely rewritten.
Merged from MOODLE_19_STABLE.
2008-12-04 08:53:10 +00:00
|
|
|
'moodle/category:viewhiddencategories' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
course categories: Fix many bugs with category editing and permissions. Clean up code.
Bugs: MDL-17479, MDL-16426, MDL-16063, MDL-16013, MDL-15658, MDL-15556, MDL-15161, MDL-14925, MDL-13742, MDL-11557.
* Simplify category editing permissions to just moodle/category:manage and moodle/category:seehiddencategories.
* Enforce those correctly. (Note MDL 17502 is still outstanding.)
* Don't screw up category sort order when you just edit name or description.
* Niceties like where redirects go when you cancel or submit forms.
* Make sure a global course creator can see the site admin block.
* Don't allow a category to be made the child of one of its children!
* General code cleanup to bring key files more in line with best pracitice.
Apologies for the fact it is one big patch, rather than a series of smaller patches. However, categoryedit.php, category.php and index.php where in pretty bad shape and needed significant cleaning up. categoryedit.php, in particular, was almost completely rewritten.
Merged from MOODLE_19_STABLE.
2008-12-04 08:53:10 +00:00
|
|
|
'captype' => 'read',
|
2006-08-08 05:13:06 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSECAT,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
course categories: Fix many bugs with category editing and permissions. Clean up code.
Bugs: MDL-17479, MDL-16426, MDL-16063, MDL-16013, MDL-15658, MDL-15556, MDL-15161, MDL-14925, MDL-13742, MDL-11557.
* Simplify category editing permissions to just moodle/category:manage and moodle/category:seehiddencategories.
* Enforce those correctly. (Note MDL 17502 is still outstanding.)
* Don't screw up category sort order when you just edit name or description.
* Niceties like where redirects go when you cancel or submit forms.
* Make sure a global course creator can see the site admin block.
* Don't allow a category to be made the child of one of its children!
* General code cleanup to bring key files more in line with best pracitice.
Apologies for the fact it is one big patch, rather than a series of smaller patches. However, categoryedit.php, category.php and index.php where in pretty bad shape and needed significant cleaning up. categoryedit.php, in particular, was almost completely rewritten.
Merged from MOODLE_19_STABLE.
2008-12-04 08:53:10 +00:00
|
|
|
'coursecreator' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
course categories: Fix many bugs with category editing and permissions. Clean up code.
Bugs: MDL-17479, MDL-16426, MDL-16063, MDL-16013, MDL-15658, MDL-15556, MDL-15161, MDL-14925, MDL-13742, MDL-11557.
* Simplify category editing permissions to just moodle/category:manage and moodle/category:seehiddencategories.
* Enforce those correctly. (Note MDL 17502 is still outstanding.)
* Don't screw up category sort order when you just edit name or description.
* Niceties like where redirects go when you cancel or submit forms.
* Make sure a global course creator can see the site admin block.
* Don't allow a category to be made the child of one of its children!
* General code cleanup to bring key files more in line with best pracitice.
Apologies for the fact it is one big patch, rather than a series of smaller patches. However, categoryedit.php, category.php and index.php where in pretty bad shape and needed significant cleaning up. categoryedit.php, in particular, was almost completely rewritten.
Merged from MOODLE_19_STABLE.
2008-12-04 08:53:10 +00:00
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/category:visibility'
|
2006-08-08 05:13:06 +00:00
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2010-04-23 09:05:56 +00:00
|
|
|
// create, delete, move cohorts in system and course categories,
|
|
|
|
// (cohorts with component !== null can be only moved)
|
|
|
|
'moodle/cohort:manage' => array(
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSECAT,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-04-23 09:05:56 +00:00
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
// add and remove cohort members (only for cohorts where component !== null)
|
|
|
|
'moodle/cohort:assign' => array(
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSECAT,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-04-23 09:05:56 +00:00
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2014-07-29 17:44:25 +08:00
|
|
|
// View visible and hidden cohorts defined in the current context.
|
2010-04-23 09:05:56 +00:00
|
|
|
'moodle/cohort:view' => array(
|
|
|
|
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-04-23 09:05:56 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2023-03-07 13:28:02 +11:00
|
|
|
'moodle/cohort:configurecustomfields' => array(
|
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'clonepermissionsfrom' => 'moodle/site:config'
|
|
|
|
),
|
|
|
|
|
2023-08-09 11:02:49 +10:00
|
|
|
'moodle/group:configurecustomfields' => array(
|
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'clonepermissionsfrom' => 'moodle/site:config'
|
|
|
|
),
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/course:create' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-18 21:32:49 +00:00
|
|
|
'riskbitmask' => RISK_XSS,
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
2007-03-14 21:42:38 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSECAT,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-10-10 03:03:17 +00:00
|
|
|
'coursecreator' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2018-10-18 21:08:15 +08:00
|
|
|
'moodle/course:creategroupconversations' => array(
|
|
|
|
'riskbitmask' => RISK_XSS,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2008-12-10 02:57:41 +00:00
|
|
|
'moodle/course:request' => array(
|
|
|
|
'captype' => 'write',
|
2019-09-23 16:37:23 +02:00
|
|
|
'contextlevel' => CONTEXT_COURSECAT,
|
2008-12-10 02:57:41 +00:00
|
|
|
),
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/course:delete' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2008-07-23 16:10:06 +00:00
|
|
|
'riskbitmask' => RISK_DATALOSS,
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/course:update' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-18 21:32:49 +00:00
|
|
|
'riskbitmask' => RISK_XSS,
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-08 05:13:06 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week
AMOS START
MOV [sendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage,enrol_self]
MOV [configsendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage_desc,enrol_self]
MOV [enrolstartdate,core],[enrolstartdate,enrol_self]
MOV [enrolenddate,core],[enrolenddate,enrol_self]
CPY [welcometocourse,core],[welcometocourse,enrol_self]
CPY [welcometocoursetext,core],[welcometocoursetext,enrol_self]
MOV [notenrollable,core],[notenrollable,core_enrol]
MOV [enrolenddaterror,core],[enrolenddaterror,enrol_self]
MOV [enrolmentkeyhint,core],[passwordinvalidhint,enrol_self]
MOV [coursemanager,core_admin],[coursecontact,core_admin]
MOV [configcoursemanager,core_admin],[coursecontact_desc,core_admin]
MOV [enrolledincourserole,core],[enrolledincourserole,enrol_manual]
MOV [enrolme,core],[enrolme,core_enrol]
MOV [unenrol,core],[unenrol,core_enrol]
MOV [unenrolme,core],[unenrolme,core_enrol]
MOV [enrolmentnew,core],[enrolmentnew,core_enrol]
MOV [enrolmentnewuser,core],[enrolmentnewuser,core_enrol]
MOV [enrolments,core],[enrolments,core_enrol]
MOV [enrolperiod,core],[enrolperiod,core_enrol]
MOV [unenrolroleusers,core],[unenrolroleusers,core_enrol]
AMOS END
2010-06-21 15:30:49 +00:00
|
|
|
'moodle/course:view' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week
AMOS START
MOV [sendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage,enrol_self]
MOV [configsendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage_desc,enrol_self]
MOV [enrolstartdate,core],[enrolstartdate,enrol_self]
MOV [enrolenddate,core],[enrolenddate,enrol_self]
CPY [welcometocourse,core],[welcometocourse,enrol_self]
CPY [welcometocoursetext,core],[welcometocoursetext,enrol_self]
MOV [notenrollable,core],[notenrollable,core_enrol]
MOV [enrolenddaterror,core],[enrolenddaterror,enrol_self]
MOV [enrolmentkeyhint,core],[passwordinvalidhint,enrol_self]
MOV [coursemanager,core_admin],[coursecontact,core_admin]
MOV [configcoursemanager,core_admin],[coursecontact_desc,core_admin]
MOV [enrolledincourserole,core],[enrolledincourserole,enrol_manual]
MOV [enrolme,core],[enrolme,core_enrol]
MOV [unenrol,core],[unenrol,core_enrol]
MOV [unenrolme,core],[unenrolme,core_enrol]
MOV [enrolmentnew,core],[enrolmentnew,core_enrol]
MOV [enrolmentnewuser,core],[enrolmentnewuser,core_enrol]
MOV [enrolments,core],[enrolments,core_enrol]
MOV [enrolperiod,core],[enrolperiod,core_enrol]
MOV [unenrolroleusers,core],[unenrolroleusers,core_enrol]
AMOS END
2010-06-21 15:30:49 +00:00
|
|
|
'manager' => CAP_ALLOW,
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week
AMOS START
MOV [sendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage,enrol_self]
MOV [configsendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage_desc,enrol_self]
MOV [enrolstartdate,core],[enrolstartdate,enrol_self]
MOV [enrolenddate,core],[enrolenddate,enrol_self]
CPY [welcometocourse,core],[welcometocourse,enrol_self]
CPY [welcometocoursetext,core],[welcometocoursetext,enrol_self]
MOV [notenrollable,core],[notenrollable,core_enrol]
MOV [enrolenddaterror,core],[enrolenddaterror,enrol_self]
MOV [enrolmentkeyhint,core],[passwordinvalidhint,enrol_self]
MOV [coursemanager,core_admin],[coursecontact,core_admin]
MOV [configcoursemanager,core_admin],[coursecontact_desc,core_admin]
MOV [enrolledincourserole,core],[enrolledincourserole,enrol_manual]
MOV [enrolme,core],[enrolme,core_enrol]
MOV [unenrol,core],[unenrol,core_enrol]
MOV [unenrolme,core],[unenrolme,core_enrol]
MOV [enrolmentnew,core],[enrolmentnew,core_enrol]
MOV [enrolmentnewuser,core],[enrolmentnewuser,core_enrol]
MOV [enrolments,core],[enrolments,core_enrol]
MOV [enrolperiod,core],[enrolperiod,core_enrol]
MOV [unenrolroleusers,core],[unenrolroleusers,core_enrol]
AMOS END
2010-06-21 15:30:49 +00:00
|
|
|
/* review course enrolments - no group restrictions, it is really full access to all participants info*/
|
|
|
|
'moodle/course:enrolreview' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
2010-03-31 07:41:31 +00:00
|
|
|
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week
AMOS START
MOV [sendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage,enrol_self]
MOV [configsendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage_desc,enrol_self]
MOV [enrolstartdate,core],[enrolstartdate,enrol_self]
MOV [enrolenddate,core],[enrolenddate,enrol_self]
CPY [welcometocourse,core],[welcometocourse,enrol_self]
CPY [welcometocoursetext,core],[welcometocoursetext,enrol_self]
MOV [notenrollable,core],[notenrollable,core_enrol]
MOV [enrolenddaterror,core],[enrolenddaterror,enrol_self]
MOV [enrolmentkeyhint,core],[passwordinvalidhint,enrol_self]
MOV [coursemanager,core_admin],[coursecontact,core_admin]
MOV [configcoursemanager,core_admin],[coursecontact_desc,core_admin]
MOV [enrolledincourserole,core],[enrolledincourserole,enrol_manual]
MOV [enrolme,core],[enrolme,core_enrol]
MOV [unenrol,core],[unenrol,core_enrol]
MOV [unenrolme,core],[unenrolme,core_enrol]
MOV [enrolmentnew,core],[enrolmentnew,core_enrol]
MOV [enrolmentnewuser,core],[enrolmentnewuser,core_enrol]
MOV [enrolments,core],[enrolments,core_enrol]
MOV [enrolperiod,core],[enrolperiod,core_enrol]
MOV [unenrolroleusers,core],[unenrolroleusers,core_enrol]
AMOS END
2010-06-21 15:30:49 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
/* add, remove, hide enrol instances in courses */
|
|
|
|
'moodle/course:enrolconfig' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2014-03-26 10:17:23 -04:00
|
|
|
'moodle/course:reviewotherusers' => array(
|
|
|
|
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/role:assign'
|
|
|
|
),
|
|
|
|
|
2006-09-28 06:41:07 +00:00
|
|
|
'moodle/course:bulkmessaging' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-09-28 06:41:07 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-09-28 06:41:07 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2006-09-11 08:56:23 +00:00
|
|
|
'moodle/course:viewhiddenuserfields' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-18 21:32:49 +00:00
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
2008-07-28 12:31:29 +00:00
|
|
|
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2008-07-28 12:31:29 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2008-07-28 12:31:29 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2006-09-11 08:56:23 +00:00
|
|
|
'moodle/course:viewhiddencourses' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-11 08:56:23 +00:00
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-03-15 04:23:21 +00:00
|
|
|
'coursecreator' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-09-11 08:56:23 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/course:visibility' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week
AMOS START
MOV [sendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage,enrol_self]
MOV [configsendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage_desc,enrol_self]
MOV [enrolstartdate,core],[enrolstartdate,enrol_self]
MOV [enrolenddate,core],[enrolenddate,enrol_self]
CPY [welcometocourse,core],[welcometocourse,enrol_self]
CPY [welcometocoursetext,core],[welcometocoursetext,enrol_self]
MOV [notenrollable,core],[notenrollable,core_enrol]
MOV [enrolenddaterror,core],[enrolenddaterror,enrol_self]
MOV [enrolmentkeyhint,core],[passwordinvalidhint,enrol_self]
MOV [coursemanager,core_admin],[coursecontact,core_admin]
MOV [configcoursemanager,core_admin],[coursecontact_desc,core_admin]
MOV [enrolledincourserole,core],[enrolledincourserole,enrol_manual]
MOV [enrolme,core],[enrolme,core_enrol]
MOV [unenrol,core],[unenrol,core_enrol]
MOV [unenrolme,core],[unenrolme,core_enrol]
MOV [enrolmentnew,core],[enrolmentnew,core_enrol]
MOV [enrolmentnewuser,core],[enrolmentnewuser,core_enrol]
MOV [enrolments,core],[enrolments,core_enrol]
MOV [enrolperiod,core],[enrolperiod,core_enrol]
MOV [unenrolroleusers,core],[unenrolroleusers,core_enrol]
AMOS END
2010-06-21 15:30:49 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-15 04:13:22 +00:00
|
|
|
'moodle/course:managefiles' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-18 21:32:49 +00:00
|
|
|
'riskbitmask' => RISK_XSS,
|
|
|
|
|
2006-08-15 04:13:22 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-15 04:13:22 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-15 04:13:22 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2017-01-12 17:16:25 -08:00
|
|
|
'moodle/course:ignoreavailabilityrestrictions' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_MODULE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'coursecreator' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:viewhiddenactivities'
|
|
|
|
),
|
|
|
|
|
2012-03-27 17:42:53 +07:00
|
|
|
'moodle/course:ignorefilesizelimits' => array(
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/course:manageactivities' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-18 21:32:49 +00:00
|
|
|
'riskbitmask' => RISK_XSS,
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
2011-12-18 11:54:02 +01:00
|
|
|
'contextlevel' => CONTEXT_MODULE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-08 05:13:06 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/course:activityvisibility' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
2011-12-18 11:54:02 +01:00
|
|
|
'contextlevel' => CONTEXT_MODULE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-08 05:13:06 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/course:viewhiddenactivities' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2020-04-29 08:19:40 +12:00
|
|
|
'captype' => 'read',
|
2011-12-18 11:54:02 +01:00
|
|
|
'contextlevel' => CONTEXT_MODULE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-08 05:13:06 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/course:viewparticipants' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-08 05:13:06 +00:00
|
|
|
'student' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-10-02 03:37:30 +00:00
|
|
|
)
|
|
|
|
),
|
2008-10-08 13:23:35 +00:00
|
|
|
|
|
|
|
'moodle/course:changefullname' => array(
|
|
|
|
|
2008-10-08 20:07:42 +00:00
|
|
|
'riskbitmask' => RISK_XSS,
|
|
|
|
|
2008-10-08 13:23:35 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2008-10-08 13:23:35 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2008-10-08 20:03:15 +00:00
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:update'
|
2008-10-08 13:23:35 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
'moodle/course:changeshortname' => array(
|
|
|
|
|
2008-10-08 20:07:42 +00:00
|
|
|
'riskbitmask' => RISK_XSS,
|
|
|
|
|
2008-10-08 13:23:35 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2008-10-08 13:23:35 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2008-10-08 20:03:15 +00:00
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:update'
|
2008-10-08 13:23:35 +00:00
|
|
|
),
|
|
|
|
|
2019-01-11 10:56:14 +01:00
|
|
|
'moodle/course:changelockedcustomfields' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
'moodle/course:configurecustomfields' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'clonepermissionsfrom' => 'moodle/site:config'
|
|
|
|
),
|
|
|
|
|
2015-10-01 18:04:40 +01:00
|
|
|
'moodle/course:renameroles' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:update'
|
|
|
|
),
|
|
|
|
|
2008-10-08 13:23:35 +00:00
|
|
|
'moodle/course:changeidnumber' => array(
|
|
|
|
|
2008-10-08 20:07:42 +00:00
|
|
|
'riskbitmask' => RISK_XSS,
|
|
|
|
|
2008-10-08 13:23:35 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2008-10-08 13:23:35 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2008-10-08 20:03:15 +00:00
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:update'
|
2008-10-08 13:23:35 +00:00
|
|
|
),
|
2009-10-02 07:05:02 +00:00
|
|
|
'moodle/course:changecategory' => array(
|
|
|
|
'riskbitmask' => RISK_XSS,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2009-10-02 07:05:02 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2009-10-02 07:05:02 +00:00
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:update'
|
|
|
|
),
|
|
|
|
|
|
|
|
'moodle/course:changesummary' => array(
|
|
|
|
'riskbitmask' => RISK_XSS,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2016-01-18 13:48:30 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:update'
|
|
|
|
),
|
|
|
|
|
2022-04-29 15:37:05 +01:00
|
|
|
// Ability to set a forced language for a course or activity.
|
2016-01-18 13:48:30 +00:00
|
|
|
'moodle/course:setforcedlanguage' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
2009-10-02 07:05:02 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2009-10-02 07:05:02 +00:00
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:update'
|
|
|
|
),
|
|
|
|
|
2008-10-08 13:23:35 +00:00
|
|
|
|
2007-10-02 03:37:30 +00:00
|
|
|
'moodle/site:viewparticipants' => array(
|
|
|
|
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2012-08-29 16:31:55 +01:00
|
|
|
'moodle/course:isincompletionreports' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'student' => CAP_ALLOW,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/course:viewscales' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-08 05:13:06 +00:00
|
|
|
'student' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/course:managescales' => array(
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-08 05:13:06 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/course:managegroups' => array(
|
2018-12-19 13:58:11 +08:00
|
|
|
'riskbitmask' => RISK_XSS,
|
2006-08-08 05:13:06 +00:00
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-15 04:13:22 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-15 04:13:22 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
MDL-68093 groups: Add visibility and participation settings
These new settings are designed to enchance user privacy surrounding
groups. They allow groups to be configured so that users outside the
group cannot see the group, so that users in the group cannot see each
other, or so that users cannot see the group at all, even if they are in
it. This avoids issues where a group may be assigned based on sensitive
personal information (such as a person requiring special arrangements
due to a disability).
By default, groups are visible to all and available for participation in
activities, which maintains the current behaviour.
For performance, a new cache has been added to track the number of
groups on a course that are not visible to non-members. This allows us
to revert to the existing behaviour if the new features are not being
used at all on a course, and only apply the new visibility conditions if
they are.
Users who have the moodle/course:viewhiddengroups capability should be
concious of exposing hidden groups when showing their screen to other
users. The "Switch role to..." feature can be used to show a course page
on screen without exposing private availability conditions, for example.
The changes cover several specific areas:
* grouplib functions, which most code should use to get lists of groups
and members (this includes the participants page).
* Activities supporting group overrides will not allow overrides for
groups that are hidden from all users.
* Activities supporting separate/visible groups modes will only allow
groups with the new "participation" flag enabled to be selected.
* Group messaging will be disabled for groups where members cannot see
each other, or cannot see the group at all.
2022-09-06 09:14:24 +01:00
|
|
|
'moodle/course:viewhiddengroups' => array(
|
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
'captype' => 'READ',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2006-08-15 04:13:22 +00:00
|
|
|
'moodle/course:reset' => array(
|
|
|
|
|
2008-07-23 16:10:06 +00:00
|
|
|
'riskbitmask' => RISK_DATALOSS,
|
|
|
|
|
2006-08-15 04:13:22 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-08 05:13:06 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2013-03-27 10:14:10 +08:00
|
|
|
'moodle/course:viewsuspendedusers' => array(
|
|
|
|
|
|
|
|
'captype' => 'read',
|
2019-10-30 18:36:03 +01:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2013-03-27 10:14:10 +08:00
|
|
|
'archetypes' => array(
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2015-08-22 20:55:37 +08:00
|
|
|
'moodle/course:tag' => array(
|
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:update'
|
|
|
|
),
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/blog:view' => array(
|
|
|
|
|
|
|
|
'captype' => 'read',
|
2009-10-30 07:26:11 +00:00
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2009-10-30 07:26:11 +00:00
|
|
|
'guest' => CAP_ALLOW,
|
|
|
|
'user' => CAP_ALLOW,
|
|
|
|
'student' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2009-10-30 07:26:11 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
'moodle/blog:search' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-09-12 05:58:42 +00:00
|
|
|
'guest' => CAP_ALLOW,
|
2007-01-31 21:05:32 +00:00
|
|
|
'user' => CAP_ALLOW,
|
2006-08-08 05:13:06 +00:00
|
|
|
'student' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2009-10-30 07:26:11 +00:00
|
|
|
'moodle/blog:viewdrafts' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2009-10-30 07:26:11 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2006-10-31 09:09:40 +00:00
|
|
|
'moodle/blog:create' => array( // works in CONTEXT_SYSTEM only
|
2006-08-08 05:13:06 +00:00
|
|
|
|
2006-09-18 21:32:49 +00:00
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-01-31 21:05:32 +00:00
|
|
|
'user' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/blog:manageentries' => array(
|
|
|
|
|
2006-09-18 21:32:49 +00:00
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
2009-10-30 07:26:11 +00:00
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-08 05:13:06 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2009-10-30 07:26:11 +00:00
|
|
|
|
2009-09-04 00:36:43 +00:00
|
|
|
'moodle/blog:manageexternal' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
2010-11-19 18:25:27 +00:00
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2009-09-04 00:36:43 +00:00
|
|
|
'student' => CAP_ALLOW,
|
|
|
|
'user' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2009-09-04 00:36:43 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2006-10-31 09:09:40 +00:00
|
|
|
'moodle/calendar:manageownentries' => array( // works in CONTEXT_SYSTEM only
|
2006-08-08 05:13:06 +00:00
|
|
|
|
2006-09-18 21:32:49 +00:00
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
2008-07-24 21:59:13 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-01-31 21:05:32 +00:00
|
|
|
'user' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2007-10-30 16:19:47 +00:00
|
|
|
'moodle/calendar:managegroupentries' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
2008-07-24 21:59:13 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-10-30 16:19:47 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-10-30 16:19:47 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'moodle/calendar:manageentries' => array(
|
|
|
|
|
2006-09-18 21:32:49 +00:00
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
|
2006-08-08 05:13:06 +00:00
|
|
|
'captype' => 'write',
|
2008-07-24 21:59:13 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-08 05:13:06 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-08 05:13:06 +00:00
|
|
|
)
|
2006-08-16 07:57:51 +00:00
|
|
|
),
|
2007-05-08 15:07:25 +00:00
|
|
|
|
|
|
|
'moodle/user:editprofile' => array(
|
|
|
|
|
2008-07-23 16:10:06 +00:00
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
|
2007-05-08 15:07:25 +00:00
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-05-08 15:07:25 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2007-09-17 17:31:48 +00:00
|
|
|
'moodle/user:editownprofile' => array(
|
2007-04-26 21:41:08 +00:00
|
|
|
|
2008-07-23 16:10:06 +00:00
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
|
2007-09-17 17:31:48 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-04-26 21:41:08 +00:00
|
|
|
'guest' => CAP_PROHIBIT,
|
|
|
|
'user' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-09-17 17:31:48 +00:00
|
|
|
)
|
2007-04-26 21:41:08 +00:00
|
|
|
),
|
|
|
|
|
2007-09-17 17:31:48 +00:00
|
|
|
'moodle/user:changeownpassword' => array(
|
2007-04-26 21:41:08 +00:00
|
|
|
|
2007-09-17 17:31:48 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-04-26 21:41:08 +00:00
|
|
|
'guest' => CAP_PROHIBIT,
|
|
|
|
'user' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-09-17 17:31:48 +00:00
|
|
|
)
|
2007-04-26 21:41:08 +00:00
|
|
|
),
|
|
|
|
|
2006-09-20 21:00:45 +00:00
|
|
|
// The next 3 might make no sense for some roles, e.g teacher, etc.
|
2006-08-16 07:57:51 +00:00
|
|
|
// since the next level up is site. These are more for the parent role
|
|
|
|
'moodle/user:readuserposts' => array(
|
2006-10-24 08:02:26 +00:00
|
|
|
|
2006-08-16 07:57:51 +00:00
|
|
|
'captype' => 'read',
|
2006-09-15 14:09:16 +00:00
|
|
|
'contextlevel' => CONTEXT_USER,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-16 07:57:51 +00:00
|
|
|
'student' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-16 07:57:51 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-16 07:57:51 +00:00
|
|
|
'moodle/user:readuserblogs' => array(
|
2006-10-24 08:02:26 +00:00
|
|
|
|
2006-08-16 07:57:51 +00:00
|
|
|
'captype' => 'read',
|
2006-09-15 14:09:16 +00:00
|
|
|
'contextlevel' => CONTEXT_USER,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-16 07:57:51 +00:00
|
|
|
'student' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-16 07:57:51 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2008-12-01 19:19:29 +00:00
|
|
|
// designed for parent role - not used in legacy roles
|
2006-08-16 07:57:51 +00:00
|
|
|
'moodle/user:viewuseractivitiesreport' => array(
|
2008-12-01 19:19:29 +00:00
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
2006-10-24 08:02:26 +00:00
|
|
|
|
2006-08-16 07:57:51 +00:00
|
|
|
'captype' => 'read',
|
2006-09-15 14:09:16 +00:00
|
|
|
'contextlevel' => CONTEXT_USER,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-16 07:57:51 +00:00
|
|
|
)
|
2006-08-23 06:36:08 +00:00
|
|
|
),
|
2008-07-28 12:31:29 +00:00
|
|
|
|
2008-07-24 08:38:03 +00:00
|
|
|
//capabilities designed for the new message system configuration
|
|
|
|
'moodle/user:editmessageprofile' => array(
|
2008-10-08 13:23:35 +00:00
|
|
|
|
2008-07-24 08:38:03 +00:00
|
|
|
'riskbitmask' => RISK_SPAM,
|
2008-10-08 13:23:35 +00:00
|
|
|
|
2008-07-24 08:38:03 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2008-07-24 08:38:03 +00:00
|
|
|
)
|
|
|
|
),
|
2008-10-08 13:23:35 +00:00
|
|
|
|
|
|
|
'moodle/user:editownmessageprofile' => array(
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2008-07-24 08:38:03 +00:00
|
|
|
'guest' => CAP_PROHIBIT,
|
|
|
|
'user' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2008-10-08 13:23:35 +00:00
|
|
|
)
|
2008-07-24 08:38:03 +00:00
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2007-08-09 21:51:09 +00:00
|
|
|
'moodle/question:managecategory' => array(
|
2008-08-13 07:05:42 +00:00
|
|
|
'riskbitmask' => RISK_SPAM | RISK_XSS,
|
2006-08-23 06:36:08 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-23 06:36:08 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-08-23 06:36:08 +00:00
|
|
|
)
|
2007-09-17 17:31:48 +00:00
|
|
|
),
|
|
|
|
|
2007-08-09 21:51:09 +00:00
|
|
|
//new in moodle 1.9
|
|
|
|
'moodle/question:add' => array(
|
2008-08-13 07:05:42 +00:00
|
|
|
'riskbitmask' => RISK_SPAM | RISK_XSS,
|
2007-08-09 21:51:09 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-08-09 21:51:09 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-08-09 21:51:09 +00:00
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/question:manage'
|
2006-08-23 06:36:08 +00:00
|
|
|
),
|
2007-08-09 21:51:09 +00:00
|
|
|
'moodle/question:editmine' => array(
|
2008-08-13 07:05:42 +00:00
|
|
|
'riskbitmask' => RISK_SPAM | RISK_XSS,
|
2007-08-09 21:51:09 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-08-09 21:51:09 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-08-09 21:51:09 +00:00
|
|
|
),
|
2007-09-17 17:31:48 +00:00
|
|
|
'clonepermissionsfrom' => 'moodle/question:manage'
|
2007-08-09 21:51:09 +00:00
|
|
|
),
|
|
|
|
'moodle/question:editall' => array(
|
2008-08-13 07:05:42 +00:00
|
|
|
'riskbitmask' => RISK_SPAM | RISK_XSS,
|
2007-08-09 21:51:09 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-08-09 21:51:09 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-08-09 21:51:09 +00:00
|
|
|
),
|
2007-09-17 17:31:48 +00:00
|
|
|
'clonepermissionsfrom' => 'moodle/question:manage'
|
2007-08-09 21:51:09 +00:00
|
|
|
),
|
|
|
|
'moodle/question:viewmine' => array(
|
2006-08-23 06:36:08 +00:00
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-23 06:36:08 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-08-09 21:51:09 +00:00
|
|
|
),
|
2007-09-17 17:31:48 +00:00
|
|
|
'clonepermissionsfrom' => 'moodle/question:manage'
|
2006-08-23 06:36:08 +00:00
|
|
|
),
|
2007-08-09 21:51:09 +00:00
|
|
|
'moodle/question:viewall' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-08-09 21:51:09 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-08-09 21:51:09 +00:00
|
|
|
),
|
2007-09-17 17:31:48 +00:00
|
|
|
'clonepermissionsfrom' => 'moodle/question:manage'
|
2007-08-09 21:51:09 +00:00
|
|
|
),
|
|
|
|
'moodle/question:usemine' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-08-09 21:51:09 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-08-09 21:51:09 +00:00
|
|
|
),
|
2007-09-17 17:31:48 +00:00
|
|
|
'clonepermissionsfrom' => 'moodle/question:manage'
|
2007-08-09 21:51:09 +00:00
|
|
|
),
|
|
|
|
'moodle/question:useall' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-08-09 21:51:09 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-08-09 21:51:09 +00:00
|
|
|
),
|
2007-09-17 17:31:48 +00:00
|
|
|
'clonepermissionsfrom' => 'moodle/question:manage'
|
|
|
|
),
|
2007-08-09 21:51:09 +00:00
|
|
|
'moodle/question:movemine' => array(
|
2006-08-23 06:36:08 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-23 06:36:08 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-08-09 21:51:09 +00:00
|
|
|
),
|
2007-09-17 17:31:48 +00:00
|
|
|
'clonepermissionsfrom' => 'moodle/question:manage'
|
2006-08-23 06:36:08 +00:00
|
|
|
),
|
2007-08-09 21:51:09 +00:00
|
|
|
'moodle/question:moveall' => array(
|
2006-08-23 06:36:08 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-23 06:36:08 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-08-09 21:51:09 +00:00
|
|
|
),
|
2007-09-17 17:31:48 +00:00
|
|
|
'clonepermissionsfrom' => 'moodle/question:manage'
|
2006-09-03 16:26:55 +00:00
|
|
|
),
|
2007-08-09 21:51:09 +00:00
|
|
|
//END new in moodle 1.9
|
2007-09-17 17:31:48 +00:00
|
|
|
|
2007-04-27 10:37:39 +00:00
|
|
|
// Configure the installed question types.
|
|
|
|
'moodle/question:config' => array(
|
|
|
|
'riskbitmask' => RISK_CONFIG,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-04-27 10:37:39 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2008-08-29 10:08:27 +00:00
|
|
|
// While attempting questions, the ability to flag particular questions for later reference.
|
|
|
|
'moodle/question:flag' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2008-08-29 10:08:27 +00:00
|
|
|
'student' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2008-08-29 10:08:27 +00:00
|
|
|
)
|
|
|
|
),
|
2006-10-24 08:02:26 +00:00
|
|
|
|
2018-02-19 10:26:38 +08:00
|
|
|
// Controls whether the user can tag his own questions.
|
|
|
|
'moodle/question:tagmine' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/question:editmine'
|
|
|
|
),
|
|
|
|
|
|
|
|
// Controls whether the user can tag all questions.
|
|
|
|
'moodle/question:tagall' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/question:editall'
|
|
|
|
),
|
|
|
|
|
2008-08-29 10:08:27 +00:00
|
|
|
'moodle/site:doclinks' => array(
|
2006-09-03 16:26:55 +00:00
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-09-03 16:26:55 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-09-03 16:26:55 +00:00
|
|
|
)
|
2006-09-05 08:50:23 +00:00
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-05 08:50:23 +00:00
|
|
|
'moodle/course:sectionvisibility' => array(
|
2006-10-24 08:02:26 +00:00
|
|
|
|
2006-09-05 08:50:23 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-09-05 08:50:23 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-09-05 08:50:23 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-20 09:00:04 +00:00
|
|
|
'moodle/course:useremail' => array(
|
2006-10-24 08:02:26 +00:00
|
|
|
|
2006-09-20 09:00:04 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-09-20 09:00:04 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-09-20 09:00:04 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-05 08:50:23 +00:00
|
|
|
'moodle/course:viewhiddensections' => array(
|
2006-10-24 08:02:26 +00:00
|
|
|
|
2020-04-29 08:19:40 +12:00
|
|
|
'captype' => 'read',
|
2006-09-05 08:50:23 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-09-05 08:50:23 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-09-05 08:50:23 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-09-05 08:50:23 +00:00
|
|
|
'moodle/course:setcurrentsection' => array(
|
2006-10-24 08:02:26 +00:00
|
|
|
|
2006-09-05 08:50:23 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-09-05 08:50:23 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2006-09-05 08:50:23 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2012-07-18 14:33:32 +08:00
|
|
|
'moodle/course:movesections' => array(
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:update'
|
|
|
|
),
|
|
|
|
|
2007-07-23 19:22:48 +00:00
|
|
|
'moodle/site:mnetlogintoremote' => array(
|
2009-01-07 19:56:30 +00:00
|
|
|
|
2006-09-05 08:50:23 +00:00
|
|
|
'captype' => 'read',
|
2007-07-23 19:22:48 +00:00
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-09-05 08:50:23 +00:00
|
|
|
)
|
|
|
|
),
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2007-07-23 19:22:48 +00:00
|
|
|
'moodle/grade:viewall' => array(
|
2006-10-24 08:02:26 +00:00
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
2007-07-23 19:22:48 +00:00
|
|
|
'captype' => 'read',
|
2007-12-16 10:54:45 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE, // and CONTEXT_USER
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-07-23 19:22:48 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
2006-09-05 08:50:23 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-07-23 19:22:48 +00:00
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
|
2007-01-04 03:30:37 +00:00
|
|
|
),
|
2006-09-07 08:35:30 +00:00
|
|
|
|
2007-07-23 19:22:48 +00:00
|
|
|
'moodle/grade:view' => array(
|
2007-01-04 03:30:37 +00:00
|
|
|
'captype' => 'read',
|
2007-12-16 10:54:45 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-07-23 19:22:48 +00:00
|
|
|
'student' => CAP_ALLOW
|
2007-01-04 03:30:37 +00:00
|
|
|
)
|
2007-05-02 06:30:54 +00:00
|
|
|
),
|
2007-07-23 19:22:48 +00:00
|
|
|
|
|
|
|
'moodle/grade:viewhidden' => array(
|
2007-05-02 06:30:54 +00:00
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
'captype' => 'read',
|
2007-12-16 10:54:45 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-10-04 15:45:37 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-07-23 19:22:48 +00:00
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
|
2007-05-02 06:30:54 +00:00
|
|
|
),
|
2007-07-23 19:22:48 +00:00
|
|
|
|
|
|
|
'moodle/grade:import' => array(
|
2008-07-23 16:10:06 +00:00
|
|
|
'riskbitmask' => RISK_PERSONAL | RISK_XSS,
|
2007-07-23 19:22:48 +00:00
|
|
|
'captype' => 'write',
|
2007-05-02 06:30:54 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-05-02 06:30:54 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-07-23 19:22:48 +00:00
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:managegrades'
|
2007-05-02 06:30:54 +00:00
|
|
|
),
|
2007-07-23 19:22:48 +00:00
|
|
|
|
|
|
|
'moodle/grade:export' => array(
|
2007-05-02 06:30:54 +00:00
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-05-02 06:30:54 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-07-23 19:22:48 +00:00
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:managegrades'
|
2007-05-02 06:30:54 +00:00
|
|
|
),
|
2007-07-23 19:22:48 +00:00
|
|
|
|
|
|
|
'moodle/grade:manage' => array(
|
2008-07-23 16:10:06 +00:00
|
|
|
'riskbitmask' => RISK_PERSONAL | RISK_XSS,
|
2007-07-23 19:22:48 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-07-23 19:22:48 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-07-23 19:22:48 +00:00
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:managegrades'
|
2007-05-02 06:30:54 +00:00
|
|
|
),
|
2007-07-23 19:22:48 +00:00
|
|
|
|
2007-09-17 17:31:48 +00:00
|
|
|
'moodle/grade:edit' => array(
|
|
|
|
'riskbitmask' => RISK_PERSONAL | RISK_XSS,
|
2007-07-31 09:10:35 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-07-31 09:10:35 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-07-31 09:10:35 +00:00
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:managegrades'
|
|
|
|
),
|
|
|
|
|
2011-11-01 14:05:11 +01:00
|
|
|
// ability to define advanced grading forms in activities either from scratch
|
|
|
|
// or from a shared template
|
2011-10-03 00:37:36 +02:00
|
|
|
'moodle/grade:managegradingforms' => array(
|
|
|
|
'riskbitmask' => RISK_PERSONAL | RISK_XSS,
|
|
|
|
'captype' => 'write',
|
2011-10-18 14:55:25 +02:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2011-10-03 00:37:36 +02:00
|
|
|
'archetypes' => array(
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:managegrades'
|
2007-07-31 09:10:35 +00:00
|
|
|
),
|
|
|
|
|
2011-11-01 14:05:11 +01:00
|
|
|
// ability to save a grading form as a new shared template and eventually edit
|
|
|
|
// and remove own templates (templates originally shared by that user)
|
2011-10-18 14:55:25 +02:00
|
|
|
'moodle/grade:sharegradingforms' => array(
|
2011-11-01 14:05:11 +01:00
|
|
|
'riskbitmask' => RISK_XSS,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
// ability to edit and remove any shared template, even those originally shared
|
|
|
|
// by other users
|
|
|
|
'moodle/grade:managesharedforms' => array(
|
|
|
|
'riskbitmask' => RISK_XSS,
|
2011-10-18 14:55:25 +02:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
2007-09-17 17:31:48 +00:00
|
|
|
'moodle/grade:manageoutcomes' => array(
|
2007-09-28 20:12:43 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-09-28 20:12:43 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-09-28 20:12:43 +00:00
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:managegrades'
|
|
|
|
),
|
|
|
|
|
|
|
|
'moodle/grade:manageletters' => array(
|
2007-05-02 06:30:54 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-05-02 06:30:54 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-09-17 17:31:48 +00:00
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:managegrades'
|
2007-05-02 06:30:54 +00:00
|
|
|
),
|
2007-07-23 19:22:48 +00:00
|
|
|
|
2007-09-17 17:31:48 +00:00
|
|
|
'moodle/grade:hide' => array(
|
2007-05-02 06:30:54 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-05-02 06:30:54 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-05-02 06:30:54 +00:00
|
|
|
)
|
|
|
|
),
|
2007-07-23 19:22:48 +00:00
|
|
|
|
2007-09-17 17:31:48 +00:00
|
|
|
'moodle/grade:lock' => array(
|
2007-07-23 19:22:48 +00:00
|
|
|
'captype' => 'write',
|
2007-05-02 06:30:54 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-05-02 06:30:54 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-05-02 06:30:54 +00:00
|
|
|
)
|
|
|
|
),
|
2007-07-23 19:22:48 +00:00
|
|
|
|
2007-09-17 17:31:48 +00:00
|
|
|
'moodle/grade:unlock' => array(
|
2007-05-02 06:30:54 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-05-02 06:30:54 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-05-02 06:30:54 +00:00
|
|
|
)
|
2007-05-18 11:57:46 +00:00
|
|
|
),
|
2007-07-23 19:22:48 +00:00
|
|
|
|
|
|
|
'moodle/my:manageblocks' => array(
|
2007-05-18 11:57:46 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-05-18 11:57:46 +00:00
|
|
|
'user' => CAP_ALLOW
|
|
|
|
)
|
2007-07-05 06:53:17 +00:00
|
|
|
),
|
2007-07-23 19:22:48 +00:00
|
|
|
|
2007-07-05 06:53:17 +00:00
|
|
|
'moodle/notes:view' => array(
|
|
|
|
'captype' => 'read',
|
2008-07-24 21:59:13 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-07-05 06:53:17 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-07-05 06:53:17 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
'moodle/notes:manage' => array(
|
2008-07-23 16:10:06 +00:00
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
|
2007-07-05 06:53:17 +00:00
|
|
|
'captype' => 'write',
|
2008-07-24 21:59:13 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-07-05 06:53:17 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-07-05 06:53:17 +00:00
|
|
|
)
|
2007-07-23 19:22:48 +00:00
|
|
|
),
|
2007-07-31 05:59:32 +00:00
|
|
|
|
|
|
|
'moodle/tag:manage' => array(
|
2008-07-23 16:10:06 +00:00
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
|
2007-07-31 05:59:32 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-07-31 05:59:32 +00:00
|
|
|
)
|
2007-07-31 07:34:03 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
'moodle/tag:edit' => array(
|
2008-07-23 16:10:06 +00:00
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
|
2007-07-31 07:34:03 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2015-07-19 21:09:32 +08:00
|
|
|
'manager' => CAP_ALLOW
|
2007-08-11 03:25:23 +00:00
|
|
|
)
|
|
|
|
),
|
2007-09-17 17:31:48 +00:00
|
|
|
|
2012-09-20 09:12:11 +01:00
|
|
|
'moodle/tag:flag' => array(
|
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
'user' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2007-08-11 03:25:23 +00:00
|
|
|
'moodle/tag:editblocks' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-07-31 07:34:03 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2007-07-31 07:34:03 +00:00
|
|
|
)
|
2007-08-13 10:08:15 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
'moodle/block:view' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_BLOCK,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2007-08-13 10:08:15 +00:00
|
|
|
'guest' => CAP_ALLOW,
|
2007-08-22 10:35:28 +00:00
|
|
|
'user' => CAP_ALLOW,
|
|
|
|
'student' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2007-08-13 10:08:15 +00:00
|
|
|
)
|
2008-08-12 13:31:02 +00:00
|
|
|
),
|
|
|
|
|
2009-07-30 03:44:10 +00:00
|
|
|
'moodle/block:edit' => array(
|
|
|
|
'riskbitmask' => RISK_SPAM | RISK_XSS,
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_BLOCK,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2009-07-30 03:44:10 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2012-05-31 10:42:43 +08:00
|
|
|
'manager' => CAP_ALLOW
|
2009-07-30 03:44:10 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2008-08-12 13:31:02 +00:00
|
|
|
'moodle/portfolio:export' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2008-08-12 13:31:02 +00:00
|
|
|
'user' => CAP_ALLOW,
|
|
|
|
'student' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
)
|
2009-07-24 02:44:44 +00:00
|
|
|
),
|
|
|
|
'moodle/comment:view' => array(
|
|
|
|
'captype' => 'read',
|
2010-07-16 07:47:23 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2011-07-29 09:32:48 +08:00
|
|
|
'frontpage' => CAP_ALLOW,
|
|
|
|
'guest' => CAP_ALLOW,
|
2009-07-24 02:44:44 +00:00
|
|
|
'user' => CAP_ALLOW,
|
|
|
|
'student' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2009-07-24 02:44:44 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
'moodle/comment:post' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
|
|
|
|
'captype' => 'write',
|
2010-07-16 07:47:23 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2009-07-24 02:44:44 +00:00
|
|
|
'user' => CAP_ALLOW,
|
|
|
|
'student' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2009-07-24 02:44:44 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
'moodle/comment:delete' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_DATALOSS,
|
|
|
|
'captype' => 'write',
|
2010-07-16 07:47:23 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2009-07-24 02:44:44 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2009-07-24 02:44:44 +00:00
|
|
|
)
|
2010-01-12 10:34:52 +00:00
|
|
|
),
|
|
|
|
'moodle/webservice:createtoken' => array(
|
|
|
|
|
2010-02-01 03:23:35 +00:00
|
|
|
'riskbitmask' => RISK_CONFIG | RISK_DATALOSS | RISK_SPAM | RISK_PERSONAL | RISK_XSS,
|
2010-01-12 10:34:52 +00:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2010-01-12 10:34:52 +00:00
|
|
|
)
|
2010-03-16 05:57:51 +00:00
|
|
|
),
|
2017-07-03 16:21:33 +08:00
|
|
|
'moodle/webservice:managealltokens' => array(
|
|
|
|
|
|
|
|
'riskbitmask' => RISK_CONFIG | RISK_DATALOSS | RISK_PERSONAL,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array()
|
|
|
|
),
|
2011-06-13 17:41:56 +08:00
|
|
|
'moodle/webservice:createmobiletoken' => array(
|
|
|
|
|
2011-08-31 10:38:48 +08:00
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
|
2011-06-13 17:41:56 +08:00
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
'user' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
2010-03-16 09:02:34 +00:00
|
|
|
'moodle/rating:view' => array(
|
2010-07-16 07:47:23 +00:00
|
|
|
|
2010-03-16 05:57:51 +00:00
|
|
|
'captype' => 'read',
|
2010-07-16 07:47:23 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-07-16 07:47:23 +00:00
|
|
|
'user' => CAP_ALLOW,
|
2010-03-18 07:14:49 +00:00
|
|
|
'student' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2010-03-16 05:57:51 +00:00
|
|
|
)
|
|
|
|
),
|
2010-04-23 05:42:22 +00:00
|
|
|
'moodle/rating:viewany' => array(
|
2010-07-16 07:47:23 +00:00
|
|
|
|
2010-04-23 05:42:22 +00:00
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
'captype' => 'read',
|
2010-07-16 07:47:23 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-07-16 07:47:23 +00:00
|
|
|
'user' => CAP_ALLOW,
|
2010-04-23 05:42:22 +00:00
|
|
|
'student' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
2010-03-16 09:02:34 +00:00
|
|
|
'moodle/rating:viewall' => array(
|
2010-07-16 07:47:23 +00:00
|
|
|
|
2010-03-16 05:57:51 +00:00
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
'captype' => 'read',
|
2010-07-16 07:47:23 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-07-16 07:47:23 +00:00
|
|
|
'user' => CAP_ALLOW,
|
2010-04-23 05:42:22 +00:00
|
|
|
'student' => CAP_ALLOW,
|
2010-03-18 07:14:49 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2010-03-16 05:57:51 +00:00
|
|
|
)
|
|
|
|
),
|
2010-03-16 09:02:34 +00:00
|
|
|
'moodle/rating:rate' => array(
|
2010-07-16 07:47:23 +00:00
|
|
|
|
2010-03-16 05:57:51 +00:00
|
|
|
'captype' => 'write',
|
2010-07-16 07:47:23 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-07-16 07:47:23 +00:00
|
|
|
'user' => CAP_ALLOW,
|
2010-04-23 05:42:22 +00:00
|
|
|
'student' => CAP_ALLOW,
|
2010-03-18 07:14:49 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-03-31 07:41:31 +00:00
|
|
|
'manager' => CAP_ALLOW
|
2010-03-16 05:57:51 +00:00
|
|
|
)
|
2010-04-30 03:06:22 +00:00
|
|
|
),
|
|
|
|
'moodle/course:markcomplete' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-04-30 03:06:22 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
2010-06-08 02:21:50 +00:00
|
|
|
),
|
2017-02-17 14:48:02 +00:00
|
|
|
'moodle/course:overridecompletion' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
2013-04-02 13:57:39 +13:00
|
|
|
|
|
|
|
// Badges.
|
|
|
|
'moodle/badges:manageglobalsettings' => array(
|
|
|
|
'riskbitmask' => RISK_DATALOSS | RISK_CONFIG,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
// View available badges without earning them.
|
|
|
|
'moodle/badges:viewbadges' => array(
|
|
|
|
'captype' => 'read',
|
2013-06-23 12:22:31 +02:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2013-04-02 13:57:39 +13:00
|
|
|
'archetypes' => array(
|
|
|
|
'user' => CAP_ALLOW,
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
// Manage badges on own private badges page.
|
|
|
|
'moodle/badges:manageownbadges' => array(
|
2013-06-23 12:22:31 +02:00
|
|
|
'riskbitmap' => RISK_SPAM,
|
2013-04-02 13:57:39 +13:00
|
|
|
'captype' => 'write',
|
2013-06-23 12:22:31 +02:00
|
|
|
'contextlevel' => CONTEXT_USER,
|
2013-04-02 13:57:39 +13:00
|
|
|
'archetypes' => array(
|
|
|
|
'user' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
// View public badges in other users' profiles.
|
|
|
|
'moodle/badges:viewotherbadges' => array(
|
|
|
|
'riskbitmap' => RISK_PERSONAL,
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
|
|
|
'user' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
// Earn badge.
|
|
|
|
'moodle/badges:earnbadge' => array(
|
|
|
|
'captype' => 'write',
|
2013-06-23 12:22:31 +02:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2013-04-02 13:57:39 +13:00
|
|
|
'archetypes' => array(
|
|
|
|
'user' => CAP_ALLOW,
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
// Create/duplicate badges.
|
|
|
|
'moodle/badges:createbadge' => array(
|
2013-06-23 12:22:31 +02:00
|
|
|
'riskbitmask' => RISK_SPAM,
|
2013-04-02 13:57:39 +13:00
|
|
|
'captype' => 'write',
|
2013-06-23 12:22:31 +02:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2013-04-02 13:57:39 +13:00
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
// Delete badges.
|
|
|
|
'moodle/badges:deletebadge' => array(
|
2013-06-23 12:22:31 +02:00
|
|
|
'riskbitmask' => RISK_DATALOSS,
|
2013-04-02 13:57:39 +13:00
|
|
|
'captype' => 'write',
|
2013-06-23 12:22:31 +02:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2013-04-02 13:57:39 +13:00
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
// Set up/edit badge details.
|
|
|
|
'moodle/badges:configuredetails' => array(
|
2013-06-23 12:22:31 +02:00
|
|
|
'riskbitmask' => RISK_SPAM,
|
2013-04-02 13:57:39 +13:00
|
|
|
'captype' => 'write',
|
2013-06-23 12:22:31 +02:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2013-04-02 13:57:39 +13:00
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
// Set up/edit criteria of earning a badge.
|
|
|
|
'moodle/badges:configurecriteria' => array(
|
2015-03-20 21:21:35 +13:00
|
|
|
'riskbitmask' => RISK_XSS,
|
2013-04-02 13:57:39 +13:00
|
|
|
'captype' => 'write',
|
2013-06-23 12:22:31 +02:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2013-04-02 13:57:39 +13:00
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
// Configure badge messages.
|
|
|
|
'moodle/badges:configuremessages' => array(
|
2013-06-23 12:22:31 +02:00
|
|
|
'riskbitmask' => RISK_SPAM,
|
2013-04-02 13:57:39 +13:00
|
|
|
'captype' => 'write',
|
2013-06-23 12:22:31 +02:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2013-04-02 13:57:39 +13:00
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
// Award badge to a user.
|
|
|
|
'moodle/badges:awardbadge' => array(
|
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
'captype' => 'write',
|
2013-06-23 12:22:31 +02:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2013-04-02 13:57:39 +13:00
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
)
|
2016-09-28 10:39:56 -04:00
|
|
|
),
|
|
|
|
|
|
|
|
// Revoke badge from a user.
|
|
|
|
'moodle/badges:revokebadge' => array(
|
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
)
|
2013-04-02 13:57:39 +13:00
|
|
|
),
|
|
|
|
|
|
|
|
// View users who earned a specific badge without being able to award a badge.
|
|
|
|
'moodle/badges:viewawarded' => array(
|
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
'captype' => 'read',
|
2013-06-23 12:22:31 +02:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2013-04-02 13:57:39 +13:00
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
)
|
2013-12-24 14:00:49 +01:00
|
|
|
),
|
|
|
|
|
|
|
|
'moodle/site:forcelanguage' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
)
|
2016-02-23 10:44:20 +08:00
|
|
|
),
|
|
|
|
|
|
|
|
// Perform site-wide search queries through the search API.
|
|
|
|
'moodle/search:query' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
'guest' => CAP_ALLOW,
|
|
|
|
'user' => CAP_ALLOW,
|
|
|
|
'student' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
2016-04-04 14:49:50 +08:00
|
|
|
),
|
|
|
|
|
|
|
|
// Competencies.
|
|
|
|
'moodle/competency:competencymanage' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSECAT,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
'moodle/competency:competencyview' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSECAT,
|
|
|
|
'archetypes' => array(
|
|
|
|
'user' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'moodle/competency:competencygrade' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE, // And CONTEXT_USER.
|
|
|
|
'archetypes' => array(
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
),
|
|
|
|
// Course competencies.
|
|
|
|
'moodle/competency:coursecompetencymanage' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'moodle/competency:coursecompetencyconfigure' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_MODULE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'moodle/competency:coursecompetencygradable' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'student' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/course:isincompletionreports'
|
|
|
|
),
|
|
|
|
'moodle/competency:coursecompetencyview' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'user' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
),
|
2016-04-13 10:12:30 +08:00
|
|
|
// Evidence.
|
|
|
|
'moodle/competency:evidencedelete' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
|
|
|
),
|
|
|
|
'clonepermissionsfrom' => 'moodle/site:config'
|
|
|
|
),
|
2016-04-04 14:49:50 +08:00
|
|
|
// User plans.
|
|
|
|
'moodle/competency:planmanage' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
2016-04-22 17:03:50 +08:00
|
|
|
'manager' => CAP_ALLOW
|
2016-04-04 14:49:50 +08:00
|
|
|
),
|
|
|
|
),
|
|
|
|
'moodle/competency:planmanagedraft' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
2016-04-22 17:03:50 +08:00
|
|
|
'manager' => CAP_ALLOW
|
2016-04-04 14:49:50 +08:00
|
|
|
),
|
|
|
|
),
|
|
|
|
'moodle/competency:planmanageown' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'moodle/competency:planmanageowndraft' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'moodle/competency:planview' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
2016-04-22 17:03:50 +08:00
|
|
|
'manager' => CAP_ALLOW
|
2016-04-04 14:49:50 +08:00
|
|
|
),
|
|
|
|
),
|
|
|
|
'moodle/competency:planviewdraft' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
2016-04-22 17:03:50 +08:00
|
|
|
'manager' => CAP_ALLOW
|
2016-04-04 14:49:50 +08:00
|
|
|
),
|
|
|
|
),
|
|
|
|
'moodle/competency:planviewown' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
|
|
|
'user' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'moodle/competency:planviewowndraft' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'moodle/competency:planrequestreview' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
2016-04-22 17:03:50 +08:00
|
|
|
'manager' => CAP_ALLOW
|
2016-04-04 14:49:50 +08:00
|
|
|
)
|
|
|
|
),
|
|
|
|
'moodle/competency:planrequestreviewown' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
|
|
|
'user' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
'moodle/competency:planreview' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
2016-04-22 17:03:50 +08:00
|
|
|
'manager' => CAP_ALLOW
|
2016-04-04 14:49:50 +08:00
|
|
|
),
|
|
|
|
),
|
|
|
|
'moodle/competency:plancomment' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
2016-04-22 17:03:50 +08:00
|
|
|
'manager' => CAP_ALLOW
|
2016-04-04 14:49:50 +08:00
|
|
|
),
|
|
|
|
),
|
|
|
|
'moodle/competency:plancommentown' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
|
|
|
'user' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
),
|
|
|
|
// User competencies.
|
|
|
|
'moodle/competency:usercompetencyview' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_USER, // And CONTEXT_COURSE.
|
|
|
|
'archetypes' => array(
|
2016-04-22 17:03:50 +08:00
|
|
|
'manager' => CAP_ALLOW,
|
2016-04-04 14:49:50 +08:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
'moodle/competency:usercompetencyrequestreview' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
2016-04-22 17:03:50 +08:00
|
|
|
'manager' => CAP_ALLOW
|
2016-04-04 14:49:50 +08:00
|
|
|
)
|
|
|
|
),
|
|
|
|
'moodle/competency:usercompetencyrequestreviewown' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
|
|
|
'user' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
'moodle/competency:usercompetencyreview' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
2016-04-22 17:03:50 +08:00
|
|
|
'manager' => CAP_ALLOW
|
2016-04-04 14:49:50 +08:00
|
|
|
),
|
|
|
|
),
|
|
|
|
'moodle/competency:usercompetencycomment' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
2016-04-22 17:03:50 +08:00
|
|
|
'manager' => CAP_ALLOW
|
2016-04-04 14:49:50 +08:00
|
|
|
),
|
|
|
|
),
|
|
|
|
'moodle/competency:usercompetencycommentown' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
|
|
|
'user' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
),
|
|
|
|
// Template.
|
|
|
|
'moodle/competency:templatemanage' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSECAT,
|
|
|
|
'archetypes' => array(
|
2016-04-22 17:03:50 +08:00
|
|
|
'manager' => CAP_ALLOW
|
2016-04-04 14:49:50 +08:00
|
|
|
),
|
2017-05-23 17:43:46 +08:00
|
|
|
),
|
|
|
|
'moodle/analytics:listinsights' => array(
|
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
|
|
|
'moodle/analytics:managemodels' => array(
|
|
|
|
'riskbitmask' => RISK_CONFIG,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
),
|
2016-04-04 14:49:50 +08:00
|
|
|
),
|
|
|
|
'moodle/competency:templateview' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSECAT,
|
|
|
|
'archetypes' => array(
|
2016-04-22 17:03:50 +08:00
|
|
|
'manager' => CAP_ALLOW
|
2016-04-04 14:49:50 +08:00
|
|
|
),
|
|
|
|
),
|
|
|
|
// User evidence.
|
|
|
|
'moodle/competency:userevidencemanage' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
2016-04-22 17:03:50 +08:00
|
|
|
'manager' => CAP_ALLOW
|
2016-04-04 14:49:50 +08:00
|
|
|
),
|
|
|
|
),
|
|
|
|
'moodle/competency:userevidencemanageown' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
|
|
|
'user' => CAP_ALLOW
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'moodle/competency:userevidenceview' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_USER,
|
|
|
|
'archetypes' => array(
|
2016-04-22 17:03:50 +08:00
|
|
|
'manager' => CAP_ALLOW
|
2016-04-04 14:49:50 +08:00
|
|
|
),
|
|
|
|
),
|
2016-09-12 10:37:25 -04:00
|
|
|
'moodle/site:maintenanceaccess' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
)
|
|
|
|
),
|
2018-10-05 13:22:59 +02:00
|
|
|
// Allow message any user, regardlesss of the privacy preferences for messaging.
|
|
|
|
'moodle/site:messageanyuser' => array(
|
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
2016-02-23 10:44:20 +08:00
|
|
|
|
2018-06-07 14:35:26 +08:00
|
|
|
// Context locking/unlocking.
|
|
|
|
'moodle/site:managecontextlocks' => [
|
|
|
|
'captype' => 'write',
|
2018-11-13 08:06:25 +08:00
|
|
|
'contextlevel' => CONTEXT_MODULE,
|
2018-06-07 14:35:26 +08:00
|
|
|
'archetypes' => [
|
|
|
|
],
|
|
|
|
],
|
2019-01-08 13:27:21 -08:00
|
|
|
|
|
|
|
// Manual completion toggling.
|
|
|
|
'moodle/course:togglecompletion' => [
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_MODULE,
|
|
|
|
'archetypes' => [
|
|
|
|
'user' => CAP_ALLOW,
|
|
|
|
],
|
|
|
|
],
|
2019-03-21 13:08:31 +01:00
|
|
|
|
|
|
|
'moodle/analytics:listowninsights' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
'user' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
),
|
2019-10-02 12:26:44 +02:00
|
|
|
|
|
|
|
// Set display option buttons to an H5P content.
|
|
|
|
'moodle/h5p:setdisplayoptions' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_MODULE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
)
|
|
|
|
),
|
2019-10-24 21:48:30 +02:00
|
|
|
|
|
|
|
// Allow to deploy H5P content.
|
|
|
|
'moodle/h5p:deploy' => array(
|
|
|
|
'riskbitmask' => RISK_XSS,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_MODULE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
)
|
|
|
|
),
|
2019-10-30 09:07:51 +01:00
|
|
|
|
|
|
|
// Allow to update H5P content-type libraries.
|
|
|
|
'moodle/h5p:updatelibraries' => [
|
|
|
|
'riskbitmask' => RISK_XSS,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_MODULE,
|
|
|
|
'archetypes' => [
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
]
|
|
|
|
],
|
2020-02-10 10:18:27 +08:00
|
|
|
|
|
|
|
// Allow users to recommend activities in the activity chooser.
|
|
|
|
'moodle/course:recommendactivity' => [
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => [
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
]
|
2020-04-01 16:23:33 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
// Content bank capabilities.
|
|
|
|
'moodle/contentbank:access' => array(
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'coursecreator' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
'moodle/contentbank:upload' => array(
|
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'coursecreator' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
)
|
2020-04-16 12:11:28 +02:00
|
|
|
),
|
|
|
|
|
|
|
|
// Delete any content from the content bank.
|
|
|
|
'moodle/contentbank:deleteanycontent' => [
|
|
|
|
'riskbitmask' => RISK_DATALOSS,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => [
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'coursecreator' => CAP_ALLOW,
|
|
|
|
]
|
|
|
|
],
|
|
|
|
|
|
|
|
// Delete content created by yourself.
|
|
|
|
'moodle/contentbank:deleteowncontent' => [
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => [
|
|
|
|
'user' => CAP_ALLOW,
|
|
|
|
]
|
|
|
|
],
|
2020-04-17 13:40:55 +02:00
|
|
|
|
|
|
|
// Manage (rename, move, publish, share, etc.) any content from the content bank.
|
|
|
|
'moodle/contentbank:manageanycontent' => [
|
|
|
|
'riskbitmask' => RISK_DATALOSS,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'coursecreator' => CAP_ALLOW,
|
|
|
|
)
|
|
|
|
],
|
|
|
|
|
|
|
|
// Manage (rename, move, publish, share, etc.) content created by yourself.
|
|
|
|
'moodle/contentbank:manageowncontent' => [
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'coursecreator' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
)
|
|
|
|
],
|
2020-04-29 14:00:43 +01:00
|
|
|
|
|
|
|
// Allow users to create/edit content within the content bank.
|
|
|
|
'moodle/contentbank:useeditor' => [
|
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'coursecreator' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
)
|
|
|
|
],
|
2020-08-13 14:36:26 +02:00
|
|
|
|
|
|
|
// Allow users to download content.
|
|
|
|
'moodle/contentbank:downloadcontent' => [
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => [
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'coursecreator' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
]
|
|
|
|
],
|
2020-09-03 13:53:41 +08:00
|
|
|
|
2022-11-16 17:30:08 -03:00
|
|
|
// Allow users to copy content.
|
|
|
|
'moodle/contentbank:copyanycontent' => [
|
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => [
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'coursecreator' => CAP_ALLOW,
|
|
|
|
]
|
|
|
|
],
|
|
|
|
|
|
|
|
// Allow users to copy content.
|
|
|
|
'moodle/contentbank:copycontent' => [
|
|
|
|
'riskbitmask' => RISK_SPAM,
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => [
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'coursecreator' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
]
|
|
|
|
],
|
|
|
|
|
2020-09-03 13:53:41 +08:00
|
|
|
// Allow users to download course content.
|
|
|
|
'moodle/course:downloadcoursecontent' => [
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'student' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
|
|
|
],
|
2020-09-18 18:52:13 +08:00
|
|
|
|
|
|
|
// Allow users to configure download course content functionality within a course, if the feature is available.
|
|
|
|
'moodle/course:configuredownloadcontent' => [
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => array(
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW
|
2020-10-27 12:47:50 +08:00
|
|
|
),
|
|
|
|
],
|
|
|
|
|
2020-09-29 19:27:37 +02:00
|
|
|
// Allow to manage payment accounts.
|
|
|
|
'moodle/payment:manageaccounts' => [
|
|
|
|
'captype' => 'write',
|
|
|
|
'riskbitmask' => RISK_PERSONAL | RISK_CONFIG | RISK_DATALOSS,
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2020-10-27 12:47:50 +08:00
|
|
|
'archetypes' => [],
|
2020-09-29 19:27:37 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
// Allow to view payments.
|
|
|
|
'moodle/payment:viewpayments' => [
|
|
|
|
'captype' => 'read',
|
|
|
|
'riskbitmask' => RISK_PERSONAL,
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2020-10-27 12:47:50 +08:00
|
|
|
'archetypes' => [],
|
2020-09-18 18:52:13 +08:00
|
|
|
],
|
2020-09-23 13:49:57 -04:00
|
|
|
|
|
|
|
// Allow users to view hidden content.
|
|
|
|
'moodle/contentbank:viewunlistedcontent' => [
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => [
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'coursecreator' => CAP_ALLOW,
|
|
|
|
]
|
|
|
|
],
|
2021-07-06 16:10:30 +00:00
|
|
|
|
|
|
|
// Allow users to view custom reports.
|
|
|
|
'moodle/reportbuilder:view' => [
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => [
|
|
|
|
'user' => CAP_ALLOW,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
2024-01-18 11:21:57 +00:00
|
|
|
// Allow users to view all custom reports.
|
|
|
|
'moodle/reportbuilder:viewall' => [
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => [],
|
|
|
|
],
|
|
|
|
|
2021-07-06 16:10:30 +00:00
|
|
|
// Allow users to create/edit their own custom reports.
|
|
|
|
'moodle/reportbuilder:edit' => [
|
|
|
|
'captype' => 'write',
|
|
|
|
'riskbitmap' => RISK_PERSONAL,
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => [
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
// Allow users to create/edit all custom reports.
|
|
|
|
'moodle/reportbuilder:editall' => [
|
|
|
|
'captype' => 'write',
|
|
|
|
'riskbitmap' => RISK_PERSONAL,
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => [],
|
|
|
|
],
|
2021-11-04 09:21:30 +00:00
|
|
|
|
|
|
|
// Allow users to schedule reports as other users.
|
|
|
|
'moodle/reportbuilder:scheduleviewas' => [
|
|
|
|
'captype' => 'read',
|
|
|
|
'riskbitmap' => RISK_PERSONAL,
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => [],
|
|
|
|
],
|
2023-03-08 21:35:54 +07:00
|
|
|
|
|
|
|
// Allow users to share activities to MoodleNet.
|
|
|
|
'moodle/moodlenet:shareactivity' => [
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => [
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
]
|
|
|
|
],
|
2023-08-03 12:36:04 +10:00
|
|
|
|
|
|
|
// Allow users to configure course communication rooms.
|
|
|
|
'moodle/course:configurecoursecommunication' => [
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => [
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
]
|
|
|
|
],
|
2023-06-01 00:56:45 +10:00
|
|
|
|
|
|
|
// Allow users to share courses to MoodleNet.
|
|
|
|
'moodle/moodlenet:sharecourse' => [
|
|
|
|
'captype' => 'read',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'archetypes' => [
|
|
|
|
'editingteacher' => CAP_ALLOW,
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
]
|
|
|
|
],
|
2006-08-08 05:13:06 +00:00
|
|
|
);
|