From: David Mudrak Date: Mon, 4 Jan 2010 18:00:24 +0000 (+0000) Subject: Reviewed and modified the workshop capabilities X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=095d6e6c9d2184cf093ae055d9ec026811632281;p=moodle.git Reviewed and modified the workshop capabilities --- diff --git a/mod/workshop/db/access.php b/mod/workshop/db/access.php index f075aafcd4..6d3eb6a79a 100644 --- a/mod/workshop/db/access.php +++ b/mod/workshop/db/access.php @@ -18,31 +18,6 @@ /** * 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 should be the same as the directory name of the mod or block. - * - * Core moodle capabilities are defined thus: - * moodle/: - * - * Examples: mod/forum:viewpost - * block/recent_activity:view - * moodle/site:deleteuser - * - * The variable name for the capability definitions array follows the format - * $__capabilities - * - * For the core capabilities, the variable is $moodle_capabilities. - * * @package mod-workshop * @copyright 2009 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later @@ -52,18 +27,23 @@ defined('MOODLE_INTERNAL') || die(); $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( @@ -73,8 +53,9 @@ $mod_workshop_capabilities = 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( @@ -83,21 +64,19 @@ $mod_workshop_capabilities = 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( @@ -105,8 +84,10 @@ $mod_workshop_capabilities = 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( @@ -116,8 +97,8 @@ $mod_workshop_capabilities = array( ) ), + // Ability to allocate (assign) a submission for a review 'mod/workshop:allocate' => array( - 'captype' => 'write', 'contextlevel' => CONTEXT_MODULE, 'legacy' => array( @@ -127,8 +108,9 @@ $mod_workshop_capabilities = 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( @@ -139,8 +121,8 @@ $mod_workshop_capabilities = 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( @@ -150,17 +132,21 @@ $mod_workshop_capabilities = 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( @@ -170,8 +156,8 @@ $mod_workshop_capabilities = 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( @@ -181,8 +167,9 @@ $mod_workshop_capabilities = 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( diff --git a/mod/workshop/version.php b/mod/workshop/version.php index 806ba25210..386ad8fb25 100644 --- a/mod/workshop/version.php +++ b/mod/workshop/version.php @@ -28,6 +28,6 @@ defined('MOODLE_INTERNAL') || die(); -$module->version = 2009081300; -$module->requires = 2009080700; // Requires this Moodle version +$module->version = 2009090400; +$module->requires = 2009090400; // Requires this Moodle version $module->cron = 60;