mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-10579 Implement capability checks in grade import/export/report/edit pages - work in progress
refactoring - reports now use real index.php
This commit is contained in:
parent
7229af7890
commit
65dd61bda6
12 changed files with 332 additions and 348 deletions
|
@ -156,9 +156,9 @@ class block_admin extends block_list {
|
|||
}
|
||||
|
||||
/// View course grades (or just your own grades, same link)
|
||||
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>';
|
||||
if ((has_capability('moodle/grade:viewall', $context) or
|
||||
(has_capability('moodle/grade:view', $context) && $course->showgrades)) && ($course->id!==SITEID)) {
|
||||
$this->content->items[]='<a href="'.$CFG->wwwroot.'/grade/report/index.php?id='.$this->instance->pageid.'">'.get_string('grades').'</a>';
|
||||
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/grades.gif" class="icon" alt="" />';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue