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

Download files for mod_page and mod_book in background

XMLWordPrintable

    • Hide

      This issue only needs to be tested in 1 device.

      1. In the app, login in our 4.4 site and go to MM Dev Testing course > Resource: Page.
      2. Open "Page containing 50MB video 3 times but only used once". Check that the page loads faster than it used to in the 4.4 version of the app.
      3. Open the activity info menu (the i icon at the top-right). Check that the total space used is only a few KB, the video wasn't downloaded because it's a big video, it's only downloaded in background when playing the video or if you download the page activity.
      4. Now play the video and wait a bit to make sure the video finishes downloading in background (waiting around 30 seconds should be enough).
      5. Open the activity info menu (the i icon at the top-right). Check that the total space used is now around 50MB.
        1. Please notice the activity is still not marked as downloaded, we only mark it as downloaded if the user downloads it. This is a decision we made with Juan because detecting if the activity is downloaded every time a file is downloaded can affect performance.
      6. Click to Download the page. When done, check that the space used is now 150MB. When viewing the page we only download the files used, but when downloading the page we download all files included in the activity, even if they aren't used in the page. 
      7. Now go to "Resource: Book", open "Book containing 50MB video 3 times but only used once" and click "Start". Check that the book loads faster than it used to in the 4.4 version of the app.
      8. Check that you can view the book and its chapters, but don't play the the video inside "First chapter".
      9. Go back and open the activity info menu. Check that the total space used is around 4-5MB.
      10. Now Resume the book, play the video in the first chapter and wait a bit to make sure the video finishes downloading in background (waiting around 30 seconds should be enough).
      11. Go back and open the activity info menu. Check that the total space used is now around 54MB.
      12. Click to Download the book. When done, check that the space used is now around 154MB. 
      13. Besides the steps above, just check that pages and books work fine, similar to how they used to. But please notice that now big embedded videos/audios won't be available in offline unless you play them or you download the activity.
      Show
      This issue only needs to be tested in 1 device. In the app, login in our 4.4 site and go to MM Dev Testing course > Resource: Page. Open "Page containing 50MB video 3 times but only used once". Check that the page loads faster than it used to in the 4.4 version of the app. Open the activity info menu (the i icon at the top-right). Check that the total space used is only a few KB, the video wasn't downloaded because it's a big video, it's only downloaded in background when playing the video or if you download the page activity. Now play the video and wait a bit to make sure the video finishes downloading in background (waiting around 30 seconds should be enough). Open the activity info menu (the i icon at the top-right). Check that the total space used is now around 50MB. Please notice the activity is still not marked as downloaded, we only mark it as downloaded if the user downloads it. This is a decision we made with Juan because detecting if the activity is downloaded every time a file is downloaded can affect performance. Click to Download the page. When done, check that the space used is now 150MB. When viewing the page we only download the files used, but when downloading the page we download all files included in the activity, even if they aren't used in the page.  Now go to "Resource: Book", open "Book containing 50MB video 3 times but only used once" and click "Start". Check that the book loads faster than it used to in the 4.4 version of the app. Check that you can view the book and its chapters, but don't play the the video inside "First chapter". Go back and open the activity info menu. Check that the total space used is around 4-5MB. Now Resume the book, play the video in the first chapter and wait a bit to make sure the video finishes downloading in background (waiting around 30 seconds should be enough). Go back and open the activity info menu. Check that the total space used is now around 54MB. Click to Download the book. When done, check that the space used is now around 154MB.  Besides the steps above, just check that pages and books work fine, similar to how they used to. But please notice that now big embedded videos/audios won't be available in offline unless you play them or you download the activity.
    • MOODLE_405_STABLE
    • Moodle Apps - 2024 i3.1, Moodle Apps - 2024 i3.2

      When a user opens a page or a book, we download all files before displaying anything. If the resource has a lot of files or big files, the UX is really poor because the app takes a long time to display the contents.

      We should display the page/book ASAP, and download the rest of files in background as we do in many places of the app. Also, we might want to avoid downloading files not used in the HTML.

            dpalou Dani Palou
            dpalou Dani Palou
            Pau Ferrer Pau Ferrer
            Isabel Renedo Rouco Isabel Renedo Rouco
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 34 minutes
                4h 34m

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