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

Don't prefetch mod_glossary_get_entry_by_id

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor Minor
    • 3.7.1
    • 3.7.0
    • Glossary add-on
    • Hide

      This issue should only be tested in 1 device. You should be able to inspect the device.

      1. Install the app in the device and login in master site.
      2. Go to MM Dev Testing > Glossary and enable download options.
      3. Open the inspector and go to the Network tab.
      4. Prefetch the glossary "Main glossary in the course". Check that there is no request to the WS mod_glossary_get_entry_by_id.
      5. Go offline and open the glossary. Check that you're able to view the glossary in offline.
      6. Go back to the Glossary section and click any of the links in the section description. Check that the glossary term is opened in offline.
      Show
      This issue should only be tested in 1 device. You should be able to inspect the device. Install the app in the device and login in master site. Go to MM Dev Testing > Glossary and enable download options. Open the inspector and go to the Network tab. Prefetch the glossary "Main glossary in the course". Check that there is no request to the WS mod_glossary_get_entry_by_id. Go offline and open the glossary. Check that you're able to view the glossary in offline. Go back to the Glossary section and click any of the links in the section description. Check that the glossary term is opened in offline.
    • MOODLE_37_STABLE
    • MOODLE_37_STABLE
    • Moodle App 3.7.1

      When prefetching a glossary, right now we prefetch all entries. In one of our test glossaries, this means we have around 1400 WS calls to get this data.

      The entry data is already included in the get_entries_by_letter WS, so we could use that WS as a fallback to get the entry data if the by_id request isn't cached. That way we wouldn't have to prefetch all the entries individually.

      There is an extra problem though. To use this fallback we need the glossary ID, and we don't have that in glossary auto-links. The only way to solve this is to have a local table with glossaryId + entryId so we can retrieve the glossaryId using an entryId in offline.

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