From: stronk7 Date: Tue, 9 Mar 2004 23:07:35 +0000 (+0000) Subject: Now, in SEPARATE groups courses, a user cannot access to the info about users X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=dd780a3b4c6f562d28df9cb2d870ff713ab09bdb;p=moodle.git Now, in SEPARATE groups courses, a user cannot access to the info about users in other groups. Please check !! --- diff --git a/user/view.php b/user/view.php index 5f1aad0cc4..64bd305db6 100644 --- a/user/view.php +++ b/user/view.php @@ -35,6 +35,25 @@ $personalprofile = get_string("personalprofile"); $participants = get_string("participants"); + $groupmode = groupmode($course); + + if ($groupmode and !isteacheredit($course->id)) { // Groups must be kept separate + if ($groupmode == SEPARATEGROUPS) { + require_login(); + + if (!ismember($USER->groupmember[$course->id], $user->id)) { + print_header("$personalprofile: ", "$personalprofile: ", + "id\">$course->shortname -> + id\">$participants", + "", "", true, " ", navmenu($course)); + print_heading("Sorry, you can't see this user because you are not in his group"); + print_footer(); + die; + } + + } + } + if ($course->category) { print_header("$personalprofile: $fullname", "$personalprofile: $fullname", "id\">$course->shortname ->