Skip to content

Conversation

@ihsaan-ullah
Copy link
Collaborator

@ihsaan-ullah ihsaan-ullah commented Jun 12, 2023

@ mention of reviewers

@Didayolo

A brief description of the purpose of the changes contained in this PR.

Phases api (example: https://www.codabench.org/api/phases/1215/) was giving null status and status was not used in the UI to allow or block user from submiting to a phase which has started/ended etc.

Now this is fixed.

Issues this PR resolves

#931

What is changed?

  • Phases api ( https://www.codabench.org/api/phases/) fixed to add a valid status instead of null
  • Used these 3 statuses (1. Previous, 2. Current, 3. Next)
  • Serializer modified to return correct status
  • Phase start/end logic based on start date and end date replaced by status in the UI submission panel
  • Admin as well as participants are allowed to see submission panel
  • error/warning messages are displayed to both admin and participant for not started and ended phases

Screenshots

API with valid status:
Screenshot 2023-06-13 at 1 03 28 AM

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer
  • Hand tested by reviewer
  • CircleCi tests are passing
  • Ready to merge

@ihsaan-ullah
Copy link
Collaborator Author

ihsaan-ullah commented Jun 12, 2023

@Didayolo there is one problem with the status: It is never updated because there is no action for updating status so it always remains null

This cannot be done manually because there is no scenario where you can change status. Status depends on competition dates. Either this should be removed from the Phase Model or updated automatically by a cron job or something similar

In any case, a new issue should be opened about this

@Didayolo Didayolo self-assigned this Jun 15, 2023
@Didayolo Didayolo merged commit 283360d into develop Jun 16, 2023
@Didayolo Didayolo deleted the phase_status_null branch June 16, 2023 13:01
This was referenced Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants