From 40aa50f77289a7e29ae2a23072841724cbdc30fa Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Thu, 21 Sep 2023 18:54:14 +0200 Subject: [PATCH] Fix Pair Programming status for automatically matched learners --- app/channels/pg_matching_channel.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/channels/pg_matching_channel.rb b/app/channels/pg_matching_channel.rb index ceb28432..ac337ae9 100644 --- a/app/channels/pg_matching_channel.rb +++ b/app/channels/pg_matching_channel.rb @@ -36,7 +36,7 @@ class PgMatchingChannel < ApplicationCable::Channel # Create the programming group. Note that an unhandled exception will be raised if the programming group # is not valid (i.e., if one of the users already joined a programming group for this exercise). pg = ProgrammingGroup.create!(exercise: @exercise, users: match.map(&:user)) - match.each {|wu| wu.update(status: :created_pg, programming_group: pg) } + match.each {|wu| wu.update(status: :joined_pg, programming_group: pg) } ActionCable.server.broadcast(specific_channel, {action: 'joined_pg', users: pg.users.map(&:to_page_context)}) end