add output of the percentage of correct answers

This commit is contained in:
iIronside committed 2021-10-25 13:41:12 +03:00
1 parent e362ad45a4
commit 84ec9ef9c7
10 files changed
+1313 -6

No files matched your search

+2 -2
View File
@@ -156,9 +156,9 @@ class UserResponse extends \yii\db\ActiveRecord
{
$correct_answers = $this->getCorrectAnswers();
foreach ($correct_answers as $correct_answerr)
foreach ($correct_answers as $correct_answer)
{
if ($this->response_body === $correct_answerr['answer_body'])
if ($this->response_body === $correct_answer['answer_body'])
{
$this->answer_flag = 1;
$this->save();