Skip to content

Commit

Permalink
MDL-36369 Question types and behaviour settings should not require mo…
Browse files Browse the repository at this point in the history
…odle/site:config
  • Loading branch information
marinaglancy authored and timhunt committed Nov 13, 2012
1 parent 5c4685f commit e75324a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions admin/settings/plugins.php
Expand Up @@ -312,6 +312,10 @@

// Question type settings
if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext)) {
if (!$hassiteconfig) {
require_once("$CFG->libdir/pluginlib.php");
$allplugins = plugin_manager::instance()->get_plugins();
}
// Question behaviour settings.
$ADMIN->add('modules', new admin_category('qbehavioursettings', new lang_string('questionbehaviours', 'admin')));
$ADMIN->add('qbehavioursettings', new admin_page_manageqbehaviours());
Expand Down
5 changes: 3 additions & 2 deletions lib/adminlib.php
Expand Up @@ -5252,7 +5252,7 @@ class admin_page_manageqbehaviours extends admin_externalpage {
public function __construct() {
global $CFG;
parent::__construct('manageqbehaviours', get_string('manageqbehaviours', 'admin'),
new moodle_url('/admin/qbehaviours.php'));
new moodle_url('/admin/qbehaviours.php'), 'moodle/question:config');
}

/**
Expand Down Expand Up @@ -5299,7 +5299,8 @@ class admin_page_manageqtypes extends admin_externalpage {
*/
public function __construct() {
global $CFG;
parent::__construct('manageqtypes', get_string('manageqtypes', 'admin'), "$CFG->wwwroot/$CFG->admin/qtypes.php");
parent::__construct('manageqtypes', get_string('manageqtypes', 'admin'), "$CFG->wwwroot/$CFG->admin/qtypes.php",
'moodle/question:config');
}

/**
Expand Down

0 comments on commit e75324a

Please sign in to comment.