TEAMMATES/repo — pull request #2756 by LowWeiLin (2014-12-15 03:38:51+00:00)
Title: Restructure code for feedback session questions (JavaScript) #2748

Fixes #2748

Minor organization, moved code for specific question types together and to the bottom.

So far, here is a list of steps to be done for adding a new question type:

Java
-----
Add and implement the following:
- FeedbackQuestionDetails.java - extends FeedbackQuestionDetails
- FeedbackResponseDetails.java - extends FeedbackResponseDetails

FeedbackQuestionType.java
- Define new question type
- Add cases in getFeedbackQuestionDetailsInstance() and getFeedbackReseponseDetailsInstance()

JSP
-----
Nothing to do here...

JS
-----
common.js
- Add in constants for feedback question typename (Format: FEEDBACK_QUESTION_TYPENAME_)

instructorFeedbackEdit.js
- Hide new question form in hideAllNewQuestionForms()
- Add logic in prepareQuestionForm() to prepare new question form
- Add logic in enableQuestion() if necessary

feedbackSubmissionsEdit.js
- Add logic if necessary

Tests
-----

Add test cases in:
FeedbackResponseDetailsTest.java
InstructorFeedbackQuestionAddActionTest.java
InstructorFeedbackQuestionEditActionTest.java

Add and implement the following
- FeedbackQuestionUiTest.java
- Add test class to testng.xml
- Test add/edit
- Test Submit (StudentFeedbackSubmitPageUiTest.java) ?
- Test Results View by adding in data to existing json files