diff --git a/app/room.py b/app/room.py index 0f2863a..60f119d 100644 --- a/app/room.py +++ b/app/room.py @@ -267,6 +267,17 @@ class RoomManager: ack = await self.existing_submit_ack(sid, identity["student_id"], session["current_question_idx"]) if ack: await websocket.send_json(ack) + elif session["state"] == "question_closed": + # Replay the reveal so a student joining mid-reveal sees the + # closed-question card with their answer / correct option / + # leaderboard, instead of being stuck on the join form's + # disabled state waiting for an event that never arrives. + await websocket.send_json(await self.question_open_message(sid, session["current_question_idx"])) + await websocket.send_json( + await self.question_closed_message(sid, session["current_question_idx"], identity) + ) + elif session["state"] == "finished": + await websocket.send_json(await self.ended_message(sid, identity)) async def send_instructor_snapshot(self, websocket: WebSocket, sid: str) -> None: session = await self.get_session(sid)