-
Improvement
-
Resolution: Fixed
-
Minor
-
2.5
-
MOODLE_25_STABLE
-
MOODLE_26_STABLE
-
MDL-37459-master -
This patch moves the implementation of the "advanced" and "locked" checkboxes for admin_settings to the base class - so any admin setting can use these flags. The current implementations of blah_with_advanced and blah_with_lock have been converted into wrappers which just set the flags on the base class.
This allows any setting to use any combination of locked or advanced checkboxes and makes it easier to add new ones (hidden might be nice...).
This change is 100% backward compatible and does not require any changes to existing subclasses of admin_settings.
To enable an advanced checkbox - call $setting->set_advanced(true);
To enable an locked checkbox - call $setting->set_lockable(true);
To set the defaults for the checkboxes call
$setting->set_advanced_flag_options(admin_setting::OPTION_ENABLED, true);
or
$setting->set_locked_flag_options(admin_setting::OPTION_ENABLED, false);
Note: All modules will work with this patch with 0 changes - the config values set have the same names as the previous implementations.
Discussion link:
https://moodle.org/mod/forum/discuss.php?d=220263
- blocks
-
MDL-37621 Use MDL-37459 to add admin defaults for assignment module.
- Closed
- has a non-specific relationship to
-
MDL-37914 (Meta) Convert remaining core activities to use new admin defaults (MDL-37459)
- Closed
- has been marked as being related by
-
MDL-30637 Simplify moodle forms
- Closed
-
MDL-37337 Assignment settings screen is long and unwieldy
- Closed
-
MDL-18267 Consequent use of admin features for all activities and default settings
- Closed
- is duplicated by
-
MDL-44901 Assignment - Add default values configurations
- Closed
- will help resolve
-
MDL-37786 Use MDL-37459 to add admin defaults for quiz module.
- Open
-
MDL-35808 Allow for option of default to be set for available and due dates within an assignment
- Closed
-
MDL-37621 Use MDL-37459 to add admin defaults for assignment module.
- Closed