From 4d0036e8bedc391b6127c177db6dc235fa3cec26 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 19 Jun 2006 13:51:58 +0000 Subject: [PATCH] Don't show users tab if you can't go there --- user/tabs.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/user/tabs.php b/user/tabs.php index 4b2ef6f818c..52bb10e04c5 100644 --- a/user/tabs.php +++ b/user/tabs.php @@ -34,8 +34,12 @@ print_heading($site->fullname); if ($CFG->bloglevel >= 4) { - $toprow[] = new tabobject('participants', $CFG->wwwroot.'/user/index.php?id='.SITEID, - get_string('participants')); + if (isteacher(SITEID) || + ($CFG->showsiteparticipants == 1 && isteacherinanycourse()) || + ($CFG->showsiteparticipantslist == 2)) { + $toprow[] = new tabobject('participants', $CFG->wwwroot.'/user/index.php?id='.SITEID, + get_string('participants')); + } $toprow[] = new tabobject('blogs', $CFG->wwwroot.'/blog/index.php?filtertype=site&', get_string('blogs','blog'));