diff options
| author | Jesse Morgan <jesse@jesterpm.net> | 2013-09-03 07:02:59 -0700 | 
|---|---|---|
| committer | Jesse Morgan <jesse@jesterpm.net> | 2013-09-03 07:03:26 -0700 | 
| commit | eb881fdc9b62d1b9d1f5c61f1f4077065db7e933 (patch) | |
| tree | 85dda0e94824177ed5aed88d511b95071fe85d87 /devfiles | |
| parent | 84d008be8a35d3a19607de669042ddb5c6540f0c (diff) | |
New account page improvements and renumbered questions.
Diffstat (limited to 'devfiles')
| -rw-r--r-- | devfiles/questions/01.json (renamed from devfiles/questions/1.json) | 4 | ||||
| -rw-r--r-- | devfiles/questions/02.json (renamed from devfiles/questions/2.json) | 6 | ||||
| -rw-r--r-- | devfiles/questions/03.json (renamed from devfiles/questions/3.json) | 6 | ||||
| -rw-r--r-- | devfiles/questions/04.json (renamed from devfiles/questions/4.json) | 8 | ||||
| -rw-r--r-- | devfiles/questions/04a.json (renamed from devfiles/questions/4a.json) | 6 | ||||
| -rw-r--r-- | devfiles/questions/05.json (renamed from devfiles/questions/5.json) | 6 | ||||
| -rw-r--r-- | devfiles/questions/06.json (renamed from devfiles/questions/6.json) | 6 | ||||
| -rw-r--r-- | devfiles/questions/07.json (renamed from devfiles/questions/7.json) | 6 | ||||
| -rw-r--r-- | devfiles/questions/08.json (renamed from devfiles/questions/8.json) | 6 | ||||
| -rw-r--r-- | devfiles/questions/09.json (renamed from devfiles/questions/9.json) | 4 | ||||
| -rw-r--r-- | devfiles/questions/10.json | 2 | ||||
| -rwxr-xr-x | devfiles/scripts/bootstrap-cassandra.sh | 6 | ||||
| -rwxr-xr-x | devfiles/scripts/compile-questions.sh | 17 | 
13 files changed, 50 insertions, 33 deletions
diff --git a/devfiles/questions/1.json b/devfiles/questions/01.json index 30899e1..daa9c5e 100644 --- a/devfiles/questions/1.json +++ b/devfiles/questions/01.json @@ -1,5 +1,5 @@  { -    "id": "1", +    "id": "01",      "type": "slider",      "question": "I Believe God",      "answers": { @@ -8,5 +8,5 @@          "a3": { "text": "Created the earth and everything in it, and is involved to some extent", "score": "3" },          "a4": { "text": "Is creator and ultimate authority in all things, and holds the future of all creation in His hands", "score": "4" }      }, -    "nextQuestion": "2" +    "nextQuestion": "02"  } diff --git a/devfiles/questions/2.json b/devfiles/questions/02.json index f619cdd..86a3426 100644 --- a/devfiles/questions/2.json +++ b/devfiles/questions/02.json @@ -1,5 +1,5 @@  { -    "id": "2", +    "id": "02",      "type": "image",      "question": "I see God this way",      "answers": { @@ -10,6 +10,6 @@          "a5": { "score": "1" },          "a6": { "score": "1" }      }, -    "previousQuestion": "1", -    "nextQuestion": "3" +    "previousQuestion": "01", +    "nextQuestion": "03"  } diff --git a/devfiles/questions/3.json b/devfiles/questions/03.json index cedfc79..3dd2b65 100644 --- a/devfiles/questions/3.json +++ b/devfiles/questions/03.json @@ -1,5 +1,5 @@  { -    "id": "3", +    "id": "03",      "type": "circle",      "question": "In my life, Jesus is",      "topleft": "Leader & Savior and I generally apply his teaching", @@ -14,6 +14,6 @@          "-1.00,1.00": { "score": "3" }      }, -    "previousQuestion": "2", -    "nextQuestion": "4" +    "previousQuestion": "02", +    "nextQuestion": "04"  } diff --git a/devfiles/questions/4.json b/devfiles/questions/04.json index da83cd1..a3f66e2 100644 --- a/devfiles/questions/4.json +++ b/devfiles/questions/04.json @@ -1,13 +1,13 @@  { -    "id": "4", +    "id": "04",      "type": "text",      "question": "I accepted Jesus Christ as my Savior...",      "answers": {          "a1": { "text": "In my current church.", "type": "none" },          "a2": { "text": "Somewhere else.", "type": "none" },          "a3": { "text": "I have not accepted Jesus Christ as my savior.", "score": "0", "type": "trump", -                "nextQuestion": "5" } +                "nextQuestion": "05" }      }, -    "previousQuestion": "3", -    "nextQuestion": "4a" +    "previousQuestion": "03", +    "nextQuestion": "04a"  } diff --git a/devfiles/questions/4a.json b/devfiles/questions/04a.json index a9036e1..9977ec7 100644 --- a/devfiles/questions/4a.json +++ b/devfiles/questions/04a.json @@ -1,5 +1,5 @@  { -    "id": "4a", +    "id": "04a",      "type": "text",      "question": "I accepted Jesus Christ as my Savior...",      "answers": { @@ -8,6 +8,6 @@          "a3": { "text": "5 - 6 years ago", "type": "none" },          "a4": { "text": "7+ years ago",    "type": "none" }      }, -    "previousQuestion": "3", -    "nextQuestion": "5" +    "previousQuestion": "03", +    "nextQuestion": "05"  } diff --git a/devfiles/questions/5.json b/devfiles/questions/05.json index 6070acb..f1abade 100644 --- a/devfiles/questions/5.json +++ b/devfiles/questions/05.json @@ -1,5 +1,5 @@  { -    "id": "5", +    "id": "05",      "type": "slider",      "question": "I share my faith in Jesus...",      "answers": { @@ -8,6 +8,6 @@          "a3": { "text": "Sometimes", "score": "3" },          "a4": { "text": "Frequently", "score": "4" }      }, -    "previousQuestion": "4", -    "nextQuestion": "6" +    "previousQuestion": "04", +    "nextQuestion": "06"  } diff --git a/devfiles/questions/6.json b/devfiles/questions/06.json index 1965bfb..c6788cb 100644 --- a/devfiles/questions/6.json +++ b/devfiles/questions/06.json @@ -1,5 +1,5 @@  { -    "id": "6", +    "id": "06",      "type": "circle",      "question": "I believe the Bible is:",      "topleft": "Inspired word of God and I try to read it regularly", @@ -14,6 +14,6 @@          "-1.00,1.00": { "score": "3" }      }, -    "previousQuestion": "5", -    "nextQuestion": "7" +    "previousQuestion": "05", +    "nextQuestion": "07"  } diff --git a/devfiles/questions/7.json b/devfiles/questions/07.json index 3386137..be714da 100644 --- a/devfiles/questions/7.json +++ b/devfiles/questions/07.json @@ -1,5 +1,5 @@  { -    "id": "7", +    "id": "07",      "type": "slider",      "question": "I believe following the Bible\'s teachings is",      "answers": { @@ -8,6 +8,6 @@          "a3": { "text": "Encouraged by God", "score": "3" },          "a4": { "text": "Essential", "score": "4" }      }, -    "previousQuestion": "6", -    "nextQuestion": "8" +    "previousQuestion": "06", +    "nextQuestion": "08"  } diff --git a/devfiles/questions/8.json b/devfiles/questions/08.json index 3c0f07c..4775554 100644 --- a/devfiles/questions/8.json +++ b/devfiles/questions/08.json @@ -1,5 +1,5 @@  { -    "id": "8", +    "id": "08",      "type": "image",      "question": "My spiritual life resembles...",      "answers": { @@ -7,6 +7,6 @@          "a2": { "score": "2", "type": "none" },          "a3": { "score": "1", "type": "none" }      }, -    "previousQuestion": "7", -    "nextQuestion": "9" +    "previousQuestion": "07", +    "nextQuestion": "09"  } diff --git a/devfiles/questions/9.json b/devfiles/questions/09.json index c49dd56..dab424e 100644 --- a/devfiles/questions/9.json +++ b/devfiles/questions/09.json @@ -1,5 +1,5 @@  { -    "id": "9", +    "id": "09",      "type": "circle",      "question": "Prayer for me is:",      "topleft": "Important and I pray regularly", @@ -14,6 +14,6 @@          "-1.00,1.00": { "score": "3" }      }, -    "previousQuestion": "8", +    "previousQuestion": "08",      "nextQuestion": "10"  } diff --git a/devfiles/questions/10.json b/devfiles/questions/10.json index 1a84b84..d76520c 100644 --- a/devfiles/questions/10.json +++ b/devfiles/questions/10.json @@ -8,6 +8,6 @@          "a3": { "text": "Enjoyable", "score": "3" },          "a4": { "text": "Lifestyle", "score": "4" }      }, -    "previousQuestion": "9", +    "previousQuestion": "09",      "nextQuestion": "11"  } diff --git a/devfiles/scripts/bootstrap-cassandra.sh b/devfiles/scripts/bootstrap-cassandra.sh index e0813a0..128767e 100755 --- a/devfiles/scripts/bootstrap-cassandra.sh +++ b/devfiles/scripts/bootstrap-cassandra.sh @@ -12,13 +12,13 @@ $TOOLS/scripts/setup-cassandra.sh  # Bootstrap keyspace  TEMPFILE=`mktemp` -cat $DEVFILES/cassandra-bootstrap.cql > $TEMPFILE +cat $DEVFILES/scripts/cassandra-bootstrap.cql > $TEMPFILE  # Fill with questions -./compile-questions.sh >> $TEMPFILE +$DEVFILES/scripts/compile-questions.sh >> $TEMPFILE  # Fill with videos -./compile-videos.sh >> $TEMPFILE +$DEVFILES/scripts/compile-videos.sh >> $TEMPFILE  # GO!  #cat $TEMPFILE | less diff --git a/devfiles/scripts/compile-questions.sh b/devfiles/scripts/compile-questions.sh index 16be5b1..7f108b8 100755 --- a/devfiles/scripts/compile-questions.sh +++ b/devfiles/scripts/compile-questions.sh @@ -1,9 +1,26 @@  # Dump Cassandra commands to setup questions + +FIRST="" +COUNT=0 +  for i in $DEVFILES/questions/*.json; do      id=`basename $i .json` +    if [ -z "$FIRST" ]; then +        FIRST=$id +    fi      echo "set strings['/questions/${id}']['value'] = '"      cat $i      echo "';" +    COUNT=$((COUNT + 1))  done +# Create Summary +cat << EOF +set strings['/questions']['value'] = ' +{ +    "first": "$FIRST", +    "count": $COUNT +} +'; +EOF  | 
