Detecting Changes in Slope and Level
Submitted by spazfox on Thu, 11/19/2015 - 08:19
This H5P question is part of a tutorial on the visual analysis of single-subject or time-series data in behavioral science. I used some custom javascript code to listen to the question's xAPI statement to 1) change the image of the question to provide visual feedback in addition to the regular textual feedback and 2) conditionally change what the "next page" button links to (to provide adaptive remediation for those who miss the question).
Comments
roman
Thu, 01/14/2016 - 22:44
Permalink
Javascript question
Hi spazfox! I really enjoyed your H5P implementation and think that its a great way to utilize the xAPI statements as well.
I was wondering if you could possible share the javascript code you use to listen to the statements, or point me in a direction where I can figure it out on my own.
Thank you
Roman
falcon
Tue, 01/19/2016 - 22:32
Permalink
You have perhaps already seen
You have perhaps already seen this xAPI documentation page? By the way I agree, this is great integration by spazfox :)
spazfox
Sat, 06/18/2016 - 05:33
Permalink
Sure, he's a bit of the code
Sure, he's a bit of the code we use for the xAPI statements:
<code>
H5P.externalDispatcher.on('xAPI', function(event){
//Only check total score if the object is not the child of a larger object (e.g., Course Presentation)
if (event.getVerifiedStatementValue(['context','contextActivities','parent']) === null) {
if(event.getScore() != null){
if (event.getScore() === event.getMaxScore() ){
showCorrectNext();
} else {
showIncorrectNext();
}
}
}
});
</code>