Fix for bug 2550:

Users cannot see their own profile if course is set to separate groups and
the user is not a member of any group.

Patch provided by cdu@somerville.qld.edu.au, slightly modified
This commit is contained in:
defacer 2005-02-15 16:02:18 +00:00
parent 624bc87886
commit ccfd6c83f3

View file

@ -59,7 +59,7 @@
if (groupmode($course) == SEPARATEGROUPS and !isteacheredit($course->id)) { // Groups must be kept separate
require_login();
if (!isteacheredit($course->id, $user->id) and !ismember(mygroupid($course->id), $user->id)) {
if (!$currentuser && !isteacheredit($course->id, $user->id) && !ismember(mygroupid($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>",