MDL-21665 Minor fix to breadcrumb trail in completion progress report
[moodle.git] / 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();