Skip to content

Conversation

@bbearce
Copy link
Collaborator

@bbearce bbearce commented Feb 21, 2024

Issue description

Some pages aren't showing if you are not in a phase.

Issues this PR resolves

A checklist for hand testing

  • Upload competition
  • Delete all but one phase
  • Make sure you can access all html pages
  • Repeat for pre-existing and manually created challenges

Any relevant files for testing

iris_competition_bundle_vetted.zip

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

What was the actual problem?

@bbearce
Copy link
Collaborator Author

bbearce commented Feb 21, 2024

So elusive man. Phases have these two types of statuses. status and is_final_phase. Generally speaking if the phase status is current then everything works out fine. In our case is there is no current phase and there is some JavaScript trying to look up in that case if the is_final_phase of any phase in this challenge is the final phase. That part wasn't working because even if you only have one phase there was no guarantee it was the final. To me it was a back end bug where if a challenge only has one phase it needs to always say that it is the final phase in the data base. It wasn't doing that and it was getting kind of tricky for me to figure out. So instead of hacking the front end to just figure out if there's only one phase and force the issue, I decided to change the back end to adjust the phase's attribute appropriately.

@Didayolo Didayolo linked an issue Feb 21, 2024 that may be closed by this pull request
@Didayolo
Copy link
Member

@bbearce By default is_final_phase is False? Where is it defined?

@Didayolo Didayolo merged commit 1ca4c3e into develop Feb 21, 2024
@Didayolo Didayolo deleted the issue_1180_manual_ui_creation branch February 21, 2024 19:34
@ihsaan-ullah
Copy link
Collaborator

ihsaan-ullah commented Feb 21, 2024

First, great work BB.

I think this 'is_final_phase' is not needed. We can remove it from the model and remove this logic. But maybe in another PR. The db design is not what i would do in this case

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.

Manual Competition Creation has bug with pages not able to be shown

4 participants