mirror of
https://github.com/moodle/moodle.git
synced 2025-04-16 14:02:32 +02:00
allow guests to see the reply link
This commit is contained in:
parent
9276d74255
commit
21b89cb43b
@ -168,8 +168,7 @@
|
||||
}
|
||||
|
||||
$groupmode = groupmode($course, $cm);
|
||||
if ($canreply = has_capability($capname, $modcontext)) {
|
||||
|
||||
if ($canreply = has_capability($capname, $modcontext)) {
|
||||
|
||||
if ($groupmode && !has_capability('moodle/site:accessallgroups', $modcontext)) {
|
||||
// Groups must be kept separate
|
||||
@ -193,6 +192,11 @@
|
||||
(ismember($discussion->groupid) || $mygroupid == $discussion->groupid) );
|
||||
}
|
||||
}
|
||||
} else { // allow guests to see the link
|
||||
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
|
||||
if (has_capability('moodle/legacy:guest', $coursecontext, NULL, false)) { // User is a guest here!
|
||||
$canreply = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// Print the controls across the top
|
||||
|
Loading…
x
Reference in New Issue
Block a user