-
Notifications
You must be signed in to change notification settings - Fork 3
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
API for viewing submissions and leaderboard #90
API for viewing submissions and leaderboard #90
Conversation
Maybe, it's better if I send a PR after this, for schema validation of some of these endpoints, because the endpoints which contain pagination involve a lot of query params and if invalid, may cause many errors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks fine to me
lets wait for @NBNARADHYA
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes regarding count; Since it has expensive checks, it can be made better using multiple statement queries. Also, follow this guide for getting count without making more checks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can change this to multiple statements query if performance is slow later on. For now, LGTM !
The following API's are completed-
getAllSubmissions
GET /contests/:contest_id/submissions
Contest Moderator only: See all submissions (pagination, sorting, filtering and searching enabled)getUserContestSubmissions
GET /contests/:contest_id/users/:user_id/submissions
The user only: get all submissions of a usergradeSubjectiveSubmission
POST /contests/:contest_id/subjective_submissions/:submission_id/grade
Contest Moderator only: Grade a subjective submission providing a score along with an optional feedback. (If submission is already judged/graded, update it)getMCQSubmission
GET /contests/:contest_id/mcq_submissions/:submission_id
Only the specific user: Get a specific MCQ submissionGET /contests/:contest_id/mcq_submissions/:submission_id?moderator=true
Contest Moderator only: Get a specific MCQ submissiongetSubjectiveSubmission
GET /contests/:contest_id/subjective_submissions/:submission_id
Only the specific user: Get a specific subjective submission.GET /contests/:contest_id/subjective_submissions/:submission_id?moderator=true
Contest Moderator only: Get a specific subjective submissiongetContestLeaderboard
GET /contests/:contest_id/leaderboard
All participants: Everyone should be allowed, ifshow_leaderboard
is true, otherwise allow only contest moderators.getQuestionLeaderboard
GET /contests/:contest_id/questions/:question_id/leaderboard
:Everyone should be allowed, ifshow_leaderboard
is true, otherwise allow only contest moderators.#60