CSC/ECE 517 Fall 2018 E1836 Refactor quiz questionnaires controller.rb: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
E1836. Refactor quiz_questionnaires_controller.rb
==E1836. Refactor quiz_questionnaires_controller.rb==


Files involved: Questionnaires_controller.rb, (quiz_questionnaire.rb)
This page provides a description of the Expertiza based OSS project.  
What it does: Manages questionnaires and quiz.
 
What is wrong with it: questionnaires_controller is a very complex file, it contains some method that should appear in the questionnaires model and for the method that manages quiz created should be in a separate controller. Some methods are way too long to understand, please break them down into pieces for better understanding. Also, the few instances of code duplication that exist should also be removed.
 
What needs to be done:
__TOC__
Create quiz_questionnaire_controller.rb and move some of the methods in the questionnaires_controller.rb to the new file created.
 
Refactor the long methods in questionnaires_controller.rb, such as create and create_questionnaire, update quiz, valid quiz, etc.
 
Write tests to test the code first
===About Expertiza===
Replace switch statements with subclasses methods
 
Create models for the subclasses
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ 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.
Remove hardcoded parameters, such as save_choice method
 
===Problem Statement===
The following tasks were accomplished in this project:

Revision as of 05:13, 8 November 2018

E1836. Refactor quiz_questionnaires_controller.rb

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.

Problem Statement

The following tasks were accomplished in this project: