allow guests to see the reply link

This commit is contained in:
toyomoyo 2007-03-13 04:49:05 +00:00
parent 9276d74255
commit 21b89cb43b

View File

@ -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