- Issue created by @nsciacca
- First commit to issue fork.
Automatically closed - issue fixed for 2 weeks with no activity.
Same as described in https://www.drupal.org/project/quiz/issues/3346955 π Division by Zero while using getWeightedRatio() method Active (which was closed). The getWeightedRatio function doesn't check if the quiz question max score is 0 and therefore sometimes leads to diving by 0 and the error is thrown.
DivisionByZeroError: Division by zero in Drupal\quiz\Entity\QuizResultAnswer->getWeightedRatio() (line 219 of /var/www/web/modules/composer/quiz/src/Entity/QuizResultAnswerEntityTrait.php).
Code should check if either value in the division process is 0 before calculating.
Active
7.0
Code - Quiz core
Automatically closed - issue fixed for 2 weeks with no activity.