From 9395177df22adcb90a573a9afa832e72b9a1930e Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Tue, 17 Sep 2013 22:28:51 -0700 Subject: Fixing question 4 to skip 4a in some cases. For this fix I am moving Question and Answer from the backend into a new model package. Question is now used in SurveyPageResource instead of the Map. Eventually I should encode/decode the model from the json directly. I am adding support to the Question model to find the next question based on the answer to the current question. If the answer has a specific nextQuestion field, that is used. Otherwise the question's nextQuestion field is used. This is to facilitate skipping irrelevant questions. --- src/com/p4square/grow/backend/resources/SurveyResultsResource.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/com/p4square/grow/backend/resources/SurveyResultsResource.java') diff --git a/src/com/p4square/grow/backend/resources/SurveyResultsResource.java b/src/com/p4square/grow/backend/resources/SurveyResultsResource.java index e93e253..208fa2e 100644 --- a/src/com/p4square/grow/backend/resources/SurveyResultsResource.java +++ b/src/com/p4square/grow/backend/resources/SurveyResultsResource.java @@ -20,6 +20,8 @@ import org.restlet.representation.StringRepresentation; import org.apache.log4j.Logger; +import com.p4square.grow.model.Answer; +import com.p4square.grow.model.Question; import com.p4square.grow.backend.GrowBackend; import com.p4square.grow.backend.db.CassandraDatabase; -- cgit v1.2.3