mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00

* LTI service related changes: ** Fixing exceptions in OAuth library. ** Added new launch option, Existing window: replaces entire page with the LTI object. ** The LTI tool ID used to perform the launch is now sent with the LTI launch parameters. This is sent back to Moodle on subsequent requests. ** Added $CFG->mod_lti_forcessl to force SSL on all LTI launches. ** Added new LTI launch parameter: tool_consumer_instance_name. Default value is site full name, but can be customized with $CFG->mod_lti_institution_name. ** The LTI grade service endpoints now set the affected user to the session. This was required for event listeners. ** Fix the grade deletion service. Was deleting the grade item instead of just the grade. ** Send error response when LTI instance does not accept grades and grades are being sent. ** Added a method for writing incoming LTI requests to disk for debugging. Disabled by default. * Changes for ltisource plugins: ** Can now to plug into backup/restore. ** Can now have settings.php files. ** Can now hook into the LTI launch and edit parameters. * Several grade changes: ** Added standard_grading_coursemodule_elements to LTI instance edit form. This means LTI instances can be configured with a grade. ** No longer assumes that grade is out of 100. ** Replaced modl/lti:grade capability with mod/lti:view. * JS on mod/lti/view.php for resizing the content object has been converted to YUI3. * Fixed misspellings in language file. * Added hooks for log post and view actions. * Bug fix for lti_get_url_thumbprint() when the URL is missing a schema.
94 lines
3.1 KiB
PHP
94 lines
3.1 KiB
PHP
<?php
|
|
// This file is part of Moodle - http://moodle.org/
|
|
//
|
|
// Moodle is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// Moodle is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
/**
|
|
* This file contains the capabilities used by the lti module
|
|
*
|
|
* @package mod_lti
|
|
* @copyright 2009 Marc Alier, Jordi Piguillem, Nikolas Galanis, marc.alier@upc.edu
|
|
* @copyright 2009 Universitat Politecnica de Catalunya http://www.upc.edu
|
|
* @author Marc Alier
|
|
* @author Jordi Piguillem
|
|
* @author Nikolas Galanis
|
|
* @author Chris Scribner
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
*/
|
|
|
|
defined('MOODLE_INTERNAL') || die;
|
|
|
|
$capabilities = array(
|
|
|
|
// Whether the user can see the link to the external tool and follow it.
|
|
'mod/lti:view' => array(
|
|
'captype' => 'read',
|
|
'contextlevel' => CONTEXT_MODULE,
|
|
'archetypes' => array(
|
|
'student' => CAP_ALLOW,
|
|
'teacher' => CAP_ALLOW,
|
|
'editingteacher' => CAP_ALLOW,
|
|
'manager' => CAP_ALLOW
|
|
)
|
|
),
|
|
|
|
// Add an External tool activity to a course.
|
|
'mod/lti:addinstance' => array(
|
|
'riskbitmask' => RISK_XSS,
|
|
|
|
'captype' => 'write',
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
'archetypes' => array(
|
|
'editingteacher' => CAP_ALLOW,
|
|
'manager' => CAP_ALLOW
|
|
),
|
|
'clonepermissionsfrom' => 'moodle/course:manageactivities'
|
|
),
|
|
|
|
// When the user arrives at the external tool, if they have this capability
|
|
// in Moodle, then they given the Instructor role in the remote system,
|
|
// otherwise they are given Learner. See the lti_get_ims_role function.
|
|
'mod/lti:manage' => array(
|
|
'riskbitmask' => RISK_PERSONAL, // A bit of a guess, but seems likely.
|
|
|
|
'captype' => 'write',
|
|
'contextlevel' => CONTEXT_MODULE,
|
|
'archetypes' => array(
|
|
'teacher' => CAP_ALLOW,
|
|
'editingteacher' => CAP_ALLOW,
|
|
'manager' => CAP_ALLOW
|
|
)
|
|
),
|
|
|
|
// The ability to create or edit tool configurations for particular courses.
|
|
'mod/lti:addcoursetool' => array(
|
|
'captype' => 'write',
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
'archetypes' => array(
|
|
'editingteacher' => CAP_ALLOW,
|
|
'manager' => CAP_ALLOW
|
|
)
|
|
),
|
|
|
|
// The ability to request the adminstirator to configure a particular
|
|
// External tool globally.
|
|
'mod/lti:requesttooladd' => array(
|
|
'captype' => 'write',
|
|
'contextlevel' => CONTEXT_COURSE,
|
|
'archetypes' => array(
|
|
'editingteacher' => CAP_ALLOW,
|
|
'manager' => CAP_ALLOW
|
|
)
|
|
)
|
|
);
|