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

Be able to hide labels and defaults for some admin settings

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.6
    • Administration
    • MOODLE_26_STABLE

      For 2.6 a new admin setting type (admin_setting_php_extension_enabled) was introduced by MDL-42671. It allows to show a warning when some optional extension is not installed in the server and some feature may require it. It's a special setting, without storage in DB and friends, just informative.

      The setting uses the central format_admin_setting() function to display its HTML. Unluckily that function does not allow to "hide" some parts of the output that have not sense for this setting, namely:

      • the default value information.
      • the label (and name) of the setting (aka, left "column").

      So this is about to consider which of these solutions is better:

      1. Add 1 extra param to the function to instruct it to skip rendering defaults and labels.
      2. Modify the special setting to use another, reduced, function, say "format_informative_setting()" or so.
      3. Hard-code the rendering into admin_setting_php_extension_enabled->output_html() and don't use any core function.

      That is, ciao

            Unassigned Unassigned
            stronk7 Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.