CSC/ECE 517 Fall 2025 - E2552. ProjectTopic and SignedUpTeam
This wiki page describes the changes made for the E2552 OSS assignment in Fall 2025 for CSC/ECE 517.
Peer Review Information
For users intending to view the deployed Expertiza associated with this assignment, the credentials are below:
- Instructor login: username -> admin, password -> password123
- Student login: username -> teststudent, password -> password123
- (Add other relevant student logins if needed)
About Expertiza
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback. The current effort involves reimplementing the application with a Ruby on Rails API backend and a React/Typescript frontend.
Description of the current project (E2552)
This project focuses on the reimplementation of the Project Topic and Signed Up Team functionalities within Expertiza. In Expertiza, assignments can require students or teams to choose a topic. The ProjectTopic class (originally SignUpTopic) manages these topics, and when a team selects one, a SignedUpTeam object is created to link the team and the topic.
This project involved integrating and refining backend code previously developed (but not merged) in project E2513 and implementing the corresponding frontend interface for both instructors and students. The backend work included renaming classes and methods based on prior feedback, improving code structure using ActiveRecord features, optimizing logic, and adding validations. The frontend work involved creating new UI components in React/Typescript to manage and display topics, handle topic selection/signup, and provide distinct views for instructors and students, closely mirroring the existing Expertiza interface.
Files modified/created in current project
Backend (Ruby on Rails API):
- Models:
app/models/project_topic.rb(Created, replacingsign_up_topic.rb)app/models/signed_up_team.rb(Modified extensively)app/models/assignment.rb(Modified associations)app/models/bookmark.rb(Modified association comment)app/models/user.rb(Modified associations)app/models/sign_up_topic.rb(Deleted)
- Controllers:
app/controllers/project_topics_controller.rb(Created, replacingsign_up_topics_controller.rb)app/controllers/signed_up_teams_controller.rb(Modified extensively)app/controllers/assignments_controller.rb(Modifiedassignment_params, comment)app/controllers/sign_up_topics_controller.rb(Deleted)
- Database:
- Migrations created/modified for renaming tables/columns (
sign_up_topic->project_topic) and addingallow_bookmarksto assignments. db/schema.rb(Updated)db/seeds.rb(Updated to useProjectTopic, added test student)
- Migrations created/modified for renaming tables/columns (
- Configuration:
config/routes.rb(Updated forproject_topicsandsigned_up_teamsendpoints)
- Tests (RSpec):
spec/models/project_topic_spec.rb(Created)spec/models/signed_up_team_spec.rb(Created)spec/models/due_date_spec.rb(Modified)spec/routing/project_topics_routing_spec.rb(Created)spec/factories/project_topics.rb(Created)spec/rails_helper.rb(Minor configuration change)spec/routing/sign_up_topics_routing_spec.rb(Deleted)
- Dependencies:
Gemfile,Gemfile.lock(Updated versions, added/removed gems) - Swagger Documentation:
swagger/v1/swagger.yaml(Updated paths and definitions) - Docker:
docker-compose.yml(Updated command)
Frontend (React/Typescript):
- Pages:
src/pages/Assignments/AssignmentEditPage.tsx(Created - Main page for editing assignments with tabs)src/pages/Assignments/tabs/TopicsTab.tsx(Created - Instructor view for managing topics)src/pages/Assignments/tabs/RubricsTab.tsx,ReviewStrategyTab.tsx,DueDatesTab.tsx,EtcTab.tsx,GeneralTab.tsx(Created - Placeholder tabs)src/pages/StudentTasks/StudentTasks.tsx(Created - Student view for signing up for topics)src/pages/Assignments/Assignment.tsx(Modified - Integrated new edit page link)src/pages/Assignments/AssignmentEditor.tsx(Modified - Simplified, as detailed editing moved toAssignmentEditPage)
- Components:
src/components/Table/Table.tsx(Modified - Added row highlighting for selected topics)src/pages/Assignments/components/TopicsTable.tsx(Created - Reusable table component for displaying topics)
- Routing:
src/App.tsx(Modified - Added routes forAssignmentEditPageandStudentTasks)
- Layout:
src/layout/Header.tsx(Modified - Conditionally show Assignments link for students)
- Hooks:
src/hooks/useAPI.ts(Modified - Minor change inthenblock)
- Assets:
public/assets/icons/Check-icon.png(Added)
List of changes / Features Implemented
Based on the project description and feedback from E2513:
Backend:
- Renamed
SignUpTopictoProjectTopic: Refactored the model, controller, routes, database table, associations, and tests to use the new naming convention consistently. - Refactored
SignedUpTeamLogic: Moved business logic from the controller into theSignedUpTeamandProjectTopicmodels, utilizing ActiveRecord features like transactions and scopes. Implemented methods for signing up students/teams, dropping topics, finding participants, and handling waitlists. - Addressed E2513 Feedback:
- Renamed
signup_teammethod tosign_team_upinProjectTopic. - Renamed
signup_for_topicmethod tosign_up_for_topicinSignedUpTeam. - Addressed DRY violation between
find_team_participantsandfind_project_topic_team_users. - Ensured files terminate with a newline.
- Renamed
- Updated
AssignmentModel: Addedallow_bookmarksattribute and updated associations related to topics. - API Endpoints: Created/updated API endpoints for CRUD operations on
ProjectTopicand actions related toSignedUpTeam(signup, drop topic). - Testing: Added comprehensive RSpec tests for
ProjectTopicandSignedUpTeammodels. Updated existing tests (due_date_spec.rb). Added routing specs.
Frontend:
- New Assignment Edit Page: Created
AssignmentEditPagewith a tabbed interface for editing assignments. - Instructor Topics Tab: Implemented
TopicsTabcomponent allowing instructors to:- View/manage topics via
TopicsTable. - Configure topic settings (e.g., allow bookmarks).
- View assigned/waitlisted teams and drop teams.
- Toggle display of user names/IDs.
- Create, import, edit, delete topics via modals.
- View bookmark counts.
- Access Partner Ad functionality (UI added).
- View/manage topics via
- Student Task/Signup Page: Created
StudentTaskspage allowing students to:- View available topics via
TopicsTable. - See available slots and waitlist numbers.
- View their selected topic.
- Select/deselect (drop) a topic.
- Bookmark topics (if enabled).
- View available topics via
- Reusable
TopicsTableComponent: Developed adaptable table for student/instructor views with row expansion, selection, and custom actions. - API Integration: Connected frontend components to backend API for fetching/updating topics, assignment settings, and handling signups/drops.
- UI Enhancements: Added selected topic highlighting, action icons, and modals for various operations.
Testing Details
Backend (RSpec)
New spec files (project_topic_spec.rb, signed_up_team_spec.rb) were created with extensive test coverage for the core models, including various scenarios like signup, waitlisting, dropping teams, and validations. Existing specs (due_date_spec.rb) were updated. Routing specs were added. Tests confirmed the refactored code integrates correctly.
UI Testing
Manual testing was performed following scenarios for instructors and students:
Instructor UI:
- Login as instructor6.
- Navigate to an assignment (e.g., "OSS project & documentation") and click 'Edit'.
- Go to the 'Topics' tab.
- Verify topic list display: Check columns (Checkbox, ID, Name, Questionnaire, Slots, Available, Waitlist, Bookmarks, Actions).
- Verify topic settings: Test checkboxes, especially 'Allow participants to create bookmarks?'. Backend save confirmed via API call.
- Test topic actions:
- Create a new topic via 'New topic' button/modal.
- Edit an existing topic via edit icon/modal.
- Delete topic(s) via delete icon or selecting checkboxes and using 'Delete selected topics'.
- Import topics via 'Import topics' button/modal.
- Expand a topic row to view assigned/waitlisted teams. Test dropping a team via 'X' icon.
- Test 'Display User Names' toggle.
Student UI:
- Login as teststudent.
- Navigate to 'Assignments' via header link.
- Verify signup sheet loads.
- Verify topic list display: Check columns (ID, Name, Available Slots, Num. on Waitlist, Bookmarks [if enabled], Actions).
- Test topic selection: Click checkmark icon. Verify 'Your topic(s)' updates, row highlights yellow, slots update optimistically, and API call is made.
- Test topic deselection (drop): Click 'X' icon on selected topic row. Verify topic is dropped, highlighting removed, slots update, and API call is made.
- Test bookmarking (if enabled): Click bookmark icon to toggle status.
- Verify actions are disabled for full topics (0 available slots).
Scope for future improvement
- Complete Placeholder Tabs: Implement functionality for 'Rubrics', 'Review Strategy', 'Due Dates', and 'Etc.' tabs in instructor view.
- Partner Ad Backend: Implement backend logic for partner ads and applications.
- Bookmark Implementation: Fully implement bookmark creation/viewing functionality.
- Topic Suggestions: Implement student topic suggestion feature.
- Bidding Features: Implement topic/reviewer bidding.
- Refined UI/UX: Enhance UI based on feedback, e.g., team display within rows.
- Automated Frontend Testing: Add