Hi all, I have a page where a user can answer a diagnostic that is structured like a quiz.
To illustrate with a specific example: the quiz consists of 31 questions that can be scored, with each question answered with either “yes” or “no”. At the end of the quiz, I need to calculate a score that reflects the user’s performance. Specifically, I want to calculate a score that ranges from 0 to 1. The user’s score is calculated based on the questions they answered that returns “is_correct = yes”
Here’s the scenario that is happening in the live version (on test mode, everything works just fine):
- The user answered 6 questions out of the 31 total questions that can be scored.
- So, in this case, this user score should be 0.19.
- The value that was stored on the db was 0 though.
This is the expression I’m currently using:
For further context, the users are free to create and selected the diagnostic’s questions they want to use, they’re also free to indicate if the “yes” or the “no” is the answer that will score. This error happened to a bunch of new diagnostics on the live version. Tested on test mode and the scores are being recorded accordingly.
What am I doing wrong?