Describe the bug
Database contains this information for a specific gradeable:
# select g_id,g_grade_start_date from gradeable where g_id='final';
g_id | g_grade_start_date
-------+------------------------
final | 2024-08-15 23:59:59-04
# select g_id,eg_submission_due_date from electronic_gradeable where g_id='final';;
g_id | eg_submission_due_date
-------+------------------------
final | 2024-08-23 23:59:59-04
Loading the main course page/gradeables page caused a frog robot crash!
23:54:38 08/15/2024 - FATAL ERROR
app\exceptions\ValidationException (Code: 0) thrown in /usr/local/submitty/site/app/models/gradeable/Gradeable.php (Line 873) by:
throw new ValidationException('Date validation failed', $errors);
Message:
Date validation failed
Stack Trace:
#0 /usr/local/submitty/site/app/models/gradeable/Gradeable.php(960): app\models\gradeable\Gradeable->assertDates()
#1 /usr/local/submitty/site/app/models/gradeable/Gradeable.php(436): app\models\gradeable\Gradeable->setDates()
#2 /usr/local/submitty/site/app/libraries/database/DatabaseQueries.php(6488): 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/libraries/database/DatabaseRowIterator.php(34): app\libraries\database\DatabaseRowIterator->next()
#6 /usr/local/submitty/site/app/libraries/database/AbstractDatabase.php(194): app\libraries\database\DatabaseRowIterator->__construct()
#7 /usr/local/submitty/site/app/libraries/database/DatabaseQueries.php(6588): app\libraries\database\AbstractDatabase->queryIterator()
#8 /usr/local/submitty/site/app/models/gradeable/GradeableList.php(86): app\libraries\database\DatabaseQueries->getGradeableConfigs()
#9 /usr/local/submitty/site/app/controllers/NavigationController.php(19): app\models\gradeable\GradeableList->__construct()
#10 unknown file(unknown line): app\controllers\NavigationController->navigationPage()
#11 /usr/local/submitty/site/app/libraries/routers/WebRouter.php(268): call_user_func_array()
#12 /usr/local/submitty/site/app/libraries/routers/WebRouter.php(246): app\libraries\routers\WebRouter->run()
#13 /usr/local/submitty/site/public/index.php(149): app\libraries\routers\WebRouter::getWebResponse()
Extra Details:
submission_due_date: Submission Due Date must come before Grading Open Date
Expected behavior
I believe we wanted to prevent this date inequality from being violated in the database, but somehow it got saved. We should not crash this badly if the dates are set like this.
Additional context
Dates are too complicated and problematic. Not all gradeables need all dates. We want to loosen these inequalities and just let instructors set what makes sense. (Not sure if I've already written these thoughts up in another issue).
Describe the bug
Database contains this information for a specific gradeable:
Loading the main course page/gradeables page caused a frog robot crash!
Expected behavior
I believe we wanted to prevent this date inequality from being violated in the database, but somehow it got saved. We should not crash this badly if the dates are set like this.
Additional context
Dates are too complicated and problematic. Not all gradeables need all dates. We want to loosen these inequalities and just let instructors set what makes sense. (Not sure if I've already written these thoughts up in another issue).