Limit progression on Interactive book
Submitted by Kevin Winter on Thu, 01/21/2021 - 12:39
Forums:
Hi
We're using the h5p plugin within learndash. Is there a way to limit progression so the user can not click next lesson until they have read all the pages in the book?
Thanks
BV52
Thu, 01/21/2021 - 18:08
Permalink
Hi Kevin,Currently there is
Hi Kevin,
Currently there is no way of limiting progress in the Interactive Book.
-BV
f15strikeeagle
Fri, 06/06/2025 - 04:46
Permalink
Hi BV. This is almost 5
Hi BV. This is almost 5 years later, but will H5P offer a way to track viewership of specific pages in an interactive book? I've experimented with H5P in Moodle but there's a few major problems. One big problem is that students can completely skip looking at an H5P object. The LMS has no way to enforce a student fully viewing all pages of an H5P object, making the H5P object purely decorative. Can't there be a simple flag being triggered by the H5P object once every page of a book is viewed?
otacke
Sat, 06/07/2025 - 11:47
Permalink
Hi, f15strikeeagle (I only
Hi, f15strikeeagle (I only played f14tomcat)!
Normally, compound content types trigger an xAPI statement with the verb `progressed` and a description of the target, e.g. the index of the slide in Course Presentation. Those xAPI statements can then be evaluated to learn about progress within the content type. Unfortunately, Interactive Book does not trigger that `progressed` statement when moving from chapter to chapter. Would be a very simple addition though.
If you are not afraid of customizing your H5P setup a little, you can achieve this yourself fairly easily. You can try this out in your browser's development console:
- Open Interactive Book content.
- In the development console, check that the context is set to the h5p-iframe.
- Use
H5P.instances[0].on('newChapter', (event) => { const chapterPrefix = 'h5p-interactive-book-chapter-'; const chapterSubcontentID = event.data.chapter.replace(chapterPrefix, ''); const chapterNo = H5P.instances[0].chapters.findIndex((chapter) => chapter.instance.subContentId === chapterSubcontentID) + 1; console.log(`User visited chapter #${chapterNo}`); });and then go from page to page. `chapterNo` will hold the chapter number. That's a proof of concept. The same approach can be applied programmatically by injecting JavaScript (see https://h5p.org/moodle-customization) and could be send to your server for further processing, e.g. as an xAPI statement or in some other fashion. Don't know what Moodle holds in store for evaluation of such "flags" though - might need some extra plugin?
Limiting progression would be a little more effort, but there's a pull request for adding that feature already, see also ticket at https://h5ptechnology.atlassian.net/browse/HFP-4227. However, I can't tell if or when H5P Group is going to review that pull-request. Hopefully, the recent employment of Kelly Choi as a community manager is going to make this contribution process more transpatent and more predictable.
Best,
Oliver