Skip to content
Snippets Groups Projects
Commit 9ff6d126 authored by iaibrys's avatar iaibrys
Browse files

Fix overzealous cleanup

parent db89ec94
No related branches found
No related tags found
No related merge requests found
Pipeline #439 passed
function flash(kind, message) {
window.flash = function (kind, message) {
const allowed_kinds = ['alert-success', 'alert-info', 'alert-warning', 'alert-danger'];
if (allowed_kinds.indexOf(kind) === -1) {
console.error(`ASSERT: invalid flash message kind ${kind}`);
......
......@@ -85,6 +85,8 @@ class SetQuizVisibilityService
quiz.visible_to_students = vis
if quiz.visible_to_students
groups_by_course = DTUAuth2::CachedAuthorizationManager.groups_by_course(quiz.course_id)
eligeable_students = quiz.group_names.map do |group_name|
groups_by_course[group_name]&.select{ |user| user.acl == 'student'}
end.compact.flatten
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment