From 98245ca295a8873bccc75b8f6a5e7494154ecb9b Mon Sep 17 00:00:00 2001 From: "A. Prooks" Date: Sat, 29 Mar 2014 14:14:17 +0300 Subject: [PATCH 1/2] hotfix(problemEdit): requried to select valid answer Signed-off-by: A. Prooks --- app/templates/questionForm.html | 1 + 1 file changed, 1 insertion(+) diff --git a/app/templates/questionForm.html b/app/templates/questionForm.html index f39c791..32ba324 100644 --- a/app/templates/questionForm.html +++ b/app/templates/questionForm.html @@ -33,6 +33,7 @@ ng-model="question.validAnswer" ng-options="a for a in question.options" class="form-control question-valid-answer" + ng-required > From fdb7bdd1bb5da1bf24270868ccda0e28981d3140 Mon Sep 17 00:00:00 2001 From: "A. Prooks" Date: Sat, 29 Mar 2014 14:41:33 +0300 Subject: [PATCH 2/2] hotfix: validAnswer returned for proper edit questions Signed-off-by: A. Prooks --- api/problemsData.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/problemsData.js b/api/problemsData.js index be8893f..5d26701 100644 --- a/api/problemsData.js +++ b/api/problemsData.js @@ -70,7 +70,7 @@ exports.getById = function(id) { return problem.questionsRef.indexOf(question.id) > -1; }) .map(function(question) { - return _.pick(question, ['id', 'title', 'options', 'answered', 'isCorrect']); + return _.pick(question, ['id', 'title', 'options', 'answered', 'isCorrect','validAnswer']); }) .value(); return _.pick(problem, ['id', 'title', 'description', 'questions']);