Sub-flow › Author Matching Question
Question New Question Matching
Prompt-answer pairs β€” each pair has a left-side prompt and its correct right-side answer. Distractor answers (right column only, no matching prompt) are optional, extra items that increase difficulty. All right-column values (matched + distractor) are shuffled when presented to learners.
Prompt (left column) Answer (right column)
Distractor
Scoring: each correctly matched pair earns an equal share of the total points β€” floor(correct_pairs / total_pairs Γ— points). Distractor rows are excluded from the pair count.
Total marks this question contributes. Each of the 4 matched pairs earns an equal share.

Prototype β€” simulate state:

Spec notes

Identity

SUC-CCM-09 Β· Screen: SCR-CCM.07 (Question Editor β€” Matching)

ReturnUrl context

Current returnUrl: /manage-question-bank/
Fallback: / when returnUrl is empty.
Propagation: Save β†’ returnUrl. Cancel β†’ returnUrl + &sub_cancelled=1.

Sub-flow context

SUC-CCM-09 Β· Invoked by (Backoffice Portal): SUC-CCM-11 (Build Quiz), UC-CCM.12 (Manage Question Bank).
Question type locked to Matching; cannot change after first save (SCR-CCM.07 AR#2).
New question: form opens blank. Edit mode: pre-filled with the current version's stem, all pairs, distractors, points, and explanation.
Distractor answers (prompt empty) appear only in the right column to increase difficulty.
Partial credit: each correctly matched pair earns an equal share of total points; distractor answers excluded from the pair total (SUC AR#5, SS-CCM.40).
New: Question + QuestionVersion v1 + QuestionMatchPair rows (Active status). Edit: new QuestionVersion vN; prior version preserved for quiz sections already referencing it.
Cancel (AF 5A): unsaved draft discarded; question bank unchanged.

Screen spec: SCR-CCM.07 (match type)

  • Regions: Question Header Β· Question Text Β· Type-Specific Content Β· Feedback & Explanation Β· Scoring Β· Form Actions
  • question_type: read-only Β· locked to param type (match) Β· data_ref: Question.type
  • question_text: required Β· 1–5000 chars Β· data_ref: QuestionVersion.text
  • match_pairs: dynamic table β€” prompt (QuestionMatchPair.prompt), answer (QuestionMatchPair.answer), order (drag-drop). At least 2 prompt-answer pairs required, both non-empty; distractor rows have prompt empty, answer non-empty. Controls: "Add pair" (full row), "Add distractor" (row with prompt locked empty), delete row, reorder drag-drop
  • explanation: optional Β· max 5000 Β· shown to all learners post-submit Β· data_ref: QuestionVersion.config.explanation
  • points: required Β· 0.01–1000 Β· default 1 Β· data_ref: QuestionVersion.points
  • SCR AR#1: Type-specific validation β€” match: at least 2 pairs, both prompt+answer non-empty, distractor values non-empty if added (SS-CCM.09).
  • SCR AR#2: Question type cannot be changed after first save.
  • SCR AR#6: Matching partial credit β€” floor(correct_pairs / total_pairs Γ— points); distractor rows excluded from total_pairs; scoring rule shown below the table.
  • SUC AR#2: Save is atomic β€” if saving fails at any step, no partial data is kept (SS-CCM.07).