kolibri
kolibri copied to clipboard
wrong average score in the coach reports after the first learner of a quiz submits it
Observed behavior
when the first quiz taker submits a quiz , the quiz score showing to the quiz taker (learner) after quiz submission is correct but the initial average score (reports view in coach account) of that quiz for the whole class is Wrong .
what i exactly did is the following :
- created a quiz from the coach account with 5 quesions
- (in another session eg.Incognito mode ) took that quiz as a learner and answered all the 5 questions correct
- ( learner account ) the result score for that quiz is 100% (5/5) as expected
- (coach account ) without reloading the page, the average score for that quiz in the coach reports is 20% ! whic is wrong but refreshing the page it shows 100% as expected .
what does that mean ?
It means an important thing (to lead the person working on this issue in the right direction) The quiz answers got saved in the database normally and correctly as expected that's why when you refresh the page you see the expected average score , so i think it has something to do with the notifications pushed to the coach.
related files
/kolibri/core/notifications/api.py line 553 examine (quiz_completed_notification) function
Expected behavior
coah should sees correct average score (initially the same as the score showed to the learner) after the first learner who took the quiz submits the quiz
Steps to reproduce
- login as a coach, make a quiz and start it (try a simple one where you can answer correctly)
- from another window (Incognito mode) login as a learner , take this quiz
- answer the questions and then submit
- look at the other window (logged in as a coach) without refreshing the page
- observe the expected avg score for that quiz in the reports view (again without loading the page)
Context
noticed the same issue on both environments :
Production evironment)( following kolibri user guide ) Kolibri 0.15.1 Windows 10 Chrome 99.0.4844.74
Developemnt environment (following Kolibri developer documentation ) Kolibri 0.16.0a4.dev0+git.88.g98506819 Ubuntu 20.04 Chrome 100.0.4896.60
I can replicate this with 0.15.6 on Ubuntu 18.04:

so this behaviour is not related to the environment used.
also i referenced a function above that me be relevant
Fixed in #9721 - thanks for the report @abdelrahman725 !