[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/lti/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   * This file contains the capabilities used by the lti module
  19   *
  20   * @package    mod_lti
  21   * @copyright  2009 Marc Alier, Jordi Piguillem, Nikolas Galanis, marc.alier@upc.edu
  22   * @copyright  2009 Universitat Politecnica de Catalunya http://www.upc.edu
  23   * @author     Marc Alier
  24   * @author     Jordi Piguillem
  25   * @author     Nikolas Galanis
  26   * @author     Chris Scribner
  27   * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  28   */
  29  
  30  defined('MOODLE_INTERNAL') || die;
  31  
  32  $capabilities = array(
  33  
  34      // Whether the user can see the link to the external tool and follow it.
  35      'mod/lti:view' => array(
  36          'captype' => 'read',
  37          'contextlevel' => CONTEXT_MODULE,
  38          'archetypes' => array(
  39              'student' => CAP_ALLOW,
  40              'teacher' => CAP_ALLOW,
  41              'editingteacher' => CAP_ALLOW,
  42              'manager' => CAP_ALLOW
  43          )
  44      ),
  45  
  46      // Add an External tool activity to a course.
  47      'mod/lti:addinstance' => array(
  48          'riskbitmask' => RISK_XSS,
  49  
  50          'captype' => 'write',
  51          'contextlevel' => CONTEXT_COURSE,
  52          'archetypes' => array(
  53              'editingteacher' => CAP_ALLOW,
  54              'manager' => CAP_ALLOW
  55          ),
  56          'clonepermissionsfrom' => 'moodle/course:manageactivities'
  57      ),
  58  
  59      // When the user arrives at the external tool, if they have this capability
  60      // in Moodle, then they are given the Instructor role in the remote system,
  61      // otherwise they are given Learner. See the lti_get_ims_role function.
  62      'mod/lti:manage' => array(
  63          'riskbitmask' => RISK_PERSONAL, // A bit of a guess, but seems likely.
  64  
  65          'captype' => 'write',
  66          'contextlevel' => CONTEXT_MODULE,
  67          'archetypes' => array(
  68              'teacher' => CAP_ALLOW,
  69              'editingteacher' => CAP_ALLOW,
  70              'manager' => CAP_ALLOW
  71          )
  72      ),
  73  
  74      // The ability to create or edit tool configurations for particular courses.
  75      'mod/lti:addcoursetool' => array(
  76          'captype' => 'write',
  77          'contextlevel' => CONTEXT_COURSE,
  78          'archetypes' => array(
  79              'editingteacher' => CAP_ALLOW,
  80              'manager' => CAP_ALLOW
  81          )
  82      ),
  83  
  84      // The ability to request the administrator to configure a particular
  85      // External tool globally.
  86      'mod/lti:requesttooladd' => array(
  87          'captype' => 'write',
  88          'contextlevel' => CONTEXT_COURSE,
  89          'archetypes' => array(
  90              'editingteacher' => CAP_ALLOW,
  91              'manager' => CAP_ALLOW
  92          )
  93      )
  94  );


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1