MDL-9511 adding/renaming grading capabilities
This commit is contained in:
@@ -156,8 +156,8 @@ class block_admin extends block_list {
|
||||
}
|
||||
|
||||
/// View course grades (or just your own grades, same link)
|
||||
if ((has_capability('moodle/course:viewcoursegrades', $context) or
|
||||
(has_capability('moodle/user:viewusergrades', $context) && $course->showgrades)) && ($course->id!==SITEID)) {
|
||||
if ((has_capability('moodle/grade:view', $context) or
|
||||
(has_capability('moodle/grade:viewown', $context) && $course->showgrades)) && ($course->id!==SITEID)) {
|
||||
$this->content->items[]='<a href="'.$CFG->wwwroot.'/grade/report.php?id='.$this->instance->pageid.'">'.get_string('grades').'</a>';
|
||||
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/grades.gif" class="icon" alt="" />';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user