I would like to implement offline support to attendance plugin for moodle mobile app.
I am working on suggestions given by @Dan Marsden on thread :https://moodle.org/mod/forum/discuss.php?d=395122
He suggested to me, this feature can be added through remote addon or I need to add support to the Moodle mobile app code so that the newer method supports offline access.
Attendance plugin uses newer method to allow support in mobile app. I have some queries regarding it.
1. Why this newer method does not provide support for offline access ? Is there any technical constraints or it is purposefully left out ?
2. Also which approach would be better remote addon or adding support for offline access in moodle mobile code?
I am thinking to implement it as following:-
As Attendance plugin use CoreCourseModuleDelegate in newer method to add support in moodle mobile app.
As CoreCourseModuleDelegate has option for offlinefunctions, where we can specify list of function to prefetch the module. Thus we can pre download
the views of attendance for offline purposes.
(Also we can create our own prefetch handler to determine what needs to be download)
When teacher is offline, the attendance response will be stored in SQL
(it is already used in moodle app) untill teacher is offline.
When teacher got internet ,attendance will be synchronise with moodle site database.
what do you think about this approach ?
Is their any other approach better than above?
If yes please let me know.
Any suggestion will be highly appreciated.
Thanks and Regards