Different Games items state
Submitted by Alex_K on Thu, 06/17/2021 - 12:45
Forums:
Hi, I'm using "Memory" game, how can I know what image was flipped?
Also where ca I found some documentation on different games events, so that I will not ask this question on every game?
otacke
Thu, 06/17/2021 - 14:22
Permalink
Hi!You'll find all the source
Hi!
You'll find all the source code on github.
Best,
Oliver
Alex_K
Thu, 06/17/2021 - 14:41
Permalink
Still have the issue
Hi thank you for your response but can you be more specific?
I looked at the Memory game code but still can't get the data in the 'xAPI' event listener
otacke
Thu, 06/17/2021 - 19:32
Permalink
Hi Alex!I'll gladly help you
Hi Alex!
I'll gladly help you if you have a specific question that I can answer, but without you sharing how you tried to get hold of the xAPI events that Memory Game sends out, I can't. Using the "ExternalDispatcher" for xAPI is described at https://h5p.org/documentation/x-api. That's different from listening for internal events that some class of a content type migth use (those are usually not dispatched to the "outside") - so if you put that listener on the content type instance and listened for "interacted", that won't work.
Best,
Oliver
Alex_K
Sun, 06/20/2021 - 08:04
Permalink
Hi Oliver, Thank you for your help
Hi Oliver!
Thank you for your help, I'll try be more specific, I want to keep track in the "Memory" game on every card spin and to get information of the card, this is for anlytics reasons, I want to know the number of errors, meaning the number of unsuccessful card spins.
I know that listening to event "xAPI" is agreat way to "catch" the flip event but my problem is that I can't get the "spined" card object and therefor I don't know wich card was spined.
The only thing that can see is that in DOM the class name of the turned card was changed to "h5p-flipped" but is there other way?
Thank you!
otacke
Mon, 06/21/2021 - 10:25
Permalink
Hi Alex!The xAPI event doesn
Hi Alex!
The xAPI event doesn't tell you what card was flipped. That'd require an extension (what e.g. Course Presentation uses to add the slide number to the progressed statement) or using some other xAPI statement on top, so for both the code would need to be changed. Since Memory Game instances do not seem to expose their internal variables, I don't think there's an easier way than checking the DOM.
Cheers,
Oliver