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

Execute sync hooks using cron delegate when the user clicks to sync a site

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.1.3
    • 3.1.2
    • Synchronization
    • Hide
      1. Go to App Settings and click to sync a site. Check that a spinner is shown and it disappears once the sync is done.
      2. Click to synchronize a site whose token has expired (you can use school demo sites). Check that an error is shown.
      3. Put your server down and perform and action that will require synchronizing (the easiest is send message once MOBILE-809 is integrated). Put your server up again and click to synchronize the site. Check that the offline data has been sent.
      Show
      Go to App Settings and click to sync a site. Check that a spinner is shown and it disappears once the sync is done. Click to synchronize a site whose token has expired (you can use school demo sites). Check that an error is shown. Put your server down and perform and action that will require synchronizing (the easiest is send message once MOBILE-809 is integrated). Put your server up again and click to synchronize the site. Check that the offline data has been sent.
    • MOODLE_31_STABLE
    • MOODLE_31_STABLE
    • Moodle Mobile 3.1.3

      Right now, when the user clicks to synchronize a site we only invalidate the downloaded data so it's redownloaded the next time he accesses the module.

      As the name "synchonize" implies, we should also execute the synchronization processes only for that site. Since we are executing a partial synchronization (only one site), the last execution time shouldn't be affected so it's possible that the app executes the site sync and the "all sites" sync at the same time.

      Some things to take into account:

      • The documentation of the cron delegate already specifies that it can pass a siteId to the execute function. SCORM and quiz sync functions already support both options, all sites or single site, so they can be used as an example.
      • We should show a spinner or something similar until all the processes are done. Right now we block the user using mmUtil#showLoading, we shouldn't do that.
      • Should this skip the queue of cron processes?

            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.