ubc / iPeer

Peer Evaluation System
http://ipeer.ctlt.ubc.ca
Other
17 stars 18 forks source link

Evaluation score calculated incorrectly #604

Closed kitsook closed 5 years ago

kitsook commented 5 years ago

There are reported cases that for mixed evaluations, some of the raw scores in exported CSV don't match with the sum of individual scores.

Found inconsistencies in the db data. For each reported case:

In each case, the evaluator probably saved the evaluation multiple times. And somehow for the latest save, some questions were not processed and caused the total score calculated incorrectly.

Can't simulate the case yet. But suspecting it is related to Javascript processing.

In the UI, there is logic to set a selected_lom variable for each question when an answer is selected: https://github.com/ubc/iPeer/blob/ed1d8535518eeef5d24402b7a56c0c4d6807cd68/app/views/elements/mixevals/view_mixeval_details.ctp#L64-L67

Looking at the logic for saving evaluation details, it skips processing silently if the selected_lom variable is not set for that question: https://github.com/ubc/iPeer/blob/ed1d8535518eeef5d24402b7a56c0c4d6807cd68/app/controllers/components/evaluation.php#L1083-L1085

One possible cause of the problem is that somehow (network timeout during page load? or user submitted the form before onClick events fired?) some of the selected_lom variables are not set probably during form submit. Hence causing the total score calculated incorrectly.