We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 861c7d5 commit ea5fea2Copy full SHA for ea5fea2
app/pods/contests/contest/content/quiz/controller.js
@@ -16,15 +16,15 @@ export default class Quiz extends Controller {
16
get totalCorrect () {
17
const result = this.get('submitQuizTask.lastSuccessful.value.judge_result')
18
return result.questions.reduce((acc, question) => {
19
- return acc + +question.correctlyAnswered.length
+ return acc + question.questionAnsweredCorrectly ? 1 : 0
20
}, 0)
21
}
22
23
@computed('submitQuizTask.lastSuccessful.value.judge_result')
24
get totalIncorrect() {
25
26
27
- return acc + +question.incorrectlyAnswered.length
+ return acc + question.questionAnsweredCorrectly ? 0 : 1
28
29
30
0 commit comments