-
Improvement
-
Resolution: Done
-
Minor
-
4.3.0
-
MOODLE_403_STABLE
-
MOODLE_404_STABLE
-
Moodle Apps - 2024 i1.2, Moodle Apps - 2024 i1.3
Right now, the isDownloadable function of module prefetch handlers is called on course page if there is a module of that type. It is called from the getModuleStatus function.
It's important that the getModuleStatus calls isDownloadable to return the right status, but in the course page we don't care if the result is NOT_DOWNLOADED or NOT_DOWNLOADABLE, the result is the same. So we could create a new function that checks the status without using isDownloadable (we need to decide a good name for it), and this would allow us to avoid some WS calls when opening a course.
Other pages like course downloads and the module summary modal will still use the getModuleStatus function (that uses isDownloadable).