[QTI] Editing a question rewrites the response settings and scoring it was stored with
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, python, xml
Hướng nghiên cứu
Start with the QTI editor files named in the issue: the interaction parse.js files, assembleItem.js, and validateItem.js; use the listed fixtures and VALID_ASSOCIATE_ITEM_DOCUMENT to trace parsing, rebuilding, and validation. Run the Jest reproductions described in the issue, then compare each saved raw_data setting with the uploaded item. Done means the chosen settings survive edits or open read-only, and saved items pass validate_qti_item.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
❌ 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
Saving any edit to a QTI question rebuilds the settings its interaction's builder writes from the editor's state, so a stored value the editor has no field for is replaced. Every item below opens editable.
#6309 covers the attributes and markup the builders don't write; its comment leaves the settings a builder writes to this issue.
Choice (choice/parse.js#L140-L159):
- Multiple selection:
min-choicesandmax-choicesbecome the number of correct choices. Every converted legacy multiple selection question (multiple_selection.xml) goes frommax-choices="4" min-choices="0"to3/3. - Single choice:
min-choices="1"is dropped. shuffle="1"is saved asfalse, andfixed="1"on a choice is dropped (#L109).
Ordering:
- Choices presented in an order other than the correct one are saved in the correct order. With
shuffle="false", learners are then shown the answer.
Associate, match and gap match (associate/parse.js#L196-L200, match/parse.js#L222-L226, gapMatch/parse.js#L279-L283):
shuffleis saved astrue.max-associationsis saved as the number of correct pairs; for gap match, the number of gaps.match-max="2"on an option keyed once is saved as1.- Two options whose text differs only in formatting (
<strong>Hot</strong>,<em>Hot</em>) are merged (associate/parse.js#L131-L132, match/parse.js#L155), and the pair keyed to the second is rewritten to the first.
Text entry (textEntry/parse.js#L200-L211, #L278-L281, #L316-L319):
- A
base-type="integer"declaration is saved asbase-type="string"with no correct response, mapping or response processing. expected-length="1000000000000000000000"is saved as1e+21, which the item XSD rejects;expected-length="0"is saved as50.<qti-default-value>on the response declaration is dropped.- An item with a mapping and no
<qti-response-processing>gains one.
Scoring (assembleItem.js#L103-L119; EDITOR_CHILDREN accepts these elements whatever they hold, validateItem.js#L77-L83):
- A
<qti-response-processing>holding its own rules is replaced by thematch_correcttemplate. - A choice scored with
map_responseand a<qti-mapping>(choice-bworth0.5) is saved withmatch_correctand no mapping. normal-maximumand<qti-default-value>on theSCOREdeclaration are dropped, and so is a second outcome declaration (MAXSCORE).
Expected behavior
An edit does not change a response setting or scoring rule the author did not touch. For each setting above, the QTI editor's maintainers choose between keeping the stored value through the edit and opening the item read-only; read-only on min-choices/max-choices would lock every converted multiple selection question.
User-facing consequences
- Learners get a question that is presented or scored differently from the uploaded one: options shuffled, an ordering shown already solved, partial credit gone.
- An integer text entry question loses its answer key.
- The author isn't told.
Steps to reproduce
- Open a converted legacy multiple selection question (
multiple_selection.xml), click Edit, change the question text, click Close:<qti-choice-interaction>hasmax-choices="3" min-choices="3". - Open
VALID_ASSOCIATE_ITEM_DOCUMENT(testingFixtures.js) withshuffle="false" max-associations="9"on its interaction, change the question text, click Close: the interaction hasshuffle="true" max-associations="2". - Open
input_question.xmlwithbase-type="integer"on its response declaration, change the question text, click Close: the declaration isbase-type="string"and has no<qti-correct-response>. - Open
ORDERING_ITEM_DOCUMENT_NO_PROMPT(same file) withshuffle="false"and its two choices swapped, change a choice's text, click Close: the choices are saved in the correct order.
Context
unstableat 2713cbf33, Jest with jsdom: each item was parsed, rebuilt with its descriptor and assembled.- The scoring cases are sites closed #6290's fix (#6306) left editable: it made an item read-only for any root child the editor doesn't write, and treats response processing and outcome declarations as the editor's whatever they hold.
- Closed #6301 keeps answers that differ only in bold or italic equal, for duplicate checks on answers typed in the editor; the merged options here are stored ones the edit didn't touch.
- #6309's branch changes the same
parse.jsfiles andvalidateItem.js.
Acceptance Criteria
- After an edit to the question text, each setting the maintainers chose to keep has its stored value in the saved
raw_data, for each item in Steps to reproduce. - An item holding a setting they chose to lock opens read-only, and
validateQtiItemstill reports its rule errors. - Every item the editor saves passes
validate_qti_item;expected-length="1000000000000000000000"no longer saves as1e+21. - Changing the answer key still saves bounds and limits that accept the new key.
- Unit tests cover each setting from the stored item to the saved
raw_data.
AI usage
Claude Code found these while working on #6309, reproduced each with Jest on unstable, and drafted this issue.
- Ngôn ngữ chính
- JavaScript
- Star
- 214
- Fork
- 327
- Merge trung bình
- 17 giờ 5 phút
- Pull request đã merge (30 ngày)
- 25
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của learningequality/studio
-
Community library status changes don't update `date_updated`Có thể đã có người làm @ArpitaSamanta10 đã nhận 13 ngày trước. Đang mởcommunity-contribution-in-progress DEV: backend good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
learningequality/studio#6414 · 8 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Activation key can activate a different account whose email differs only in caseCó thể đã có người làm @Madhu-priya123 đã nhận 4 ngày trước. Đang mởDEV: backend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
learningequality/studio#6410 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DEV: backend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
learningequality/studio#6409 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DEV: backend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
learningequality/studio#6407 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Stripe webhook accepts events when no webhook secret is configuredCó thể đã có người làm @adibmbrk đã nhận 14 ngày trước. Đang mởcommunity-contribution-in-progress DEV: backend good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
learningequality/studio#6404 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của learningequality/studio
Issue tương tự
-
enhancement good first issue shields parity
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
seuthootDev/terminal-shields#125 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[ui] 自創球員 (投手): pick 球種 at creation (直球 fixed + up to 2 more), trade-off line, shown on the cardĐang mởarea:ui P1 status:doing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
sunososobro-hub/cloudball#1153 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
NuSkooler/enigma-bbs#1241 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
harness seguranca target:staging
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
corosolto/client#1507 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày