Describe the bug
Upgrade script sets default values to zero, when upgrading from Moodle 3.9 to e.g. 4.1.
To Reproduce
Steps to reproduce the behaviour:
Install format_topcoll to Moodle 3.9.
Upgrade Moodle to a newer version (>=3.10).
Upgrade format_topcoll to the corresponding version.
Go to plugin settings after the upgrade, and see that many of the default values have been set to zero.
Go to a course with Collapsed Topics format, and see that there is white text on white background on the topics.
Expected behaviour
The settings should not change.
Screenshots
Versions (please complete the following information):
Before the upgrade:
Moodle: 3.9.22
Format: 3.9.1.8
After the upgrade:
Moodle: 4.1.4
Format: 401.1.0
Additional context
The $oldversion check here has been changed from MOODLE_39 version. So the upgrade is trying to find old setting names, which didn't exist anymore in Moodle 3.9.
Describe the bug Upgrade script sets default values to zero, when upgrading from Moodle 3.9 to e.g. 4.1.
To Reproduce Steps to reproduce the behaviour:
Expected behaviour The settings should not change.
Screenshots
Versions (please complete the following information):
Additional context The
$oldversion
check here has been changed from MOODLE_39 version. So the upgrade is trying to find old setting names, which didn't exist anymore in Moodle 3.9.