Offline attendance with Moodle mobile app

Re: Offline attendance with Moodle mobile app

by SHIV CHARAN SHARMA -
Number of replies: 2
The requirement is teacher should be able to mark attendance of students while offline from moodle mobile app. When internet is available attendance get updated with moodle website.
In reply to SHIV CHARAN SHARMA

Re: Offline attendance with Moodle mobile app

by SHIV CHARAN SHARMA -
Hello everyone,
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 SQLite database (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
  
 


In reply to SHIV CHARAN SHARMA

Re: Offline attendance with Moodle mobile app

by SHIV CHARAN SHARMA -
Hello everyone,

I would like to do this project under GSOC 2020.
I have discussed some queries and an approach to implement this project in my previous message. Please review it smile
Please provide your valuable feedback/suggestions with respect to it?

In addition to above said approach, we can also use similar approach as in offline quiz module in moodle mobile app.
As for offline feature, quiz module use TypeScript code written in "moodleapp/src/addon/mod/quiz/providers/" folder. Here TypeScript code handle all function such as prefetch, quiz, saving of response, synchronisation of data with moodle site etc.
We can also use similar approach to implement offline functionality for attendance.

What is your opinion about these approaches ?
In order to add offline functionality for attendance in moodle mobile codebase, moodle mobile app community's opinion is very crucial.Kindly share your views.

Any suggestion will be highly appreciated smile

Thanks and regards
--
Shiv Charan
https://github.com/ShivCharanSharma
https://codebuddy.code.blog/