I will soon be starting the initial coding on the edit_week handler that can be used by a commissioner to modify the slate of weekly games (ie. the pick sheet as it is called). This will be heavily based on create_week, but will have some additional checks in place to make sure the database is not modified improperly. It will probably use much of the infrastructure of create_week. There are two main differences between create_week and edit_week:
create_week starts with a blank slate, whereas edit_week must query the database for its starting data.
Once the data is properly vetted, create_week can always put everything to the database, whereas edit_week will be limited by the current state of the week.
This was covered in Issue #10, but I will recap here.
After a pick sheet is created with create_sheet, it can be edited as follows:
If no player has submitted any picks using that pick sheet, the entire pick sheet is up for grabs (ie. any edits will be accepted).
To address the race condition where a pooler has started the process of making picks but has not successfully submitted them, the code that accepts a pooler's picks will check the timestamp of the pick sheet to make sure it agrees with that of the current pick sheet.
If one or more players have submitted picks, then no edits will be allowed except to mark a game as aborted.
This might be because the pick sheet had an incorrect matchup of teams, or for some reason that game was not played (weather, plane crash, terrorist attack, etc.).
If all the games have been completed/finalized, then no edits of any kind will be allowed (should still show the pick sheet).
I will soon be starting the initial coding on the edit_week handler that can be used by a commissioner to modify the slate of weekly games (ie. the pick sheet as it is called). This will be heavily based on create_week, but will have some additional checks in place to make sure the database is not modified improperly. It will probably use much of the infrastructure of create_week. There are two main differences between create_week and edit_week:
This was covered in Issue #10, but I will recap here.
After a pick sheet is created with create_sheet, it can be edited as follows: