praekelt/go-nike-ghr — pull request #9 by imsickofmaps (2013-07-02 12:51:33+00:00)
Title: Monitoring & Learning Quiz creation and json api exposure

## Basics

* Needs a M&L quiz model creating first (this is not the same as weekly quiz)
* Each quiz will have 4 questions with multiple options.
* Total quiz question and answers should not exceed 160 characters (this should be validated in admin UI - server side) per question

## API

There need to be two endpoints

GET /quiz/mandl

Returns an array of quiz ids (this unique id for the quiz in the DB)

{"quizzes":[3, 4, 5]}

GET /quiz/mandl/{id}

[
{
"question_id": 1,
"question":"This is a test question?",
"options": ["Option 1", "Option 2", "Option 3"]
},
{
"question_id": 2,
"question":"This is a test question 2?",
"options": ["Option 1", "Option 2", "Option 3"]
},
{
"question_id": 3,
"question":"This is a test question 3?",
"options": ["Option 1", "Option 2", "Option 3"]
},
{
"question_id": 4,
"question":"This is a test question 4?",
"options": ["Option 1", "Option 2", "Option 3"]
}
]