Exception - Division by zero using Immediate feedback with CBM

Exception - Division by zero using Immediate feedback with CBM

de Thomas Öttl -
Número de respuestas: 2

Hello,

we have a problem using CodeRunner in a quiz having Question behavior set to Immediate feedback with CBM

If the trainer views the attempts and uses the link "Review attempt" folling error occours: "Exception - Division by zero"

If the trainer clicks on a single question all is displayed correctly, but calling the review of the whole test attempt leads to the error.

We use moodle version 4.5.7 and CodeRunner version 5.7.1+ (2025052100) and we have the strange situation to have two moodle environments with the same versions installed, and the error appears only on one of them. We have checket ervery setting we could find, but still all are equal.

Has anyone a hint where we could find the reason of this error? 

Many thanks!

Thomas Öttl

En respuesta a Thomas Öttl

Re: Exception - Division by zero using Immediate feedback with CBM

de Richard Lobb -

CodeRunner doesn't support CBM - it always uses its own custom behaviour, an extension of Adaptive. If all the questions in the quiz are CodeRunner, then when the quiz review attempts to summarise the results by computing the average accuracy and average cbm, it comes up with 0 / 0 for both.

Similar problems apparently occur with a quiz containing only essay questions. See the bug report here: DivisionByZero while reviewing attempt in quiz using CBM behaviour.

I think (but please check) that the problem will go away if you add just one non-CodeRunner non-essay question. Given that CodeRunner questions don't present the user with an option to specify their confidence in their result, is there a reason to use CBM behaviour for the quiz that contain only CodeRunner questions?

You may want to add a comment to the bug report linked above, pointing out that the issue occurs with CodeRunner questions as well.

As to why you're getting the problem on one of your systems and not the other: my guess is that one of the servers is set to display warnings, the other not.

En respuesta a Richard Lobb

Re: Exception - Division by zero using Immediate feedback with CBM

de Thomas Öttl -
Thanks for your answer! Adding a question of non CodeRunner or essay fixed the problem.