Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/glossary/db/access.php
Go to the documentation of this file.
00001 <?php
00002 //
00003 // Capability definitions for the glossary module.
00004 //
00005 // The capabilities are loaded into the database table when the module is
00006 // installed or updated. Whenever the capability definitions are updated,
00007 // the module version number should be bumped up.
00008 //
00009 // The system has four possible values for a capability:
00010 // CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT, and inherit (not set).
00011 //
00012 //
00013 // CAPABILITY NAMING CONVENTION
00014 //
00015 // It is important that capability names are unique. The naming convention
00016 // for capabilities that are specific to modules and blocks is as follows:
00017 //   [mod/block]/<plugin_name>:<capabilityname>
00018 //
00019 // component_name should be the same as the directory name of the mod or block.
00020 //
00021 // Core moodle capabilities are defined thus:
00022 //    moodle/<capabilityclass>:<capabilityname>
00023 //
00024 // Examples: mod/forum:viewpost
00025 //           block/recent_activity:view
00026 //           moodle/site:deleteuser
00027 //
00028 // The variable name for the capability definitions array is $capabilities
00029 
00030 
00031 $capabilities = array(
00032 
00033     'mod/glossary:write' => array(
00034 
00035         'riskbitmask' => RISK_SPAM,
00036 
00037         'captype' => 'write',
00038         'contextlevel' => CONTEXT_MODULE,
00039         'archetypes' => array(
00040             'student' => CAP_ALLOW,
00041             'teacher' => CAP_ALLOW,
00042             'editingteacher' => CAP_ALLOW,
00043             'manager' => CAP_ALLOW
00044         )
00045     ),
00046 
00047     'mod/glossary:manageentries' => array(
00048 
00049         'riskbitmask' => RISK_SPAM,
00050 
00051         'captype' => 'write',
00052         'contextlevel' => CONTEXT_MODULE,
00053         'archetypes' => array(
00054             'teacher' => CAP_ALLOW,
00055             'editingteacher' => CAP_ALLOW,
00056             'manager' => CAP_ALLOW
00057         )
00058     ),
00059 
00060     'mod/glossary:managecategories' => array(
00061 
00062         'riskbitmask' => RISK_SPAM,
00063 
00064         'captype' => 'write',
00065         'contextlevel' => CONTEXT_MODULE,
00066         'archetypes' => array(
00067             'teacher' => CAP_ALLOW,
00068             'editingteacher' => CAP_ALLOW,
00069             'manager' => CAP_ALLOW
00070         )
00071     ),
00072 
00073     'mod/glossary:comment' => array(
00074 
00075         'riskbitmask' => RISK_SPAM,
00076 
00077         'captype' => 'write',
00078         'contextlevel' => CONTEXT_MODULE,
00079         'archetypes' => array(
00080             'student' => CAP_ALLOW,
00081             'teacher' => CAP_ALLOW,
00082             'editingteacher' => CAP_ALLOW,
00083             'manager' => CAP_ALLOW
00084         )
00085     ),
00086 
00087     'mod/glossary:managecomments' => array(
00088 
00089         'riskbitmask' => RISK_SPAM,
00090 
00091         'captype' => 'write',
00092         'contextlevel' => CONTEXT_MODULE,
00093         'archetypes' => array(
00094             'teacher' => CAP_ALLOW,
00095             'editingteacher' => CAP_ALLOW,
00096             'manager' => CAP_ALLOW
00097         )
00098     ),
00099 
00100     'mod/glossary:import' => array(
00101 
00102         'riskbitmask' => RISK_SPAM,
00103 
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     'mod/glossary:export' => array(
00114 
00115         'captype' => 'read',
00116         'contextlevel' => CONTEXT_MODULE,
00117         'archetypes' => array(
00118             'teacher' => CAP_ALLOW,
00119             'editingteacher' => CAP_ALLOW,
00120             'manager' => CAP_ALLOW
00121         )
00122     ),
00123 
00124     'mod/glossary:approve' => array(
00125 
00126         'riskbitmask' => RISK_SPAM,
00127 
00128         'captype' => 'write',
00129         'contextlevel' => CONTEXT_MODULE,
00130         'archetypes' => array(
00131             'teacher' => CAP_ALLOW,
00132             'editingteacher' => CAP_ALLOW,
00133             'manager' => CAP_ALLOW
00134         )
00135     ),
00136 
00137     'mod/glossary:rate' => array(
00138 
00139         'captype' => 'write',
00140         'contextlevel' => CONTEXT_MODULE,
00141         'archetypes' => array(
00142             'teacher' => CAP_ALLOW,
00143             'editingteacher' => CAP_ALLOW,
00144             'manager' => CAP_ALLOW
00145         )
00146     ),
00147 
00148     'mod/glossary:viewrating' => array(
00149 
00150         'captype' => 'read',
00151         'contextlevel' => CONTEXT_MODULE,
00152         'archetypes' => array(
00153             'teacher' => CAP_ALLOW,
00154             'editingteacher' => CAP_ALLOW,
00155             'manager' => CAP_ALLOW
00156         )
00157     ),
00158 
00159     'mod/glossary:viewanyrating' => array(
00160 
00161         'riskbitmask' => RISK_PERSONAL,
00162         'captype' => 'read',
00163         'contextlevel' => CONTEXT_MODULE,
00164         'archetypes' => array(
00165             'teacher' => CAP_ALLOW,
00166             'editingteacher' => CAP_ALLOW,
00167             'manager' => CAP_ALLOW
00168         ),
00169         'clonepermissionsfrom' =>  'mod/glossary:viewrating'
00170     ),
00171 
00172     'mod/glossary:viewallratings' => array(
00173 
00174         'riskbitmask' => RISK_PERSONAL,
00175         'captype' => 'read',
00176         'contextlevel' => CONTEXT_MODULE,
00177         'archetypes' => array(
00178             'teacher' => CAP_ALLOW,
00179             'editingteacher' => CAP_ALLOW,
00180             'manager' => CAP_ALLOW
00181         ),
00182         'clonepermissionsfrom' =>  'mod/glossary:viewrating'
00183     ),
00184 
00185     'mod/glossary:exportentry' => array(
00186 
00187         'riskbitmask' => RISK_PERSONAL,
00188 
00189         'captype' => 'read',
00190         'contextlevel' => CONTEXT_MODULE,
00191         'archetypes' => array(
00192             'teacher' => CAP_ALLOW,
00193             'editingteacher' => CAP_ALLOW,
00194             'manager' => CAP_ALLOW
00195         )
00196     ),
00197 
00198     'mod/glossary:exportownentry' => array(
00199 
00200         'captype' => 'read',
00201         'contextlevel' => CONTEXT_MODULE,
00202         'archetypes' => array(
00203             'teacher' => CAP_ALLOW,
00204             'editingteacher' => CAP_ALLOW,
00205             'manager' => CAP_ALLOW,
00206             'student' => CAP_ALLOW,
00207         )
00208     ),
00209 
00210 );
00211 
00212 
 All Data Structures Namespaces Files Functions Variables Enumerations