access.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. /**
  3. * Capability definitions for the nasatlx module
  4. *
  5. * The capabilities are loaded into the database table when the module is
  6. * installed or updated. Whenever the capability definitions are updated,
  7. * the module version number should be bumped up.
  8. *
  9. * The system has four possible values for a capability:
  10. * CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT, and inherit (not set).
  11. *
  12. * It is important that capability names are unique. The naming convention
  13. * for capabilities that are specific to modules and blocks is as follows:
  14. * [mod/block]/<plugin_name>:<capabilityname>
  15. *
  16. * component_name should be the same as the directory name of the mod or block.
  17. *
  18. * Core moodle capabilities are defined thus:
  19. * moodle/<capabilityclass>:<capabilityname>
  20. *
  21. * Examples: mod/forum:viewpost
  22. * block/recent_activity:view
  23. * moodle/site:deleteuser
  24. *
  25. * The variable name for the capability definitions array is $capabilities
  26. *
  27. * @package mod_nasatlx
  28. * @copyright 2014 LInE - http://line.ime.usp.br
  29. * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  30. */
  31. defined('MOODLE_INTERNAL') || die();
  32. $capabilities = array(
  33. /***************************** remove these comment marks and modify the code as needed
  34. 'mod/nasatlx:addinstance' => array(
  35. 'riskbitmask' => RISK_XSS,
  36. 'captype' => 'write',
  37. 'contextlevel' => CONTEXT_COURSE,
  38. 'archetypes' => array(
  39. 'editingteacher' => CAP_ALLOW,
  40. 'manager' => CAP_ALLOW
  41. ),
  42. 'clonepermissionsfrom' => 'moodle/course:manageactivities'
  43. ),
  44. 'mod/nasatlx:view' => array(
  45. 'captype' => 'read',
  46. 'contextlevel' => CONTEXT_MODULE,
  47. 'legacy' => array(
  48. 'guest' => CAP_ALLOW,
  49. 'student' => CAP_ALLOW,
  50. 'teacher' => CAP_ALLOW,
  51. 'editingteacher' => CAP_ALLOW,
  52. 'admin' => CAP_ALLOW
  53. )
  54. ),
  55. 'mod/nasatlx:submit' => array(
  56. 'riskbitmask' => RISK_SPAM,
  57. 'captype' => 'write',
  58. 'contextlevel' => CONTEXT_MODULE,
  59. 'legacy' => array(
  60. 'student' => CAP_ALLOW
  61. )
  62. ),
  63. ******************************/
  64. );