Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions bases/rsptx/assignment_server_api/routers/peer.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,11 +716,11 @@ def find_set_containing_string(
for p in answerers:
if p in clustered:
continue
grp = {
s
for s in find_set_containing_string(in_person_groups, p)
if s in sid_ans
}
# Keep the full recorded verbal group, including partners who did
# not vote on this question. Students should stay in the same condition
# as their verbal partners so they aren't split into text chat.
grp = set(find_set_containing_string(in_person_groups, p))
grp -= clustered
grp.add(p)
clustered |= grp
clusters.append(sorted(grp))
Expand Down Expand Up @@ -761,8 +761,10 @@ def find_set_containing_string(
# Re-running the experiment will randomize it again so that it can clear any previous assignments to keep one unambiguous group per student.
# Delete + insert now will happen in a single call so re-running stays fast for larger courses.
experiment_id = f"{div_id}_ab"
# Record every clustered student in their group's condition, including
# students whose partner did not vote, so partners always share a condition
assignments = [(sid, 0) for sid in peeps_in_person] + [
(sid, 1) for sid in peeps
(sid, 1) for sid in peeps_in_chat
]
await replace_user_experiment_entries(experiment_id, assignments)

Expand Down
Loading