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:
|
|
|
|
* - Access API: {@link http://docs.moodle.org/dev/Access_API}
|
|
|
|
* - Upgrade API: {@link http://docs.moodle.org/dev/Upgrade_API}
|
|
|
|
*
|
|
|
|
* @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
|
|
|
)
|
|
|
|
),
|
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
|
|
|
|
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
|
|
|
|
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',
|
|
|
|
'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-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:backuptargethub' => 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:backuptargetimport' => 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'
|
|
|
|
),
|
|
|
|
|
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,
|
|
|
|
),
|
|
|
|
|
2010-05-01 16:42:29 +00:00
|
|
|
'moodle/restore:restoretargethub' => 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'
|
|
|
|
),
|
|
|
|
|
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',
|
2008-07-24 21:59:13 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2006-08-08 06:45:25 +00:00
|
|
|
'teacher' => CAP_ALLOW,
|
|
|
|
'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
|
|
|
|
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',
|
2008-07-24 21:59:13 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
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',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
|
|
'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',
|
2008-07-24 21:59:13 +00:00
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
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
|
|
|
|
2008-07-23 16:10:06 +00: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
|
|
|
)
|
|
|
|
),
|
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
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
|
|
|
|
2008-12-10 02:57:41 +00:00
|
|
|
'moodle/course:request' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2008-12-10 02:57:41 +00:00
|
|
|
'user' => CAP_ALLOW,
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
'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
|
|
|
),
|
|
|
|
|
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(
|
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(
|
|
|
|
|
|
|
|
'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
|
|
|
|
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',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'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
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2013-04-04 15:46:05 +08:00
|
|
|
// TODO: Remove 'moodle/blog:associatecourse' and 'moodle/blog:associatemodule' after a few releases.
|
2009-10-30 07:26:11 +00:00
|
|
|
'moodle/blog:associatecourse' => array(
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_COURSE,
|
2013-04-04 15:46:05 +08:00
|
|
|
'archetypes' => array()
|
2009-10-30 07:26:11 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
'moodle/blog:associatemodule' => array(
|
|
|
|
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_MODULE,
|
2013-04-04 15:46:05 +08:00
|
|
|
'archetypes' => array()
|
2009-10-30 07:26:11 +00:00
|
|
|
),
|
2006-09-20 21:00:45 +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
|
|
|
|
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
|
|
|
|
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-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
|
|
|
),
|
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-05-01 05:05:55 +00:00
|
|
|
),
|
|
|
|
'moodle/course:publish' => array(
|
|
|
|
|
|
|
|
'captype' => 'write',
|
2010-07-16 07:47:23 +00:00
|
|
|
'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
|
2010-05-01 05:05:55 +00:00
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
2010-05-21 11:51:23 +00:00
|
|
|
'archetypes' => array(
|
2010-05-01 05:05:55 +00:00
|
|
|
'manager' => CAP_ALLOW
|
|
|
|
)
|
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
|
|
|
),
|
|
|
|
'moodle/community:add' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
|
|
|
'teacher' => CAP_ALLOW,
|
2010-06-18 03:48:37 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-06-08 02:21:50 +00:00
|
|
|
)
|
|
|
|
),
|
|
|
|
'moodle/community:download' => array(
|
|
|
|
'captype' => 'write',
|
|
|
|
'contextlevel' => CONTEXT_SYSTEM,
|
|
|
|
'archetypes' => array(
|
|
|
|
'manager' => CAP_ALLOW,
|
2010-06-18 03:48:37 +00:00
|
|
|
'editingteacher' => CAP_ALLOW,
|
2010-06-08 02:21:50 +00:00
|
|
|
)
|
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,
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
// 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(
|
|
|
|
)
|
2007-07-31 05:59:32 +00:00
|
|
|
)
|
2006-08-08 05:13:06 +00:00
|
|
|
);
|