MDL-39084 grade: Capability checks are incoherent for the Course grade settings section

This commit is contained in:
Jean-Philippe Gaudreau
2013-04-16 09:30:19 -04:00
parent 7b9df2353c
commit ec934409e6
+1 -1
View File
@@ -2424,7 +2424,7 @@ abstract class grade_helper {
return self::$managesetting;
}
$context = get_context_instance(CONTEXT_COURSE, $courseid);
if (has_capability('moodle/course:update', $context)) {
if (has_capability('moodle/grade:manage', $context)) {
self::$managesetting = new grade_plugin_info('coursesettings', new moodle_url('/grade/edit/settings/index.php', array('id'=>$courseid)), get_string('course'));
} else {
self::$managesetting = false;