Skip to content

Commit

Permalink
MDL-82916 core: minor style fixes to lti upgrade step
Browse files Browse the repository at this point in the history
  • Loading branch information
snake committed Oct 24, 2024
1 parent f8b5b66 commit 16e269f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -1450,8 +1450,8 @@ function xmldb_main_upgrade($oldversion) {
if ($oldversion < 2024100700.02) {
// Move mod_lti keys into new core lti config.
if (!empty(get_config('mod_lti', 'kid')) && !empty(get_config('mod_lti', 'privatekey'))) {
set_config('kid', get_config('mod_lti', 'kid'), 'core_ltix');
set_config('privatekey', get_config('mod_lti', 'privatekey'), 'core_ltix');
set_config('kid', get_config('mod_lti', 'kid'), 'core_ltix');
set_config('privatekey', get_config('mod_lti', 'privatekey'), 'core_ltix');
set_config('kid', null, 'mod_lti');
set_config('privatekey', null, 'mod_lti');
}
Expand All @@ -1465,7 +1465,7 @@ function xmldb_main_upgrade($oldversion) {
// Launch rename table for ltiservice_gradebookservices.
$dbman->rename_table($table, 'tmp_ltiservice_gradebookservices');

$servicetypes = ['basicoutcomes', 'gradebookservices', 'memberships','profile', 'toolproxy', 'toolsettings'];
$servicetypes = ['basicoutcomes', 'gradebookservices', 'memberships', 'profile', 'toolproxy', 'toolsettings'];
foreach ($servicetypes as $type) {
$versionfile = $CFG->dirroot . "mod/lti/service/{$type}/version.php";

Expand All @@ -1481,7 +1481,7 @@ function xmldb_main_upgrade($oldversion) {
[$insql, $inparams] = $DB->get_in_or_equal($pluginconfigoptions, SQL_PARAMS_NAMED, 'name');
$sql = "UPDATE {lti_types_config}
SET name = REPLACE(name, :oldprefix, :newprefix)
WHERE name ".$insql;
WHERE name " . $insql;
$params = ['oldprefix' => 'ltiservice_', 'newprefix' => 'ltixservice_'];
$DB->execute($sql, array_merge($params, $inparams));

Expand Down

0 comments on commit 16e269f

Please sign in to comment.