Describe the bug
The dates for a bulk upload gradeable were edited by an instructor in the UI and we ended up in a very bad state. The entire course became inaccessible for all users (students, TAs, & instructors).
Message:
Date validation failed
Stack Trace:
#0 /usr/local/submitty/site/app/models/gradeable/Gradeable.php(878): app\models\gradeable\Gradeable->assertDates()
#1 /usr/local/submitty/site/app/models/gradeable/Gradeable.php(366): app\models\gradeable\Gradeable->setDates()
#2 /usr/local/submitty/site/app/libraries/database/DatabaseQueries.php(6205): app\models\gradeable\Gradeable->__construct()
#3 unknown file(unknown line): app\libraries\database\DatabaseQueries->app\libraries\database\{closure}()
#4 /usr/local/submitty/site/app/libraries/database/DatabaseRowIterator.php(52): call_user_func()
#5 /usr/local/submitty/site/app/models/gradeable/GradeableList.php(86): app\libraries\database\DatabaseRowIterator->next()
#6 /usr/local/submitty/site/app/controllers/NavigationController.php(20): app\models\gradeable\GradeableList->__construct()
#7 unknown file(unknown line): app\controllers\NavigationController->navigationPage()
#8 /usr/local/submitty/site/app/libraries/routers/WebRouter.php(254): call_user_func_array()
#9 /usr/local/submitty/site/app/libraries/routers/WebRouter.php(232): app\libraries\routers\WebRouter->run()
#10 /usr/local/submitty/site/public/index.php(147): app\libraries\routers\WebRouter::getWebResponse()
Extra Details:
submission_due_date: Submission Due Date must come before Grading Open Date
USER: REDACTED
URL: https://submitty.cs.rpi.edu//courses/f25/REDACTED
=-=-=-=-=-=-=
The instructor had initially set many/all of the dates 1 year in the future. (year 2026).
I believe what happen is that the instructor later changed the grading open date to year 2025 before changing the submission due date to 2025.
To fix the problem I had to manually edit the database to set the grading open date back to 2026. I did try to edit the submission due date to 2025, but that was rejected by a constraint.
Sorry, I did not record the settings of all the dates at the time of the problem, but this is what they look like now, which is not broken:
Expected behavior
We should not fail this badly on inconsistent dates.
We eventually want to remove all date constraints, they are too complicated to enforce since not all gradeables have all dates (non-team gradeables don't have a team lock date, etc.) and there are real world use cases where instructors want to set inconsistent dates. (allow excused absence submissions after grading has begun, etc.)
Describe the bug
The dates for a bulk upload gradeable were edited by an instructor in the UI and we ended up in a very bad state. The entire course became inaccessible for all users (students, TAs, & instructors).
The instructor had initially set many/all of the dates 1 year in the future. (year 2026).
I believe what happen is that the instructor later changed the grading open date to year 2025 before changing the submission due date to 2025.
To fix the problem I had to manually edit the database to set the grading open date back to 2026. I did try to edit the submission due date to 2025, but that was rejected by a constraint.
Sorry, I did not record the settings of all the dates at the time of the problem, but this is what they look like now, which is not broken:
Expected behavior
We should not fail this badly on inconsistent dates.
We eventually want to remove all date constraints, they are too complicated to enforce since not all gradeables have all dates (non-team gradeables don't have a team lock date, etc.) and there are real world use cases where instructors want to set inconsistent dates. (allow excused absence submissions after grading has begun, etc.)