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

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

Open
csidirop opened this issue Jul 8, 2024 · 4 comments
Open

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

csidirop opened this issue Jul 8, 2024 · 4 comments

Comments

@csidirop
Copy link

csidirop commented Jul 8, 2024

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:

  • Test1: 2/2 (if two out of two were correct answered)
  • Test2: 0/1

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
Copy link

otacke commented Jul 8, 2024

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
Copy link
Author

csidirop commented Jul 8, 2024

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
Copy link
Author

csidirop commented Jul 19, 2024

A little addendum:

If I force H5PIntegration.reportingIsEnabled to true somewhere after:

this.isSubmitButtonEnabled = false;
this.isAnswerUpdated = true;
if (contentData.isScoringEnabled !== undefined || contentData.isReportingEnabled !== undefined) {
this.isSubmitButtonEnabled = (contentData.isScoringEnabled || contentData.isReportingEnabled);
}
else if (H5PIntegration.reportingIsEnabled !== undefined) { // (Never use H5PIntegration directly in a content type. It's only here for backwards compatibility)
this.isSubmitButtonEnabled = H5PIntegration.reportingIsEnabled;
}

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
Copy link
Author

csidirop commented Jul 30, 2024

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

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