/**
* Capability definitions for the workshop module
*
- * 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).
- *
- * 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]/<component_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 follows the format
- * $<componenttype>_<component_name>_capabilities
- *
- * For the core capabilities, the variable is $moodle_capabilities.
- *
* @package mod-workshop
* @copyright 2009 David Mudrak <david.mudrak@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
$mod_workshop_capabilities = array(
- 'mod/workshop:edit' => array(
-
- 'captype' => 'write',
+ // Ability to see that the workshop exists, and the basic information
+ // about it, for example the intro field
+ 'mod/workshop:view' => array(
+ 'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,
'legacy' => array(
+ 'guest' => CAP_ALLOW,
+ 'student' => CAP_ALLOW,
+ 'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'admin' => CAP_ALLOW
)
),
+ // Ability to change the current phase (stage) of the workshop, it est for example
+ // allow submitting, start assessment period, close workshop etc.
'mod/workshop:switchphase' => array(
-
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'legacy' => array(
)
),
+ // Ability to modify the assessment forms, gives access to editform.php
'mod/workshop:editdimensions' => array(
- 'riskbitmask' => RISK_XSS, // can embed flash and javascript into wysiwyg
+ 'riskbitmask' => RISK_XSS, // can embed flash and javascript into wysiwyg
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'legacy' => array(
)
),
- 'mod/workshop:view' => array(
-
- 'captype' => 'read',
+ // Ability to submit own work. All users having this capability are expected to participate
+ // in the workshop as the authors
+ 'mod/workshop:submit' => array(
+ 'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'legacy' => array(
- 'guest' => CAP_ALLOW,
'student' => CAP_ALLOW,
- 'teacher' => CAP_ALLOW,
- 'editingteacher' => CAP_ALLOW,
- 'admin' => CAP_ALLOW
)
),
- 'mod/workshop:submit' => array(
-
+ // Ability to be a reviewer of a submission. All users with this capability are considered
+ // as potential reviewers for the allocation purposes.
+ 'mod/workshop:peerassess' => array(
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'legacy' => array(
)
),
- 'mod/workshop:submitexamples' => array(
+ // Ability to submit and referentialy assess the examples and to see all other
+ // assessments of these examples
+ 'mod/workshop:manageexamples' => array(
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'legacy' => array(
)
),
+ // Ability to allocate (assign) a submission for a review
'mod/workshop:allocate' => array(
-
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'legacy' => array(
)
),
+ // Ability to identify the author of the work that has been allocated to them for a review
+ // Reviewers without this capability will see the author as Anonymous
'mod/workshop:viewauthornames' => array(
-
'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,
'legacy' => array(
)
),
+ // Ability to identify the reviewer of the given submission (ie the owner of the assessment)
'mod/workshop:viewreviewernames' => array(
-
'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,
'legacy' => array(
)
),
- 'mod/workshop:peerassess' => array(
-
- 'captype' => 'write',
+ // Ability to view a work submitted by an other user. Applies to the user's group only
+ // or - if the user is allowed to access all groups - applies to any submission
+ 'mod/workshop:viewallsubmissions' => array(
+ 'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,
'legacy' => array(
- 'student' => CAP_ALLOW,
+ 'teacher' => CAP_ALLOW,
+ 'editingteacher' => CAP_ALLOW,
+ 'admin' => CAP_ALLOW
)
),
- 'mod/workshop:viewallsubmissions' => array(
-
+ // Ability to view the assessments of other users' work. Applies to the user's group only
+ // or - if the user is allowed to access all groups - applies to any assessment
+ 'mod/workshop:viewallassessments' => array(
'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,
'legacy' => array(
)
),
- 'mod/workshop:assessallsubmissions' => array(
-
+ // Ability to override grade for submission or the calcaluted grades for assessment
+ 'mod/workshop:overridegrades' => array(
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'legacy' => array(
)
),
+ // Ability to see the given/calculated grades even before the author did not agree
+ // with the assessment comments yet
'mod/workshop:viewgradesbeforeagreement' => array(
-
'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,
'legacy' => array(