CSC/ECE 517 Spring 2019 - Project E1903. Create quiz questionnaires controller.rb

From Expertiza_Wiki
Revision as of 18:42, 25 March 2019 by Nkuncha (talk | contribs) (filled problem statement, files affected, team members and references)
Jump to navigation Jump to search

Problem Statement

1. The questionnaires_controller.rb has multiple methods to handle quizzes. Some of these methods cater only to quizzes. The controller has to be refactored into 2 controllers by moving the functions related to quizzes and the dependencies into a new controller called quiz_questionnaire_controller.rb.

2. Some methods in the questionnaires_controller.rb are long or have hardcoded parameters. These methods have to be refactored into shorter functions rid of hardcoded parameters.

Changes made to current Implementation

1. Creation of new controller
to be filled

2. Creation of rpec file for new controller
to be filled

3. Refactoring current controller
to be filled

4. Creation of new routes and updation of affected links in views
to be filled

Files affected

The following files were created or refactored 1. /app/controllers/questionnaires_controller.rb
2. /app/controllers/quiz_questionnaire_controller.rb
3. /app/views/questionnaire/view.html.erb
4. /app/views/questionnaire/new_quiz.erb
5. /app/views/questionnaire/edit.html.erb
6. /app/views/submitted_content/_main.html.erb
7. /config/routes.rb
8. /spec/controllers/questionnaires_controller_spec.rb
9. /spec/controllers/quiz_questionnaire_controller_spec.rb

Team members

1. Abhishek Arya (aarya@ncsu.edu)
2. Nitin Nataraj Kuncham (nkuncha@ncsu.edu)
3. Suraj Siddharudh (ssiddha@ncsu.edu)

References

  1. Expertiza on GitHub
  2. rpec tutorial
  3. Stackoverflow