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:
skodak 2007-07-23 22:20:07 +00:00
parent 7229af7890
commit 65dd61bda6
12 changed files with 332 additions and 348 deletions

View file

@ -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="" />';
}