NRGI / rgi-assessment-tool

MEAN build of RGI 2015 assessment tool
MIT License
5 stars 1 forks source link

Researchers are accidentally able to send full assessments back without having completed all the answers. #486

Closed HumairaP closed 8 years ago

HumairaP commented 8 years ago

Congo - Brazzaville and Bangladesh had the same issue. Email from Bangladesh:

"Dear Humaira,

As you guessed, I was working offline and am in the process of submitting the answer. Unfortunately, I submitted the whole trial while submitting an answer by mistake. Now it shows that it is under admin review. Will it be possible to undo it?

Thanks, Asif"

I have sent his assessment back to him, by changing the status of the assessment on the dashboard and he has received it.

alexander-elgin commented 8 years ago

I could not reproduce the bug. However I studied the source code carefully. Such issue could happen if a user clicks the 'Submit Assessment' button before the app gets the question data. Till that moment the number of completed and approved answers as well as the total answers number in the assessment are undefined. Hence the check on the completed answers number was passed. I disabled the 'Submit Assessment' button while the question data are not loaded. See https://github.com/NRGI/rgi-assessment-tool/pull/487.