-
Improvement
-
Resolution: Fixed
-
Minor
-
3.8.2
-
-
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.