MDL-44902: Several additions to External Tool (LTI)

* 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.
This commit is contained in:
Mark Nielsen 2014-04-01 15:07:54 -07:00
parent f500ff4e52
commit 8fa50fdd34
23 changed files with 759 additions and 74 deletions

View file

@ -77,9 +77,25 @@
}, 2000);
});
var allowgrades = Y.one('#id_instructorchoiceacceptgrades');
allowgrades.on('change', this.toggleGradeSection, this);
updateToolMatches();
},
toggleGradeSection: function(e) {
if (e) {
e.preventDefault();
}
var allowgrades = Y.one('#id_instructorchoiceacceptgrades');
var gradefieldset = Y.one('#modstandardgrade');
if (!allowgrades.get('checked')) {
gradefieldset.hide();
} else {
gradefieldset.show();
}
},
clearToolCache: function(){
this.urlCache = {};
this.toolTypeCache = {};
@ -138,9 +154,10 @@
automatchToolDisplay.set('innerHTML', '<img style="vertical-align:text-bottom" src="' + self.settings.green_check_icon_url + '" />' + M.str.lti.custom_config);
}
var continuation = function(toolInfo){
self.updatePrivacySettings(toolInfo);
var continuation = function(toolInfo, inputfield){
if (inputfield === undefined || (inputfield.get('id') != 'id_securetoolurl' || inputfield.get('value'))) {
self.updatePrivacySettings(toolInfo);
}
if(toolInfo.toolname){
automatchToolDisplay.set('innerHTML', '<img style="vertical-align:text-bottom" src="' + self.settings.green_check_icon_url + '" />' + M.str.lti.using_tool_configuration + toolInfo.toolname);
} else if(!selectedToolType) {
@ -159,7 +176,7 @@
return continuation(self.urlCache[url]);
} else if(!selectedToolType && !url) {
// No tool type or url set
return continuation({});
return continuation({}, field);
} else {
self.findToolByUrl(url, selectedToolType, function(toolInfo){
if(toolInfo){
@ -237,6 +254,8 @@
}
}
}
this.toggleGradeSection();
},
getSelectedToolTypeOption: function(){