TUDelft-SPC-Lab / covfee

extensible web framework for continuous annotation and perception experiments.
https://josedvq.github.io/covfee
MIT License
0 stars 0 forks source link

Fix missing annotations in json download #51

Closed Era-Dorta closed 6 months ago

Era-Dorta commented 6 months ago

This PR adds the annotation data to the json that is downloaded when you click on the "Download results (JSON)" in the admin panel.

The json is formatted like so:

{
    "hit_id": "35c236724410e66e214c786aad51d9d813bdef9e7203d123ed9ebeddf512e4c1",
    "nodes": {
        "1": {
            "responses": [
                {
                    "created": "2024-05-02 13:07:24.066921",
                    "submitted": "False",
                    "state": {
                        "selectedAnnotationIndex": 0,
                        "mediaPaused": null
                    },
                    "annotations": [],
                    "prolific_id": [
                        "annotator3"
                    ]
                }
            ]
        },
        "2": {
            "responses": [
                {
                    "created": "2024-05-02 13:07:24.066926",
                    "submitted": "False",
                    "state": {
                        "selectedAnnotationIndex": 0,
                        "mediaPaused": null
                    },
                    "annotations": [
                        [0, 0, 0, 0, 0, ........ THIS IS ACTUALLY QUITE LONG, 7200 LINES BUT WITHOUT LINE BREAKS ........., 0, 1, 1]
                   ],
                    "prolific_id": [
                        "annotator1"
                    ]
                }
            ]
        }
    },
    "journeys": [
        {
            "nodes": [
                1
            ]
        },
        {
            "nodes": [
                2
            ]
        },
    ]
}