Skip to content

[Bugfix:InstructorUI] Fix Admin Gradeable's Team Lock Date#11981

Merged
bmcutler merged 1 commit into
mainfrom
fix-team-lock-date
Aug 7, 2025
Merged

[Bugfix:InstructorUI] Fix Admin Gradeable's Team Lock Date#11981
bmcutler merged 1 commit into
mainfrom
fix-team-lock-date

Conversation

@williamschen23

@williamschen23 williamschen23 commented Aug 6, 2025

Copy link
Copy Markdown
Contributor

Why is this Change Important & Necessary?

#11702 Magic Methods PR stated that team_lock_date is ?DateTime, which is true, but getting the value actually returns a DateTime, casuing a frog robot crash

Oh no! Something irrecoverable has happened...
app\exceptions\OutputException (Code: 0) thrown in /usr/local/submitty/site/app/libraries/Output.php (Line 412) by:
            throw new OutputException("{$e->getMessage()} in {$e->getFile()}:{$e->getLine()}");
Message:
An exception has been thrown during the rendering of a template ("app\models\gradeable\Gradeable::getTeamLockDate(): Return value must be of type DateTime, null returned") in "admin/admin_gradeable/AdminGradeableDates.twig" at line 14. in /usr/local/submitty/site/app/templates/admin/admin_gradeable/AdminGradeableDates.twig:14
Stack Trace:
#0 /usr/local/submitty/site/app/libraries/Output.php(425): app\libraries\Output->renderTwigTemplate()
#1 /usr/local/submitty/site/app/controllers/admin/AdminGradeableController.php(617): app\libraries\Output->renderTwigOutput()
#2 /usr/local/submitty/site/app/controllers/admin/AdminGradeableController.php(32): app\controllers\admin\AdminGradeableController->editPage()
#3 unknown file(unknown line): app\controllers\admin\AdminGradeableController->editGradeableRequest()
#4 /usr/local/submitty/site/app/libraries/routers/WebRouter.php(254): call_user_func_array()
#5 /usr/local/submitty/site/app/libraries/routers/WebRouter.php(232): app\libraries\routers\WebRouter->run()
#6 /usr/local/submitty/site/public/index.php(147): app\libraries\routers\WebRouter::getWebResponse()
USER: instructor

What is the New Behavior?

Like all other dates, team lock date now returns the correct value, ?\DateTime

What steps should a reviewer take to reproduce or test the bug or new feature?

Automated Testing & Documentation

We should check creating and modifying dates for a checkpoint gradeables
#11982 11982

Other information

@codecov

codecov Bot commented Aug 6, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 21.75%. Comparing base (ce093e1) to head (e7442b4).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #11981   +/-   ##
=========================================
  Coverage     21.75%   21.75%           
  Complexity     9459     9459           
=========================================
  Files           267      267           
  Lines         36146    36146           
  Branches        474      474           
=========================================
  Hits           7863     7863           
  Misses        27813    27813           
  Partials        470      470           
Flag Coverage Δ
autograder 21.31% <ø> (ø)
js 2.07% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.76% <0.00%> (ø)
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 90.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jeffrey-cordero jeffrey-cordero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The small fix looks good, as the error no longer persists because the return type now matches all the other date setters. An issue should be made for catching this in a simple Cypress test.

@github-project-automation github-project-automation Bot moved this from Seeking Reviewer to Awaiting Maintainer Review in Submitty Development Aug 6, 2025
@williamschen23 williamschen23 changed the title [Bugfix:InstructorUI] Fix Team Lock Date [Bugfix:InstructorUI] Fix Admin Gradeable's Team Lock Date Aug 6, 2025
@bmcutler
bmcutler merged commit 182a806 into main Aug 7, 2025
30 checks passed
@bmcutler
bmcutler deleted the fix-team-lock-date branch August 7, 2025 01:00
@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Done in Submitty Development Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants