Google Assignments (Course Kit)

dtod
Community Contributor

Google Course Kit has been renamed to Google Assignments, and I wanted to rename it, and update the url (not strictly necessary) without deleting and replacing the tool. Initial setup instructions are here.

Copying and pasting the following code in my browser Dev Tools console while on a Canvas page did what I needed to do. Of course, the url to your installed tool will be different (see the Network panel in Dev Tools when you review a tool's placements to get the url).

var url='/api/v1/accounts/1/external_tools/8102';
$.ajax({
url: url,
type: 'PUT',
data: 'editor_button[url]=https://assignments.google.com/embed/lti&editor_button[enabled]=true&editor_button[icon_url]=https://www.gstatic.com/coursekit/logo_course_kit_color_16dp.png&editor_button[selection_width]=690&editor_button[selection_height]=530&editor_button[message_type]=ContentItemSelectionRequest&editor_button[text]=Google+Drive',
success: function(data) {
console.log('Tool updated.');
}
});
$.ajax({
url: url,
type: 'PUT',
data: 'homework_submission[url]=https://assignments.google.com/embed/lti&homework_submission[enabled]=true&homework_submission[icon_url]=https://www.gstatic.com/coursekit/logo_course_kit_color_16dp.png&homework_submission[selection_width]=820&homework_submission[selection_height]=450&homework_submission[message_type]=ContentItemSelectionRequest&homework_submission[text]=Google+Assignment',
success: function(data) {
console.log('Tool updated.');
}
});
$.ajax({
url: url,
type: 'PUT',
data: 'link_selection[url]=https://assignments.google.com/embed/lti&link_selection[enabled]=true&link_selection[icon_url]=https://www.gstatic.com/coursekit/logo_course_kit_color_16dp.png&link_selection[selection_width]=690&link_selection[selection_height]=530&link_selection[message_type]=ContentItemSelectionRequest&link_selection[text]=Google+Drive',
success: function(data) {
console.log('Tool updated.');
}
});
$.ajax({
url: url,
type: 'PUT',
data: 'assignment_selection[url]=https://assignments.google.com/assignments/lti&assignment_selection[enabled]=true&assignment_selection[icon_url]=https://www.gstatic.com/coursekit/logo_course_kit_color_16dp.png&assignment_selection[selection_width]=690&assignment_selection[selection_height]=530&assignment_selection[message_type]=ContentItemSelectionRequest&assignment_selection[text]=Google+Assignment',
success: function(data) {
console.log('Tool updated.');
}
});
0 Likes