diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2013-09-17 22:28:51 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2013-09-17 22:28:51 -0700 |
commit | 9395177df22adcb90a573a9afa832e72b9a1930e (patch) | |
tree | e8cdbc652f5c2dfe670833893c5f1393135338a4 /src/com/p4square/grow/backend/resources/SurveyResultsResource.java | |
parent | feb118725012cb1929f245b446568fe1ecb6ce01 (diff) |
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.
Diffstat (limited to 'src/com/p4square/grow/backend/resources/SurveyResultsResource.java')
-rw-r--r-- | src/com/p4square/grow/backend/resources/SurveyResultsResource.java | 2 |
1 files changed, 2 insertions, 0 deletions
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; |