Documentation tool in Interactive Book - Submit doesn't work and return error

Hi, 

I am using Moodle 3.10.3 and have noticed an issue with the H5P documentation tool when it is used in an interactive book. It appears that if we have more than one documentation tool in an interactive book, the submit button does not work on the first of the documentation tools.

Step the reproduce the bug,

1, Add activity, choose H5P core of Moodle.

2, Add an Interactive book

3, In the interactive book, add some pages with more than two documentation tool content.

4. In documentation tool content, create some standard page and documentation export page elements

5, Try to input some text and go to the export document page

6, Press Create Document

7, Press Submit

8, Check the console log and see the error

documentation-tool.js?ver=1.8.9:653

        

       Uncaught TypeError: Cannot read properties of undefined (reading 'forEach')

    at DocumentationTool.H5P.DocumentationTool.DocumentationTool.getXAPIDataFromChildren (documentation-tool.js?ver=1.8.9:653:24)

    at DocumentationTool.H5P.DocumentationTool.DocumentationTool.getXAPIData (documentation-tool.js?ver=1.8.9:673:22)

    at h5p-column.js?ver=1.13.1:476:24

    at Array.map (<anonymous>)

    at getXAPIDataFromChildren (h5p-column.js?ver=1.13.1:474:23)

    at Column.self.getXAPIData (h5p-column.js?ver=1.13.1:353:19)

    at h5p-interactive-book.js?ver=1.3.5:10:63434

    at Array.map (<anonymous>)

    at e.r.getXAPIDataFromChildren (h5p-interactive-book.js?ver=1.3.5:10:63372)

    at e.r.getXAPIData (h5p-interactive-book.js?ver=1.3.5:10:63249)

 

There is a work around whereby you need to go to the second documentation tool or go through all pages of interactive book or go to view ‘sumary & submit’ part and then come back to the first documentation tool and submit again. It will work.

I've had a look at the H5P forums but can't find any mention of this issue and it is a new issue as these packages were working fine before.

 

 
Attachments: 
Content types: