CSC/ECE 517 Fall 2014/oss E1502 wwj: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 27: | Line 27: | ||
! style="width:43%;"|Reason For Change | ! style="width:43%;"|Reason For Change | ||
|- style="vertical-align:top;" | |- style="vertical-align:top;" | ||
| | | copy | ||
| | | Extracted the content of this method as copy_questionnaires method and put it in questionnaire.rb | ||
| The content of this method is about operations on the database (coping a questionnaire), it is better to put it in the model | | The content of this method is about operations on the database (coping a questionnaire), it is better to put it in the model | ||
|- | |- | ||
| | | valid_quiz | ||
| | | Moved this method to quiz_questionnaire.rb | ||
| | | This method is about validation of the quiz, it shouldn't appear in the controller | ||
|- | |- | ||
| | | export | ||
| | | Moved this method to questionnaire.rb | ||
| | | This method exports the questionnaires as csv file, it should't appear in the controller | ||
|- | |- | ||
| | | import | ||
| | | Moved this method to questionnaire.rb | ||
| | | This method imports the questionnaires from csv file, it should't appear in the controller | ||
|- | |- | ||
| | | clone_questionnaire_details | ||
| | | Deleted this method due to the duplication | ||
| | | Substituted by copy_questionnaires method in questionnaire.rb | ||
|- | |- | ||
|} | |} |
Revision as of 02:14, 21 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.
Other classes involved:
What needs to be done:
What We Have Done
Method Name | Changes Made | Reason For Change |
---|---|---|
copy | Extracted the content of this method as copy_questionnaires method and put it in questionnaire.rb | The content of this method is about operations on the database (coping a questionnaire), it is better to put it in the model |
valid_quiz | Moved this method to quiz_questionnaire.rb | This method is about validation of the quiz, it shouldn't appear in the controller |
export | Moved this method to questionnaire.rb | This method exports the questionnaires as csv file, it should't appear in the controller |
import | Moved this method to questionnaire.rb | This method imports the questionnaires from csv file, it should't appear in the controller |
clone_questionnaire_details | Deleted this method due to the duplication | Substituted by copy_questionnaires method in questionnaire.rb |