Skip to content
Snippets Groups Projects
Commit 2ebbb182 authored by Elke Kreim's avatar Elke Kreim
Browse files

Settings only for courses, except site course

parent 43ca0be3
Branches
No related tags found
No related merge requests found
......@@ -27,6 +27,13 @@ define('LOCALHSHEXPORT_NAV_PARTICIPANTS', 'navpart');
function local_hshexport_extend_navigation_course($navigation, $course, $context) {
global $PAGE, $SITE;
// Only add this settings item on non-site course pages.
if (!$PAGE->course or $PAGE->course->id == $SITE->id) {
return;
}
if (has_capability('local/hshexport:canexport', $context)) {
// Create the navigation node.
$url = new moodle_url('/local/hshexport/export.php', ['id' => $course->id]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment