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

Be able to hide labels and defaults for some admin settings

    XMLWordPrintable

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.6
    • BACKEND
    • Administration
    • MOODLE_26_STABLE

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              stronk7 Eloy Lafuente (stronk7)
              David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: