Add events for pair programming study
This commit is contained in:

committed by
Sebastian Serth

parent
d1d5b0df6f
commit
79422225a8
@ -315,6 +315,8 @@ class ExercisesController < ApplicationController
|
||||
# we are just acting on behalf of a single user who has already worked on this exercise as part of a programming group **in the context of the current study group**
|
||||
session[:pg_id] = pg.id
|
||||
@current_contributor = pg
|
||||
elsif PairProgramming23Study.participate?(current_user, @exercise) && current_user.submissions.where(study_group_id: current_user.current_study_group_id, exercise: @exercise).any?
|
||||
Event.create(category: 'pp_work_alone', user: current_user, exercise: @exercise, data: nil, file_id: nil)
|
||||
end
|
||||
|
||||
user_solved_exercise = @exercise.solved_by?(current_contributor)
|
||||
|
Reference in New Issue
Block a user