PyJudge icon indicating copy to clipboard operation
PyJudge copied to clipboard

Multiple Ranking Systems

Open theSage21 opened this issue 7 years ago • 15 comments

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

theSage21 avatar Jan 25 '19 08:01 theSage21

@arnabsinha99 could you take this up?

theSage21 avatar Jan 25 '19 08:01 theSage21

Yeah alright. I would need help in the HTML part though.

arnabsinha99 avatar Jan 25 '19 11:01 arnabsinha99

Perhaps you can do that once #34 is finished?

theSage21 avatar Jan 25 '19 11:01 theSage21

Perhaps you can do that once #34 is finished?

Finished #34

HeroicHitesh avatar Jan 26 '19 11:01 HeroicHitesh

Yeah alright. I would need help in the HTML part though.

I can help with that.

HeroicHitesh avatar Jan 26 '19 11:01 HeroicHitesh

@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.

arnabsinha99 avatar Feb 02 '19 13:02 arnabsinha99

Why do you want to include Python inside HTML?

theSage21 avatar Feb 02 '19 13:02 theSage21

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.

arnabsinha99 avatar Feb 02 '19 13:02 arnabsinha99

Let's not reinvent PHP here. Could you open a PR and let us look at the code?

theSage21 avatar Feb 02 '19 14:02 theSage21

As for the python + html you'll need to use bottle's simple template language for now

theSage21 avatar Feb 02 '19 14:02 theSage21

% 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 avatar Feb 07 '19 19:02 arnabsinha99

@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.

theSage21 avatar Feb 08 '19 00:02 theSage21

For this issue can we just have one overall ranking and individual contest rankings for now?

rishabhKalakoti avatar May 10 '19 13:05 rishabhKalakoti

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 avatar May 10 '19 13:05 theSage21

@theSage21 Okay. Yes. That was what I meant.

rishabhKalakoti avatar May 10 '19 13:05 rishabhKalakoti