Repository navigation
[QTI] Perseus archive of a mixed exercise keeps legacy input questions with no numeric answer #6208
Copy link
Copy link
Labels
Description
Activity
rtibbles Blocked on #6209 (the #6196 fix), which is still open.
- This issue assumes Convert legacy input questions to answerable QTI #6209's behaviour: blank input questions left out of the QTI package,
Sphereconverted to astringtext entry. - Both change
test_exportchannel.py, and Convert legacy input questions to answerable QTI #6209 changesperseus_derive.py, which the derivability gate calls.
Should I wait for #6209 to merge, or branch from it?
- This issue assumes Convert legacy input questions to answerable QTI #6209's behaviour: blank input questions left out of the QTI package,
This has now been merged.
Reacted by Radina MaticReacted by Radina MaticPlan: A mixed native-QTI + legacy exercise's Perseus archive never ships a
numeric-inputthat no answer satisfies (#6208).- Perseus reads JSON-number input answers
- Leave answerless input questions out of a dual-published Perseus archive
- Non-numeric legacy input questions make a mixed exercise QTI only
- Self-review the produced code
Assumptions — the issue did not settle these; say so if one is wrong.
- Perseus now reads JSON-number answers in Perseus-only nodes too; if out of scope, the gate must make the int-
4fixture QTI only instead. - Hoist QTI's input
_process_answersinto the base generator; if reviewers object, Perseus duplicates the override. - Perseus logs nothing for a skipped input, since the QTI generator already warns; if a second warning is wanted, add one.
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
- Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
- Ran the project's full test suite and linter before committing
- For UI changes: captured live screenshots to verify rendering
- For backend changes: verified with example API/CLI output
#6262 leaves answerless input questions out of every exercise Perseus archive, dual-published ones included (
test_answerless_input_left_out_of_dual_published_archives). Drop the "Leave answerless input questions out of a dual-published Perseus archive" task and build on #6262 rather than adding a second skip.
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
An exercise that mixes native QTI items with legacy items publishes a Perseus archive containing legacy input questions that no answer can satisfy. A legacy input question whose answers are blank or not numbers becomes a Perseus
numeric-inputwithanswers: []. After #6196, the QTI package leaves the blank ones out, and an exercise holding a nativestringtext entry publishes QTI only. The Perseus archive of a mixed exercise still carries both kinds.Complexity: Low
Target branch: unstable
Context
_node_is_perseus_derivableaccepts every legacyinput_question:studio/contentcuration/contentcuration/utils/publish.py
Lines 264 to 274 in c87debc
_process_input_answersdrops every answerextract_valuedoes not read as a number:studio/contentcuration/contentcuration/utils/assessment/perseus.py
Lines 74 to 82 in c87debc
item_1, a legacy input question answered""(<blank>) and one answeredSphere(<sphere>), published with the [QTI] Legacy input question conversion produces wrong or unanswerable QTI #6196 fix:The Change
stringtext entry does.How to Get There
""and one answeredSphere. Then list the Perseus archive's item files and theirnumeric-inputanswers.Acceptance Criteria
["Sphere"]publishes a QTI package and no Perseus archive.[""], neither the Perseus archive's item files norexercise.jsonall_assessment_itemsinclude that question.numeric-inputwithanswers: [].test_exportchannel.pycovers both exercises.AI usage
Claude Code found this during an automated self-review of the #6196 branch, reproduced it with a scratch publish test on that branch, and drafted this issue.