Commit 26a69801 authored by Ruslan Kabalin's avatar Ruslan Kabalin
Browse files

view: do not list own views submitted to the group (bug #632308)



Own views will be shown only if user is the only member of the groups with
view assesment permissions (this can happen if another member with assessment
permissions has been demoted to ordinary members after the view had been
submitted).
Signed-off-by: default avatarRuslan Kabalin <ruslan.kabalin@luns.net.uk>
parent f11ccc93
......@@ -90,7 +90,7 @@ else {
}
$submittedgroup = (int)$view->get('submittedgroup');
if ($USER->is_logged_in() && $submittedgroup && group_user_can_assess_submitted_views($submittedgroup, $USER->get('id'))) {
if ($USER->is_logged_in() && $submittedgroup && !count(group_get_members_can_see_submitted_views($submittedgroup))) {
// The user is a tutor of the group that this view has
// been submitted to, and is entitled to release the view
$submittedgroup = get_record('group', 'id', $submittedgroup);
......
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