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

Use new WebService to obtain filter overrides

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • 4.3.0
    • Filters
    • Hide

      This issue only needs to be tested in 1 device.

      This issue requires inspecting network requests.

      1. In a site with MDL-81065 integrated, make sure there is no filter override for a category.
      2. In the app, open the Network inspector.
      3. Login in a the site. Check that there is a WS call to core_filters_get_all_states, and no WS call to core_filters_get_available_in_context.
      4. If you open a course, or go to Dashboard, check that there is no WS call to core_filters_get_available_in_context.
      5. Check that filters continue working as they used to.
      6. In site, disable a certain filter only for a course (it should be enabled in the site and other courses).
      7. In the app, go to User menu > Preferences and click "Synchronise now" (this invalidates the filter WS call).
      8. Restart the app and open the Network inspector. Check that the disabled filter doesn't work in the course where it's disabled, but it works in the other courses. Check that there are no WS calls to core_filters_get_available_in_context.
      9. In site, now disable a filter in a category (the filter should be enabled at site level).
      10. In the app, go to User menu > Preferences and click "Synchronise now" (this invalidates the filter WS call).
      11. Restart the app and open the Network inspector.
      12. Open a course that belongs to the category with the disabled filter. Check that the disabled filter doesn't work. Check that there are some WS calls to core_filters_get_available_in_context (because of the category override).
      Show
      This issue only needs to be tested in 1 device. This issue requires inspecting network requests. In a site with MDL-81065 integrated, make sure there is no filter override for a category. In the app, open the Network inspector. Login in a the site. Check that there is a WS call to core_filters_get_all_states , and no WS call to core_filters_get_available_in_context . If you open a course, or go to Dashboard, check that there is no WS call to core_filters_get_available_in_context . Check that filters continue working as they used to. In site, disable a certain filter only for a course (it should be enabled in the site and other courses). In the app, go to User menu > Preferences and click "Synchronise now" (this invalidates the filter WS call). Restart the app and open the Network inspector. Check that the disabled filter doesn't work in the course where it's disabled, but it works in the other courses. Check that there are no WS calls to core_filters_get_available_in_context. In site, now disable a filter in a category (the filter should be enabled at site level). In the app, go to User menu > Preferences and click "Synchronise now" (this invalidates the filter WS call). Restart the app and open the Network inspector. Open a course that belongs to the category with the disabled filter. Check that the disabled filter doesn't work. Check that there are some WS calls to core_filters_get_available_in_context (because of the category override).
    • MOODLE_403_STABLE
    • Moodle Apps - 2024 i1.2, Moodle Apps - 2024 i1.3, Moodle Apps - 2024 i1.4

    Description

      In MDL-81065, a new WebService has been created to obtain the states of filters in the site. This WebService will only return the default values for the site and then the specific overrides for particular contexts.

      Using this WebService we can avoid calling core_filters_get_available_in_context most of the times, and this is the WS call that is used the most in the app. 

      When we want to retrieve the filters in a specific context, we'll use this WebService to check if there is an "override" for this particular context and the parent contexts to determine the list of filters to use instead of calling core_filters_get_available_in_context.

      The only case where we won't know the filters to use is when a site has an override at category level. In most places of the app we don't know the category of the context (e.g. of an activity), so we won't be able to determine the correct parent configuration. In that case we'll still use core_filters_get_available_in_context.

      Attachments

        Issue Links

          Activity

            People

              dpalou Dani Palou
              dpalou Dani Palou
              Noel De Martin Noel De Martin
              Juan Leyva Juan Leyva
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Clockify

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