Now, in SEPARATE groups courses, a user cannot access to the info about users

in other groups.

Please check !!
This commit is contained in:
stronk7
2004-03-09 23:07:35 +00:00
parent bdad9dbae8
commit dd780a3b4c
+19
View File
@@ -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: ",
"<a href=\"../course/view.php?id=$course->id\">$course->shortname</a> ->
<a href=\"index.php?id=$course->id\">$participants</a>",
"", "", true, "&nbsp;", 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",
"<a href=\"../course/view.php?id=$course->id\">$course->shortname</a> ->