Skip to content

Commit

Permalink
Fixed issue where a 503 error shows up when moodlebot has no access t…
Browse files Browse the repository at this point in the history
…o the course administration reports.
  • Loading branch information
Daniel Thee Roperto committed Dec 13, 2016
1 parent a5cab38 commit 8f86af9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ function tool_crawler_extend_navigation_course($navigation, $course, $coursecont
$reports = array('queued', 'recent', 'broken', 'oversize');

$coursereports = $navigation->get('coursereports');
if (!$coursereports) {
return; // Course reports submenu in "course administration" not available.
}

$node = $coursereports->add(
get_string('pluginname', 'tool_crawler'),
Expand Down

0 comments on commit 8f86af9

Please sign in to comment.