Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding TA Timers #322

Merged
merged 11 commits into from
Oct 27, 2024
Merged

Adding TA Timers #322

merged 11 commits into from
Oct 27, 2024

Conversation

ryantanen
Copy link
Contributor

@ryantanen ryantanen commented Oct 13, 2024

This PR adds a countdown timer setting to Queues. With this setting enabled, every question will contain a countdown from when the Staff starts answering the question. This countdown can be configured to a time suitable for that course/queue. At 0:00, a sound effect is played + notification, and the time continues into negatives. This signifies it is time for the TA to move on to a new student.

The two separate Queue Forms (Creating and Updating) have been centralized into one component and separate parent components to allow the forms to differ if needed. Also created a better system for optional flags for the Queue Type to allow it to be easier to add more beyond Rate Limits.

Backend - Added 2 new fields to Queue to handle timer settings.

@ryantanen ryantanen marked this pull request as ready for review October 13, 2024 17:05
}
>;

// export type Queue =
Copy link
Contributor

Choose a reason for hiding this comment

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

Delete commented code.

return (
<>
<Form.Field>
<label htmlFor="form-name">Name</label>
Copy link
Contributor

Choose a reason for hiding this comment

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

Mark required fields as required.

// Play a sound effect when hit zero (once)
useEffect(() => {
if (minutes + seconds === 0) {
if (!checkPermissions())
Copy link
Contributor

Choose a reason for hiding this comment

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

Make sure null behavior is consistent.

@ryantanen ryantanen merged commit 524282d into master Oct 27, 2024
5 checks passed
@ryantanen ryantanen deleted the feature/ta-timer-v2 branch October 27, 2024 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants