Skip to content

CodeTailor: let a question opt out of personalization by label suffix (-ct-static) - #1616

Merged
bnmnetp merged 1 commit into
RunestoneInteractive:mainfrom
aspadiyath:codetailor-static-arm
Oct 16, 2026
Merged

bnmnetp merged 1 commit into
RunestoneInteractive:mainfrom
aspadiyath:codetailor-static-arm

Conversation

@aspadiyath

Copy link
Copy Markdown
Contributor

PreTeXt's @codetailor can only ask for a personalized puzzle (incorrect → partial, all → movable). There's no way to emit data-parsons-personalized="false". So a PreTeXt book can't set up an A/B <select> where one copy of an exercise gets a CodeTailor puzzle and the other gets the instructor's backup puzzle.

This PR treats any question whose label ends in -ct-static as non-personalized. Its Get Help always serves the codetailor-fallback Parsons problem and logs example_solution, whatever the request says. The client is unchanged and both copies look identical to students.

<exercise label="u3-toggle1">
  <select grade="ab-experiment" experiment-name="csa-u3-ct-1"
          questions="u3-toggle1-ct u3-toggle1-ct-static"/>
</exercise>

We need this for a CodeTailor study in CSAwesome. It's deliberately small and self-contained: one constant, one helper and two call sites in coach.py. It can be deleted when the study ends.

🤖 Generated with Claude Code

PreTeXt's @codetailor can only request personalization, so a PreTeXt book
has no way to mark a non-personalized copy of an exercise for an A/B
<select>. Questions whose label ends in -ct-static now always get the
instructor's backup Parsons problem. Intended for a Fall 2026 study and
removable afterwards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aspadiyath
aspadiyath requested a review from bnmnetp as a code owner October 16, 2026 19:07
@bnmnetp
bnmnetp merged commit 5cf3c43 into RunestoneInteractive:main Oct 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants