
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Target branch: unstable
Observed behavior
set_qti_item_language (utils/assessment/qti/media.py) rewrites the first <qti-assessment-item …> match in the raw text.
- A comment before the root that quotes that tag takes the match.
xml:lang is written inside the comment; the real root keeps its own language.
- The item passes
validate_qti_item.
Steps to reproduce
- Insert
<!-- <qti-assessment-item foo="1"> --> before the root of VALID_CHOICE_ITEM (tests/utils/qti/test_validation.py).
- Call
set_qti_item_language(xml, "fr").
- The real root still has
xml:lang="en-US".
Acceptance Criteria
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Target branch: unstable
Observed behavior
set_qti_item_language(utils/assessment/qti/media.py) rewrites the first<qti-assessment-item …>match in the raw text.xml:langis written inside the comment; the real root keeps its own language.validate_qti_item.Steps to reproduce
<!-- <qti-assessment-item foo="1"> -->before the root ofVALID_CHOICE_ITEM(tests/utils/qti/test_validation.py).set_qti_item_language(xml, "fr").xml:lang="en-US".Acceptance Criteria
set_qti_item_languagesets the language on the real root regardless of comments before it.