Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-82522

Allow to view h5p draftfiles

      The goal is to preview the content of a text editor where H5P content is embedded using the H5P button (see https://docs.moodle.org/404/en/H5P#Embedding_H5P_into_other_activities). Currently the text editor show shows only a placeholder in atto, and only a link in Tiny.

      For the text editors atto and tiny there is a plugin which allows a user to preview the content of the editor before saving:

      At the moment, when using the Preview Plugin, it displays "H5P file not found", this is because in code h5p draft files are completely blocked from viewing, see: https://github.com/moodle/moodle/blob/main/h5p/classes/api.php#L622-L625 (commenting this out allows to preview).

      When reviewing why draft files are not downloadable, I can only find a improvement line in this comment: https://tracker.moodle.org/browse/MDL-66609?focusedId=687630&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-687630

      Besides, an exception has been added to exclude the draft files (because they are considered temporary files so shouldn't be displayed by the player).

      I've attached two images. In these image you can see that we can only see a link in the Tiny text editor and the Preview modal displays a error when the draft files are disallowed, and shows the h5p content when the draft files are allowed (deleting the 4 lines linked)

      I'd like to finish with the question; why should draft files not be displayed by the player, even if they are considered temporary?

            scottverbeek Scott Verbeek
            scottverbeek Scott Verbeek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.