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

Be able to hide labels and defaults for some admin settings

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.6
    • Fix Version/s: BACKEND
    • Component/s: Administration
    • Labels:
    • Affected Branches:
      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

              Assignee:
              Unassigned
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: