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

Update site info periodically

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: DEV backlog
    • Fix Version/s: 2.1
    • Component/s: Synchronization
    • Labels:
    • Testing Instructions:
      Hide

      To test this issue you need to perform changes in Moodle and check that they're applied to the app once you logout/login or re-load the app. It can be interesting to add a $timeout in $mmSitesManager.loadSite, right before calling updateSiteInfo to simulate slow connections.

      Some examples of tests to do:

      • Change username in Moodle. Check that it is updated in side menu as soon as the site data is updated.
      • Disable downloadfiles in the service and check that you're logged out in the app (you can use the app until the updateSiteInfo call finishes).
      • Enable/Disable some of the side menu addons. E.g. enable/disable messaging in Moodle. Check that the addon is enabled/disabled as it should.
      • Remove the core_message_search_contacts function and check that the search box in Contacts is shown/hidden as it should.
      • Remove the manageownfiles capability and check that the "My private files" option is not shown.
      Show
      To test this issue you need to perform changes in Moodle and check that they're applied to the app once you logout/login or re-load the app. It can be interesting to add a $timeout in $mmSitesManager.loadSite , right before calling updateSiteInfo to simulate slow connections. Some examples of tests to do: Change username in Moodle. Check that it is updated in side menu as soon as the site data is updated. Disable downloadfiles in the service and check that you're logged out in the app (you can use the app until the updateSiteInfo call finishes). Enable/Disable some of the side menu addons. E.g. enable/disable messaging in Moodle. Check that the addon is enabled/disabled as it should. Remove the core_message_search_contacts function and check that the search box in Contacts is shown/hidden as it should. Remove the manageownfiles capability and check that the "My private files" option is not shown.
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull Master Branch:

      Description

      Right now the site info is downloaded when a site is added and it's never updated. This data should be updated periodically. A good place to update this data is when a session is restored (open app or click on a site in sites list). This operation should not block the user.

      We cannot use the cache in the first call to get the data (new site), but we could apply it to the update calls to decrease the number of calls to server.

      It might be interesting to provide an option for the user to update this data when he wants, since he might be an admin changing site info. A possible choice is to add this feature in the "Sync" options on site preferences.

      Updating this means updating the site stored in mmCoreSitesStore and the current site.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dpalou Dani Palou
              Reporter:
              dpalou Dani Palou
              Peer reviewer:
              Frédéric Massart
              Integrator:
              Juan Leyva
              Tester:
              Dani Palou
              Participants:
              Component watchers:
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                28/Aug/15