mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
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:
parent
624bc87886
commit
ccfd6c83f3
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@
|
||||||
if (groupmode($course) == SEPARATEGROUPS and !isteacheredit($course->id)) { // Groups must be kept separate
|
if (groupmode($course) == SEPARATEGROUPS and !isteacheredit($course->id)) { // Groups must be kept separate
|
||||||
require_login();
|
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: ",
|
print_header("$personalprofile: ", "$personalprofile: ",
|
||||||
"<a href=\"../course/view.php?id=$course->id\">$course->shortname</a> ->
|
"<a href=\"../course/view.php?id=$course->id\">$course->shortname</a> ->
|
||||||
<a href=\"index.php?id=$course->id\">$participants</a>",
|
<a href=\"index.php?id=$course->id\">$participants</a>",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue