Skip to content

Commit

Permalink
issue/55 Allow score to be set if _requireAssessmentCompleted is false (
Browse files Browse the repository at this point in the history
  • Loading branch information
deltanetdan authored Jan 24, 2022
1 parent 12411df commit b5ce694
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions js/tracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ class Tracking extends Backbone.Controller {
}

setupEventListeners() {
// Check if completion requires passing an assessment.
if (this._config._requireAssessmentCompleted) {
this.listenTo(Adapt, {
'assessment:complete': this.onAssessmentComplete,
'assessment:restored': this.onAssessmentRestored
});
}
this.listenTo(Adapt, {
'assessment:complete': this.onAssessmentComplete,
'assessment:restored': this.onAssessmentRestored
});

// Check if completion requires completing all content.
if (this._config._requireContentCompleted) {
Expand All @@ -39,7 +36,10 @@ class Tracking extends Backbone.Controller {
this._assessmentState = assessmentState;

this.submitScore();
this.checkCompletion();
// Check if completion requires passing an assessment.
if (this._config._requireAssessmentCompleted) {
this.checkCompletion();
}
}

submitScore() {
Expand Down

0 comments on commit b5ce694

Please sign in to comment.