Skip to content

Commit

Permalink
Revert "fix: revise logic on start of categorization experiment"
Browse files Browse the repository at this point in the history
This reverts commit c2f9cb2.
  • Loading branch information
BeritJanssen committed Oct 31, 2024
1 parent c2f9cb2 commit 59232cd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions backend/experiment/rules/categorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,20 @@ def get_intro_explainer(self):
def next_round(self, session: Session):
json_data = session.json_data

if not json_data.get("phase"):
if json_data.get("started"):
actions = [self.get_intro_explainer()]
questions = self.get_open_questions(session)
if questions:
actions.extend(questions)
json_data = self.plan_experiment(session)
session.save_json_data({"started": True})
return actions

json_data = session.json_data

# Plan experiment on the first call to next_round
if not json_data.get("phase"):
json_data = self.plan_experiment(session)

# Check if this participant already has a session
if json_data == "REPEAT":
json_data = {"phase": "REPEAT"}
Expand Down Expand Up @@ -226,7 +232,6 @@ def next_round(self, session: Session):
session=session,
final_text=final_text + final_message,
total_score=round(score_percent),
rank=rank,
points="% correct",
)
return final
Expand Down

0 comments on commit 59232cd

Please sign in to comment.