Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-4738

Fallback for playing inline H5P activities when the package download fails

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • DEV backlog
    • H5P
    • Hide

      This issue only needs to be tested in 1 device.

      This issue is tricky to test because we weren't able to reproduce the original issue (some H5P packages not being downloadable in some specific devices). We'll simulate a failure while downloading by going offline, but this will cause some problems that wouldn't happen with the original issue.

      1. Create an H5P activity with a big H5P package. E.g. we have one in our master site > MM Dev Testing course > H5P > MOBILE-3917.
      2. Open the activity in the app, it should display a "Download H5P file" button.
      3. Click to download and, while the app says "Downloading", go offline (e.g. by activating flight mode). This is why it's important that the H5P is big, the bigger it is the more time it takes to download so it's easier to make the download fail.
      4. If this was a real error like the one reported, you would see a Toast at the bottom saying "This activity is only available with an internet connection. If your device is offline, you will not be able to access it". And the package would play online.
      5. However, since the device is offline, some more things will happen. The app will display the Toast at the bottom, but the activity will not work (the iframe will probably display an error saying "Webpage not available" or similar). Also, if the H5P activity has tracking enabled, the app will also display an error saying that any changes done while offline may not be saved.
      Show
      This issue only needs to be tested in 1 device. This issue is tricky to test because we weren't able to reproduce the original issue (some H5P packages not being downloadable in some specific devices). We'll simulate a failure while downloading by going offline, but this will cause some problems that wouldn't happen with the original issue. Create an H5P activity with a big H5P package. E.g. we have one in our master site > MM Dev Testing course > H5P > MOBILE-3917 . Open the activity in the app, it should display a "Download H5P file" button. Click to download and, while the app says "Downloading", go offline (e.g. by activating flight mode). This is why it's important that the H5P is big, the bigger it is the more time it takes to download so it's easier to make the download fail. If this was a real error like the one reported, you would see a Toast at the bottom saying "This activity is only available with an internet connection. If your device is offline, you will not be able to access it". And the package would play online. However, since the device is offline, some more things will happen. The app will display the Toast at the bottom, but the activity will not work (the iframe will probably display an error saying "Webpage not available" or similar). Also, if the H5P activity has tracking enabled, the app will also display an error saying that any changes done while offline may not be saved.
    • Moodle Apps - 2025 i1

      It seems that a package download failure could happen because of network issues or some specific devices issues with remote downloads.

      The H5P activity module should detect if a package download failed and then instead of displaying an error embed the H5P content inline so it can be executed from the server.

      This will prevent the H5P activity to work offline but at least it will allow the user to access to it

            dpalou Dani Palou
            jleyva Juan Leyva
            Pau Ferrer Pau Ferrer
            Isabel Renedo Rouco Isabel Renedo Rouco
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 5 hours, 29 minutes
                2d 5h 29m

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