A fake evaluator for onsite contest
Review Request #163 - Created May 4, 2010 and updated
Information | |
---|---|
Victor Rusu | |
infoarena | |
Reviewers | |
hackers | |
The evaluator behaves like the monitor, but hides the scores. At the push of a button, with the magic of javascript, it gives the impression that the sources are actually evaluated live, but instead it just waits a random amount of time until it shows the previously computed score.
-
trunk/www/controllers/liveeval.php (Diff revision 1) -
You should use usernames instead of ids.
-
trunk/www/controllers/liveeval.php (Diff revision 1) -
I understand these are mainly copy paste functions from the real monitor. Maybe you should document the changes?
-
trunk/www/views/liveeval.php (Diff revision 1) -
You should check if a tbody exists.
-
trunk/www/views/liveeval.php (Diff revision 1) -
typo: evalueaza
-
trunk/www/views/liveeval.php (Diff revision 1) -
Do you need the evil trailing space?
-
trunk/common/round.php (Diff revision 1) -
Why did you do this? I am a bit tired right now but isn't algoritmiada a classic contest?
-
trunk/www/controllers/liveeval.php (Diff revision 1) -
Functions that are db related should be in common/ or in common/db. In this case everythin except controller_liveeval should go to common/db/job.php
-
trunk/www/views/liveeval.php (Diff revision 1) -
if (...) { }
I am not saying "ship it" to this because the change is a very weird hack and I would like Bogdan to take a look too (not to have any major bugs or security leaks - in the liveeval monitor users can see the scores with firebug). We should revert this change after algoritmiada and rethink a nicer solution for this. Maybe creating a new round type - "onsite-contest" which doesn't have public eval at the end and starts a live eval on admin command. However time is short so let's go with this solution for the moment.
I don't really like the copy-pasting of the database functions and hardcoding the rounds and users. PHP has a cool way of passing Arrays as GET parameters. If I go to monitor?round[]=s&round[]=c&round[]=2 php will give me round = Array('s', 'c', '2'). I think it would be better if our backend methods can actually handle multiple rounds without any problem. We will need this change next year, there's no reason we can't commit a proper one and not have to revert it after Algoritmiada. :)
-
trunk/common/round.php (Diff revision 1) -
Tibi is right, this should not be commented. It makes scores public for *virtual* contests, not for Algoritmiada-type contests.
-
trunk/common/security.php (Diff revision 1) -
This already gets converted into simple-critical above. No need to add it here also.
-
trunk/www/controllers/liveeval.php (Diff revision 1) -
Last year we filtered the users by IP address, it's a much cleaner solution. No need for this, imo.
-
trunk/www/views/liveeval.php (Diff revision 1) -
I'm not sure if this will work on IE (do we actually add tbody to our code?).
-
trunk/www/views/liveeval.php (Diff revision 1) -
We have a projector view that we used for live evals which displays less information (looks better on a projector). Take a look at that.
We're getting there. :)
-
trunk/www/controllers/liveeval.php (Diff revision 2) -
Do you really need separate liveeval_ functions now? I thought the only difference between them is that you can filter by multiple rounds. It would be better to modify the existing functions to support filtering by multiple rounds (if $rounds is array then {something} else {original})