Merge branch 'MDL-40857_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE

This commit is contained in:
Dan Poltawski
2013-07-29 13:56:46 +08:00
3 changed files with 20 additions and 12 deletions
+12 -5
View File
@@ -31,11 +31,11 @@ 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(
'guest' => CAP_ALLOW,
'student' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
@@ -43,6 +43,7 @@ $capabilities = array(
)
),
// Add an External tool activity to a course.
'mod/lti:addinstance' => array(
'riskbitmask' => RISK_XSS,
@@ -55,8 +56,10 @@ $capabilities = array(
'clonepermissionsfrom' => 'moodle/course:manageactivities'
),
// Controls access to the grade.php script, which shows all the submissions
// made to the external tool that have been reported back to Moodle.
'mod/lti:grade' => array(
'riskbitmask' => RISK_XSS,
'riskbitmask' => RISK_PERSONAL,
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
@@ -67,8 +70,11 @@ $capabilities = array(
)
),
// 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_XSS,
'riskbitmask' => RISK_PERSONAL, // A bit of a guess, but seems likely.
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
@@ -79,21 +85,22 @@ $capabilities = array(
)
),
// The ability to create or edit tool configurations for particular courses.
'mod/lti:addcoursetool' => array(
'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => array(
'teacher' => CAP_ALLOW,
'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(
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
+6 -6
View File
@@ -216,12 +216,12 @@ real estate to the tool, and others provide a more integrated feel with the Mood
It is possible that browsers will prevent the new window from opening.';
$string['launchoptions'] = 'Launch Options';
$string['lti'] = 'LTI';
$string['lti:addinstance'] = 'Add a new LTI activity';
$string['lti:addcoursetool'] = 'Grade LTI activities';
$string['lti:grade'] = 'Grade LTI activities';
$string['lti:manage'] = 'Edit LTI activities';
$string['lti:requesttooladd'] = 'Submit a tool to admins for configuration';
$string['lti:view'] = 'View LTI activities';
$string['lti:addinstance'] = 'Add new external tool activities';
$string['lti:addcoursetool'] = 'Add course-specific tool configurations';
$string['lti:grade'] = 'View grades returned by the external tool';
$string['lti:manage'] = 'Be an Instructor when the tool is launched';
$string['lti:requesttooladd'] = 'Request a tool is configured site-wide';
$string['lti:view'] = 'Launch external tool activities';
$string['lti_administration'] = 'LTI Administration';
$string['lti_errormsg'] = 'The tool returned the following error message: "{$a}"';
$string['lti_launch_error'] = 'An error occured when launching the external tool: ';
+2 -1
View File
@@ -195,7 +195,8 @@ class mod_lti_mod_form extends moodleform_mod {
// add standard buttons, common to all modules
$this->add_action_buttons();
$editurl = new moodle_url("/mod/lti/instructor_edit_tool_type.php?sesskey={$USER->sesskey}&course={$COURSE->id}");
$editurl = new moodle_url('/mod/lti/instructor_edit_tool_type.php',
array('sesskey' => sesskey(), 'course' => $COURSE->id));
$ajaxurl = new moodle_url('/mod/lti/ajax.php');
$jsinfo = (object)array(