From 0019725320d0bf6297220912735ed3ad4fe2e26e Mon Sep 17 00:00:00 2001 From: vyshane Date: Mon, 18 Sep 2006 05:28:06 +0000 Subject: [PATCH] Removed references to showsiteparticipantslist. Replaced by capability. --- user/index.php | 9 ++------- user/tabs.php | 4 ++-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/user/index.php b/user/index.php index 7ade006948..3d8bb516d6 100644 --- a/user/index.php +++ b/user/index.php @@ -59,15 +59,10 @@ require_capability('moodle/course:viewparticipants', $context); if (!$course->category) { - if (!$CFG->showsiteparticipantslist and !has_capability('moodle/course:viewparticipants', get_context_instance(CONTEXT_SYSTEM, SITEID))) { + if (!has_capability('moodle/course:viewparticipants', get_context_instance(CONTEXT_SYSTEM, SITEID))) { print_header("$course->shortname: ".get_string('participants'), $course->fullname, get_string('participants'), "", "", true, " ", navmenu($course)); - notice(get_string('sitepartlist0')); - } - if ($CFG->showsiteparticipantslist < 2 and !isteacherinanycourse()) { - print_header("$course->shortname: ".get_string('participants'), $course->fullname, - get_string('participants'), "", "", true, " ", navmenu($course)); - notice(get_string('sitepartlist1')); + notice(get_string('sitepartlist')); } } diff --git a/user/tabs.php b/user/tabs.php index 95640a3d17..742f11798d 100644 --- a/user/tabs.php +++ b/user/tabs.php @@ -35,8 +35,8 @@ if ($CFG->bloglevel >= 4) { if (isteacher(SITEID) || - ($CFG->showsiteparticipants == 1 && isteacherinanycourse()) || - ($CFG->showsiteparticipantslist == 2)) { + ( $CFG->showsiteparticipants == 1 + && has_capability('moodle/course:viewparticipants', get_context_instance(CONTEXT_SYSTEM, SITEID)) ) { $toprow[] = new tabobject('participants', $CFG->wwwroot.'/user/index.php?id='.SITEID, get_string('participants')); } -- 2.39.5