Moodle General Airnotifier Server X Private Airnotifier Server

Moodle General Airnotifier Server X Private Airnotifier Server

Douglas Rosa發表於
Number of replies: 4

Hello there,

I just set up a particular Airnotifier server. I noticed that there are some differences from the general server.

When a notification arrived from the general server, clicking on it the Moodle Mobile application was open and led to the resource that triggered the notification (forum, private message ...).

Using the private server, the behavior is different. The notification is only shown if the application is closed and when you touch the notification you are taken to the main screen of the application (My Courses), not to the resource that triggered the notification. Also, the notification comes with a signature equal to the one of the message that is sent by email, for example, a private message:

This is a copy of a message sent to you at XXX. Go to XXX to reply.



Is there any configuration to be made in the private Airnotifier so that the notifications work in the same way as the Moodle Airnotifier? Or is it a configuration in Moodle itself?

Thank you! 微笑

評比平均分數: -
In reply to Douglas Rosa

Re: Moodle General Airnotifier Server X Private Airnotifier Server

Juan Leyva發表於
Core developers的相片 Moodle HQ的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片

Hi,

they should work the same, are you sure you are using the correct Airnotifier repository and branch?

https://docs.moodle.org/32/en/Mobile_app_notifications#Installing_your_own_notifications_infrastructure

Juan

In reply to Juan Leyva

Re: Moodle General Airnotifier Server X Private Airnotifier Server

Douglas Rosa發表於

Hey Juan,

Yes, the correct AirNotifier repository and moodle2 branch.

I believe I have been able to understand the problem.

When I open the notification, I am actually taken to the main screen containing all the courses (My Courses). It turns out that when the user has many courses, and as the application loads all the information first, it takes a long time until it is taken from the course screen to the notification screen (I tested it with private message).

There's no way to solve it, I guess. The only way would be when a user accessed the notification, it did not go through the "My Courses" screen and was taken directly to the screen corresponding to the notification. There he would not have to wait for all the courses information to be loaded (grade, participants, etc).

In reply to Juan Leyva

Re: Moodle General Airnotifier Server X Private Airnotifier Server

Douglas Rosa發表於

Juan,

I just did a test: I created a static screen to work as my "home" after the user logs in. I changed the helper.js so that instead of being directed to the site.mm_courses, it is directed to this page (which I called site.home and contains only a welcome message).

I had a great time gain between the user tapping the notification and being taken to the resource that triggered it. Because the home page is static, it is almost instantaneous to load the resource.

In reply to Douglas Rosa

Re: Moodle General Airnotifier Server X Private Airnotifier Server

Dani Palou發表於
Core developers的相片 Moodle HQ的相片 Peer reviewers的相片 Plugin developers的相片

Hi Douglas,

that's weird, the redirect to the notification shouldn't wait for My Courses to be loaded, specially if you are using a private message notification.

Can you please send me the contents of the notification? You can add a console.log in $mmaPushNotifications#onMessageReceived to see what is receiving the app exactly. You can send it to me using a private message if you want (for privacy).

Kind regards,

Dani