This repository was archived by the owner on Nov 28, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
General behavior:
user
will be stored with a random 32-character string, that represents that user'suser_id
. Theuser_id
is used to avoid one user occupying multiple slots on the leaderboard.claimed_wpm
) greater thanMAX_UNVERIFIED_WPM = 90
, they have to complete a Captcha in a timed manner.CAPTCHA_SLOWDOWN_FACTOR = 0.7
times their claimed wpm, to qualify for the leaderboard. Their accuracy must be at leastCAPTCHA_ACCURACY_THRESHOLD = 70
to pass the Captcha.token
will be stored authenticating that(user_id, claimed_wpm)
tuple, so future attempts will not require confirmation. However, they will never qualify for the leaderboard unless they beat their previous time, so this cookie isn't really necessary.Risks:
user
cookie to obtain multiple spots on the leaderboard. However, this would require them to complete the Captcha challenge multiple times, since thetoken
stores theiruser_id
. There's no easy way to avoid this short of using OKPy authentication, which I don't want to do since it can't be used for the SIGCSE version (and is annoying to implement).Future improvements:
gui.py
and are handled by student code.