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

Allow to enforce playing H5P activity modules always online when the package is not compatible with the app

XMLWordPrintable

    • Hide

      Test this issue in 1 Android and 1 iOS device.

      To test this issue you will need a package with missing dependencies. We have one in our master site > Dev test course > H5P > MOBILE-3917. If you want to add the package to a new site (with no other H5P installed), please contact me and I'll explain how to do this because you'll need a second package that includes the missing dependencies.

      During these steps you will fix the broken dependencies of an H5P activity, so if you're planning to use the MOBILE-3917 activity please create a new activity and re-upload the H5P file, that way we keep the MOBILE-3917 activity broken. Please remember duplicating activities is broken in our big course.

      1. In the app, open the H5P activity that has missing dependencies.
      2. If the package is big, click "Download file". If it's small then it should start downloading it automatically.
      3. After a while, a Toast will be displayed saying that the activity is only available with internet connection, and the H5P package should be displayed. Check that you can use the package normally.
        1. FYI, before this patch we displayed an error saying there were missing dependencies and the activity couldn't be played.
      4. Leave the activity, go to course downloads and click to download the activity. Check that you see an error message saying that there is a dependency missing. Júlia wanted to improve this message too but we decided to open a follow up issue (MOBILE-4717) to improve error messages for all activities in this page.
        1. Please notice that the H5P file is not re-downloaded because we already know that there are missing dependencies. However, we decided to keep the download button to avoid UX issues, and this is an edge case. E.g. if we remove the download button and this is the only activity not downloaded in the section, then the section should be marked as downloaded? To avoid this cases we decided to keep the button even if we know right now it cannot be downloaded.
      5. Open the activity again. Check that the package is displayed without downloading it and now you no longer see the Toast message.
      6. With the activity open, go offline. Check that the app displays an error saying that you could lose changes and you should connect to the internet. Please notice this message is only displayed if the activity has tracking enabled.
      7. Leave the activity and open it again while offline. Check that an error modal is displayed saying that the activity is not available offline and you need to connect again. A yellow warning will be displayed in the page too, and the activity will NOT be displayed.
      8. Go online with the activity open. Check that the app detects it and it displays the activity now.
      9. Open the activity summary modal (using the top-right icon) and click the trash icon to delete the data.
      10. While online, leave and re-open the activity. Check that the app displays the "Download file" button again (or try to download the package automatically if it's small). If the user deletes the downloaded data we decided to "unmark" the package and try to download it again.
      11. Download the file again to detect that it has missing dependencies.
      12. In LMS as teacher/admin, open the activity and click "Edit content" on top of the H5P package. This will open the content editor. Click to save changes without changing anything, this will re-create the H5P package and fix the missing dependencies.
      13. In the app, go to preferences and click to synchronize the site. This is done to invalidate the cache, that way the app will fetch the latest data from the server.
      14. In online, open the activity you just fixed. Check that the app displays the "Download file" button again (or try to download the package automatically if it's small). The app automatically detects that the H5P file has changed so now it tries to download it again because the dependencies could be fixed.
      15. Download the fixed file, it should play fine now in the app and work offline.
      16. For H5P embedded in other activities (e.g. a label or page) using the H5P button in atto/tiny, if they have missing dependencies they will use the "online player" too, but they won't display any error. The reason is that H5P embedded in other activities already use the "online player" if they aren't downloaded (while the H5P activity always required downloading the file first), so the behaviour of this component has barely changed.
      Show
      Test this issue in 1 Android and 1 iOS device. To test this issue you will need a package with missing dependencies. We have one in our master site > Dev test course > H5P > MOBILE-3917 . If you want to add the package to a new site (with no other H5P installed), please contact me and I'll explain how to do this because you'll need a second package that includes the missing dependencies. During these steps you will fix the broken dependencies of an H5P activity, so if you're planning to use the MOBILE-3917 activity please create a new activity and re-upload the H5P file, that way we keep the MOBILE-3917 activity broken. Please remember duplicating activities is broken in our big course. In the app, open the H5P activity that has missing dependencies. If the package is big, click "Download file". If it's small then it should start downloading it automatically. After a while, a Toast will be displayed saying that the activity is only available with internet connection, and the H5P package should be displayed. Check that you can use the package normally. FYI, before this patch we displayed an error saying there were missing dependencies and the activity couldn't be played. Leave the activity, go to course downloads and click to download the activity. Check that you see an error message saying that there is a dependency missing. Júlia wanted to improve this message too but we decided to open a follow up issue ( MOBILE-4717 ) to improve error messages for all activities in this page. Please notice that the H5P file is not re-downloaded because we already know that there are missing dependencies. However, we decided to keep the download button to avoid UX issues, and this is an edge case. E.g. if we remove the download button and this is the only activity not downloaded in the section, then the section should be marked as downloaded? To avoid this cases we decided to keep the button even if we know right now it cannot be downloaded. Open the activity again. Check that the package is displayed without downloading it and now you no longer see the Toast message. With the activity open, go offline. Check that the app displays an error saying that you could lose changes and you should connect to the internet. Please notice this message is only displayed if the activity has tracking enabled. Leave the activity and open it again while offline. Check that an error modal is displayed saying that the activity is not available offline and you need to connect again. A yellow warning will be displayed in the page too, and the activity will NOT be displayed. Go online with the activity open. Check that the app detects it and it displays the activity now. Open the activity summary modal (using the top-right icon) and click the trash icon to delete the data. While online, leave and re-open the activity. Check that the app displays the "Download file" button again (or try to download the package automatically if it's small). If the user deletes the downloaded data we decided to "unmark" the package and try to download it again. Download the file again to detect that it has missing dependencies. In LMS as teacher/admin, open the activity and click "Edit content" on top of the H5P package. This will open the content editor. Click to save changes without changing anything, this will re-create the H5P package and fix the missing dependencies. In the app, go to preferences and click to synchronize the site. This is done to invalidate the cache, that way the app will fetch the latest data from the server. In online, open the activity you just fixed. Check that the app displays the "Download file" button again (or try to download the package automatically if it's small). The app automatically detects that the H5P file has changed so now it tries to download it again because the dependencies could be fixed. Download the fixed file, it should play fine now in the app and work offline. For H5P embedded in other activities (e.g. a label or page) using the H5P button in atto/tiny, if they have missing dependencies they will use the "online player" too, but they won't display any error. The reason is that H5P embedded in other activities already use the "online player" if they aren't downloaded (while the H5P activity always required downloading the file first), so the behaviour of this component has barely changed.
    • Moodle Apps - 2024 i4.1, Moodle Apps - 2024 i4.2, Moodle Apps - 2024 i4.3

      This issue is similar to MOBILE-4669 but in this case is for when there are critical errors such as the one indicating dependency problems. If that's the case, we should embed the H5P package online (as a fallback).

      Please notice that we need to keep a track of faulty H5P packages to avoid having to do all the process of downloading the package, etc... but at the same time the user should be able to reset this behaviour (maybe just using the option to remove downloaded content from within the activity or the course downloads section)

            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 - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 4 hours, 16 minutes
                1d 4h 16m

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