wolfe3d / sodata

Science Olympiad Data
GNU General Public License v3.0
3 stars 2 forks source link

Events, Time Blocks Issue #26

Closed chinmay314 closed 1 year ago

chinmay314 commented 2 years ago

Similar to how the site currently allows us to remove students from a team when they still have events, the site also allows us to remove events from time blocks without removing the teams that were assigned to them. Currently it needs us to uncheck the teams first, then remove them from the time block. I will see if I can implement a warning system for both ASAP.

I encountered this error when fixing the time blocks for UGA.

wolfe3d commented 2 years ago

I made some edits to the teamedit page to add to the warning system. I changed how you were return values. Use the exit() function to end a php script with an error. However, I have not added a warning for removing a student from a team when they still have events. I figured you could do this, so I left a todo marker for you as to where to add this.

wolfe3d commented 1 year ago

I believe I added sufficient blocking of events that might deteriorate the database. You can no longer remove a possible timeblock unless it is not assigned. You can no longer remove an event unless there is not a timeblock, and no students are assigned to it.