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

@ -5,7 +5,7 @@ class FlowrController < ApplicationController
require_user!
# get the latest submission for this user that also has a test run (i.e. structured_errors if applicable)
submission = Submission.joins(:testruns)
.where(submissions: {contributor: current_user})
.where(submissions: {contributor: current_contributor})
.includes(structured_errors: [structured_error_attributes: [:error_template_attribute]])
.merge(Testrun.order(created_at: :desc)).first