Commit f6d2e379 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Fix for overzealous moderation


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent d90afcb5
......@@ -144,10 +144,10 @@ function releaseview_submit() {
// If the view has comments turned off, tutors can still leave
// comments if the view is submitted to their group.
if (!empty($releaseform) || $commenttype = $view->user_comments_allowed($USER)) {
if (!empty($releaseform) || ($commenttype = $view->user_comments_allowed($USER))) {
$defaultprivate = !empty($releaseform);
$privateonly = isset($commenttype) && $commenttype == 'private';
$addfeedbackform = pieform(ArtefactTypeComment::add_comment_form($defaultprivate, $privateonly));
$moderate = isset($commenttype) && $commenttype === 'private';
$addfeedbackform = pieform(ArtefactTypeComment::add_comment_form($defaultprivate, $moderate));
}
if ($USER->is_logged_in()) {
$objectionform = pieform(objection_form());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment