Summary
When a student clicks "Get Help" on an activecode problem while their editor still just contains starter code (no real attempt), CodeTailor's Parsons scaffolding is frequently built from a terse, single-line solution (e.g. a list comprehension or chained one-liner) rather than a structured, multi-step solution. Parsons puzzles are meant to let students practice assembling control structure (loops, conditionals, variable assignment order) — a one-line solution collapses into 1-2 blocks and provides no structural practice.
Root cause
student_code_checker() (bases/rsptx/book_server_api/routers/personalized_parsons/buggy_code_checker.py) correctly detects "no student code contributed," but the downstream path in generate_personalized_fixed_code() (bases/rsptx/book_server_api/routers/personalized_parsons/end_to_end.py, lines 292-298) then falls straight through to generate_example_solution() with no path that asks for a pedagogically structured solution.
get_example_solution()'s prompt (bases/rsptx/book_server_api/routers/personalized_parsons/get_personalized_solution.py, lines 241-249) only constrains for correctness and "entry-level features" — it does not discourage comprehensions, ternaries, or single-expression solutions, so the LLM is free to return the shortest idiomatic answer.
- Because there's no student code in this branch, the "similar to student's approach" fixing logic (
request_fixed_code_from_openai) never runs, so there's no mechanism at all to force multi-line/structural decomposition here.
Steps to reproduce
- Open an
activecode problem configured with CodeTailor.
- Leave the editor as the unmodified starter code (or empty).
- Click "Get Help."
- Observe the generated Parsons puzzle is a trivial 1-2 block puzzle built from a one-line solution.
Expected behavior
The generated example solution used for Parsons scaffolding should reflect a step-by-step, structurally decomposed solution (using explicit loops/conditionals/intermediate variables as appropriate for the problem), even when no student code exists, so the puzzle gives students real practice with program structure.
Summary
When a student clicks "Get Help" on an
activecodeproblem while their editor still just contains starter code (no real attempt), CodeTailor's Parsons scaffolding is frequently built from a terse, single-line solution (e.g. a list comprehension or chained one-liner) rather than a structured, multi-step solution. Parsons puzzles are meant to let students practice assembling control structure (loops, conditionals, variable assignment order) — a one-line solution collapses into 1-2 blocks and provides no structural practice.Root cause
student_code_checker()(bases/rsptx/book_server_api/routers/personalized_parsons/buggy_code_checker.py) correctly detects "no student code contributed," but the downstream path ingenerate_personalized_fixed_code()(bases/rsptx/book_server_api/routers/personalized_parsons/end_to_end.py, lines 292-298) then falls straight through togenerate_example_solution()with no path that asks for a pedagogically structured solution.get_example_solution()'s prompt (bases/rsptx/book_server_api/routers/personalized_parsons/get_personalized_solution.py, lines 241-249) only constrains for correctness and "entry-level features" — it does not discourage comprehensions, ternaries, or single-expression solutions, so the LLM is free to return the shortest idiomatic answer.request_fixed_code_from_openai) never runs, so there's no mechanism at all to force multi-line/structural decomposition here.Steps to reproduce
activecodeproblem configured with CodeTailor.Expected behavior
The generated example solution used for Parsons scaffolding should reflect a step-by-step, structurally decomposed solution (using explicit loops/conditionals/intermediate variables as appropriate for the problem), even when no student code exists, so the puzzle gives students real practice with program structure.