Add ProgrammingGroup & ProgrammingGroupMembership
* User can create programming group with other users for exercise * Submission is shared in a group * Also adjust specs
This commit is contained in:

committed by
Sebastian Serth

parent
0234414bae
commit
319c3ab3b4
@@ -10,6 +10,11 @@ FactoryBot.define do
|
||||
submission.exercise.files.editable.visible.each do |file|
|
||||
submission.add_file(content: file.content, file_id: file.id)
|
||||
end
|
||||
|
||||
# Do not change anything if a study group was provided explicitly or user has no study groups
|
||||
next if submission.study_group.present? || submission.users.first.study_groups.blank?
|
||||
|
||||
submission.update!(study_group: submission.users.first.study_groups.first)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user