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

xAPI -Report on lines individually. #4

Closed
garemoko opened this issue Oct 22, 2015 · 20 comments
Closed

xAPI -Report on lines individually. #4

garemoko opened this issue Oct 22, 2015 · 20 comments

Comments

@garemoko
Copy link

This content type contains one or more liens of text with a blank in them. Currently the content type reports "answered" for all lines together. If the lines were seen as a sub content type, they could have individual "answered" statements with interaction component data. This would include detail such as the learner's response, possible responses and score and success for each line.

@falcon-git
Copy link
Member

Do note that each line may have multiple blanks as well, and it might not be possible to understand each line if it stands on its own. We're actually considering to remove the multiple lines feature. They were there because we initially didn't use a wysiwyg text editor in this content type, but now there is really not reason to have that feature anymore, and most ppl only uses one line and creates several lines with the wysiwyg editor anyway.

@garemoko
Copy link
Author

There would need to be one statement per blank in order to fit with the interaction component data structure.

@falcon-git
Copy link
Member

I think I found that xAPI supports multiple blanks. Is our current implementation wrong then?

https://h5p.org/node/3426

I saw that it was troublesome but not impossible to implement support for multiple correct answers for each blank though.

@garemoko
Copy link
Author

Sorry yes, you are quite right and so is your documentation. My error.

I didn't get the interaction component properties when I tested though. Has that documentation been implemented? Here's the statement I got:

{
    "id": "faa6db0a-3bc4-4e96-b58d-6582b268e430",
    "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,
        "duration": "PT12.8S"
    },
    "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": "2015-10-22T10:55:47.307Z",
    "stored": "2015-10-22T10:55:47.307Z",
    "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"
            }
        },
        "objectType": "Activity"
    }
}

@falcon-git
Copy link
Member

That was strange. If you try the example on H5P.org you get it in your console so it is implemented yes.

https://h5p.org/fill-in-the-blanks

Does it show up in console in your test server?

@falcon-git
Copy link
Member

Waiting for feedback here...

@garemoko
Copy link
Author

garemoko commented Nov 3, 2015

Hi, sorry for the slow reply. Can you remind me how to turn on statements in the console? I know you mentioned it in another thread but I can't remember which repo it was on.

@garemoko
Copy link
Author

garemoko commented Nov 3, 2015

Found it H5P.externalDispatcher.on('xAPI', function(event){console.log(JSON.parse(JSON.stringify(event.data.statement)));})

So confirmed, I'm not getting interaction components in console on my local wordpress either.

@falcon-git
Copy link
Member

Ok, that probably doesn't prove anything since there might be other event listeners that runs before your's messing up the statement.

Have you got the latest version of the H5P library? Not the H5P plugin for Wordpress, but the content types https://h5p.org/update-all-content-types

Are you looking at the "answered" statements?

Could you provide a link to the page where this content is so that I may debug it?

@garemoko
Copy link
Author

garemoko commented Nov 4, 2015

I aim to check those questions later today or tomorrow. Unfortunately I can't give you access as I'm running this on localhost. I don't have a live Wordpress I can test this on.

@garemoko
Copy link
Author

garemoko commented Nov 4, 2015

Confirmed - I updated the libraries and checked that I was looking at the "answered" statement.

I attach the h5p file below. I had to rename this to .png for github to let me upload it, so hopefully you can download it and rename? If not I'll send it via email.

fill-in-the-blanks-9

@falcon-git
Copy link
Member

Thanks. I was unable to reproduce the problem with your code when running it in WP. If you turn of any xAPI related plugins on your site, does this still happen in the console?

@garemoko
Copy link
Author

garemoko commented Nov 4, 2015

Yes, I'm afraid I still get the same statement with only 1 plugin activated, H5P.

@garemoko
Copy link
Author

garemoko commented Nov 4, 2015

Just to make sure we're talking about the same thing, can you post the statement you're seeing?

@falcon-git
Copy link
Member

{"actor":{"account":{"name":"53e4abae-76e7-42d9-858e-c54c29059fa4","homePage":"https://h5p.org/"},"objectType":"Agent"},"verb":{"id":"http://adlnet.gov/expapi/verbs/answered","display":{"en-US":"answered"}},"object":{"id":"https://h5p.org/fill-in-the-blanks","objectType":"Activity","definition":{"extensions":{"http://h5p.org/x-api/h5p-local-content-id":837},"name":{"en-US":"Fill in the Blanks"},"description":{"en-US":"

Insert the missing words in this text about berries found in Norwegian forests and mountainous regions.

\n

Bilberries (Vaccinium myrtillus), also known as __________berries are edible, nearly black berries found in nutrient-poor soils.

\n

__________berries (Rubus chamaemorus) are edible orange berries similar to raspberries or blackberries found in alpine and arctic tundra. 

\n

Redcurrant (Ribes rubrum) are red translucent berries with a diameter of 8–10 mm, and are closely related to its black colored relative __________currant. 

\n"},"type":"http://adlnet.gov/expapi/activities/cmi.interaction","interactionType":"fill-in","correctResponsesPattern":["{case_matters=false}blue[,]Cloud[,]black"]}},"context":{"contextActivities":{"category":[{"id":"http://h5p.org/libraries/H5P.Blanks-1.4","objectType":"Activity"}]}},"result":{"score":{"min":0,"max":3,"raw":0,"scaled":0},"duration":"PT31.57S","response":"wef[,]sdf[,]sdf"}}

@garemoko
Copy link
Author

garemoko commented Nov 4, 2015

Hm.. well I'm throughly puzzled then!

@falcon-git
Copy link
Member

Yeah, I would be able to figure this out with access to the server :)

@falcon-git
Copy link
Member

I close this issue, and you could consider open a new one if you still think the issue is with H5P and not your setup.

@garemoko
Copy link
Author

OK.

@falcon-git
Copy link
Member

I actually found the problem now. When "Automatically check answers after input" is on it works, when it isn't on and you press the check button the properties are missing. This has been fixed on master and will be released soon. The problem seems to be caused by a merge that went wrong.

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

No branches or pull requests

2 participants