Skip to content
Snippets Groups Projects
Commit cffa0c1c authored by Chris Sangwin's avatar Chris Sangwin
Browse files

Improvements to the upgrade scripts.

parent 94fa4a1e
No related branches found
No related tags found
No related merge requests found
...@@ -840,7 +840,14 @@ function xmldb_qtype_stack_upgrade($oldversion) { ...@@ -840,7 +840,14 @@ function xmldb_qtype_stack_upgrade($oldversion) {
if ($oldversion < 2020112100) { if ($oldversion < 2020112100) {
if (get_config('qtype_stack', 'platform') == 'unix' || get_config('qtype_stack', 'platform') == 'unix-optimised') { if (get_config('qtype_stack', 'platform') == 'unix' || get_config('qtype_stack', 'platform') == 'unix-optimised') {
set_config('platform', 'linux', 'qtype_stack'); set_config('platform', 'linux', 'qtype_stack');
set_config('maximacommandopt', get_config('qtype_stack', 'maximacommand'), 'qtype_stack');
set_config('maximacommand', '', 'qtype_stack');
} }
if (get_config('qtype_stack', 'platform') == 'server') {
set_config('maximacommandserver', get_config('qtype_stack', 'maximacommand'), 'qtype_stack');
set_config('maximacommand', '', 'qtype_stack');
}
upgrade_plugin_savepoint(true, 2020112100, 'qtype', 'stack');
} }
// Add new upgrade blocks just above here. // Add new upgrade blocks just above here.
...@@ -864,7 +871,7 @@ function xmldb_qtype_stack_upgrade($oldversion) { ...@@ -864,7 +871,7 @@ function xmldb_qtype_stack_upgrade($oldversion) {
// If appropriate, clear the CAS cache and re-generate the image. // If appropriate, clear the CAS cache and re-generate the image.
if ($latestversion != $currentlyusedversion) { if ($latestversion != $currentlyusedversion) {
stack_cas_connection_db_cache::clear_cache($DB); stack_cas_connection_db_cache::clear_cache($DB);
if (QTYPE_STACK_TEST_CONFIG_PLATFORM !== 'server') { if (get_config('qtype_stack', 'platform') !== 'server') {
$pbar = new progress_bar('healthautomaxopt', 500, true); $pbar = new progress_bar('healthautomaxopt', 500, true);
list($ok, $message) = stack_cas_configuration::create_auto_maxima_image(); list($ok, $message) = stack_cas_configuration::create_auto_maxima_image();
$pbar->update(500, 500, get_string('healthautomaxopt', 'qtype_stack', array())); $pbar->update(500, 500, get_string('healthautomaxopt', 'qtype_stack', array()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment