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

Calculate download size: ignore size of files already downloaded

XMLWordPrintable

    • 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.
    • MOODLE_38_STABLE
    • MOODLE_39_STABLE
    • Moodle App 3.9.0

      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.

            pferre22 Pau Ferrer
            dpalou Dani Palou
            Dani Palou Dani Palou
            Juan Leyva Juan Leyva
            Dani Palou Dani Palou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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