-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat(report_bot): add a leaderboard #119
Open
pythonbrad
wants to merge
20
commits into
osscameroon:main
Choose a base branch
from
pythonbrad:reportquiz_leaderboard
base: main
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.
Open
Conversation
This file contains 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
In saving the quiz data, we will be able to retrieve the submitted answers and build the leaderboard
This commit introduces the following changes: - Added a function `get_user_answers` and `fetch_quiz_data` to be able to get the user quiz answers and update the quiz_data database - Restricted the quiz answers to one answer submission per user per quiz
pythonbrad
force-pushed
the
reportquiz_leaderboard
branch
2 times, most recently
from
August 24, 2024 10:34
3280748
to
48e548f
Compare
pythonbrad
force-pushed
the
reportquiz_leaderboard
branch
from
August 24, 2024 10:53
48e548f
to
d3cc3da
Compare
When a quiz_data is created, the user_answers field is not present and the addition can't proceed. As change, we will use an empty value in this case
- added the possibility to generate and send the leaderboard
Stop all the active quiz, submit the result and archive the quiz data
Added a friendly announcement message. Additonnal change - moved the price calculation from `generate_leaderboard` to `compute_total_score`. - fixed issue when a quiz data contains no user answer submission during the score computation
- Added the start new competition action - Added the fetching of the quiz user answers - Added the backup of the data using git - Added the ending of a current competition
@Sanix-Darker , @elhmn , this pr is ready for review. |
The close competition fail during the closing of a already closed quiz. Since the status of this process is not important, we will ignore it. Like that the closing of the competition can proceed.
This commit handles the case when there is no results during the closing of the competition.
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.
Related issues
Change
TODO
stderr
escp
inutils/function.sh
Notice
I plan to use a git repo as a database. Hence, the report_quiz action will hold a private repo.
git commit -m "Added a new quiz"
git commit -m "Added new user answers to quiz:<quiz_id>"
git commit -m "Closed quiz:<quiz_id> and generated result"
Useful link