← Back to team overview

mahara-contributors team mailing list archive

[Bug 1837194] Re: Adding notifications hooks for plugins

 

Here's also the patch for the inbox.

Note the change to the JS, I don't remember exactly why that was there
but from my notes, it seems that if you came to the message directly
(e.g. from Moodle's notifications, which is what this patch was for),
the act of opening it directly would break the ability to delete things.

This is everything I've got for the core integration here, please let me
know your thoughts on merging - I'd appreciate a hand with the Behat
since I'm not familiar with Mahara's Behat setup and I don't know how
best to trigger a notification, while knowing its ID, so it's possible
to go direct to the notification by URL.

** Patch added: "inbox.patch"
   https://bugs.launchpad.net/mahara/+bug/1837194/+attachment/5278063/+files/inbox.patch

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1837194

Title:
  Adding notifications hooks for plugins

Status in Mahara:
  New

Bug description:
  At Moodlemoot UK 2019, I demoed a piece of work we'd done for QMUL to
  better integrate their Moodle and Mahara -
  https://www.youtube.com/watch?v=Ixy4Ah9webQ for the presentation - and
  said I'd talk to the Mahara team about getting it into core so I could
  then release the rest of it as plugins.

  Essentially we made a few core hacks to 18.04 to support some
  additional behaviours around notifications sent to a user:

  * ability to add extra parameters in the inbox URL to open a specific message
  * call out to plugin functions if defined when a new notification is issued
  * call out to plugin functions if defined when a notification is read
  * call out to plugin functions if defined when a notification is deleted

  These hook points would allow a plugin to optionally do something with
  these notifications, such as sending the notifications out to a Moodle
  webservice, or updating the Moodle when a notification is read in
  Mahara, and with a view to being as efficient as possible to avoid
  affecting those who don't have the integration set up.

  I'll review the patches ASAP that I did for 18.04 to see what needs
  changing for 19.10 but I'd appreciate it if we could look at getting
  them in for that release and adding Behat tests for the first item, I
  don't think I can do anything for the others.

  The functionality I'm looking at adding is explicitly giving options
  to plugin authors, not changing core Mahara behaviour in case that's a
  concern.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1837194/+subscriptions


References