Closed manishrjain closed 7 years ago
This is done on the frontend for now.
It's buggy.
Hey, sorry for the poor user experience. Please check now with a force refresh. Also updated it so that it takes into account deleted candidates too (which we anyway soft-delete).
Thanks for fixing. Also, shouldn't the top candidate be 100%-ile?
Also, round off the percentiles, maybe to their floor value. But check first about the usual practice.
It is 100%-ile now. It wasn't so earlier because of the dummy quizzes take by Pulkit and the team. I have deleted those dummy quizzes. Also rounded of to the floor value as that should be good enough for our use case.
Tamer now has the percentile to 2%, even though he's the lowest scoring candidate. Also, quizzes shouldn't affect each other. Percentile should be per quiz.
It is per quiz right now. The way the percentile is calculated is
(No. of having score <= value) / Total Number of candidates * 100
For Tamer it is 1/50 * 100. We could make that a strict inequality(<), which would make the lowest scoring candidate have 0%-le but the highest scoring candidate won't have 100% then.
Ah.. I see. That makes sense. Thanks for clarifying.
For now, we could do this entirely in the front end.
But, later on, as we paginate this list, we should pick the lowest score that we have on the page, and ask Dgraph to give a total count of all valid (not deleted) candidates who took the quiz, and a count of all candidates who got a score < the lowest score on page. This should then be incorporated in the frontend to show the percentile scores.