Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/workshop/db/access.php
Go to the documentation of this file.
00001 <?php
00002 
00003 // This file is part of Moodle - http://moodle.org/
00004 //
00005 // Moodle is free software: you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation, either version 3 of the License, or
00008 // (at your option) any later version.
00009 //
00010 // Moodle is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
00017 
00027 defined('MOODLE_INTERNAL') || die();
00028 
00029 $capabilities = array(
00030 
00031     // Ability to see that the workshop exists, and the basic information
00032     // about it, for example the intro field
00033     'mod/workshop:view' => array(
00034         'captype' => 'read',
00035         'contextlevel' => CONTEXT_MODULE,
00036         'archetypes' => array(
00037             'guest' => CAP_ALLOW,
00038             'student' => CAP_ALLOW,
00039             'teacher' => CAP_ALLOW,
00040             'editingteacher' => CAP_ALLOW,
00041             'manager' => CAP_ALLOW
00042         )
00043     ),
00044 
00045     // Ability to change the current phase (stage) of the workshop, for example
00046     // allow submitting, start assessment period, close workshop etc.
00047     'mod/workshop:switchphase' => array(
00048         'captype' => 'write',
00049         'contextlevel' => CONTEXT_MODULE,
00050         'archetypes' => array(
00051             'teacher' => CAP_ALLOW,
00052             'editingteacher' => CAP_ALLOW,
00053             'manager' => CAP_ALLOW
00054         )
00055     ),
00056 
00057     // Ability to modify the assessment forms, gives access to editform.php
00058     'mod/workshop:editdimensions' => array(
00059         'riskbitmask' => RISK_XSS,              // can embed flash and javascript into wysiwyg
00060         'captype' => 'write',
00061         'contextlevel' => CONTEXT_MODULE,
00062         'archetypes' => array(
00063             'editingteacher' => CAP_ALLOW,
00064             'manager' => CAP_ALLOW
00065         )
00066     ),
00067 
00068     // Ability to submit own work. All users having this capability are expected to participate
00069     // in the workshop as the authors
00070     'mod/workshop:submit' => array(
00071         'captype' => 'write',
00072         'contextlevel' => CONTEXT_MODULE,
00073         'archetypes' => array(
00074             'student' => CAP_ALLOW,
00075         )
00076     ),
00077 
00078     // Ability to be a reviewer of a submission. All users with this capability are considered
00079     // as potential reviewers for the allocation purposes and can train assessment process on the
00080     // example submissions.
00081     'mod/workshop:peerassess' => array(
00082         'captype' => 'write',
00083         'contextlevel' => CONTEXT_MODULE,
00084         'archetypes' => array(
00085             'student' => CAP_ALLOW,
00086         )
00087     ),
00088 
00089 
00090     // Ability to submit and referentially assess the examples and to see all other
00091     // assessments of these examples
00092     'mod/workshop:manageexamples' => array(
00093         'captype' => 'write',
00094         'contextlevel' => CONTEXT_MODULE,
00095         'archetypes' => array(
00096             'teacher' => CAP_ALLOW,
00097             'editingteacher' => CAP_ALLOW,
00098             'manager' => CAP_ALLOW
00099         )
00100     ),
00101 
00102     // Ability to allocate (assign) a submission for a review
00103     'mod/workshop:allocate' => array(
00104         'captype' => 'write',
00105         'contextlevel' => CONTEXT_MODULE,
00106         'archetypes' => array(
00107             'teacher' => CAP_ALLOW,
00108             'editingteacher' => CAP_ALLOW,
00109             'manager' => CAP_ALLOW
00110         )
00111     ),
00112 
00113     // Ability to publish submissions, i.e. make them available when workshop is closed
00114     'mod/workshop:publishsubmissions' => array(
00115         'captype' => 'write',
00116         'contextlevel' => CONTEXT_MODULE,
00117         'archetypes' => array(
00118             'teacher' => CAP_ALLOW,
00119             'editingteacher' => CAP_ALLOW,
00120             'manager' => CAP_ALLOW
00121         )
00122     ),
00123 
00124     // Ability to identify the author of the work that has been allocated to them for a review
00125     // Reviewers without this capability will see the author as Anonymous
00126     'mod/workshop:viewauthornames' => array(
00127         'captype' => 'read',
00128         'contextlevel' => CONTEXT_MODULE,
00129         'archetypes' => array(
00130             'student' => CAP_ALLOW,
00131             'teacher' => CAP_ALLOW,
00132             'editingteacher' => CAP_ALLOW,
00133             'manager' => CAP_ALLOW
00134         )
00135     ),
00136 
00137     // Ability to identify the reviewer of the given submission (i.e. the owner of the assessment)
00138     'mod/workshop:viewreviewernames' => array(
00139         'captype' => 'read',
00140         'contextlevel' => CONTEXT_MODULE,
00141         'archetypes' => array(
00142             'teacher' => CAP_ALLOW,
00143             'editingteacher' => CAP_ALLOW,
00144             'manager' => CAP_ALLOW
00145         )
00146     ),
00147 
00148     // Ability to view a work submitted by an other user. Applies to the user's group only
00149     // or - if the user is allowed to access all groups - applies to any submission
00150     'mod/workshop:viewallsubmissions' => array(
00151         'captype' => 'read',
00152         'contextlevel' => CONTEXT_MODULE,
00153         'archetypes' => array(
00154             'teacher' => CAP_ALLOW,
00155             'editingteacher' => CAP_ALLOW,
00156             'manager' => CAP_ALLOW
00157         )
00158     ),
00159 
00160     // Ability to view published submission when the workshop is closed. Applies to the user's group only
00161     // or - if the user is allowed to access all groups - applies to any submission
00162     'mod/workshop:viewpublishedsubmissions' => array(
00163         'captype' => 'read',
00164         'contextlevel' => CONTEXT_MODULE,
00165         'archetypes' => array(
00166             'student' => CAP_ALLOW,
00167             'teacher' => CAP_ALLOW,
00168             'editingteacher' => CAP_ALLOW,
00169             'manager' => CAP_ALLOW
00170         )
00171     ),
00172 
00173     // Ability to view the authors of published submissions.
00174     'mod/workshop:viewauthorpublished' => array(
00175         'captype' => 'read',
00176         'contextlevel' => CONTEXT_MODULE,
00177         'archetypes' => array(
00178             'student' => CAP_ALLOW,
00179             'teacher' => CAP_ALLOW,
00180             'editingteacher' => CAP_ALLOW,
00181             'manager' => CAP_ALLOW
00182         )
00183     ),
00184 
00185     // Ability to always view the assessments of other users' work and the calculated grades, regardless the phase.
00186     // Applies to the user's group only or - if the user is allowed to access all groups - applies to any assessment
00187     'mod/workshop:viewallassessments' => array(
00188         'captype' => 'read',
00189         'contextlevel' => CONTEXT_MODULE,
00190         'archetypes' => array(
00191             'teacher' => CAP_ALLOW,
00192             'editingteacher' => CAP_ALLOW,
00193             'manager' => CAP_ALLOW
00194         )
00195     ),
00196 
00197     // Ability to override grade for submission or the calculated grades for assessment
00198     // and to run aggregation tasks that computes the total grade
00199     'mod/workshop:overridegrades' => array(
00200         'captype' => 'write',
00201         'contextlevel' => CONTEXT_MODULE,
00202         'archetypes' => array(
00203             'teacher' => CAP_ALLOW,
00204             'editingteacher' => CAP_ALLOW,
00205             'manager' => CAP_ALLOW
00206         )
00207     ),
00208 
00209     // Ability to ignore time restrictions (submission start/end time and assessment
00210     // start/end time) if they are defined
00211     'mod/workshop:ignoredeadlines' => array(
00212         'captype' => 'write',
00213         'contextlevel' => CONTEXT_MODULE,
00214         'archetypes' => array(
00215             'teacher' => CAP_ALLOW,
00216             'editingteacher' => CAP_ALLOW,
00217             'manager' => CAP_ALLOW
00218         )
00219     ),
00220 );
 All Data Structures Namespaces Files Functions Variables Enumerations