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

We cannot refer to $CFG->pixpath in mod/glossary/settings.php

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Cannot Reproduce
    • 2.0
    • None
    • Glossary
    • None
    • MOODLE_20_STABLE

    Description

      mod/glossary/settings.php abuses admin_setting_heading to put some icons on the settings screen.

      That is pretty evil already. However, what makes it really, really wicked is that to do this, it refers to $CFG->pixpath. That means that we refer to $CFG->pixpath in admin_get_root. However, in several places we need to call admin_get_root to get the admin tree before we have initialised all the information about the current theme.

      I think that this should be a custom admin_setting class, so we only create the HTML on output.

      (Assigning to Petr, since he originally wrote this code. However, it is not really his fault.)

      Attachments

        Activity

          People

            timhunt Tim Hunt
            timhunt Tim Hunt
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: