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

Trigger app reload on server update



    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.6.1
    • Fix Version/s: None
    • Component/s: Remote addons
    • Labels:
    • Affected Branches:


      If the user is using the app when a server is updated, the plugins they have loaded may be out of sync with those on the server.  For example, if a plugin changes a web service, the javascript for that plugin may not be expecting the result it now gets (we had this situation recently when fixing a bug which required both a change in the data structure being returned, and in the client-side code that handles it).

      To fix this, we propose something like the following:

      • tool_mobile_get_site_config should have the plugin version hash added to its return values.  This is stored by the app for later comparison.
      • When the app makes a web service call to check for messages, it should also call a new web service function which returns the current plugin version hash.
      • If the hash has changed from the initial value, the user is given a prompt that the app needs to reload.  Upon confirmation, the reload occurs (presumably something like window.navigator.reload() is sufficient, unless ionic has a tidier way of doing this).

      The user should probably be able to cancel the reload in case they are in the middle of something, in which case they will see the prompt again next time it checks.




            • Votes:
              0 Vote for this issue
              3 Start watching this issue


              • Created: