CSC/ECE 517 Fall 2019- Project E1946 Refactor Questionnaire Controller
E1946. Refactoring the Questionnaire Controller
This page provides a description of the Expertiza based OSS project.
About Expertiza
Expertiza is an open source project based on Ruby on Rails framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.
About Questionnaire Controller
Questionnaire is the superclass for all kinds of questionnaires and rubrics, rubrics is used for evaluating submissions and teammate contributions, and taking quizzes and surveys. All of these are subclasses of Questionnaire. This controller is used for creating, displaying, and managing Questionnaires. Different type of questionnaire can be created in Expertiza like Review, Metareview, Teammate review, Quiz Questionnaire, Global Survey, Course Survey and many more. This Controller is widely used and malfunctions can cause many issues in different parts of the system.
Why Refactor Questionnaire Controller
In Questionnaire controller below are some of the problems which needs refactoring:
- Renaming the methods breaking Rubys naming conventions.
- Refactoring the methods doing multiple tasks and breaking them in different modules.
- Reducing the length of methods longer than 50 lines of code.
- Removing the string literal values used in controller.
- Separating the business logic from controller and putting it in method.
- Remove variables behaving same as ruby's given functionality.
- Commenting the code properly for easy understanding.
Files Modified
Questionnaire Controller and Questionnaire model was modified during this project.
1. Questionnaire Controller - This is the controller which handles all the CRUD operation performed on any kind of questionnaire - review or surveys.