Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)

Variables

 $capabilities
 

Detailed Description

Variable Documentation

◆ $capabilities

$capabilities
Initial value:
= [
'qbank/customfields:changelockedcustomfields' => [
'riskbitmask' => RISK_SPAM,
'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => [
'manager' => CAP_ALLOW
],
],
'qbank/customfields:configurecustomfields' => [
'riskbitmask' => RISK_SPAM,
'captype' => 'write',
'contextlevel' => CONTEXT_SYSTEM,
'clonepermissionsfrom' => 'moodle/site:config'
],
'qbank/customfields:viewhiddencustomfields' => [
'captype' => 'read',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => [
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
],
],
]
const CONTEXT_SYSTEM
System context level - only one instance in every system.
Definition accesslib.php:122
const CONTEXT_COURSE
Course context level - one instances for each course.
Definition accesslib.php:128
const RISK_SPAM
Capability allows users to add content others may see - see
Definition accesslib.php:147
const CAP_ALLOW
Allow permission, overrides CAP_PREVENT defined in parent contexts.
Definition accesslib.php:115