Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.7, 1.7.1, 1.8
-
Fix Version/s: 1.9
-
Component/s: Administration
-
Labels:None
-
Database:MySQL
-
Affected Branches:MOODLE_17_STABLE, MOODLE_18_STABLE
-
Fixed Branches:MOODLE_19_STABLE
Description
Settings using the new admin interface will incorrectly appear as though they are set to their default value even if they have not been created.
This could be reproduced in a number of ways, from deleting one of the values for the config table to accidentally clicking away during the upgrade:
- Upgrade a moodle
- upgrade core takes place
- prompted to upgrade settings
- click away from the settings page (for example the admin link, rather than save settings)
- module upgrade continues
- upgrade finished
- View a setting which should've been set (e.g. enablerecordcache in performance, gradebookroles in appearance)
- the settings will look like its set to the default, but the setting doesn't exist.
A way round this would perhaps be more agreessive redirection to the uprgrade settings screen if any settings don't exist? Or perhaps something which indicates is showing the default rather than what it is set to?
Attaching a patch which will look check for admin settings for any which aren't initialised from admin/index.php, and redirect to the new settings screen if any aren't found. Being slighly more agressive at redirecting than the previous one-time chance it had on upgrades.
I don't know if searching for new settings every time we hit admin/index.php is a bit heavyweight, though..