gjbarnard / moodle-format_topcoll

Collapsed Topics course format for Moodle.
http://docs.moodle.org/en/Collapsed_Topics_course_format
GNU General Public License v3.0
35 stars 60 forks source link

Upgrading from Moodle 3.9 sets default values to zero #135

Closed anieminen closed 1 year ago

anieminen commented 1 year ago

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:

  1. Install format_topcoll to Moodle 3.9.
  2. Upgrade Moodle to a newer version (>=3.10).
  3. Upgrade format_topcoll to the corresponding version.
  4. Go to plugin settings after the upgrade, and see that many of the default values have been set to zero.
  5. 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 kuva

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.