Commit e776912b authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1950413: Adjust upgrade for LTI upgrade problem



When we need to change the LTI name before we reset the webservice
components

Change-Id: I051fa748a1a40eb3e9433d34cfa31c90b89321fc
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent d5141000
......@@ -599,6 +599,23 @@ function xmldb_auth_webservice_upgrade($oldversion=0) {
add_field($table, $field);
}
}
if ($oldversion < 2021102710) {
log_debug('Updating External Service label: LTI integration is now LTI 1.1.');
// Need to have this here and not in LTI integration as this is called first in upgrade
try {
$id = get_field('external_services', 'id', 'shortname', 'maharalti');
if ($id) {
$record = new stdClass;
$record->name = 'LTI 1.1';
$record->id = $id;
update_record('external_services', $record);
}
}
catch (Exception $e) {
log_debug($e->getMessage());
$status = false;
}
}
// sweep for webservice updates everytime
$status = external_reload_webservices();
......
......@@ -12,7 +12,7 @@
defined('INTERNAL') || die();
$config = new stdClass();
$config->version = 2020081900;
$config->release = '2.0.5';
$config->version = 2021102710;
$config->release = '2.0.6';
$config->requires_config = 0;
$config->requires_parent = 0;
......@@ -64,22 +64,5 @@ function xmldb_module_lti_upgrade($oldversion=0) {
}
if ($oldversion < 2021102710) {
log_debug('Updating External Service label: LTI integration is now LTI 1.1.');
try {
$id = get_field('external_services', 'id', 'shortname', 'maharalti');
if ($id) {
$record = new stdClass;
$record->name = 'LTI 1.1';
$record->id = $id;
update_record('external_services', $record);
}
}
catch (Exception $e) {
log_debug($e->getMessage());
$status = false;
}
}
return $status;
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment