src/AppBundle/Services/CheckAnswerV0.php 1 location
|
@@ 52-59 (lines=8) @@
|
| 49 |
|
} |
| 50 |
|
} |
| 51 |
|
//first type question |
| 52 |
|
if ($question->getAllIncorrect() || $data['answer_all_incorrect']) { |
| 53 |
|
if ($question->getAllIncorrect() === $data['answer_all_incorrect'] && $question->getAllIncorrect() === true && $sumTrueCorrect == 0) { |
| 54 |
|
|
| 55 |
|
return 1; |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
return 0; |
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
// second type question |
| 62 |
|
if ($countAllTrueAnswers == 1) { |
src/AppBundle/Services/CheckAnwers.php 1 location
|
@@ 58-65 (lines=8) @@
|
| 55 |
|
$maxCountAnswers = $countAllTrueAnswers; |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
if ($question->getAllIncorrect() || $data['answer_all_incorrect']) { |
| 59 |
|
if ($question->getAllIncorrect() === $data['answer_all_incorrect'] && $question->getAllIncorrect() === true && |
| 60 |
|
$sumAllCorrect == $countOriginalAnswers |
| 61 |
|
) |
| 62 |
|
return 1; |
| 63 |
|
|
| 64 |
|
return 0; |
| 65 |
|
} |
| 66 |
|
|
| 67 |
|
|
| 68 |
|
if ($sumAllCorrect && $sumCorrectChecks && $countAllChecks <= $maxCountAnswers) { |