Fix duplicate student registration bug and add 6 new extracurricular activities#2
Draft
Fix duplicate student registration bug and add 6 new extracurricular activities#2
Conversation
Author
|
@heathermathies-accesso 👋 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. |
- Add validation to prevent students from registering twice for same activity - Add 2 sports activities: Basketball Team, Swimming Club - Add 2 artistic activities: Art Studio, Drama Club - Add 2 intellectual activities: Debate Team, Science Club - All activities include realistic schedules and participant limits - Tested duplicate registration prevention via web interface Co-authored-by: heathermathies-accesso <114941769+heathermathies-accesso@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Exercise: Getting Started with GitHub Copilot
Fix duplicate student registration bug and add 6 new extracurricular activities
Aug 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses the duplicate registration bug in the Mergington High School Activities system and expands the available extracurricular activities as part of the GitHub Copilot exercise.
Bug Fix: Duplicate Registration Prevention
The original
signup_for_activityfunction allowed students to register multiple times for the same activity, creating duplicate entries in the participants list. This has been fixed by adding validation:Before: Students could register multiple times, creating duplicates like:
After: Duplicate registrations return HTTP 400 with clear error message.
New Activities Added
Expanded the activities database from 3 to 9 activities, adding variety across different interest areas:
Sports Activities (2 new)
Artistic Activities (2 new)
Intellectual Activities (2 new)
All new activities include realistic schedules, participant limits, and empty participant lists ready for signups.
Testing
Fixes #1.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.