From e77c9b418fdfb935ff8e99f10f607a4bbd7e1c8c Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Sun, 20 Oct 2013 23:14:51 -0700 Subject: First stage of a major refactoring. Question and Answer can now be serialized and deserialized to/from JSON. As such, I no longer have to pass awkward maps around. As part of this change I have introduced a Provider interface to abstract out loading and persisting these beans. The scoring logic has been completed factored out of SurveyResultsResource and into the various ScoringEngines. Tests have been added for Question, Answer, and the ScoringEngines. A bug has been fixed in computing the value for slider questions. The label identifiers in the circle questions have changed from all lower case to camel case. That is, topleft is now topLeft. Several issues have been corrected in the circle answers where the point values did not match the labels. Testing and code coverage support and reports have been added. --- devfiles/questions/03.json | 8 ++++---- devfiles/questions/06.json | 8 ++++---- devfiles/questions/09.json | 8 ++++---- devfiles/questions/13.json | 16 ++++++++-------- devfiles/questions/17.json | 16 ++++++++-------- 5 files changed, 28 insertions(+), 28 deletions(-) (limited to 'devfiles') diff --git a/devfiles/questions/03.json b/devfiles/questions/03.json index b0d32ab..6c69630 100644 --- a/devfiles/questions/03.json +++ b/devfiles/questions/03.json @@ -2,10 +2,10 @@ "id": "03", "question": "In my life, Jesus is:", "type": "circle", - "topleft": "Leader & Savior and I generally apply his teaching", - "topright": "Leader & Savior and obedience is essential", - "bottomleft": "The Son of God, and I'm learning more about him", - "bottomright": "An important person or figure in history", + "topLeft": "Leader & Savior and I generally apply his teaching", + "topRight": "Leader & Savior and obedience is essential", + "bottomLeft": "The Son of God, and I'm learning more about him", + "bottomRight": "An important person or figure in history", "answers": { "1.00,1.00": { "score": "4" }, diff --git a/devfiles/questions/06.json b/devfiles/questions/06.json index abba954..3bfabf0 100644 --- a/devfiles/questions/06.json +++ b/devfiles/questions/06.json @@ -2,10 +2,10 @@ "id": "06", "question": "I believe the Bible is:", "type": "circle", - "topleft": "Inspired word of God and I try to read it regularly", - "topright": "Authoritative and essential to my life and I read it daily", - "bottomleft": "Pretty good wisdom that I occasionally read", - "bottomright": "A collection of moral stories, but generally not relevant to me", + "topLeft": "Inspired word of God and I try to read it regularly", + "topRight": "Authoritative and essential to my life and I read it daily", + "bottomLeft": "Pretty good wisdom that I occasionally read", + "bottomRight": "A collection of moral stories, but generally not relevant to me", "answers": { "1.00,1.00": { "score": "4" }, diff --git a/devfiles/questions/09.json b/devfiles/questions/09.json index 15ced2d..832cd6c 100644 --- a/devfiles/questions/09.json +++ b/devfiles/questions/09.json @@ -2,10 +2,10 @@ "id": "09", "question": "Prayer for me is:", "type": "circle", - "topleft": "Important and I pray regularly", - "topright": "Constant, conversational, a lifestyle, and absolutely indispensible in my life", - "bottomleft": "Helpful I think, and I pray occasionally", - "bottomright": "Not important, I don't believe it's helpful or useful", + "topLeft": "Important and I pray regularly", + "topRight": "Constant, conversational, a lifestyle, and absolutely indispensible in my life", + "bottomLeft": "Helpful I think, and I pray occasionally", + "bottomRight": "Not important, I don't believe it's helpful or useful", "answers": { "1.00,1.00": { "score": "4" }, diff --git a/devfiles/questions/13.json b/devfiles/questions/13.json index 7a74502..236b5b1 100644 --- a/devfiles/questions/13.json +++ b/devfiles/questions/13.json @@ -2,16 +2,16 @@ "id": "13", "question": "Those closest to me are:", "type": "circle", - "bottomright": "Outside the church", - "bottomleft": "Inside the church but don't know my secrets", - "topleft": "Inside the church and know me a bit", - "topright": "Church family, knows me well, and prays for me", + "bottomRight": "Outside the church", + "bottomLeft": "Inside the church but don't know my secrets", + "topLeft": "Inside the church and know me a bit", + "topRight": "Church family, knows me well, and prays for me", "answers": { - "1.00,1.00": { "score": "2" }, - "1.00,-1.00": { "score": "4" }, - "-1.00,-1.00": { "score": "3" }, - "-1.00,1.00": { "score": "1" } + "1.00,1.00": { "score": "4" }, + "1.00,-1.00": { "score": "1" }, + "-1.00,-1.00": { "score": "2" }, + "-1.00,1.00": { "score": "3" } }, "previousQuestion": "12", diff --git a/devfiles/questions/17.json b/devfiles/questions/17.json index b1b3f5e..2469a13 100644 --- a/devfiles/questions/17.json +++ b/devfiles/questions/17.json @@ -2,16 +2,16 @@ "id": "17", "question": "Character, integrity, and excellent personal conduct are:", "type": "circle", - "bottomleft": "what I aspire toward, but I'm a workin progress", - "bottomright": "Old Fashioned and not realistic", - "topleft": "Important but you can lead others if you're trying hard", - "topright": "Essential to me personally, and required in order to lead others", + "bottomLeft": "What I aspire toward, but I'm a work in progress", + "bottomRight": "Old Fashioned and not realistic", + "topLeft": "Important but you can lead others if you're trying hard", + "topRight": "Essential to me personally, and required in order to lead others", "answers": { - "1.00,1.00": { "score": "1" }, - "1.00,-1.00": { "score": "4" }, - "-1.00,-1.00": { "score": "2" }, - "-1.00,1.00": { "score": "3" } + "1.00,1.00": { "score": "4" }, + "1.00,-1.00": { "score": "1" }, + "-1.00,-1.00": { "score": "3" }, + "-1.00,1.00": { "score": "2" } }, "previousQuestion": "16", -- cgit v1.2.3