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:
kiragrammel
2023-08-10 17:07:04 +02:00
committed by Sebastian Serth
parent 0234414bae
commit 319c3ab3b4
42 changed files with 715 additions and 276 deletions

View File

@@ -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