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

In API outputs, submission user answers have trimmed trailing whitespace, questionnaire metadata does not #1690

Open
cbunicef opened this issue May 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cbunicef
Copy link
Collaborator

cbunicef commented May 2, 2024

For example on internetofgoodthings.org, page ID 3279

https://www.internetofgoodthings.org/api/v1/questionnaires/3279/

{
            "id": 1350,
            "sort_order": 2,
            "label": "3. Monitoring provides insights into:",
            "clean_name": "3_monitoring_provides_insights_into",
            "help_text": "",
            "required": true,
            "field_type": "radio",
            "choices": [
--->            "A. How well our clients are responding to or adopting recommended behaviours ",
                "B. If planned IPC activities are being implemented (outputs) ",
                "C. If our IPC efforts are effective (outcome)",
                "D. All of the above"
            ],
            "default_value": "",
            "correct_answer": [
                "D. All of the above"
            ],
            "feedback": "",
            "admin_label": "Q3_monitoring_serviceprovider",
            "page_break": false
        },

https://www.internetofgoodthings.org/api/v1/questionnaires/3279/submissions/

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 107914,
            "user": "cefadmin",
            "submit_time": "2024-05-02T05:55:32.844770Z",
            "page_url": "[https://internetofgoodthings.org/en/sandbox/ipc-training-package/service-providers/training-extensions/module-4-quiz-role-and-characteristics-of-an-effective-service-provider/](https://www.internetofgoodthings.org/en/external-link/?next=https%3A%2F%2Finternetofgoodthings.org%2Fen%2Fsandbox%2Fipc-training-package%2Fservice-providers%2Ftraining-extensions%2Fmodule-4-quiz-role-and-characteristics-of-an-effective-service-provider%2F&from=/api/v1/questionnaires/3279/submissions/)",
            "submission": [
                {
                    "admin_label": "Q5_indicator_serviceprovider",
                    "clean_name": "5_what_is_an_indicator",
                    "user_answer": "A. A number that indicates something to someone"
                },
                {
                    "admin_label": "Q3_monitoring_serviceprovider",
                    "clean_name": "3_monitoring_provides_insights_into",
--->                "user_answer": "A. How well our clients are responding to or adopting recommended behaviours"
                },
                {
                    "admin_label": "Q2_GATHER_serviceprovider",
                    "clean_name": "2_what_is_the_functionality_of_the_gather_approach",
                    "user_answer": "A. Get feedback from clients"
                },
                {
                    "admin_label": "Q1_serviceprovider_serviceprovider",
                    "clean_name": "1_what_are_the_characteristics_of_an_effective_service_provider",
                    "user_answer": "A. Knowledgeable, Skilled, Professional"
                },
                {
                    "admin_label": "Q4_monitoring_serviceprovider",
                    "clean_name": "4_which_two_of_the_following_levels_of_monitoring_for_ipc_are_correct",
                    "user_answer": "A. Surveys and Focus Groups"
                }
            ]
        }
    ]
}
@cbunicef cbunicef added the bug Something isn't working label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant