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

Calculate download size: ignore size of files already downloaded

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Test on one device of your choice.

      1. Enter into the master site.
      2. Enable downloads and click on the download link of the dev master course.
      3. When the size warning appears, annotate the size and Cancel.
      4. Enter the course and download a section (ie forum section).
      5. Go back to the dashboard.
      6. Repeat step 2.
      7. When the size warning appears, check it's less than the one you annotated on step 3.
      Show
      Test on one device of your choice. Enter into the master site. Enable downloads and click on the download link of the dev master course. When the size warning appears, annotate the size and Cancel . Enter the course and download a section (ie forum section). Go back to the dashboard. Repeat step 2. When the size warning appears, check it's less than the one you annotated on step 3.
    • Affected Branches:
      MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:
    • Sprint:
      Moodle App 3.9.0

      Description

      Right now, when a user tries to download a module/section/course we calculate the size of the download. By default we just sum the size of the files, but we don't check if they're already downloaded. See the getDownloadSize function in CoreCourseModulePrefetchHandlerBase (please notice that some activities override this function).

      Also related to this, when a user clicks the refresh button of a module we call the invalidateContent function of the prefetch handler, and in some modules this invalidates the files (so they'll be re-downloaded). This code is inherited from a long time ago, and probably isn't needed in most cases because we can control if the file needs to be re-downloaded or not based on the timemodified or revision. So IMO we need to check if these functions are really needed, and remove all the ones that aren't.

        Attachments

          Activity

            People

            Assignee:
            pferre22 Pau Ferrer
            Reporter:
            dpalou Dani Palou
            Peer reviewer:
            Dani Palou
            Integrator:
            Juan Leyva
            Tester:
            Dani Palou
            Participants:
            Component watchers:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              26/Jun/20