Skip to content

Commit

Permalink
Fix: Set _isAssessmentPassed correctly (fixes #474) (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverfoster authored Dec 4, 2023
1 parent 9a212ca commit 420dab1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/tracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class Tracking extends Backbone.Controller {
}

submitScore() {
const isPassed = Boolean(this._assessmentState?.isPass ?? this._assessmentState?.isPassed);
Adapt.course.set('_isAssessmentPassed', isPassed);
if (!this._config._shouldSubmitScore) return;
offlineStorage.set('score', this._assessmentState.score, this._assessmentState.minScore, this._assessmentState.maxScore, this._assessmentState.isPercentageBased);
}
Expand Down

0 comments on commit 420dab1

Please sign in to comment.