Repository navigation
Improve student activity registration system - #2
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Unescaped participant emails rendered through innerHTML enable stored XSS for anyone viewing the activity list.
2 open issues
What changed in this PR
This PR extends the student activity app with participant removal and visible participant lists, supported by API tests and updated documentation.
Changes:
- Adds an unregister endpoint and duplicate-signup validation.
- Displays participants with removal controls and refreshes activity data after changes.
- Expands sample activities and adds isolated API tests.
| File | Description |
|---|---|
tests/test_activities_api.py |
Tests activity listing, signup, unregister, and error cases. |
tests/conftest.py |
Provides a test client and restores activity data between tests. |
src/static/styles.css |
Styles participant lists and removal buttons. |
src/static/app.js |
Displays participants, handles removal, and refreshes activity data. |
src/README.md |
Documents participant removal and its API endpoint. |
src/app.py |
Adds unregister support, duplicate checks, and sample activities. |
requirements.txt |
Adds pytest for API testing. |
Review effort: Balanced
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 pull request adds the ability to unregister participants from activities, enhances the frontend to display and manage participants for each activity, expands the set of example activities, and introduces comprehensive API tests. The changes improve both backend and frontend functionality, as well as overall test coverage.
Backend API enhancements:
/activities/{activity_name}/participants?email=...to allow unregistering a participant from an activity, including error handling for non-existent activities and participants.Frontend improvements:
Documentation updates:
README.mdto document the new unregister feature and API endpoint. [1] [2]Testing: