h5p / h5p-interactive-book

MIT License
16 stars 61 forks source link

Interactive Book does not return any results to the calling LMS #154

Open csidirop opened 2 months ago

csidirop commented 2 months ago

The Interactive Book module does not return any results to the calling LMS (in our case ILIAS).

Other H5P modules like Blanks or Drag Text returning how many tasks were solved correctly (from all of them).

I'm sure other LMSs using the results too. Something like:

I couldn't verify this, but I believe IB is missing a file presave.js (like presave.js in drag-text) or presave.jsin blanks. For example, it validates the content for the Blanks module, calculates the maximum score based on the number of blanks in the questions, and ensures that the required parameters are present before saving the content. If any problems are found, it throws an error, otherwise it validates the score and calls the completion callback.

Is that correct? Can we have that too?

If yes, I could provide help or implement it myself if you don't have resources left for that kind of task.

otacke commented 2 months ago

The presave.js file is not a requirement. It's an optional addition (only used by Edlib to the best of my knowledge) that would allow to determine the number of maximum points before the content is rendered for the first time (if you desperately required to know the maximum possible score server side immediately after saving the content), but it has nothing to do with the xAPI data that is used for reporting.

Interactive Book only reports scores when the user hits the "Submit Report" button on the Summary page (just like Interactive Video only reports scores when the user submits them or like Course Presentation only submits them when the user enters the summary slide). That's more likely the cause.

If you don't see the "Submit Report" button on ILIAS, you should reach out to Studer&Raimann, the maintainers of the ILIAS module. They'd have to ensure that their H5P integration sets the "environment" variable H5PIntegration.reportingIsEnabled to true.

csidirop commented 2 months ago

Thanks for the quick clarification!

If you don't see the "Submit Report" button on ILIAS, you should reach out to Studer&Raimann, the maintainers of the ILIAS module. They'd have to ensure that their H5P integration sets the "environment" variable H5PIntegration.reportingIsEnabled to true.

Where exactly should this button be located? On the result page of the module or is it Ilias content outside the h5p iframe?

Because we don't have that button on the result page: grafik

csidirop commented 1 month ago

A little addendum:

If I force H5PIntegration.reportingIsEnabled to true somewhere after: https://github.com/h5p/h5p-interactive-book/blob/a3b1cdeb09881c90615fb715483e545ec2a983fd/src/scripts/app.js#L56-L63 I'm getting the submit button. Thats what it looks like for those who wonder: grafik

After a bit of searching I found a forum post: Interactive Book: Missing "Submit Report" Button in which you gave the hint to:

... tick the option "Enable LRS dependent content types" in the plugin settings of H5P which will then set a flag for reporting being enabled (H5PIntegration.reportingIsEnabled as mentioned on the issue tracker). It's a non-intuitive procedure unfortunately.

Unfortunately that didn't changed anything in my tests (ILIAS r_7 & r_8). But added it for future reference. Is this variable even in use anymore? I couldn't find any trace of H5PIntegration.reportingIsEnabled or reportingIsEnabled other than here and at the H5P Documentation Tool. (grep over the whole ILIAS dir)

csidirop commented 1 month ago

you should reach out to Studer&Raimann, the maintainers of the ILIAS module. They'd have to ensure that their H5P integration sets the "environment" variable H5PIntegration.reportingIsEnabled to true.

Ticket: SUPPORT-15210