Moodle

Admin settings and plugins

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.9.5
  • Fix Version/s: STABLE backlog
  • Component/s: Administration
  • Labels:
    None
  • Difficulty:
    Easy
  • Affected Branches:
    MOODLE_19_STABLE

Description

The add method of the admin_settingpage class doesn't allow settings to be added that have the same name but different plugin names. The following function definition fixes that problem:

function add($setting) {
if (!is_a($setting, 'admin_setting')) { debugging('error - not a setting instance'); return false; }

if (!empty($setting->plugin)) {
$name = "{$setting->plugin}$setting->name";
} else { $name = $setting->name; }

$this->settings->$name = $setting;
return true;
}

Activity

There are no comments yet on this issue.

People

Vote (5)
Watch (1)

Dates

  • Created:
    Updated: