Skip to content

fix: missing team report system#492

Open
hadiafifah wants to merge 4 commits intomainfrom
fix/missing-team-report
Open

fix: missing team report system#492
hadiafifah wants to merge 4 commits intomainfrom
fix/missing-team-report

Conversation

@hadiafifah
Copy link
Copy Markdown
Contributor

@hadiafifah hadiafifah commented Apr 16, 2026

Summary

This PR adds an admin recovery flow for missing teams: admins can now mark a team as present and restore it back to relevant judges’ queues.

What Changed

Backend

  • Added restoreMissingTeam(team_id) in the teams missing-report action module.
  • Enforced admin-only access inside the action (auth() + role check).
  • Restore logic now:
    • Collects unique judge IDs from team.reports.
    • For each reporting judge, requeues the team to the end only if: the submission exists for that judge/team, and is_scored === false.
    • Skips scored submissions (existing judged work is preserved).
    • Sets team.active = true.
    • Clears team.reports after successful processing.

Admin UI (/admin/teams)

  • Added a team-level action button and helper text on reported teams
  • Added confirmation prompt before execution

Behavior Notes

  • Only judges who reported the team missing and still have an unscored submission are requeued.
  • Non-reporting judges are unaffected.
  • Scored submissions are not modified.

Fixes #466

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix missing team report system

1 participant