[ Index ]

PHP Cross Reference of Moodle

title

Body

[close]

/mod/chat/db/ -> access.php (source)

   1  <?php
   2  //
   3  // Capability definitions for the chat 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  //
  13  // CAPABILITY NAMING CONVENTION
  14  //
  15  // It is important that capability names are unique. The naming convention
  16  // for capabilities that are specific to modules and blocks is as follows:
  17  //   [mod/block]/<component_name>:<capabilityname>
  18  //
  19  // component_name should be the same as the directory name of the mod or block.
  20  //
  21  // Core moodle capabilities are defined thus:
  22  //    moodle/<capabilityclass>:<capabilityname>
  23  //
  24  // Examples: mod/forum:viewpost
  25  //           block/recent_activity:view
  26  //           moodle/site:deleteuser
  27  //
  28  // The variable name for the capability definitions array follows the format
  29  //   $<componenttype>_<component_name>_capabilities
  30  //
  31  // For the core capabilities, the variable is $moodle_capabilities.
  32  
  33  
  34  $mod_chat_capabilities = array(
  35  
  36      'mod/chat:chat' => array(
  37  
  38          'riskbitmask' => RISK_SPAM,
  39  
  40          'captype' => 'write',
  41          'contextlevel' => CONTEXT_MODULE,
  42          'legacy' => array(
  43              'student' => CAP_ALLOW,
  44              'teacher' => CAP_ALLOW,
  45              'editingteacher' => CAP_ALLOW,
  46              'admin' => CAP_ALLOW
  47          )
  48      ),
  49  
  50      'mod/chat:readlog' => array(
  51  
  52          'captype' => 'read',
  53          'contextlevel' => CONTEXT_MODULE,
  54          'legacy' => array(
  55              'student' => CAP_ALLOW,
  56              'teacher' => CAP_ALLOW,
  57              'editingteacher' => CAP_ALLOW,
  58              'admin' => CAP_ALLOW
  59          )
  60      ),
  61  
  62      'mod/chat:deletelog' => array(
  63  
  64          'captype' => 'write',
  65          'contextlevel' => CONTEXT_MODULE,
  66          'legacy' => array(
  67              'teacher' => CAP_ALLOW,
  68              'editingteacher' => CAP_ALLOW,
  69              'admin' => CAP_ALLOW
  70          )
  71      )
  72  
  73  );
  74  
  75  ?>


Generated: Wed Nov 14 17:38:08 2007 Cross-referenced by PHPXref 0.7