Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-63795

Not all core settings defaults are applied anymore

    XMLWordPrintable

    Details

      Description

      MDL-62777 appears to have caused some core settings, and those of some 3rd party plugins, to no longer be set.

      As far as core goes - tool_mobile no longer has several settings set.

      This appears to be caused by some of the settings being wrapped in a IF check, that stops the settings nodes even existing prior to that setting being enabled.

       

      Pre MDL-62777

      • tool_mobile settings start with `enablemobilewebservice` unset, with a default of `1` and several settings that never get loaded until that is set.
      • admin_apply_default_settings called
        • settings as they currently exist loaded
        • defaults set
      • admin_apply_default_settings  called again
        • new settings now exist as `!empty($CFG->enablemobilewebservice` evaluates to true
        • defaults for those new settings are set

      Post MDL-62777

      • tool_mobile settings start with `enablemobilewebservice` unset, with a default of `1` and several settings that never get loaded until that is set.
      • admin_apply_default_settings called
        • settings as they currently exist loaded
        • for each of those settings, build a list of defaults
        • defaults set
        • call admin_apply_default_settings - but only if we had new defaults applied

       

      It looks like MDL-62777 covers the case where a default settings value may depend on another setting - but not where a settings even "existing" in the settings tree depends on another setting.

       

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 41 minutes
                  1h 41m