Dictaction - result.success in xAPI statement is always false
Submitted by Michael Dajewski on Sat, 04/04/2020 - 21:56
Forums:
xAPI statement example:
actor: {...}verb: {id: "http://adlnet.gov/expapi/verbs/answered", display: {…}}
object: {...}
context: {...}
result:
score: {min: 0, max: 14, raw: 14, scaled: 1}
completion: true
success: false
Even if result.scale.scaled is 1 the result success is false.
The 'Behavioural settings' in editor have no impact.
Tested with: https://h5p.org/dictation (1st example)Library version: 1.0.2
This happens because the mistakesTrimmed used in isPassed() is never declared nor assigned a value.
See: h5p-dictation/src/scripts/h5p-dictation.js
Branch: master
Latest commit to this file: 5de4db4
LN: 318
this.isPassed = () => this.mistakesTrimmed === 0;Proposed change:
this.isPassed = () => this.mistakesCapped === 0;Above change fixes issue for me, but I will live decission upto you.
The result.success is true or false as expected.
Content types:
otacke
Mon, 04/06/2020 - 00:44
Permalink
Hi Michael!Clearly a bug that
Hi Michael!
Clearly a bug that happened when tidying up the code. Why didn't you simply file a pull request for the change? No need for lengthy explanations.
Best,
Oliver
otacke
Mon, 04/06/2020 - 14:19
Permalink
Hi Michael!I fixed the issue
Hi Michael!
I fixed the issue and also was told by the H5P core team that the patch should be out this week. Thanks for reporting and sorry for the trouble.
Cheers,
Oliver
Michael Dajewski
Tue, 04/07/2020 - 04:34
Permalink
Oliver, Thank you for fixing
Oliver,
Thank you for fixing it quickly.
Sorry for lengthly report - wanted to be as clear as possible.
I was not sure the pull request is the right way to report the issues.
Best regards,
MichaelD
otacke
Tue, 04/07/2020 - 18:17
Permalink
Hi Michael!If you fixed it
Hi Michael!
If you fixed it anyway, don't be shy :-)
Best,
Oliver
otacke
Thu, 04/09/2020 - 13:23
Permalink
Hi Michael!The fix has been
Hi Michael!
The fix has been released on h5p.org and should soon be available via the editor for updating. Thanks again.
Best,
Oliver