access.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. // This file is part of
  3. //
  4. // Moodle is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (at your option) any later version.
  8. //
  9. // Moodle is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License
  15. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
  16. defined('MOODLE_INTERNAL') || die();
  17. $capabilities = array(
  18. 'mod/gradeimporter:addinstance' => array(
  19. 'riskbitmask' => RISK_XSS,
  20. 'captype' => 'write',
  21. 'contextlevel' => CONTEXT_COURSE,
  22. 'archetypes' => array(
  23. 'editingteacher' => CAP_ALLOW,
  24. 'manager' => CAP_ALLOW
  25. ),
  26. 'clonepermissionsfrom' => 'moodle/course:manageactivies'
  27. ),
  28. 'mod/gradeimporter:view' => array(
  29. 'captype' => 'read',
  30. 'contextlevel' => CONTEXT_MODULE,
  31. 'archetypes' => array(
  32. 'guest' => CAP_ALLOW,
  33. 'student' => CAP_ALLOW,
  34. 'teacher' => CAP_ALLOW,
  35. 'editingteacher' => CAP_ALLOW,
  36. 'manager' => CAP_ALLOW
  37. )
  38. ),
  39. 'mod/gradeimporter:addsubmission' => array(
  40. 'captype' => 'write',
  41. 'contextlevel' => CONTEXT_MODULE,
  42. 'archetypes' => array(
  43. 'editingteacher' => CAP_ALLOW
  44. )
  45. ),
  46. 'mod/gradeimporter:edit' => array(
  47. 'captype' => 'write',
  48. 'contextlevel' => CONTEXT_MODULE,
  49. 'archetypes' => array(
  50. 'editingteacher' => CAP_ALLOW,
  51. 'manager' => CAP_ALLOW
  52. )
  53. ),
  54. /*'mod/gradeimporter:teacherview' => array(
  55. 'captype' => 'write',
  56. 'contextlevel' => CONTEXT_MODULE,
  57. 'archetypes' => array(
  58. 'editingteacher' => CAP_ALLOW,
  59. 'manager' => CAP_ALLOW,
  60. 'teacher' => CAP_ALLOW
  61. )
  62. ),*/
  63. 'mod/gradeimporter:student' => array(
  64. 'captype' => 'read',
  65. 'contextlevel' => CONTEXT_MODULE,
  66. 'archetypes' => array(
  67. 'student' => CAP_ALLOW
  68. )
  69. )
  70. );