MDL-21665 Minor fix to breadcrumb trail in completion progress report
authorSam Marshall <s.marshall@open.ac.uk>
Fri, 19 Feb 2010 13:38:36 +0000 (13:38 +0000)
committerSam Marshall <s.marshall@open.ac.uk>
Fri, 19 Feb 2010 13:38:36 +0000 (13:38 +0000)
course/report/progress/index.php

index 589b6c2..469a54c 100644 (file)
@@ -99,7 +99,9 @@ if($csv) {
 
     $PAGE->set_title($strcompletion);
     $PAGE->set_heading($course->fullname);
-    $PAGE->navbar->add($strreports, new moodle_url('/course/report.php', array('id'=>$course->id)));
+    if (has_capability('moodle/site:viewreports', $context)) {
+        $PAGE->navbar->add($strreports, new moodle_url('/course/report.php', array('id'=>$course->id)));
+    }
     $PAGE->navbar->add($strcompletion);
     echo $OUTPUT->header();