Skip to content

Instantly share code, notes, and snippets.

@jgable
Created March 8, 2012 01:07
Show Gist options
  • Save jgable/1997755 to your computer and use it in GitHub Desktop.
Save jgable/1997755 to your computer and use it in GitHub Desktop.
Magnitude Blog Post Code
SurveyTimersPage.prototype.updateTimerQuestionResponse = function () {
var newResponseId = null;
if (this.timerMgr.hasValuesEntered()) {
// Update this questions response to the timer measurement response.
var resp = this.surveyMgr.getCorrectResponse(this.timerQuestion.AllowableValues);
if (resp !== null) {
newResponseId = resp.id;
}
}
// Check to keep the score from updating again.
if (this.timerQuestion.ResponseId != newResponseId) {
this.surveyMgr.updateQuestionResponse(this.timerQuestion.AuditItemId, newResponseId);
}
};
if (resp !== null) {
newResponseId = resp.Id;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment