CSC/ECE 517 Spring 2018- Project E1808: Refactor review mapping controller.rb
Introduction
Expertiza
Expertiza is a platform through which students are able to view and manage their assignments, form teams for a group project and review other team's work for improvement. It uses Ruby on Rails Framework
Objectives of the Project
- Refactor automatic_review_mapping method
- Write failing tests first
- Split into several simpler methods and assign reasonable names
- Extract duplicated code into separate methods
- Refactor response_report method
- Write failing tests first
- Use factory pattern to replace the long switch statements
- Move switch conditions to corresponding subclasses with same method name response_report
- Create corresponding helper classes for different report types if they do not exist
- Replace the conditional with the relevant method calls
About Review Mapping Controller
Review mapping controller handles the review responses that are done on every assignment. It assigns reviews to different teams or individual student depending on the type of assignment(team project or individual project). It keeps track that all the teams are reviewed and assigned teams to review too.
Refactoring
Refactoring is used to improve a design code by changing the structure of the code such that the functionality remains the same. The changes made are quite small, but the overall effect becomes significant.