Moodle

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

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 2.0
  • Fix Version/s: STABLE backlog
  • Component/s: Glossary
  • Labels:
    None
  • Affected Branches:
    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.)

Activity

Hide
Petr Škoda (skodak) added a comment -

I guess we can simply remove those icons from admin settings :-D

Show
Petr Škoda (skodak) added a comment - I guess we can simply remove those icons from admin settings :-D
Hide
Petr Škoda (skodak) added a comment -

I have committed an ugly hack that hardcoded the pixpath for now, going to work on new setting after I finish resource migration

Show
Petr Škoda (skodak) added a comment - I have committed an ugly hack that hardcoded the pixpath for now, going to work on new setting after I finish resource migration

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: