Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
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
- All
- Comments
- History
- Activity
- Source
- Test Sessions