Skip to content

Update: Allow per-question overrides for showing feedback, marking, and model answer (fixes #232)#233

Open
swashbuck wants to merge 9 commits into
masterfrom
issue/232
Open

Update: Allow per-question overrides for showing feedback, marking, and model answer (fixes #232)#233
swashbuck wants to merge 9 commits into
masterfrom
issue/232

Conversation

@swashbuck
Copy link
Copy Markdown
Contributor

@swashbuck swashbuck commented May 12, 2026

Fixes #232

Update

  • Add new opt-in property _assessment._questions._allowComponentOverrides (default false). When enabled, article-level values for _canShowFeedback, _canShowMarking, and _canShowModelAnswer are not pushed to question components - each component's own values apply. When disabled (default), legacy behavior is preserved - article-level values always overwrite component values.
  • Update schemas and documentation
  • Add migration scripts

Testing

A. Legacy behavior (default _allowComponentOverrides: false):

  1. Set up an assessment article with one or more question components. On a component, set "_canShowModelAnswer": true in components.json.
  2. In the article's _assessment._questions block, omit _canShowModelAnswer entirely.
  3. Run the course, submit an incorrect answer to exhaust attempts.
  4. Confirm the Show Correct Answer button does not appear (article-level default false overrides component, matching pre-fix behavior).

B. New opt-in behavior (_allowComponentOverrides: true):

  1. In the same article, set "_allowComponentOverrides": true in _assessment._questions.
  2. Run the course, exhaust attempts on the component with _canShowModelAnswer: true.
  3. Confirm the Show Correct Answer button does appear.
  4. With _allowComponentOverrides: true, set _canShowModelAnswer: false explicitly at the article level. Confirm the Show Correct Answer button still appears on the component with _canShowModelAnswer: true - article-level values do not override component values when the flag is enabled.

C. Authoring tool / schema:

  1. Author a new assessment article in AAT. Confirm _allowComponentOverrides defaults to false and the article behaves identically to courses authored on the previous version.

D. Migration:

  1. Run the migration against a course authored on v5.4.1 or earlier. Confirm every assessment article gains _assessment._questions._allowComponentOverrides: false.

Posted via collaboration with Claude Code.

@swashbuck swashbuck moved this from Needs Reviewing to Assigned in adapt_framework: The TODO Board May 12, 2026
@swashbuck swashbuck marked this pull request as draft May 12, 2026 22:25
@swashbuck swashbuck changed the title Fix: assessment overwriting component feedback properties when omitted from article config (fixes #232) Update: opt-in per-question feedback override via _allowComponentOverrides (fixes #232) May 12, 2026
@swashbuck swashbuck marked this pull request as ready for review May 13, 2026 22:05
@swashbuck swashbuck moved this from Assigned to Needs Reviewing in adapt_framework: The TODO Board May 13, 2026
@swashbuck swashbuck changed the title Update: opt-in per-question feedback override via _allowComponentOverrides (fixes #232) Update: Allow per-question overrides for showing feedback, marking, and model answer (fixes #232) May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs Reviewing

Development

Successfully merging this pull request may close these issues.

Assessment overwrites question feedback flags omitted from article config

2 participants