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

Avoid calling isDownloadable in course page

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor Minor
    • 4.4.0
    • 4.3.0
    • Performance
    • 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).

            dpalou Dani Palou
            dpalou Dani Palou
            Pau Ferrer Pau Ferrer
            Juan Leyva Juan Leyva
            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.