Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-qtype_stack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-qtype_stack
Commits
cffa0c1c
Commit
cffa0c1c
authored
4 years ago
by
Chris Sangwin
Browse files
Options
Downloads
Patches
Plain Diff
Improvements to the upgrade scripts.
parent
94fa4a1e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
db/upgrade.php
+8
-1
8 additions, 1 deletion
db/upgrade.php
with
8 additions
and
1 deletion
db/upgrade.php
+
8
−
1
View file @
cffa0c1c
...
@@ -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
()));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment