Add waiting room to create programming groups (#1919)
Co-authored-by: Sebastian Serth <Sebastian.Serth@hpi.de>
This commit is contained in:
@ -53,6 +53,9 @@ class ProgrammingGroupsController < ApplicationController
|
||||
ActionCable.server.broadcast("pg_matching_channel_exercise_#{@exercise.id}", message)
|
||||
end
|
||||
|
||||
# Check if the user was waiting for a programming group match and update the status
|
||||
current_user.pair_programming_waiting_users&.find_by(exercise: @exercise)&.update(status: :created_pg, programming_group: @programming_group)
|
||||
|
||||
# Just set the programming group id in the session for the creator of the group, so that the user can be redirected.
|
||||
session[:pg_id] = @programming_group.id
|
||||
|
||||
|
Reference in New Issue
Block a user