CSC/ECE 517 Spring 2022 - E2240. Re-write waitlist functionality
Problem Statement
Feature Overview
Issues with existing functionality
Overview of Major Changes
Proposed design and Plan of action
General Design Goals
Changes to the signed_up_teams Table
Files and methods to be refactored
- signed_up_team.rb
- sign_up_sheet_controller.rb
- switch_original_topic_to_approved_suggested_topic
- Change usage of is_waitlisted attribute in the signed_up_teams table to use the new table
- Add additional checks and transactions to make sure perform operations in an atomic way in case of failures.
- switch_original_topic_to_approved_suggested_topic
- sign_up_sheet.rb
- sign_up_topic.rb
- suggestion_controller.rb
- invitation.rb
Adding new waitlist_teams Table
- Add a new table waitlist_teams
- The attributes for the table are team_id(refers to the teams table), topic_id (refers to the sign_up_topics table)
- This table only stores the waitlisted teams for each topic.
- The default timestamp in the table will be used to check the first team waitlisted instead of using queues to implement the functionality.
- The waitlist_helper class will perform the following operations
- Delete all waitlists for team
- Purge all waitlists for topic
- Add team to waitlist
- Delete specific team from waitlist
- Get all waitlisted topics for team
- Get all waitlisted teams for topic
- Get first team in waitlist for topic
- Check waitlist empty for topic
- Check if team has any waitlists
Refactoring and Design Patterns
Since our goal is to fix existing functionalities we will not be updating the existing design patterns being employed in the code. Yet, we would like to discuss what makes these refactoring important. Refactoring is a systematic process of improving code without creating new functionality. Thus, a key to the success of our project is ensuring everything that was working before our changes work even after our changes have been added. To ensure this, we will continue to test the system after each issue has been fixed. This will allow us to ensure two things:
- We are only changing what we set out to change when fixing a particular issue.
- We are not breaking what was working before we deployed our fix.
We believe at the end our changes will increase the quality of Expertiza and improve the experience for users an developers alike.
Specific Tasks Completed
will be added for the final submission
Implementation
will be added for the final submission
Testing
Video Demonstration
will be added for the final submission
Testing Goals and Test Objects
Drawing from the project objectives:
- Ways to get added to waitlist for a topic
- Team requests a topic that has no slot available.
- When capacity/max choosers for a topic is increased
- When student gets added to a team which has signed up topic
- Ways to get off a waitlist
- team gets the topic they are waiting for ( all other waitlists are dropped for the team)
- team drops off the waitlist
- instructor drops team from the waitlist
- a drop-topic deadline passes
- team is deleted
- student gets added to a new team, then old team's waitlist should be dropped
RSpec Unit Tests
Test cases provided here, will add RSpec code blocks for the final submission
- Student Waitlist
Scenario: Getting added to the waitlist for a topic Given: Logged in as a Student When: The topic for an assignment has no available slots And: Student tries to signup for a topic Then: The team that the student is a part of should be added to the waitlist for the topic. Scenario: Getting enrolled in a topic Given: Logged in as a Student When: The topic for an assignment has available slots And: Student tries to signup for a topic Then: The team that the student is a part of should be enrolled for the topic. Scenario: All waitlisted topics getting dropped Given: Logged in as a Student When: Student gets enrolled into a course for which he was waitlisted before. Then: The team that the student is a part of should be dropped from the remaining waitlisted topics. Scenario: All waitlisted teams getting dropped Given: Logged in as a Student When: The deadline for a topic passes. Then: All the waitlisted teams for that particular topic must be dropped. Scenario: Getting enrolled in a topic Given: Logged in as a Student When: The enrolled team for a topic drops Then: The team that was waitlisted earlier for the topics must be enrolled. === Manual UI Tests === *Student ID in header <pre> Scenario: Student ID in grading history view Logged in as an Instructor/Admin On Assignment page, click on Grading History Resulting Grading History Table is shown Student ID appears in the header, not in any table columns
Regression Testing
In order to ensure complete coverage, testing of the changes done between the end of last semester and this project will be done to ensure that old test cases still pass.
- Make sure all existing waitlist functionality still passes
Conclusions and Future Work
Comprehensive Testing and Scope
- will be added for final submission
Conclusion
will be added for final submission
Useful Links
Pull request
Deployed application with changes
Forked repository
Contributors
Students
- Krishna Saurabh Vankadaru (kvankad)
- Samson Mulkur (smulkur)
- Akhil Mengani (amengan)
- Sai Naga Vamshi Chidara (schidar)
Mentor
- Naman Shrimali (nshrima)