Multiple Ranking Systems
Instead of just one ranking system it would be nice to be able to rank competitors using multiple ranking systems as mentioned in #30
PRs for this issue must include:
- HTML template to show the rankings
- python code to generate multiple rankings based on user attempt history
@arnabsinha99 could you take this up?
Yeah alright. I would need help in the HTML part though.
Perhaps you can do that once #34 is finished?
Perhaps you can do that once #34 is finished?
Finished #34
Yeah alright. I would need help in the HTML part though.
I can help with that.
@HeroicHitesh Sorry for the delay.. let us continue with this issue.. Do you have any sources which I can refer to learn how to include Python codes in HTML? I use Python 3.6.5. I found this link here but this syntax does not seem to work in VSCode 2015.
Why do you want to include Python inside HTML?
When we want to print the ranklist consisting of various usernames, I could not get any method other than using a Python for loop inside the HTML code. But then the problem is that how can I use the variables in server.py in the HTML code.
Let's not reinvent PHP here. Could you open a PR and let us look at the code?
As for the python + html you'll need to use bottle's simple template language for now
% for name, rank, score in people :
<tr>
<td>{{name}}</td>
<td>{{score}}</td>
<td>{{rank}}</td>
</tr>
% end
This is the part of the code from Rankings.html . First of all, there is no variable such as "people". Second, this code is being printed as it is in the browser. I needed help with this issue. Although, I will use template functions only here for using Python code in HTML. @theSage21
@arnabsinha99 please open a PR. There are so many things that could be going wrong. I need to see the code before saying anything. At the very least post a screenshot of the browser page that is showing this behavior.
For this issue can we just have one overall ranking and individual contest rankings for now?
this actually meant something like "rank by efficiency", "rank by points", "rank by speed of solving" etc. What you're talking about is a contest Leaderboard and an overall leaderboard right?
@theSage21 Okay. Yes. That was what I meant.