CSC/ECE 517 Fall 2014/oss E1502 wwj: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 10: Line 10:
<li>Turn the questionnaire into a “form object.”  The ..._questions methods: save_new_questions, delete_questions, save_questions should be in a separate class.
<li>Turn the questionnaire into a “form object.”  The ..._questions methods: save_new_questions, delete_questions, save_questions should be in a separate class.
===Other classes involved:===
===Other classes involved:===
<li>questionnaire.rb</li>
<li>questionnaire.rb
<li>quiz_questionnaire.rb</li>
<li>quiz_questionnaire.rb
<li>questions_controller.rb</li>
<li>questions_controller.rb


===What needs to be done:===
===What needs to be done:===
<li>Move quiz related functions to quiz_questionnaire.rb.</li>
<li>Move quiz related functions to quiz_questionnaire.rb.
<li>copy, update_quiz, valid_quiz methods, clone_questionnaire_details is too long.</li>
<li>copy, update_quiz, valid_quiz methods, clone_questionnaire_details is too long.
<li>Debug output (print statements) should be removed.</li>
<li>Debug output (print statements) should be removed.
<li>Understand the functions in the controller and comment them. Ensure that the code is understandable to the next programmer who works on it.</li>
<li>Understand the functions in the controller and comment them. Ensure that the code is understandable to the next programmer who works on it.

Revision as of 02:18, 18 March 2015

E1502: Questionnaire Controller Refactoring

Introduction to Expertiza

Project Description

What it does:

Used on the admin side of Expertiza for creating/ editing questionnaires (rubrics, surveys and quizzes). It helps in add/removing questions, options, etc for a questionnaire.

  • Very big controller that handles a lot more than the name suggests. Functionalities need to be moved to appropriate controllers.
  • Quiz methods are should be treated the same as any other type of questionnaire; differences between quiz questionnaires and other questionnaires should be implemented in the model class, quiz_questionnaire
  • Turn the questionnaire into a “form object.” The ..._questions methods: save_new_questions, delete_questions, save_questions should be in a separate class.

    Other classes involved:

  • questionnaire.rb
  • quiz_questionnaire.rb
  • questions_controller.rb

    What needs to be done:

  • Move quiz related functions to quiz_questionnaire.rb.
  • copy, update_quiz, valid_quiz methods, clone_questionnaire_details is too long.
  • Debug output (print statements) should be removed.
  • Understand the functions in the controller and comment them. Ensure that the code is understandable to the next programmer who works on it.