-
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
Contests and Questions tracker #60
Comments
@cjchirag7 @NBNARADHYA see if it's fine |
Suggested changes :
Rest looks good to me. |
@ridhishjain main table headers as checkboxes instead of individual fields looks cleaner I think ? |
@ridhishjain Also could you keep the tables task in another issue ? and assign it to me also give edit access to me so that I can make changes to issue as and when I create tables and make PRs ? |
@ridhishjain Could u make those checkboxes as well? Table names ? |
working on it |
these changes are incorporated |
We need the following endpoints for tags -
|
added, schema created as well |
@ridhishjain change getModeratorQuestions to getEditorQuestions |
Once these endpoints are completed, we can also create an endpoint to download the whole leaderboard data of a contest as "CSV" and the details of all group members as "CSV", using csv-express |
Yeah once getter APIs get merged, i'll update the checks here and APIs in postman as well |
For generating, automatic notifications, when someone is added / removed from a group, we can generate automatic notifications using MySQL Triggers - AFTER DELETE Trigger and AFTER INSERT TRIGGER. I shall send it in a separate PR, later. |
Only getter for practice leaderboard is remaining as of now. |
Tables
contests
tablecontests_groups_map
tablecontests_moderators_map
tablecontests_participants_map
tablequestions
tablequestions_editors_map
tabletags
tablequestions_tags_map
tablecontests_questions_map
tablemcq_submissions
tablesubjective_submissions
tableleaderboard
tableAPI
Contests API
createContest
POST /contests/
Admin onlyupdateContest
POST /contests/:contest_id/update
Moderator onlyaddModerator
POST /contests/:contest_id/moderator
Moderator onlyremoveModerator
DELETE /contests/:contest_id/moderator
Moderator onlyaddGroup
POST /contests/:contest_id/:groups
Moderator onlyremoveGroup
DELETE /contests/:contest_id/groups
Moderator onlygetContests
GET /contests?status=active&limit=5
getModeratorContests
GET /contests/moderator_contests?limit=5
Moderator onlygetContest
GET /contests/:contest_id
getContestDetails
GET /contests/:contest_id/details?only_name=false
Moderator onlygetContestModerators
GET /contests/:contest_id/moderators
Moderator onlygetAllParticipants
GET /contests/:contest_id/participants
getAllParticipantsDetails
GET /contests/:contest_id/participants_details
Moderator onlyparticipate
POST /contests/:contest_id/participate
addQuestion
POST /contests/:contest_id/:questions
removeQuestion
DELETE /contests/:contest_id/questions
getAllQuestions
GET /contests/:contest_id/questions
getQuestion
GET /contests/:contest_id/questions/:question_id
Questions API:
createQuestion
POST /questions/
Admin only: to create a questiongetModeratorQuestions
GET /questions/moderator_questions?limit=5&search=’’
Moderator only: show the questions for which user is a moderatorgetQuestion
GET /questions/:question_id
, Editor only: to get the questionupdateQuestion
POST /questions/:question_id/update
, Editor only: to edit the questions, the change will be reflected in all instances of the questiongetAllQuestions
GET /questions/
: - send all public questions with their contest_id (for practice section)addEditor
POST /questions/:question_id/editor
Editor only: Add editor to a questionremoveEditor
DELETE /questions/:question_id/editor
Editor only: Remove editor to a question (creator can't be removed)forkQuestion
POST /questions/:question_id/fork
Editor only: Return the id of the forked new questionSubmissions API
createSubmission
POST /contests/:contest_id/questions/:question_id/submit
All participants: everyone eligible for the contest should be allowed (For MCQ, allow only 1 attempt)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.getPracticeLeaderboard
GET /practice/leaderboard
: accessible to allTags API:
createTag
POST /tag
Admin only:getTag
GET /tag?search=keyword
The text was updated successfully, but these errors were encountered: