-
Notifications
You must be signed in to change notification settings - Fork 150
Add foldered "medal" awards #988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
TheodorKitzenmaier
wants to merge
23
commits into
pwncollege:master
Choose a base branch
from
TheodorKitzenmaier:eventAwards
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Add foldered "medal" awards #988
TheodorKitzenmaier
wants to merge
23
commits into
pwncollege:master
from
TheodorKitzenmaier:eventAwards
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added a new "medals" group to the Emojis database. Added a utility method to grant a medal to a user.
Added Event Emoji cases to `get_viewable_emojis`.
Popups now have a custom message for event medals.
Granting of event awards is now at API/dojo/<dojo>/event/grant. - Takes a POST request, with `user_id`, `event_name`, and `place` as arguments. Added a `dojo_gives_awards` decorator. - Requires the dojo to have `grant_awards` as part of its *permissions*.
Found at `API/dojo/<dojo>/event/revoke` - Takes in `user_id` and `event_name` as JSON arguments.
Added fixtures for an event dojo and random event name. - Admin creates a dojo and a sql update adds grant_awards to its permissions. Added a dojo YML for an event/medal dojo.
Test granting, revoking, and pruning. Test error handling.
Logged "error" entry in response json for failing tests.
Added expiration to emojis, and added foldering to normal emojis. - Partially removed Medals.
Grant medals in the emoji table. - Follow the normal emoji format.
Updated the Medal API to take an expiration date, and removed prune/revoke options.
Removed an old placeholder event testing API
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds support for a new type of awards, "medals".
Medals can be granted for first, second or third place, and are tied to the name of an event on the dojo. Medals are granted by admins of any dojo which has the
grant_awardspermission. There is support for granting, revoking, and pruning event awards.They are displayed alongside normal emoji awards, however if a user has multiple medals of the same tier, they will be foldered. In practice, this means that only a single medal will show, however the description shown when hovering over the award will show all events that tier of medal was won in.
This feature is part of my Capstone project at ASU to support competitive events on the dojo infrastructure.