Skip to content

Fix: Retry Assessment button does nothing when results are on a separate page (fixes #109) - #110

Open
swashbuck wants to merge 1 commit into
masterfrom
issue/109
Open

Fix: Retry Assessment button does nothing when results are on a separate page (fixes #109)#110
swashbuck wants to merge 1 commit into
masterfrom
issue/109

Conversation

@swashbuck

Copy link
Copy Markdown
Contributor

Fixes #109

Fix

The "Retry Assessment" button called the assessment reset without forcing it. When the results component sits on a different page from the assessment, the assessment's reset bails out (it is already complete in the session and not set to reset on revisit), so the click did nothing. This was most visible with "Allow retry once passed" (_allowResetIfPassed) enabled, since that is what makes the button appear after passing.

The retry click is an explicit, user-initiated reset and is already gated by the button's enabled state (retry allowed, attempts remaining), so it now forces the reset. Resetting on page revisit is unaffected, so _allowResetIfPassed on its own still resets only via the button, not automatically on revisit.

Testing

  1. Set up an assessment with "Allow retry once passed" (_allowResetIfPassed) enabled and infinite attempts.
  2. Put the assessmentResults component on a separate page from the assessment questions, with a feedback band that allows retry and _routeToAssessment enabled.
  3. Answer all questions correctly to pass.
  4. Go to the results page and click "Retry Assessment".
  5. Before: nothing happens. After: the assessment resets and you are routed back to the questions.

Posted via collaboration with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Needs Reviewing

Development

Successfully merging this pull request may close these issues.

When "Allow retry once passed" option enabled in assessment, "Retry assessment" stops working in the assessmentResults component

2 participants