Skip to content

Breaking: Upgrade to version 2 of scoring (fixes #21)#22

Open
oliverfoster wants to merge 20 commits intomasterfrom
issue/21
Open

Breaking: Upgrade to version 2 of scoring (fixes #21)#22
oliverfoster wants to merge 20 commits intomasterfrom
issue/21

Conversation

@oliverfoster
Copy link
Copy Markdown
Member

@oliverfoster oliverfoster commented Jul 30, 2025

fixes #21

requires adaptlearning/adapt-contrib-scoring#30

Breaking

  • Use State to help save and restore to offline storage
  • Switched to use LifecycleSet integrated lifecycle functions
  • Isolate compatibility layer with adapt-contrib-assessment plugins
  • Changed from rawModels and models to models and availableModels where relevant
  • Added some jsdocs

@oliverfoster oliverfoster moved this from New to Needs Reviewing in adapt_framework: The TODO Board Jul 30, 2025
Resolved an issue where a second assessment attempt failed to trigger completion. This occurred because `Attempt.isInSession` was reset when `LifecycleRenderer` called `onStart` after `onVisit` following an assessment reset.

Moved `isInSession` logic into `AssessmentSet`, as it represents navigation state rather than attempt-specific state.

Also removed an unnecessary condition in the Attempts `reset` method that incorrectly set `_history` to an `Attempt`, which was unreachable due to required config.
Comment thread js/AssessmentSet.js
… may not be consistent based on conditional content such as branching or banking. This is also needed for the changes made in 20dcb0b.

Fixed potential issues due to the incorrect logical operators.
Comment thread js/AssessmentSet.js
async onVisit() {
this._isInSession = true;
if (this.attempt.isInProgress) return;
if (this._isInReset) return;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it actually possible for the set to already be in a reset phase at this point with the way the LifeCycleRenderer works?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know.

Is it not code brought over from the assessment results "try again" button, where the assessment page refreshes to rerender the assessment from the start?

… with super class methods not always being called for `onInit` and `onRestore`. Updated to latest Lifecycle logic to distinguish between first attempt and reset attempts.
…de the journal name change. Fixed issue where 6faa60e introduced old duplicates of some methods in `Attempts`.
…in c2b06d5404a1d9e52ac3d4b169e14436bfc965b3. Switched to using `Passmark` from scoring plugin to save duplication (only requiresPassedSubsets is different and set to false as default).
… to an execution order issue. It needed to update before `onCompleted`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

Upgrade to version 2 of scoring

2 participants