h5p / h5p-blanks

9 stars 68 forks source link

xAPI: correct response pattern #5

Open garemoko opened 8 years ago

garemoko commented 8 years ago

The correct response pattern has two issues:

  1. Hints are appended to the options. If this data is useful it should be included instead in a definition extension.
  2. Possible answers are delimited with a slash. instead they should be listed are multiple possible correct answers. So, for the example statement below:
"correctResponsesPattern": [
    "{case_matters=true}browser[,]Tin Can",
    "{case_matters=true}browser[,]Tin Can API",
    "{case_matters=true}web-browser[,]Tin Can",
    "{case_matters=true}web-browser[,]Tin Can API"
]

I appreciate this could be a lot of permutations where there are lots of blanks, but that's the spec as it is today and of course these permutations can be generated programmatically.

Example statement from H5P wordpress plugin (updated today).

{
    "id": "12fed9ff-f26e-42ae-bb01-1e41f1526008",
    "actor": {
        "name": "admin",
        "mbox": "mailto:andrew.downes@watershedlrs.com",
        "objectType": "Agent"
    },
    "verb": {
        "id": "http://adlnet.gov/expapi/verbs/answered",
        "display": {
            "en-US": "answered"
        }
    },
    "result": {
        "score": {
            "scaled": 0,
            "raw": 0,
            "min": 0,
            "max": 2
        },
        "completion": true,
        "response": "web browser[,]tin can",
        "duration": "PT282.78S"
    },
    "context": {
        "contextActivities": {
            "category": [
                {
                    "id": "http://h5p.org/libraries/H5P.Blanks-1.4",
                    "objectType": "Activity"
                }
            ],
            "grouping": [
                {
                    "id": "http://localhost:8888/wordpress/h5p-test/",
                    "definition": {
                        "name": {
                            "en": " | H5P testWordPress sandbox"
                        },
                        "type": "http://activitystrea.ms/schema/1.0/page",
                        "moreInfo": "http://localhost:8888/wordpress/h5p-test/"
                    },
                    "objectType": "Activity"
                }
            ]
        }
    },
    "timestamp": "2016-01-18T18:06:35.886Z",
    "stored": "2016-01-18T18:06:35.886Z",
    "authority": {
        "name": "H5P",
        "account": {
            "homePage": "https://sandbox.watershedlrs.com",
            "name": "CDrGGtiYAEjUFr"
        },
        "objectType": "Agent"
    },
    "version": "1.0.0",
    "object": {
        "id": "http://localhost:8888/wordpress/wp-admin/admin-ajax.php?action=h5p_embed&id=9",
        "definition": {
            "extensions": {
                "http://h5p.org/x-api/h5p-local-content-id": 9
            },
            "name": {
                "en-US": "Fill in the blanks"
            },
            "description": {
                "en-US": "Fill in the missing words
H5P content may be edited using a __________.

\n
xAPI is also known as __________.

\n"
            },
            "type": "http://adlnet.gov/expapi/activities/cmi.interaction",
            "interactionType": "fill-in",
            "correctResponsesPattern": [
                "{case_matters=true}browser/web-browser:Something you use every day[,]Tin Can/Tin Can API:Contains Baked Beans"
            ]
        },
        "objectType": "Activity"
    }
}
falcon-git commented 8 years ago

Yeah, I think this was forgotten, I wasn't sure about adding all those permutations, but since you indicate it is the only way at the moment I'll add it, hopefully for the next release, and get rid of the hints as well obviously

falcon-git commented 8 years ago

This was fixed in: 8e364d0115b7a00171561c6752382c5e427b34cc 2f92059e078967234d99f5ebf5525a3e29747ef7 1bf7f97071ca17b457048d43a4fd7410024e35ae

kienv commented 6 years ago

Hi guys,

We found this becomes a real problem. We have a small activity with 14 fill-in-blank questions. Each question has 4 possible answers. current, the code generates a 4^14 = 268435456 rows array for possible answers. this makes browsers get crashed and also DB issue.

Could you please review it or do you guy already working on this?

falcon-git commented 6 years ago

@garemoko do you know if there are better ways of doing this now? If not I guess we should handle this by:

If the user answered incorrectly use the first alternative answer and the other ones in a custom property(extension), if the user correctly answered one of the alternative answers we use that answer and store alternatives in the same extension.

garemoko commented 6 years ago

Hi, I don't recall exactly how the blanks question works. Would it make sense to model each blank as a separate question with a separate xapi statement to reduce the number of permutations?

falcon-git commented 6 years ago

There might be multiple blanks in each sentence, i.e. There might be __ ___ in each ____

I'm not sure if it would make sense to model it as multiple sentences. The real problem at least is how xAPI presents multiple alternative answers.

garemoko commented 6 years ago

We've also got to think about how the data will be consumed. xAPI is very unlikely to change at this point but even if it did, how would a reporting tool represent all those options? I think it would have to present them as though they were separate questions.

kienv commented 6 years ago

I think if we can keep them in order then i think it can reduce a lot of possible answers eg . [first blank - possible answer 1,possible answer 2,possible answer 3,..],[second blank - possible answer 1,possible answer 2,possible answer 3,..],....

ilukanets commented 5 years ago

Hi guys,

We found this becomes a real problem. We have a small activity with 14 fill-in-blank questions. Each question has 4 possible answers. current, the code generates a 4^14 = 268435456 rows array for possible answers. this makes browsers get crashed and also DB issue.

Could you please review it or do you guy already working on this?

Hello...

We have the same issue reported by one of our customers. Are there some news on this?