MDL-67432 quiz: Load all quiz subplugin settings from quiz settings.
Quiz quizaccess and report subplugins should have greater control over their own settings. Remove the condition that they are only included when in the full admin tree which doesn't include admin search page. The $ADMIN->fulltree condition should be handled by subplugin settings.
This commit is contained in:
@@ -234,9 +234,7 @@ if (empty($reportsbyname) && empty($rulesbyname)) {
|
||||
|
||||
$settings = new admin_settingpage('modsettingsquizcat'.$reportname,
|
||||
$strreportname, 'moodle/site:config', $module->is_enabled() === false);
|
||||
if ($ADMIN->fulltree) {
|
||||
include($CFG->dirroot . "/mod/quiz/report/$reportname/settings.php");
|
||||
}
|
||||
include($CFG->dirroot . "/mod/quiz/report/$reportname/settings.php");
|
||||
if (!empty($settings)) {
|
||||
$ADMIN->add('modsettingsquizcat', $settings);
|
||||
}
|
||||
@@ -246,9 +244,7 @@ if (empty($reportsbyname) && empty($rulesbyname)) {
|
||||
foreach ($rulesbyname as $strrulename => $rule) {
|
||||
$settings = new admin_settingpage('modsettingsquizcat' . $rule,
|
||||
$strrulename, 'moodle/site:config', $module->is_enabled() === false);
|
||||
if ($ADMIN->fulltree) {
|
||||
include($CFG->dirroot . "/mod/quiz/accessrule/$rule/settings.php");
|
||||
}
|
||||
include($CFG->dirroot . "/mod/quiz/accessrule/$rule/settings.php");
|
||||
if (!empty($settings)) {
|
||||
$ADMIN->add('modsettingsquizcat', $settings);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user