diff --git a/user/index.php b/user/index.php index 7f7d2ebd9c5..dec22664897 100644 --- a/user/index.php +++ b/user/index.php @@ -14,7 +14,9 @@ optional_variable($lastinitial, ""); // only show students with this last initial optional_variable($firstinitial, ""); // only show students with this first initial optional_variable($perpage, "20"); // how many per page + optional_variable($_GET['format'], 'brief'); // what kind of view + $compactmode = ($_GET['format'] == 'brief'); if (! $course = get_record("course", "id", $id)) { error("Course ID is incorrect"); @@ -22,6 +24,15 @@ require_login($course->id); + if (!$course->category) { + if (!$CFG->showsiteparticipantslist and !isteacher(SITEID)) { + notice(get_string('sitepartlist0')); + } + if ($CFG->showsiteparticipantslist < 2 and !isteacher()) { + notice(get_string('sitepartlist1')); + } + } + add_to_log($course->id, "user", "view all", "index.php?id=$course->id", ""); $isteacher = isteacher($course->id); @@ -33,7 +44,7 @@ $participantslink = "id\">".get_string("participants").""; } - $isseparategroups = ($course->groupmode == SEPARATEGROUPS and $course->groupmodeforce and + $isseparategroups = ($course->groupmode == SEPARATEGROUPS and $course->groupmodeforce and !isteacheredit($course->id)); $currentgroup = $isseparategroups ? get_current_group($course->id) : NULL; @@ -43,31 +54,47 @@ "id>$course->shortname -> ". "$participantslink", "", "", true, " ", navmenu($course)); } else { - print_header("$course->shortname: ".get_string("participants"), "$course->fullname", + print_header("$course->shortname: ".get_string("participants"), "$course->fullname", "$participantslink", "", "", true, " ", navmenu($course)); } + echo '