add output of the percentage of correct answers

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

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();