Merge branch 'MDL-36369' of git://github.com/timhunt/moodle

This commit is contained in:
Dan Poltawski
2012-11-14 09:29:51 +08:00
3 changed files with 10 additions and 3 deletions
+4 -2
View File
@@ -2927,9 +2927,11 @@ class plugininfo_qtype extends plugininfo_base {
$section = $this->get_settings_section_name();
$settings = null;
if ($hassiteconfig && file_exists($this->full_path('settings.php'))) {
$systemcontext = context_system::instance();
if (($hassiteconfig || has_capability('moodle/question:config', $systemcontext)) &&
file_exists($this->full_path('settings.php'))) {
$settings = new admin_settingpage($section, $this->displayname,
'moodle/site:config', $this->is_enabled() === false);
'moodle/question:config', $this->is_enabled() === false);
include($this->full_path('settings.php')); // this may also set $settings to null
}
if ($settings) {