Hi,
the Moodle app communicates with the server using WebServices. So for example when the user opens the "My courses" page, we call the appropriate WebServices to retrieve that info.
The app has a cache system (using a local database) to avoid calling the server too often. So for example if a user opens a certain course several times in a short time, the first time the app will perform a request to the server to obtain the latest data but the following requests will use the data that is already stored in the device. This system is the one that allows the app to work in offline. The "valid time" of the information depends of the WebService (whether the data retrieved can change often or not), and it can go from 7 minutes to 18 hours. In general there is no synchronization system to keep this information up to date, it will be updated the next time the user opens the page in online and the data is no longer "valid".
When a user tries to create/edit/delete something in offline and the app allows it, we store the data in a local database to be sent when the user is connected. There are several factors that can impact how often we try to send the offline data to the server, the app usually waits 5 - 15 minutes between retries (e.g. if the server is down).
So yes, the app has a local db to store the data (it uses sqlite).
Cheers,
Dani