Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Survey Framework on client #98

Open
MKV21 opened this issue Apr 28, 2014 · 4 comments
Open

Survey Framework on client #98

MKV21 opened this issue Apr 28, 2014 · 4 comments

Comments

@MKV21
Copy link
Member

MKV21 commented Apr 28, 2014

API to define surveys for the user which will be displayed in the app. Features required:

  • single choice (+ slider)
  • multiple choice
  • free text
  • range (slider)
@MKV21 MKV21 added this to the Beta 3 milestone Apr 28, 2014
@MKV21 MKV21 changed the title Survey API Survey Framework on client Apr 28, 2014
@maoswald
Copy link
Collaborator

What do you mean by slider for single choice? oO

@MKV21
Copy link
Member Author

MKV21 commented Jun 20, 2014

I guess a slider is always single choice, you are right, as there is an own bullet point for sliders this is no extra feature ;)

Single choice would be radio buttons, multiple choice checkboxes. Free text and slider are special.

@maoswald
Copy link
Collaborator

maoswald commented Jul 3, 2014

Added survey pages and another range question with min and max values.
Protocol should be finished if there are no other features required?!
Protocol for survey

@MKV21 MKV21 removed this from the Beta 3 milestone Aug 18, 2014
@MKV21
Copy link
Member Author

MKV21 commented Nov 13, 2014

From maoswald in the wiki

Survey

Every survey could have multiple pages with multiple questions.
There are 5 different types of questions:

  • 1 - single choice
  • 2 - multiple choice
  • 3 - open question
  • 4 - range (percent)
  • 5 - range (min max)

This is the protocol structure.

structure

server protocol

This is the protocol sent to the client.

{
    "survey_id": 42,
    "survey_title": "Dinner",
    "survey_description": "What would you like to eat?",
    "survey_pages": [
        {
            "survey_page_id": 1,
            "survey_page_title": "common question about food",
            "survey_page_description": "todays dinner",
            "survey_page_questions": [
                {
                    "survey_question_id": 1
                    "survey_question_title": "Food",
                    "survey_question_question": "What do you choose to eat?",
                    "survey_question_type": 1, //single choice
                    "survey_question_answers": [
                        {
                            "answer_id": 1,
                            "answer_title": "Zwiebelrostbraten",
                            "answer_description": "yummy meat"
                        },
                        {
                            ...
                        }
                    ],
                    "survey_question_skipable": true
                },
                {
                    "survey_question_id": 2
                    "survey_question_title": "Drinks",
                    "survey_question_question": "What would you like to drink?",
                    "survey_question_type": 2, //multiple choice
                    "survey_question_answers": [
                        {
                            "answer_id": 1,
                            "answer_title": "Beer",
                            "answer_description": "Gustel"
                        },
                        {
                            ...
                        }
                    ],
                    "survey_question_skipable": true
                },
                {
                    "survey_question_id": 3
                    "survey_question_title": "Extras",
                    "survey_question_question": "Other orders?",
                    "survey_question_type": 3, //free text
                    "survey_question_skipable": true
                },
                {
                    "survey_question_id": 4
                    "survey_question_title": "Meet",
                    "survey_question_question": "How would like your meet served?",
                    "survey_question_type": 4, //range
                    "survey_question_answer_range_points": [
                        {
                            "answer_range_point_id": 1,
                            "answer_range_point_title": "rare",
                            "answer_range_point_description": "short grilled"
                        },
                        {
                            ...
                        }
                    ],
                    "survey_question_skipable": true
                },
                {
                    "survey_question_id": 5,
                    "survey_question_title": "Meet weight",
                    "survey_question_question": "How heavy should your meet be?",
                    "survey_question_type": 5, //range of numbers
                    "survey_question_range_min": 50,
                    "survey_question_range_max": 5000,
                    "survey_question_range_step": 25,
                    "survey_question_range_entity": "gram", // optional information
                    "survey_question_skipable": true
                },
                {
                    ...
                }

            ]
        },
        {
            ...
        }

    ],
    "survey_greetings": "Thanks for your participation" 
}

result protocol

This is the protocol sent by the client back to the server.

{
    "survey_id": 42,
    "survey_result": [
        {
            "survey_question_id": 1,
            "survey_question_answer": 1
        },
        {
            "survey_question_id": 2,
            "survey_question_answer": [
                {
                    "answer_id": 1
                },
                {
                    ...
                }           
            ]
        },
        {
            "survey_question_id": 3,
            "survey_question_answer": "One schnitzel please!"
        },
        {
            "survey_question_id": 4,
            "survey_question_answer_range_value": 35    //percent
        },
        {
            "survey_question_id": 5,
            "survey_question_answer_range_number_of_steps": 135 //result = range_min + range_step * range_number_of_steps
        }
    ],
    "survey_feedback": "tasted really fine"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants