Add endpoint to reset students' start date for timed exams
This PR implements a new feature that allows instructors to reset the start date/time for students who have already started timed exams. This addresses scenarios where students need to restart their exam timer due to technical issues or other circumstances.
Changes Made
Backend Implementation
-
New endpoint:
POST /courses/reset_start_datethat resets thedate_startedfield toNonefor selected submissions - Permission checks: Ensures only course instructors can reset start dates
-
Audit logging: Added
RESET_START_DATEevent type to track when instructors reset student timers - Comprehensive logging: Records which user performed the reset and the previous start date value
Frontend Enhancement
-
Enhanced UI: Extended the existing
/courses/manage_timeinterface with "Reset Start Date" buttons for each student - Safety measures: Added confirmation dialog to prevent accidental resets
- Clear feedback: Success messages inform instructors which assignments were reset and confirm students can restart timers
- Consistent design: Integrates seamlessly with existing time management controls
User Experience
The feature works within the existing course management workflow:
- Instructors navigate to the course's "Manage Time" page
- Select one or more timed assignments using the existing multi-select interface
- Click "Reset Start Date" for any student who needs their timer reset
- Confirm the action through a safety dialog
- Student can now restart their exam timer as if taking it for the first time
The implementation is minimal and focused, leveraging the existing time management infrastructure rather than creating entirely new components. All changes maintain backward compatibility and include proper error handling and validation.
Fixes #64.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
@acbart 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.
I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.