Commit 80671ecb authored by Nigel McNie's avatar Nigel McNie
Browse files

(#3270) Prevent crashing when a logged out person visits a public view that...

(#3270) Prevent crashing when a logged out person visits a public view that has been submitted for assessment.
(cherry picked from commit ac1730b6)
parent 30e19bfc
......@@ -59,7 +59,7 @@ $title = $view->get('title');
define('TITLE', $title);
$submittedgroup = (int)$view->get('submittedto');
if ($submittedgroup && group_user_can_assess_submitted_views($submittedgroup, $USER->get('id'))) {
if ($USER->is_logged_in() && $submittedgroup && group_user_can_assess_submitted_views($submittedgroup, $USER->get('id'))) {
// The user is a tutor of the group that this view has
// been submitted to, and is entitled to release the view, and to
// upload an additional file when submitting feedback.
......
Supports Markdown
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