Skip to content

Commit

Permalink
added retry option for allowResetIfPassed (adaptlearning#34)
Browse files Browse the repository at this point in the history
* added retry option for allowResetIfPassed

* changed retry logic as suggested
  • Loading branch information
sarveshwar-gavhane authored and tomgreenfield committed Nov 27, 2017
1 parent 43321e7 commit 1e0b7d0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/adapt-contrib-assessmentResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,9 @@ define([

var isRetryEnabled = state.feedbackBand._allowRetry !== false;
var isAttemptsLeft = (state.attemptsLeft > 0 || state.attemptsLeft === "infinite");

var showRetry = isRetryEnabled && isAttemptsLeft;
var allowResetIfPassed = state.isPass && state.allowResetIfPassed;

var showRetry = isRetryEnabled && (isAttemptsLeft || allowResetIfPassed);
this.model.set("_isRetryEnabled", showRetry);

if (showRetry) {
Expand Down

0 comments on commit 1e0b7d0

Please sign in to comment.