Repository navigation
[QTI] Perseus archive of an exercise with raw Perseus questions keeps legacy input questions with no answer #6210
Description
❌ 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 holding a legacy perseus_question and no native QTI item publishes only a Perseus archive. That archive keeps a legacy input question with no accepted answer as a numeric-input with answers: [], which nothing a learner enters can satisfy. #6196 leaves these questions out of the QTI package, and #6208 does the same for the Perseus archive of exercises that mix native QTI and legacy items. This exercise gets neither.
Complexity: Low
Target branch: unstable
Context
- An exercise with a
perseus_questionand no native QTI item getsPerseusExerciseGeneratoronly:studio/contentcuration/contentcuration/utils/publish.py
Lines 408 to 409 in 1beec6e
elif any_perseus_question: generator_classes = [PerseusExerciseGenerator] _process_input_answersdrops every answerextract_valuedoes not read as a number:studio/contentcuration/contentcuration/utils/assessment/perseus.py
Lines 74 to 82 in 1beec6e
def _process_input_answers(self, processed_data): """Extract input answer processing logic""" non_empty_answers = [] for answer in processed_data["answers"]: answer["answer"] = extract_value(answer["answer"]) if answer["answer"] or answer["answer"] == 0: non_empty_answers.append(answer) return {**processed_data, "answers": non_empty_answers} - An exercise with a
perseus_question(bbbb…) and a legacy input question answered""(cccc…), onunstableand on the [QTI] Legacy input question conversion produces wrong or unanswerable QTI #6196 branch:Perseus archive items: bbbb….json, cccc….json exercise.json all_assessment_items: bbbb…, cccc… cccc….json widgets: numeric-input 1, answers []
The Change
- A legacy input question with no accepted answer (every answer blank,
false,nullor not marked correct) should be left out of the Perseus archive, as [QTI] Legacy input question conversion produces wrong or unanswerable QTI #6196 leaves it out of the QTI package.
How to Get There
- Publish an exercise holding one legacy
perseus_questionand one legacy input question answered"", then list the Perseus archive's item files and readexercise.json.
Out of Scope
- Legacy input questions with non-numeric answers (e.g.
Sphere) in these exercises.
Acceptance Criteria
- For an exercise holding a legacy
perseus_questionand a legacy input question answered[""], the Perseus archive keeps theperseus_question, neither its item files norexercise.jsonall_assessment_itemsinclude the input question, and publish logs a warning. -
test_exportchannel.pycovers that exercise.
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 on unstable, and drafted this issue.

Activity
rtibblesbot commentedon Sep 30, 2026
Plan: A legacy
input_questionwith no accepted answer is left out of every Perseus archive, itsexercise.jsonand the node'sAssessmentMetaData, with a warning.Assumptions — the issue did not settle these; say so if one is wrong.
nstill counts the skipped item, as the QTI path does (publish.py:842-844); if Kolibri readsnfordo_all, the exercise asks for more items than it ships.0stays accepted, peraccepted_answers, so[0]still shipsanswers: []; if it should work, base_process_answersmust stop dropping falsy answers.=0x0image) is not skipped; if it should be,exercise.jsonmust be written after the items, changing every pinned Perseus zip checksum.@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
rtibblesbot commentedon Oct 8, 2026
QTIRestoreTestCase(tests/test_restore_channel.py) fails 7 tests onunstable(51657a6d9), so every open PR's Python tests are red.raw_dataand republished package XML no longer equal the source byte for byte; Restore QTI exercises when restoring a channel #6243's tests compare them as strings.unstable,pytest contentcuration/contentcuration/tests/test_restore_channel.py -k QTIRestoreTestCase.#6262 fixes it in
test(restore): compare restored QTI XML canonically(lxml.etree.canonicalize); a restored item whose content differs still fails.Written by rtibblesbot, an LLM-based coding agent.
rtibblesbot commentedon Oct 8, 2026
Written by rtibblesbot, an LLM-based coding agent.
rtibblesbot commentedon Oct 8, 2026
rtibbles Blocked — these cannot be assumed either way:
a1716cc4cfixesQTIRestoreTestCasefailures already onunstable(Parse QTI items to rewrite them at publish instead of matching regexes #6241), unrelated to [QTI] Perseus archive of an exercise with raw Perseus questions keeps legacy input questions with no answer #6210. Open a PR fromrtibblesbot:restore-qti-xml-compare(already pushed) againstunstableand dropa1716cc4cfrom this branch, or keep it here? This session was denied both the PR and the history rewrite.Written by rtibblesbot, an LLM-based coding agent.
rtibbles commentedon Oct 8, 2026
Keep it here.