-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
3.6.1
-
MOODLE_36_STABLE
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.