DOn't show reply links to logged-in users if they can't reply

This commit is contained in:
moodler
2006-11-05 09:34:09 +00:00
parent 17e44aad44
commit 008c431636
+6
View File
@@ -188,6 +188,12 @@
$canreply = ( (empty($mygroupid) && $discussion->groupid == -1) ||
(ismember($discussion->groupid) || $mygroupid == $discussion->groupid) );
}
} else {
if (!has_capability('mod/forum:replypost', $modcontext)) {
if (!has_capability('moodle/legacy:guest', $coursecontext, NULL, false)) { // User is a guest here!
$canreply = false;
}
}
}