Skip to content

Commit

Permalink
MDL-79114 core: fix upgrade step remove basicoutcomes subplugin
Browse files Browse the repository at this point in the history
  • Loading branch information
snake committed Nov 20, 2023
1 parent a3fc5ce commit 719a493
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3707,17 +3707,21 @@ function xmldb_main_upgrade($oldversion) {
set_config('privatekey', null, 'mod_lti');
}

// Main savepoint reached.
upgrade_main_savepoint(true, 2023102000);
}

if ($oldversion < 2023111600.00) {
$servicetypes = ['basicoutcomes'];
foreach ($servicetypes as $type) {
$versionFile = $CFG->dirroot . "mod/lti/service/{$type}/version.php";
$versionFile = $CFG->dirroot . "mod/lti/service/$type/version.php";

if (!file_exists($versionFile)) {
// Clean config.
unset_all_config_for_plugin("ltiservice_$type");
uninstall_plugin('ltiservice', 'basicoutcomes');
}
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2023102000);
upgrade_main_savepoint(true, 2023111600.00);
}

return true;
Expand Down

0 comments on commit 719a493

Please sign in to comment.