CMS-Android icon indicating copy to clipboard operation
CMS-Android copied to clipboard

Mark as read not synchronized between app and website

Open Victor-Titan opened this issue 4 years ago • 4 comments

Course notifications which have been opened in the website do not mark that course module as read in the app. In the same way, opening a new course module in the app does not mark it as read on opening the notifications in the website.

Victor-Titan avatar Apr 29 '21 09:04 Victor-Titan

The app keeps track of read/unread status locally. While the same notification shows up on the website and for the app, reading it at one place does not do the same in the other place. The goal is to eventually add a notification view so that you can view old notifications on your phone just like you would on the website.

abhijeetviswa avatar Apr 29 '21 09:04 abhijeetviswa

The app keeps track of read/unread status locally. While the same notification shows up on the website and for the app, reading it at one place does not do the same in the other place. The goal is to eventually add a notification view so that you can view old notifications on your phone just like you would on the website.

Do we have the functionality for that in the Moodle API?

Victor-Titan avatar Apr 30 '21 17:04 Victor-Titan

Yes. There a a bunch of API functions like message_popup_get_popup_notifications, message_popup_get_unread_popup_notification_count, and other such webservices to mark notifications as read etc.

abhijeetviswa avatar May 01 '21 06:05 abhijeetviswa

Yep, you can take a look at the implementation of APIs to sync read state between a client and the server here: https://github.com/agrawal-d/moodle-cms-notifs/blob/main/src/api.rs ( this one marks all as read )

agrawal-d avatar Jun 27 '21 07:06 agrawal-d