|
Moodle
2.2.1
http://www.collinsharper.com
|
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 00052 defined('MOODLE_INTERNAL') || die(); 00053 00054 $capabilities = array( 00055 'moodle/site:config' => array( 00056 00057 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG | RISK_DATALOSS, 00058 00059 'captype' => 'write', 00060 'contextlevel' => CONTEXT_SYSTEM, 00061 'archetypes' => array( 00062 ) 00063 ), 00064 00065 'moodle/site:readallmessages' => array( 00066 00067 'riskbitmask' => RISK_PERSONAL, 00068 00069 'captype' => 'read', 00070 'contextlevel' => CONTEXT_SYSTEM, 00071 'archetypes' => array( 00072 'manager' => CAP_ALLOW, 00073 'editingteacher' => CAP_ALLOW 00074 ) 00075 ), 00076 00077 'moodle/site:sendmessage' => array( 00078 00079 'riskbitmask' => RISK_SPAM, 00080 00081 'captype' => 'write', 00082 'contextlevel' => CONTEXT_SYSTEM, 00083 'archetypes' => array( 00084 'manager' => CAP_ALLOW, 00085 'user' => CAP_ALLOW 00086 ) 00087 ), 00088 00089 'moodle/site:approvecourse' => array( 00090 00091 'riskbitmask' => RISK_XSS, 00092 00093 'captype' => 'write', 00094 'contextlevel' => CONTEXT_SYSTEM, 00095 'archetypes' => array( 00096 'manager' => CAP_ALLOW 00097 ) 00098 ), 00099 00100 'moodle/backup:backupcourse' => array( 00101 00102 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, 00103 00104 'captype' => 'write', 00105 'contextlevel' => CONTEXT_COURSE, 00106 'archetypes' => array( 00107 'editingteacher' => CAP_ALLOW, 00108 'manager' => CAP_ALLOW 00109 ), 00110 00111 'clonepermissionsfrom' => 'moodle/site:backup' 00112 ), 00113 00114 'moodle/backup:backupsection' => array( 00115 00116 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, 00117 00118 'captype' => 'write', 00119 'contextlevel' => CONTEXT_COURSE, 00120 'archetypes' => array( 00121 'editingteacher' => CAP_ALLOW, 00122 'manager' => CAP_ALLOW 00123 ), 00124 00125 'clonepermissionsfrom' => 'moodle/backup:backupcourse' 00126 ), 00127 00128 'moodle/backup:backupactivity' => array( 00129 00130 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, 00131 00132 'captype' => 'write', 00133 'contextlevel' => CONTEXT_MODULE, 00134 'archetypes' => array( 00135 'editingteacher' => CAP_ALLOW, 00136 'manager' => CAP_ALLOW 00137 ), 00138 00139 'clonepermissionsfrom' => 'moodle/backup:backupcourse' 00140 ), 00141 00142 'moodle/backup:backuptargethub' => array( 00143 00144 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, 00145 00146 'captype' => 'write', 00147 'contextlevel' => CONTEXT_COURSE, 00148 'archetypes' => array( 00149 'editingteacher' => CAP_ALLOW, 00150 'manager' => CAP_ALLOW 00151 ), 00152 00153 'clonepermissionsfrom' => 'moodle/backup:backupcourse' 00154 ), 00155 00156 'moodle/backup:backuptargetimport' => array( 00157 00158 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, 00159 00160 'captype' => 'write', 00161 'contextlevel' => CONTEXT_COURSE, 00162 'archetypes' => array( 00163 'editingteacher' => CAP_ALLOW, 00164 'manager' => CAP_ALLOW 00165 ), 00166 00167 'clonepermissionsfrom' => 'moodle/backup:backupcourse' 00168 ), 00169 00170 'moodle/backup:downloadfile' => array( 00171 00172 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, 00173 00174 'captype' => 'write', 00175 'contextlevel' => CONTEXT_COURSE, 00176 'archetypes' => array( 00177 'editingteacher' => CAP_ALLOW, 00178 'manager' => CAP_ALLOW 00179 ), 00180 00181 'clonepermissionsfrom' => 'moodle/site:backupdownload' 00182 ), 00183 00184 'moodle/backup:configure' => array( 00185 00186 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, 00187 00188 'captype' => 'write', 00189 'contextlevel' => CONTEXT_COURSE, 00190 'archetypes' => array( 00191 'editingteacher' => CAP_ALLOW, 00192 'manager' => CAP_ALLOW 00193 ) 00194 ), 00195 00196 'moodle/backup:userinfo' => array( 00197 00198 'riskbitmask' => RISK_PERSONAL, 00199 00200 'captype' => 'read', 00201 'contextlevel' => CONTEXT_COURSE, 00202 'archetypes' => array( 00203 'manager' => CAP_ALLOW 00204 ) 00205 ), 00206 00207 'moodle/backup:anonymise' => array( 00208 00209 'riskbitmask' => RISK_PERSONAL, 00210 00211 'captype' => 'read', 00212 'contextlevel' => CONTEXT_COURSE, 00213 'archetypes' => array( 00214 'manager' => CAP_ALLOW 00215 ) 00216 ), 00217 00218 'moodle/restore:restorecourse' => array( 00219 00220 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, 00221 00222 'captype' => 'write', 00223 'contextlevel' => CONTEXT_COURSE, 00224 'archetypes' => array( 00225 'editingteacher' => CAP_ALLOW, 00226 'manager' => CAP_ALLOW 00227 ), 00228 00229 'clonepermissionsfrom' => 'moodle/site:restore' 00230 ), 00231 00232 'moodle/restore:restoresection' => array( 00233 00234 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, 00235 00236 'captype' => 'write', 00237 'contextlevel' => CONTEXT_COURSE, 00238 'archetypes' => array( 00239 'editingteacher' => CAP_ALLOW, 00240 'manager' => CAP_ALLOW 00241 ), 00242 00243 'clonepermissionsfrom' => 'moodle/restore:restorecourse' 00244 ), 00245 00246 'moodle/restore:restoreactivity' => array( 00247 00248 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, 00249 00250 'captype' => 'write', 00251 'contextlevel' => CONTEXT_COURSE, 00252 'archetypes' => array( 00253 'editingteacher' => CAP_ALLOW, 00254 'manager' => CAP_ALLOW 00255 ), 00256 00257 'clonepermissionsfrom' => 'moodle/restore:restorecourse' 00258 ), 00259 00260 'moodle/restore:viewautomatedfilearea' => array( 00261 00262 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, 00263 00264 'captype' => 'write', 00265 'contextlevel' => CONTEXT_COURSE, 00266 ), 00267 00268 'moodle/restore:restoretargethub' => array( 00269 00270 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, 00271 00272 'captype' => 'write', 00273 'contextlevel' => CONTEXT_COURSE, 00274 'archetypes' => array( 00275 'editingteacher' => CAP_ALLOW, 00276 'manager' => CAP_ALLOW 00277 ), 00278 00279 'clonepermissionsfrom' => 'moodle/restore:restorecourse' 00280 ), 00281 00282 'moodle/restore:restoretargetimport' => array( 00283 00284 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, 00285 00286 'captype' => 'write', 00287 'contextlevel' => CONTEXT_COURSE, 00288 'archetypes' => array( 00289 'editingteacher' => CAP_ALLOW, 00290 'manager' => CAP_ALLOW 00291 ), 00292 00293 'clonepermissionsfrom' => 'moodle/site:import' 00294 ), 00295 00296 'moodle/restore:uploadfile' => array( 00297 00298 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, 00299 00300 'captype' => 'write', 00301 'contextlevel' => CONTEXT_COURSE, 00302 'archetypes' => array( 00303 'editingteacher' => CAP_ALLOW, 00304 'manager' => CAP_ALLOW 00305 ), 00306 00307 'clonepermissionsfrom' => 'moodle/site:backupupload' 00308 ), 00309 00310 'moodle/restore:configure' => array( 00311 00312 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, 00313 00314 'captype' => 'write', 00315 'contextlevel' => CONTEXT_COURSE, 00316 'archetypes' => array( 00317 'editingteacher' => CAP_ALLOW, 00318 'manager' => CAP_ALLOW 00319 ) 00320 ), 00321 00322 'moodle/restore:rolldates' => array( 00323 00324 'captype' => 'write', 00325 'contextlevel' => CONTEXT_COURSE, 00326 'archetypes' => array( 00327 'coursecreator' => CAP_ALLOW, 00328 'manager' => CAP_ALLOW 00329 ) 00330 ), 00331 00332 'moodle/restore:userinfo' => array( 00333 00334 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG, 00335 00336 'captype' => 'write', 00337 'contextlevel' => CONTEXT_COURSE, 00338 'archetypes' => array( 00339 'manager' => CAP_ALLOW 00340 ) 00341 ), 00342 00343 'moodle/restore:createuser' => array( 00344 00345 'riskbitmask' => RISK_SPAM | RISK_PERSONAL, 00346 00347 'captype' => 'write', 00348 'contextlevel' => CONTEXT_SYSTEM, 00349 'archetypes' => array( 00350 'manager' => CAP_ALLOW 00351 ) 00352 ), 00353 00354 'moodle/site:manageblocks' => array( 00355 00356 'riskbitmask' => RISK_SPAM | RISK_XSS, 00357 00358 'captype' => 'write', 00359 'contextlevel' => CONTEXT_BLOCK, 00360 'archetypes' => array( 00361 'editingteacher' => CAP_ALLOW, 00362 'manager' => CAP_ALLOW 00363 ) 00364 ), 00365 00366 'moodle/site:accessallgroups' => array( 00367 00368 'captype' => 'read', 00369 'contextlevel' => CONTEXT_COURSE, 00370 'archetypes' => array( 00371 'teacher' => CAP_ALLOW, 00372 'editingteacher' => CAP_ALLOW, 00373 'manager' => CAP_ALLOW 00374 ) 00375 ), 00376 00377 'moodle/site:viewfullnames' => array( 00378 00379 'captype' => 'read', 00380 'contextlevel' => CONTEXT_COURSE, 00381 'archetypes' => array( 00382 'teacher' => CAP_ALLOW, 00383 'editingteacher' => CAP_ALLOW, 00384 'manager' => CAP_ALLOW 00385 ) 00386 ), 00387 00388 // In reports that give lists of users, extra information about each user's 00389 // identity (the fields configured in site option showuseridentity) will be 00390 // displayed to users who have this capability. 00391 'moodle/site:viewuseridentity' => array( 00392 00393 'captype' => 'read', 00394 'contextlevel' => CONTEXT_COURSE, 00395 'archetypes' => array( 00396 'teacher' => CAP_ALLOW, 00397 'editingteacher' => CAP_ALLOW, 00398 'manager' => CAP_ALLOW 00399 ) 00400 ), 00401 00402 'moodle/site:viewreports' => array( 00403 00404 'riskbitmask' => RISK_PERSONAL, 00405 00406 'captype' => 'read', 00407 'contextlevel' => CONTEXT_COURSE, 00408 'archetypes' => array( 00409 'teacher' => CAP_ALLOW, 00410 'editingteacher' => CAP_ALLOW, 00411 'manager' => CAP_ALLOW 00412 ) 00413 ), 00414 00415 'moodle/site:trustcontent' => array( 00416 00417 'riskbitmask' => RISK_XSS, 00418 00419 'captype' => 'write', 00420 'contextlevel' => CONTEXT_COURSE, 00421 'archetypes' => array( 00422 'editingteacher' => CAP_ALLOW, 00423 'manager' => CAP_ALLOW 00424 ) 00425 ), 00426 00427 'moodle/site:uploadusers' => array( 00428 00429 'riskbitmask' => RISK_SPAM | RISK_PERSONAL, 00430 00431 'captype' => 'write', 00432 'contextlevel' => CONTEXT_SYSTEM, 00433 'archetypes' => array( 00434 'manager' => CAP_ALLOW 00435 ) 00436 ), 00437 00438 // Permission to manage filter setting overrides in subcontexts. 00439 'moodle/filter:manage' => array( 00440 00441 'captype' => 'write', 00442 'contextlevel' => CONTEXT_COURSE, 00443 'archetypes' => array( 00444 'editingteacher' => CAP_ALLOW, 00445 'manager' => CAP_ALLOW, 00446 ) 00447 ), 00448 00449 'moodle/user:create' => array( 00450 00451 'riskbitmask' => RISK_SPAM | RISK_PERSONAL, 00452 00453 'captype' => 'write', 00454 'contextlevel' => CONTEXT_SYSTEM, 00455 'archetypes' => array( 00456 'manager' => CAP_ALLOW 00457 ) 00458 ), 00459 00460 'moodle/user:delete' => array( 00461 00462 'riskbitmask' => RISK_PERSONAL, RISK_DATALOSS, 00463 00464 'captype' => 'write', 00465 'contextlevel' => CONTEXT_SYSTEM, 00466 'archetypes' => array( 00467 'manager' => CAP_ALLOW 00468 ) 00469 ), 00470 00471 'moodle/user:update' => array( 00472 00473 'riskbitmask' => RISK_SPAM | RISK_PERSONAL, 00474 00475 'captype' => 'write', 00476 'contextlevel' => CONTEXT_SYSTEM, 00477 'archetypes' => array( 00478 'manager' => CAP_ALLOW 00479 ) 00480 ), 00481 00482 'moodle/user:viewdetails' => array( 00483 00484 'captype' => 'read', 00485 'contextlevel' => CONTEXT_COURSE, 00486 'archetypes' => array( 00487 'guest' => CAP_ALLOW, 00488 'student' => CAP_ALLOW, 00489 'teacher' => CAP_ALLOW, 00490 'editingteacher' => CAP_ALLOW, 00491 'manager' => CAP_ALLOW 00492 ) 00493 ), 00494 00495 'moodle/user:viewalldetails' => array( 00496 'riskbitmask' => RISK_PERSONAL, 00497 'captype' => 'read', 00498 'contextlevel' => CONTEXT_USER, 00499 'archetypes' => array( 00500 'manager' => CAP_ALLOW 00501 ), 00502 'clonepermissionsfrom' => 'moodle/user:update' 00503 ), 00504 00505 'moodle/user:viewhiddendetails' => array( 00506 00507 'riskbitmask' => RISK_PERSONAL, 00508 00509 'captype' => 'read', 00510 'contextlevel' => CONTEXT_COURSE, 00511 'archetypes' => array( 00512 'teacher' => CAP_ALLOW, 00513 'editingteacher' => CAP_ALLOW, 00514 'manager' => CAP_ALLOW 00515 ) 00516 ), 00517 00518 'moodle/user:loginas' => array( 00519 00520 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG, 00521 00522 'captype' => 'write', 00523 'contextlevel' => CONTEXT_COURSE, 00524 'archetypes' => array( 00525 'manager' => CAP_ALLOW 00526 ) 00527 ), 00528 00529 // can the user manage the system default profile page? 00530 'moodle/user:managesyspages' => array( 00531 00532 'riskbitmap' => RISK_SPAM | RISK_PERSONAL | RISK_CONFIG, 00533 00534 'captype' => 'write', 00535 'contextlevel' => CONTEXT_SYSTEM, 00536 'archetypes' => array( 00537 'manager' => CAP_ALLOW 00538 ) 00539 ), 00540 00541 // can the user manage another user's profile page? 00542 'moodle/user:manageblocks' => array( 00543 00544 'riskbitmap' => RISK_SPAM | RISK_PERSONAL, 00545 00546 'captype' => 'write', 00547 'contextlevel' => CONTEXT_USER 00548 ), 00549 00550 // can the user manage their own profile page? 00551 'moodle/user:manageownblocks' => array( 00552 00553 'riskbitmap' => RISK_SPAM | RISK_PERSONAL, 00554 00555 'captype' => 'write', 00556 'contextlevel' => CONTEXT_SYSTEM, 00557 'archetypes' => array( 00558 'user' => CAP_ALLOW 00559 ) 00560 ), 00561 00562 // can the user manage their own files? 00563 'moodle/user:manageownfiles' => array( 00564 00565 'riskbitmap' => RISK_SPAM | RISK_PERSONAL, 00566 00567 'captype' => 'write', 00568 'contextlevel' => CONTEXT_SYSTEM, 00569 'archetypes' => array( 00570 'user' => CAP_ALLOW 00571 ) 00572 ), 00573 00574 // can the user manage the system default dashboard page? 00575 'moodle/my:configsyspages' => array( 00576 00577 'riskbitmap' => RISK_SPAM | RISK_PERSONAL | RISK_CONFIG, 00578 00579 'captype' => 'write', 00580 'contextlevel' => CONTEXT_SYSTEM, 00581 'archetypes' => array( 00582 'manager' => CAP_ALLOW 00583 ) 00584 ), 00585 00586 'moodle/role:assign' => array( 00587 00588 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, 00589 00590 'captype' => 'write', 00591 'contextlevel' => CONTEXT_COURSE, 00592 'archetypes' => array( 00593 'editingteacher' => CAP_ALLOW, 00594 'manager' => CAP_ALLOW 00595 ) 00596 ), 00597 00598 'moodle/role:review' => array( 00599 00600 'riskbitmask' => RISK_PERSONAL, 00601 00602 'captype' => 'read', 00603 'contextlevel' => CONTEXT_COURSE, 00604 'archetypes' => array( 00605 'teacher' => CAP_ALLOW, 00606 'editingteacher' => CAP_ALLOW, 00607 'manager' => CAP_ALLOW 00608 ) 00609 ), 00610 00611 'moodle/role:override' => array( 00612 00613 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, 00614 00615 'captype' => 'write', 00616 'contextlevel' => CONTEXT_COURSE, 00617 'archetypes' => array( 00618 'manager' => CAP_ALLOW 00619 ) 00620 ), 00621 00622 'moodle/role:safeoverride' => array( 00623 00624 'riskbitmask' => RISK_SPAM, 00625 00626 'captype' => 'write', 00627 'contextlevel' => CONTEXT_COURSE, 00628 'archetypes' => array( 00629 'editingteacher' => CAP_ALLOW 00630 ) 00631 ), 00632 00633 'moodle/role:manage' => array( 00634 00635 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, 00636 00637 'captype' => 'write', 00638 'contextlevel' => CONTEXT_SYSTEM, 00639 'archetypes' => array( 00640 'manager' => CAP_ALLOW 00641 ) 00642 ), 00643 00644 'moodle/role:switchroles' => array( 00645 00646 'riskbitmask' => RISK_XSS | RISK_PERSONAL, 00647 00648 'captype' => 'read', 00649 'contextlevel' => CONTEXT_COURSE, 00650 'archetypes' => array( 00651 'editingteacher' => CAP_ALLOW, 00652 'manager' => CAP_ALLOW 00653 ) 00654 ), 00655 00656 // Create, update and delete course categories. (Deleting a course category 00657 // does not let you delete the courses it contains, unless you also have 00658 // moodle/course: delete.) Creating and deleting requires this permission in 00659 // the parent category. 00660 'moodle/category:manage' => array( 00661 00662 'riskbitmask' => RISK_XSS, 00663 00664 'captype' => 'write', 00665 'contextlevel' => CONTEXT_COURSECAT, 00666 'archetypes' => array( 00667 'manager' => CAP_ALLOW 00668 ), 00669 'clonepermissionsfrom' => 'moodle/category:update' 00670 ), 00671 00672 'moodle/category:viewhiddencategories' => array( 00673 00674 'captype' => 'read', 00675 'contextlevel' => CONTEXT_COURSECAT, 00676 'archetypes' => array( 00677 'coursecreator' => CAP_ALLOW, 00678 'manager' => CAP_ALLOW 00679 ), 00680 'clonepermissionsfrom' => 'moodle/category:visibility' 00681 ), 00682 00683 // create, delete, move cohorts in system and course categories, 00684 // (cohorts with component !== null can be only moved) 00685 'moodle/cohort:manage' => array( 00686 00687 'captype' => 'write', 00688 'contextlevel' => CONTEXT_COURSECAT, 00689 'archetypes' => array( 00690 'manager' => CAP_ALLOW 00691 ) 00692 ), 00693 00694 // add and remove cohort members (only for cohorts where component !== null) 00695 'moodle/cohort:assign' => array( 00696 00697 'captype' => 'write', 00698 'contextlevel' => CONTEXT_COURSECAT, 00699 'archetypes' => array( 00700 'manager' => CAP_ALLOW 00701 ) 00702 ), 00703 00704 // view members of a cohort, this can be used in course context too, 00705 // this also controls the ability to actually use cohort 00706 'moodle/cohort:view' => array( 00707 00708 'captype' => 'read', 00709 'contextlevel' => CONTEXT_COURSE, 00710 'archetypes' => array( 00711 'editingteacher' => CAP_ALLOW, 00712 'manager' => CAP_ALLOW 00713 ) 00714 ), 00715 00716 'moodle/course:create' => array( 00717 00718 'riskbitmask' => RISK_XSS, 00719 00720 'captype' => 'write', 00721 'contextlevel' => CONTEXT_COURSECAT, 00722 'archetypes' => array( 00723 'coursecreator' => CAP_ALLOW, 00724 'manager' => CAP_ALLOW 00725 ) 00726 ), 00727 00728 'moodle/course:request' => array( 00729 'captype' => 'write', 00730 'contextlevel' => CONTEXT_SYSTEM, 00731 'archetypes' => array( 00732 'user' => CAP_ALLOW, 00733 ) 00734 ), 00735 00736 'moodle/course:delete' => array( 00737 00738 'riskbitmask' => RISK_DATALOSS, 00739 00740 'captype' => 'write', 00741 'contextlevel' => CONTEXT_COURSE, 00742 'archetypes' => array( 00743 'manager' => CAP_ALLOW 00744 ) 00745 ), 00746 00747 'moodle/course:update' => array( 00748 00749 'riskbitmask' => RISK_XSS, 00750 00751 'captype' => 'write', 00752 'contextlevel' => CONTEXT_COURSE, 00753 'archetypes' => array( 00754 'editingteacher' => CAP_ALLOW, 00755 'manager' => CAP_ALLOW 00756 ) 00757 ), 00758 00759 'moodle/course:view' => array( 00760 00761 'captype' => 'read', 00762 'contextlevel' => CONTEXT_COURSE, 00763 'archetypes' => array( 00764 'manager' => CAP_ALLOW, 00765 ) 00766 ), 00767 00768 /* review course enrolments - no group restrictions, it is really full access to all participants info*/ 00769 'moodle/course:enrolreview' => array( 00770 00771 'riskbitmask' => RISK_PERSONAL, 00772 00773 'captype' => 'read', 00774 'contextlevel' => CONTEXT_COURSE, 00775 'archetypes' => array( 00776 'editingteacher' => CAP_ALLOW, 00777 'manager' => CAP_ALLOW, 00778 ) 00779 ), 00780 00781 /* add, remove, hide enrol instances in courses */ 00782 'moodle/course:enrolconfig' => array( 00783 00784 'riskbitmask' => RISK_PERSONAL, 00785 00786 'captype' => 'write', 00787 'contextlevel' => CONTEXT_COURSE, 00788 'archetypes' => array( 00789 'editingteacher' => CAP_ALLOW, 00790 'manager' => CAP_ALLOW, 00791 ) 00792 ), 00793 00794 'moodle/course:bulkmessaging' => array( 00795 00796 'riskbitmask' => RISK_SPAM, 00797 00798 'captype' => 'write', 00799 'contextlevel' => CONTEXT_COURSE, 00800 'archetypes' => array( 00801 'teacher' => CAP_ALLOW, 00802 'editingteacher' => CAP_ALLOW, 00803 'manager' => CAP_ALLOW 00804 ) 00805 ), 00806 00807 'moodle/course:viewhiddenuserfields' => array( 00808 00809 'riskbitmask' => RISK_PERSONAL, 00810 00811 'captype' => 'read', 00812 'contextlevel' => CONTEXT_COURSE, 00813 'archetypes' => array( 00814 'teacher' => CAP_ALLOW, 00815 'editingteacher' => CAP_ALLOW, 00816 'manager' => CAP_ALLOW 00817 ) 00818 ), 00819 00820 'moodle/course:viewhiddencourses' => array( 00821 00822 'captype' => 'read', 00823 'contextlevel' => CONTEXT_COURSE, 00824 'archetypes' => array( 00825 'coursecreator' => CAP_ALLOW, 00826 'teacher' => CAP_ALLOW, 00827 'editingteacher' => CAP_ALLOW, 00828 'manager' => CAP_ALLOW 00829 ) 00830 ), 00831 00832 'moodle/course:visibility' => array( 00833 00834 'captype' => 'write', 00835 'contextlevel' => CONTEXT_COURSE, 00836 'archetypes' => array( 00837 'editingteacher' => CAP_ALLOW, 00838 'manager' => CAP_ALLOW 00839 ) 00840 ), 00841 00842 'moodle/course:managefiles' => array( 00843 00844 'riskbitmask' => RISK_XSS, 00845 00846 'captype' => 'write', 00847 'contextlevel' => CONTEXT_COURSE, 00848 'archetypes' => array( 00849 'editingteacher' => CAP_ALLOW, 00850 'manager' => CAP_ALLOW 00851 ) 00852 ), 00853 00854 'moodle/course:manageactivities' => array( 00855 00856 'riskbitmask' => RISK_XSS, 00857 00858 'captype' => 'write', 00859 'contextlevel' => CONTEXT_MODULE, 00860 'archetypes' => array( 00861 'editingteacher' => CAP_ALLOW, 00862 'manager' => CAP_ALLOW 00863 ) 00864 ), 00865 00866 'moodle/course:activityvisibility' => array( 00867 00868 'captype' => 'write', 00869 'contextlevel' => CONTEXT_MODULE, 00870 'archetypes' => array( 00871 'editingteacher' => CAP_ALLOW, 00872 'manager' => CAP_ALLOW 00873 ) 00874 ), 00875 00876 'moodle/course:viewhiddenactivities' => array( 00877 00878 'captype' => 'write', 00879 'contextlevel' => CONTEXT_MODULE, 00880 'archetypes' => array( 00881 'teacher' => CAP_ALLOW, 00882 'editingteacher' => CAP_ALLOW, 00883 'manager' => CAP_ALLOW 00884 ) 00885 ), 00886 00887 'moodle/course:viewparticipants' => array( 00888 00889 'captype' => 'read', 00890 'contextlevel' => CONTEXT_COURSE, 00891 'archetypes' => array( 00892 'student' => CAP_ALLOW, 00893 'teacher' => CAP_ALLOW, 00894 'editingteacher' => CAP_ALLOW, 00895 'manager' => CAP_ALLOW 00896 ) 00897 ), 00898 00899 'moodle/course:changefullname' => array( 00900 00901 'riskbitmask' => RISK_XSS, 00902 00903 'captype' => 'write', 00904 'contextlevel' => CONTEXT_COURSE, 00905 'archetypes' => array( 00906 'editingteacher' => CAP_ALLOW, 00907 'manager' => CAP_ALLOW 00908 ), 00909 'clonepermissionsfrom' => 'moodle/course:update' 00910 ), 00911 00912 'moodle/course:changeshortname' => array( 00913 00914 'riskbitmask' => RISK_XSS, 00915 00916 'captype' => 'write', 00917 'contextlevel' => CONTEXT_COURSE, 00918 'archetypes' => array( 00919 'editingteacher' => CAP_ALLOW, 00920 'manager' => CAP_ALLOW 00921 ), 00922 'clonepermissionsfrom' => 'moodle/course:update' 00923 ), 00924 00925 'moodle/course:changeidnumber' => array( 00926 00927 'riskbitmask' => RISK_XSS, 00928 00929 'captype' => 'write', 00930 'contextlevel' => CONTEXT_COURSE, 00931 'archetypes' => array( 00932 'editingteacher' => CAP_ALLOW, 00933 'manager' => CAP_ALLOW 00934 ), 00935 'clonepermissionsfrom' => 'moodle/course:update' 00936 ), 00937 'moodle/course:changecategory' => array( 00938 'riskbitmask' => RISK_XSS, 00939 00940 'captype' => 'write', 00941 'contextlevel' => CONTEXT_COURSE, 00942 'archetypes' => array( 00943 'editingteacher' => CAP_ALLOW, 00944 'manager' => CAP_ALLOW 00945 ), 00946 'clonepermissionsfrom' => 'moodle/course:update' 00947 ), 00948 00949 'moodle/course:changesummary' => array( 00950 'riskbitmask' => RISK_XSS, 00951 00952 'captype' => 'write', 00953 'contextlevel' => CONTEXT_COURSE, 00954 'archetypes' => array( 00955 'editingteacher' => CAP_ALLOW, 00956 'manager' => CAP_ALLOW 00957 ), 00958 'clonepermissionsfrom' => 'moodle/course:update' 00959 ), 00960 00961 00962 'moodle/site:viewparticipants' => array( 00963 00964 'captype' => 'read', 00965 'contextlevel' => CONTEXT_SYSTEM, 00966 'archetypes' => array( 00967 'manager' => CAP_ALLOW 00968 ) 00969 ), 00970 00971 'moodle/course:viewscales' => array( 00972 00973 'captype' => 'read', 00974 'contextlevel' => CONTEXT_COURSE, 00975 'archetypes' => array( 00976 'student' => CAP_ALLOW, 00977 'teacher' => CAP_ALLOW, 00978 'editingteacher' => CAP_ALLOW, 00979 'manager' => CAP_ALLOW 00980 ) 00981 ), 00982 00983 'moodle/course:managescales' => array( 00984 00985 'captype' => 'write', 00986 'contextlevel' => CONTEXT_COURSE, 00987 'archetypes' => array( 00988 'editingteacher' => CAP_ALLOW, 00989 'manager' => CAP_ALLOW 00990 ) 00991 ), 00992 00993 'moodle/course:managegroups' => array( 00994 00995 'captype' => 'write', 00996 'contextlevel' => CONTEXT_COURSE, 00997 'archetypes' => array( 00998 'editingteacher' => CAP_ALLOW, 00999 'manager' => CAP_ALLOW 01000 ) 01001 ), 01002 01003 'moodle/course:reset' => array( 01004 01005 'riskbitmask' => RISK_DATALOSS, 01006 01007 'captype' => 'write', 01008 'contextlevel' => CONTEXT_COURSE, 01009 'archetypes' => array( 01010 'editingteacher' => CAP_ALLOW, 01011 'manager' => CAP_ALLOW 01012 ) 01013 ), 01014 01015 'moodle/blog:view' => array( 01016 01017 'captype' => 'read', 01018 'contextlevel' => CONTEXT_SYSTEM, 01019 'archetypes' => array( 01020 'guest' => CAP_ALLOW, 01021 'user' => CAP_ALLOW, 01022 'student' => CAP_ALLOW, 01023 'teacher' => CAP_ALLOW, 01024 'editingteacher' => CAP_ALLOW, 01025 'manager' => CAP_ALLOW 01026 ) 01027 ), 01028 01029 'moodle/blog:search' => array( 01030 'captype' => 'read', 01031 'contextlevel' => CONTEXT_SYSTEM, 01032 'archetypes' => array( 01033 'guest' => CAP_ALLOW, 01034 'user' => CAP_ALLOW, 01035 'student' => CAP_ALLOW, 01036 'teacher' => CAP_ALLOW, 01037 'editingteacher' => CAP_ALLOW, 01038 'manager' => CAP_ALLOW 01039 ) 01040 ), 01041 01042 'moodle/blog:viewdrafts' => array( 01043 01044 'riskbitmask' => RISK_PERSONAL, 01045 'captype' => 'read', 01046 'contextlevel' => CONTEXT_SYSTEM, 01047 'archetypes' => array( 01048 'manager' => CAP_ALLOW 01049 ) 01050 ), 01051 01052 'moodle/blog:create' => array( // works in CONTEXT_SYSTEM only 01053 01054 'riskbitmask' => RISK_SPAM, 01055 01056 'captype' => 'write', 01057 'contextlevel' => CONTEXT_SYSTEM, 01058 'archetypes' => array( 01059 'user' => CAP_ALLOW, 01060 'manager' => CAP_ALLOW 01061 ) 01062 ), 01063 01064 'moodle/blog:manageentries' => array( 01065 01066 'riskbitmask' => RISK_SPAM, 01067 01068 'captype' => 'write', 01069 'contextlevel' => CONTEXT_SYSTEM, 01070 'archetypes' => array( 01071 'teacher' => CAP_ALLOW, 01072 'editingteacher' => CAP_ALLOW, 01073 'manager' => CAP_ALLOW 01074 ) 01075 ), 01076 01077 'moodle/blog:manageexternal' => array( 01078 01079 'riskbitmask' => RISK_SPAM, 01080 01081 'captype' => 'write', 01082 'contextlevel' => CONTEXT_SYSTEM, 01083 'archetypes' => array( 01084 'student' => CAP_ALLOW, 01085 'user' => CAP_ALLOW, 01086 'teacher' => CAP_ALLOW, 01087 'editingteacher' => CAP_ALLOW, 01088 'manager' => CAP_ALLOW 01089 ) 01090 ), 01091 01092 'moodle/blog:associatecourse' => array( 01093 01094 'captype' => 'write', 01095 'contextlevel' => CONTEXT_COURSE, 01096 'archetypes' => array( 01097 'student' => CAP_ALLOW, 01098 'user' => CAP_ALLOW, 01099 'teacher' => CAP_ALLOW, 01100 'editingteacher' => CAP_ALLOW, 01101 'manager' => CAP_ALLOW 01102 ) 01103 ), 01104 01105 'moodle/blog:associatemodule' => array( 01106 01107 'captype' => 'write', 01108 'contextlevel' => CONTEXT_MODULE, 01109 'archetypes' => array( 01110 'student' => CAP_ALLOW, 01111 'user' => CAP_ALLOW, 01112 'teacher' => CAP_ALLOW, 01113 'editingteacher' => CAP_ALLOW, 01114 'manager' => CAP_ALLOW 01115 ) 01116 ), 01117 01118 'moodle/calendar:manageownentries' => array( // works in CONTEXT_SYSTEM only 01119 01120 'riskbitmask' => RISK_SPAM, 01121 01122 'captype' => 'write', 01123 'contextlevel' => CONTEXT_COURSE, 01124 'archetypes' => array( 01125 'user' => CAP_ALLOW, 01126 'manager' => CAP_ALLOW 01127 ) 01128 ), 01129 01130 'moodle/calendar:managegroupentries' => array( 01131 01132 'riskbitmask' => RISK_SPAM, 01133 01134 'captype' => 'write', 01135 'contextlevel' => CONTEXT_COURSE, 01136 'archetypes' => array( 01137 'teacher' => CAP_ALLOW, 01138 'editingteacher' => CAP_ALLOW, 01139 'manager' => CAP_ALLOW 01140 ) 01141 ), 01142 01143 'moodle/calendar:manageentries' => array( 01144 01145 'riskbitmask' => RISK_SPAM, 01146 01147 'captype' => 'write', 01148 'contextlevel' => CONTEXT_COURSE, 01149 'archetypes' => array( 01150 'teacher' => CAP_ALLOW, 01151 'editingteacher' => CAP_ALLOW, 01152 'manager' => CAP_ALLOW 01153 ) 01154 ), 01155 01156 'moodle/user:editprofile' => array( 01157 01158 'riskbitmask' => RISK_SPAM | RISK_PERSONAL, 01159 01160 'captype' => 'write', 01161 'contextlevel' => CONTEXT_USER, 01162 'archetypes' => array( 01163 'manager' => CAP_ALLOW 01164 ) 01165 ), 01166 01167 'moodle/user:editownprofile' => array( 01168 01169 'riskbitmask' => RISK_SPAM, 01170 01171 'captype' => 'write', 01172 'contextlevel' => CONTEXT_SYSTEM, 01173 'archetypes' => array( 01174 'guest' => CAP_PROHIBIT, 01175 'user' => CAP_ALLOW, 01176 'manager' => CAP_ALLOW 01177 ) 01178 ), 01179 01180 'moodle/user:changeownpassword' => array( 01181 01182 'captype' => 'write', 01183 'contextlevel' => CONTEXT_SYSTEM, 01184 'archetypes' => array( 01185 'guest' => CAP_PROHIBIT, 01186 'user' => CAP_ALLOW, 01187 'manager' => CAP_ALLOW 01188 ) 01189 ), 01190 01191 // The next 3 might make no sense for some roles, e.g teacher, etc. 01192 // since the next level up is site. These are more for the parent role 01193 'moodle/user:readuserposts' => array( 01194 01195 'captype' => 'read', 01196 'contextlevel' => CONTEXT_USER, 01197 'archetypes' => array( 01198 'student' => CAP_ALLOW, 01199 'teacher' => CAP_ALLOW, 01200 'editingteacher' => CAP_ALLOW, 01201 'manager' => CAP_ALLOW 01202 ) 01203 ), 01204 01205 'moodle/user:readuserblogs' => array( 01206 01207 'captype' => 'read', 01208 'contextlevel' => CONTEXT_USER, 01209 'archetypes' => array( 01210 'student' => CAP_ALLOW, 01211 'teacher' => CAP_ALLOW, 01212 'editingteacher' => CAP_ALLOW, 01213 'manager' => CAP_ALLOW 01214 ) 01215 ), 01216 01217 // designed for parent role - not used in legacy roles 01218 'moodle/user:viewuseractivitiesreport' => array( 01219 'riskbitmask' => RISK_PERSONAL, 01220 01221 'captype' => 'read', 01222 'contextlevel' => CONTEXT_USER, 01223 'archetypes' => array( 01224 ) 01225 ), 01226 01227 //capabilities designed for the new message system configuration 01228 'moodle/user:editmessageprofile' => array( 01229 01230 'riskbitmask' => RISK_SPAM, 01231 01232 'captype' => 'write', 01233 'contextlevel' => CONTEXT_USER, 01234 'archetypes' => array( 01235 'manager' => CAP_ALLOW 01236 ) 01237 ), 01238 01239 'moodle/user:editownmessageprofile' => array( 01240 01241 'captype' => 'write', 01242 'contextlevel' => CONTEXT_SYSTEM, 01243 'archetypes' => array( 01244 'guest' => CAP_PROHIBIT, 01245 'user' => CAP_ALLOW, 01246 'manager' => CAP_ALLOW 01247 ) 01248 ), 01249 01250 'moodle/question:managecategory' => array( 01251 'riskbitmask' => RISK_SPAM | RISK_XSS, 01252 'captype' => 'write', 01253 'contextlevel' => CONTEXT_COURSE, 01254 'archetypes' => array( 01255 'editingteacher' => CAP_ALLOW, 01256 'manager' => CAP_ALLOW 01257 ) 01258 ), 01259 01260 //new in moodle 1.9 01261 'moodle/question:add' => array( 01262 'riskbitmask' => RISK_SPAM | RISK_XSS, 01263 'captype' => 'write', 01264 'contextlevel' => CONTEXT_COURSE, 01265 'archetypes' => array( 01266 'editingteacher' => CAP_ALLOW, 01267 'manager' => CAP_ALLOW 01268 ), 01269 'clonepermissionsfrom' => 'moodle/question:manage' 01270 ), 01271 'moodle/question:editmine' => array( 01272 'riskbitmask' => RISK_SPAM | RISK_XSS, 01273 'captype' => 'write', 01274 'contextlevel' => CONTEXT_COURSE, 01275 'archetypes' => array( 01276 'editingteacher' => CAP_ALLOW, 01277 'manager' => CAP_ALLOW 01278 ), 01279 'clonepermissionsfrom' => 'moodle/question:manage' 01280 ), 01281 'moodle/question:editall' => array( 01282 'riskbitmask' => RISK_SPAM | RISK_XSS, 01283 'captype' => 'write', 01284 'contextlevel' => CONTEXT_COURSE, 01285 'archetypes' => array( 01286 'editingteacher' => CAP_ALLOW, 01287 'manager' => CAP_ALLOW 01288 ), 01289 'clonepermissionsfrom' => 'moodle/question:manage' 01290 ), 01291 'moodle/question:viewmine' => array( 01292 'captype' => 'read', 01293 'contextlevel' => CONTEXT_COURSE, 01294 'archetypes' => array( 01295 'editingteacher' => CAP_ALLOW, 01296 'manager' => CAP_ALLOW 01297 ), 01298 'clonepermissionsfrom' => 'moodle/question:manage' 01299 ), 01300 'moodle/question:viewall' => array( 01301 'captype' => 'read', 01302 'contextlevel' => CONTEXT_COURSE, 01303 'archetypes' => array( 01304 'editingteacher' => CAP_ALLOW, 01305 'manager' => CAP_ALLOW 01306 ), 01307 'clonepermissionsfrom' => 'moodle/question:manage' 01308 ), 01309 'moodle/question:usemine' => array( 01310 'captype' => 'read', 01311 'contextlevel' => CONTEXT_COURSE, 01312 'archetypes' => array( 01313 'editingteacher' => CAP_ALLOW, 01314 'manager' => CAP_ALLOW 01315 ), 01316 'clonepermissionsfrom' => 'moodle/question:manage' 01317 ), 01318 'moodle/question:useall' => array( 01319 'captype' => 'read', 01320 'contextlevel' => CONTEXT_COURSE, 01321 'archetypes' => array( 01322 'editingteacher' => CAP_ALLOW, 01323 'manager' => CAP_ALLOW 01324 ), 01325 'clonepermissionsfrom' => 'moodle/question:manage' 01326 ), 01327 'moodle/question:movemine' => array( 01328 'captype' => 'write', 01329 'contextlevel' => CONTEXT_COURSE, 01330 'archetypes' => array( 01331 'editingteacher' => CAP_ALLOW, 01332 'manager' => CAP_ALLOW 01333 ), 01334 'clonepermissionsfrom' => 'moodle/question:manage' 01335 ), 01336 'moodle/question:moveall' => array( 01337 'captype' => 'write', 01338 'contextlevel' => CONTEXT_COURSE, 01339 'archetypes' => array( 01340 'editingteacher' => CAP_ALLOW, 01341 'manager' => CAP_ALLOW 01342 ), 01343 'clonepermissionsfrom' => 'moodle/question:manage' 01344 ), 01345 //END new in moodle 1.9 01346 01347 // Configure the installed question types. 01348 'moodle/question:config' => array( 01349 'riskbitmask' => RISK_CONFIG, 01350 'captype' => 'write', 01351 'contextlevel' => CONTEXT_SYSTEM, 01352 'archetypes' => array( 01353 'manager' => CAP_ALLOW 01354 ) 01355 ), 01356 01357 // While attempting questions, the ability to flag particular questions for later reference. 01358 'moodle/question:flag' => array( 01359 'captype' => 'write', 01360 'contextlevel' => CONTEXT_COURSE, 01361 'archetypes' => array( 01362 'student' => CAP_ALLOW, 01363 'teacher' => CAP_ALLOW, 01364 'editingteacher' => CAP_ALLOW, 01365 'manager' => CAP_ALLOW 01366 ) 01367 ), 01368 01369 'moodle/site:doclinks' => array( 01370 'captype' => 'read', 01371 'contextlevel' => CONTEXT_SYSTEM, 01372 'archetypes' => array( 01373 'teacher' => CAP_ALLOW, 01374 'editingteacher' => CAP_ALLOW, 01375 'manager' => CAP_ALLOW 01376 ) 01377 ), 01378 01379 'moodle/course:sectionvisibility' => array( 01380 01381 'captype' => 'write', 01382 'contextlevel' => CONTEXT_COURSE, 01383 'archetypes' => array( 01384 'editingteacher' => CAP_ALLOW, 01385 'manager' => CAP_ALLOW 01386 ) 01387 ), 01388 01389 'moodle/course:useremail' => array( 01390 01391 'captype' => 'write', 01392 'contextlevel' => CONTEXT_COURSE, 01393 'archetypes' => array( 01394 'editingteacher' => CAP_ALLOW, 01395 'manager' => CAP_ALLOW 01396 ) 01397 ), 01398 01399 'moodle/course:viewhiddensections' => array( 01400 01401 'captype' => 'write', 01402 'contextlevel' => CONTEXT_COURSE, 01403 'archetypes' => array( 01404 'editingteacher' => CAP_ALLOW, 01405 'manager' => CAP_ALLOW 01406 ) 01407 ), 01408 01409 'moodle/course:setcurrentsection' => array( 01410 01411 'captype' => 'write', 01412 'contextlevel' => CONTEXT_COURSE, 01413 'archetypes' => array( 01414 'editingteacher' => CAP_ALLOW, 01415 'manager' => CAP_ALLOW 01416 ) 01417 ), 01418 01419 'moodle/site:mnetlogintoremote' => array( 01420 01421 'captype' => 'read', 01422 'contextlevel' => CONTEXT_SYSTEM, 01423 'archetypes' => array( 01424 ) 01425 ), 01426 01427 'moodle/grade:viewall' => array( 01428 'riskbitmask' => RISK_PERSONAL, 01429 'captype' => 'read', 01430 'contextlevel' => CONTEXT_COURSE, // and CONTEXT_USER 01431 'archetypes' => array( 01432 'teacher' => CAP_ALLOW, 01433 'editingteacher' => CAP_ALLOW, 01434 'manager' => CAP_ALLOW 01435 ), 01436 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades' 01437 ), 01438 01439 'moodle/grade:view' => array( 01440 'captype' => 'read', 01441 'contextlevel' => CONTEXT_COURSE, 01442 'archetypes' => array( 01443 'student' => CAP_ALLOW 01444 ) 01445 ), 01446 01447 'moodle/grade:viewhidden' => array( 01448 'riskbitmask' => RISK_PERSONAL, 01449 'captype' => 'read', 01450 'contextlevel' => CONTEXT_COURSE, 01451 'archetypes' => array( 01452 'teacher' => CAP_ALLOW, 01453 'editingteacher' => CAP_ALLOW, 01454 'manager' => CAP_ALLOW 01455 ), 01456 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades' 01457 ), 01458 01459 'moodle/grade:import' => array( 01460 'riskbitmask' => RISK_PERSONAL | RISK_XSS, 01461 'captype' => 'write', 01462 'contextlevel' => CONTEXT_COURSE, 01463 'archetypes' => array( 01464 'editingteacher' => CAP_ALLOW, 01465 'manager' => CAP_ALLOW 01466 ), 01467 'clonepermissionsfrom' => 'moodle/course:managegrades' 01468 ), 01469 01470 'moodle/grade:export' => array( 01471 'riskbitmask' => RISK_PERSONAL, 01472 'captype' => 'read', 01473 'contextlevel' => CONTEXT_COURSE, 01474 'archetypes' => array( 01475 'teacher' => CAP_ALLOW, 01476 'editingteacher' => CAP_ALLOW, 01477 'manager' => CAP_ALLOW 01478 ), 01479 'clonepermissionsfrom' => 'moodle/course:managegrades' 01480 ), 01481 01482 'moodle/grade:manage' => array( 01483 'riskbitmask' => RISK_PERSONAL | RISK_XSS, 01484 'captype' => 'write', 01485 'contextlevel' => CONTEXT_COURSE, 01486 'archetypes' => array( 01487 'editingteacher' => CAP_ALLOW, 01488 'manager' => CAP_ALLOW 01489 ), 01490 'clonepermissionsfrom' => 'moodle/course:managegrades' 01491 ), 01492 01493 'moodle/grade:edit' => array( 01494 'riskbitmask' => RISK_PERSONAL | RISK_XSS, 01495 'captype' => 'write', 01496 'contextlevel' => CONTEXT_COURSE, 01497 'archetypes' => array( 01498 'editingteacher' => CAP_ALLOW, 01499 'manager' => CAP_ALLOW 01500 ), 01501 'clonepermissionsfrom' => 'moodle/course:managegrades' 01502 ), 01503 01504 // ability to define advanced grading forms in activities either from scratch 01505 // or from a shared template 01506 'moodle/grade:managegradingforms' => array( 01507 'riskbitmask' => RISK_PERSONAL | RISK_XSS, 01508 'captype' => 'write', 01509 'contextlevel' => CONTEXT_COURSE, 01510 'archetypes' => array( 01511 'editingteacher' => CAP_ALLOW, 01512 'manager' => CAP_ALLOW 01513 ), 01514 'clonepermissionsfrom' => 'moodle/course:managegrades' 01515 ), 01516 01517 // ability to save a grading form as a new shared template and eventually edit 01518 // and remove own templates (templates originally shared by that user) 01519 'moodle/grade:sharegradingforms' => array( 01520 'riskbitmask' => RISK_XSS, 01521 'captype' => 'write', 01522 'contextlevel' => CONTEXT_SYSTEM, 01523 'archetypes' => array( 01524 'manager' => CAP_ALLOW 01525 ), 01526 ), 01527 01528 // ability to edit and remove any shared template, even those originally shared 01529 // by other users 01530 'moodle/grade:managesharedforms' => array( 01531 'riskbitmask' => RISK_XSS, 01532 'captype' => 'write', 01533 'contextlevel' => CONTEXT_SYSTEM, 01534 'archetypes' => array( 01535 'manager' => CAP_ALLOW 01536 ), 01537 ), 01538 01539 'moodle/grade:manageoutcomes' => array( 01540 'captype' => 'write', 01541 'contextlevel' => CONTEXT_COURSE, 01542 'archetypes' => array( 01543 'editingteacher' => CAP_ALLOW, 01544 'manager' => CAP_ALLOW 01545 ), 01546 'clonepermissionsfrom' => 'moodle/course:managegrades' 01547 ), 01548 01549 'moodle/grade:manageletters' => array( 01550 'captype' => 'write', 01551 'contextlevel' => CONTEXT_COURSE, 01552 'archetypes' => array( 01553 'editingteacher' => CAP_ALLOW, 01554 'manager' => CAP_ALLOW 01555 ), 01556 'clonepermissionsfrom' => 'moodle/course:managegrades' 01557 ), 01558 01559 'moodle/grade:hide' => array( 01560 'captype' => 'write', 01561 'contextlevel' => CONTEXT_COURSE, 01562 'archetypes' => array( 01563 'editingteacher' => CAP_ALLOW, 01564 'manager' => CAP_ALLOW 01565 ) 01566 ), 01567 01568 'moodle/grade:lock' => array( 01569 'captype' => 'write', 01570 'contextlevel' => CONTEXT_COURSE, 01571 'archetypes' => array( 01572 'editingteacher' => CAP_ALLOW, 01573 'manager' => CAP_ALLOW 01574 ) 01575 ), 01576 01577 'moodle/grade:unlock' => array( 01578 'captype' => 'write', 01579 'contextlevel' => CONTEXT_COURSE, 01580 'archetypes' => array( 01581 'editingteacher' => CAP_ALLOW, 01582 'manager' => CAP_ALLOW 01583 ) 01584 ), 01585 01586 'moodle/my:manageblocks' => array( 01587 'captype' => 'write', 01588 'contextlevel' => CONTEXT_SYSTEM, 01589 'archetypes' => array( 01590 'user' => CAP_ALLOW 01591 ) 01592 ), 01593 01594 'moodle/notes:view' => array( 01595 'captype' => 'read', 01596 'contextlevel' => CONTEXT_COURSE, 01597 'archetypes' => array( 01598 'teacher' => CAP_ALLOW, 01599 'editingteacher' => CAP_ALLOW, 01600 'manager' => CAP_ALLOW 01601 ) 01602 ), 01603 01604 'moodle/notes:manage' => array( 01605 'riskbitmask' => RISK_SPAM, 01606 01607 'captype' => 'write', 01608 'contextlevel' => CONTEXT_COURSE, 01609 'archetypes' => array( 01610 'teacher' => CAP_ALLOW, 01611 'editingteacher' => CAP_ALLOW, 01612 'manager' => CAP_ALLOW 01613 ) 01614 ), 01615 01616 'moodle/tag:manage' => array( 01617 'riskbitmask' => RISK_SPAM, 01618 01619 'captype' => 'write', 01620 'contextlevel' => CONTEXT_SYSTEM, 01621 'archetypes' => array( 01622 'teacher' => CAP_ALLOW, 01623 'editingteacher' => CAP_ALLOW, 01624 'manager' => CAP_ALLOW 01625 ) 01626 ), 01627 01628 'moodle/tag:create' => array( 01629 'riskbitmask' => RISK_SPAM, 01630 01631 'captype' => 'write', 01632 'contextlevel' => CONTEXT_SYSTEM, 01633 'archetypes' => array( 01634 'manager' => CAP_ALLOW, 01635 'user' => CAP_ALLOW 01636 ) 01637 ), 01638 01639 'moodle/tag:edit' => array( 01640 'riskbitmask' => RISK_SPAM, 01641 01642 'captype' => 'write', 01643 'contextlevel' => CONTEXT_SYSTEM, 01644 'archetypes' => array( 01645 'manager' => CAP_ALLOW, 01646 'user' => CAP_ALLOW 01647 ) 01648 ), 01649 01650 'moodle/tag:editblocks' => array( 01651 'captype' => 'write', 01652 'contextlevel' => CONTEXT_SYSTEM, 01653 'archetypes' => array( 01654 'teacher' => CAP_ALLOW, 01655 'editingteacher' => CAP_ALLOW, 01656 'manager' => CAP_ALLOW 01657 ) 01658 ), 01659 01660 'moodle/block:view' => array( 01661 'captype' => 'read', 01662 'contextlevel' => CONTEXT_BLOCK, 01663 'archetypes' => array( 01664 'guest' => CAP_ALLOW, 01665 'user' => CAP_ALLOW, 01666 'student' => CAP_ALLOW, 01667 'teacher' => CAP_ALLOW, 01668 'editingteacher' => CAP_ALLOW, 01669 ) 01670 ), 01671 01672 'moodle/block:edit' => array( 01673 'riskbitmask' => RISK_SPAM | RISK_XSS, 01674 01675 'captype' => 'write', 01676 'contextlevel' => CONTEXT_BLOCK, 01677 'archetypes' => array( 01678 'editingteacher' => CAP_ALLOW, 01679 ) 01680 ), 01681 01682 'moodle/portfolio:export' => array( 01683 'captype' => 'read', 01684 'contextlevel' => CONTEXT_SYSTEM, 01685 'archetypes' => array( 01686 'user' => CAP_ALLOW, 01687 'student' => CAP_ALLOW, 01688 'teacher' => CAP_ALLOW, 01689 'editingteacher' => CAP_ALLOW, 01690 ) 01691 ), 01692 'moodle/comment:view' => array( 01693 'captype' => 'read', 01694 'contextlevel' => CONTEXT_COURSE, 01695 'archetypes' => array( 01696 'frontpage' => CAP_ALLOW, 01697 'guest' => CAP_ALLOW, 01698 'user' => CAP_ALLOW, 01699 'student' => CAP_ALLOW, 01700 'teacher' => CAP_ALLOW, 01701 'editingteacher' => CAP_ALLOW, 01702 'manager' => CAP_ALLOW 01703 ) 01704 ), 01705 'moodle/comment:post' => array( 01706 01707 'riskbitmask' => RISK_SPAM | RISK_PERSONAL, 01708 'captype' => 'write', 01709 'contextlevel' => CONTEXT_COURSE, 01710 'archetypes' => array( 01711 'user' => CAP_ALLOW, 01712 'student' => CAP_ALLOW, 01713 'teacher' => CAP_ALLOW, 01714 'editingteacher' => CAP_ALLOW, 01715 'manager' => CAP_ALLOW 01716 ) 01717 ), 01718 'moodle/comment:delete' => array( 01719 01720 'riskbitmask' => RISK_DATALOSS, 01721 'captype' => 'write', 01722 'contextlevel' => CONTEXT_COURSE, 01723 'archetypes' => array( 01724 'editingteacher' => CAP_ALLOW, 01725 'manager' => CAP_ALLOW 01726 ) 01727 ), 01728 'moodle/webservice:createtoken' => array( 01729 01730 'riskbitmask' => RISK_CONFIG | RISK_DATALOSS | RISK_SPAM | RISK_PERSONAL | RISK_XSS, 01731 'captype' => 'write', 01732 'contextlevel' => CONTEXT_SYSTEM, 01733 'archetypes' => array( 01734 'manager' => CAP_ALLOW 01735 ) 01736 ), 01737 'moodle/webservice:createmobiletoken' => array( 01738 01739 'riskbitmask' => RISK_SPAM | RISK_PERSONAL, 01740 'captype' => 'write', 01741 'contextlevel' => CONTEXT_SYSTEM, 01742 'archetypes' => array( 01743 'user' => CAP_ALLOW 01744 ) 01745 ), 01746 'moodle/rating:view' => array( 01747 01748 'captype' => 'read', 01749 'contextlevel' => CONTEXT_COURSE, 01750 'archetypes' => array( 01751 'user' => CAP_ALLOW, 01752 'student' => CAP_ALLOW, 01753 'teacher' => CAP_ALLOW, 01754 'editingteacher' => CAP_ALLOW, 01755 'manager' => CAP_ALLOW 01756 ) 01757 ), 01758 'moodle/rating:viewany' => array( 01759 01760 'riskbitmask' => RISK_PERSONAL, 01761 'captype' => 'read', 01762 'contextlevel' => CONTEXT_COURSE, 01763 'archetypes' => array( 01764 'user' => CAP_ALLOW, 01765 'student' => CAP_ALLOW, 01766 'teacher' => CAP_ALLOW, 01767 'editingteacher' => CAP_ALLOW, 01768 'manager' => CAP_ALLOW 01769 ) 01770 ), 01771 'moodle/rating:viewall' => array( 01772 01773 'riskbitmask' => RISK_PERSONAL, 01774 'captype' => 'read', 01775 'contextlevel' => CONTEXT_COURSE, 01776 'archetypes' => array( 01777 'user' => CAP_ALLOW, 01778 'student' => CAP_ALLOW, 01779 'teacher' => CAP_ALLOW, 01780 'editingteacher' => CAP_ALLOW, 01781 'manager' => CAP_ALLOW 01782 ) 01783 ), 01784 'moodle/rating:rate' => array( 01785 01786 'captype' => 'write', 01787 'contextlevel' => CONTEXT_COURSE, 01788 'archetypes' => array( 01789 'user' => CAP_ALLOW, 01790 'student' => CAP_ALLOW, 01791 'teacher' => CAP_ALLOW, 01792 'editingteacher' => CAP_ALLOW, 01793 'manager' => CAP_ALLOW 01794 ) 01795 ), 01796 'moodle/course:publish' => array( 01797 01798 'captype' => 'write', 01799 'riskbitmask' => RISK_SPAM | RISK_PERSONAL, 01800 'contextlevel' => CONTEXT_SYSTEM, 01801 'archetypes' => array( 01802 'manager' => CAP_ALLOW 01803 ) 01804 ), 01805 'moodle/course:markcomplete' => array( 01806 'captype' => 'write', 01807 'contextlevel' => CONTEXT_COURSE, 01808 'archetypes' => array( 01809 'teacher' => CAP_ALLOW, 01810 'editingteacher' => CAP_ALLOW, 01811 'manager' => CAP_ALLOW 01812 ) 01813 ), 01814 'moodle/community:add' => array( 01815 'captype' => 'write', 01816 'contextlevel' => CONTEXT_SYSTEM, 01817 'archetypes' => array( 01818 'manager' => CAP_ALLOW, 01819 'teacher' => CAP_ALLOW, 01820 'editingteacher' => CAP_ALLOW, 01821 ) 01822 ), 01823 'moodle/community:download' => array( 01824 'captype' => 'write', 01825 'contextlevel' => CONTEXT_SYSTEM, 01826 'archetypes' => array( 01827 'manager' => CAP_ALLOW, 01828 'editingteacher' => CAP_ALLOW, 01829 ) 01830 ) 01831 );