[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

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

   1  <?php
   2  // This file is part of Moodle - http://moodle.org/
   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  
  17  /**
  18   * Capability definitions for the lesson module.
  19   *
  20   * For naming conventions, see lib/db/access.php.
  21   *
  22   * @package    mod_lesson
  23   * @copyright  1999 onwards Martin Dougiamas  {@link http://moodle.com}
  24   * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or late
  25   */
  26  
  27  defined('MOODLE_INTERNAL') || die();
  28  
  29  $capabilities = array(
  30  
  31      'mod/lesson:addinstance' => array(
  32          'riskbitmask' => RISK_XSS,
  33  
  34          'captype' => 'write',
  35          'contextlevel' => CONTEXT_COURSE,
  36          'archetypes' => array(
  37              'editingteacher' => CAP_ALLOW,
  38              'manager' => CAP_ALLOW
  39          ),
  40          'clonepermissionsfrom' => 'moodle/course:manageactivities'
  41      ),
  42  
  43      'mod/lesson:edit' => array(
  44  
  45          'riskbitmask' => RISK_XSS, // we want flash and JS in question pages
  46  
  47          'captype' => 'write',
  48          'contextlevel' => CONTEXT_MODULE,
  49          'archetypes' => array(
  50              'editingteacher' => CAP_ALLOW,
  51              'manager' => CAP_ALLOW
  52          )
  53      ),
  54  
  55      // Grade essay questions.
  56      'mod/lesson:grade' => array(
  57          'riskbitmask' => RISK_SPAM,
  58          'captype' => 'write',
  59          'contextlevel' => CONTEXT_MODULE,
  60          'archetypes' => array(
  61              'teacher' => CAP_ALLOW,
  62              'editingteacher' => CAP_ALLOW,
  63              'manager' => CAP_ALLOW
  64          )
  65      ),
  66  
  67      'mod/lesson:manage' => array(
  68  
  69          'captype' => 'write',
  70          'contextlevel' => CONTEXT_MODULE,
  71          'archetypes' => array(
  72              'teacher' => CAP_ALLOW,
  73              'editingteacher' => CAP_ALLOW,
  74              'manager' => CAP_ALLOW
  75          )
  76      )
  77  );


Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1