Actions

Developer Area/Core Subsystems/Notifications: Difference between revisions

From Mahara Wiki

< Developer Area‎ | Core Subsystems
(Created page with "Mahara has a notifications framework for getting messages to users through a variety of means. <div class="wikitext"> Notification types are plugins, currently there exists thr…")
 
No edit summary
Line 17: Line 17:
<div id="section_1">
<div id="section_1">


=== watchlist (artefact) ===
===watchlist (artefact)===


Activity that occurs on an artefact (edit)
Activity that occurs on an artefact (edit)
Line 27: Line 27:
</div><div id="section_2">
</div><div id="section_2">


=== watchlist (view) ===
===watchlist (view)===


Any new items added to the view, or the view name/description etc changed.
Any new items added to the view, or the view name/description etc changed.
Line 37: Line 37:
</div><div id="section_3">
</div><div id="section_3">


=== watchlist (community) ===
===watchlist (community)===


Unclear what activity on a community is so far.
Unclear what activity on a community is so far.
Line 47: Line 47:
</div><div id="section_4">
</div><div id="section_4">


=== maharamessage ===
===maharamessage===


System message. Will notify all users the message is sent to.
System message. Will notify all users the message is sent to.
Line 55: Line 55:
</div><div id="section_5">
</div><div id="section_5">


=== usermessage ===
===usermessage===


Message from one user to another. Will notify the user the message is sent to.
Message from one user to another. Will notify the user the message is sent to.
Line 63: Line 63:
</div><div id="section_6">
</div><div id="section_6">


=== feedback (artefact) ===
===feedback (artefact)===


Feedback on an artefact. Will notify the artefact owner.
Feedback on an artefact. Will notify the artefact owner.
Line 71: Line 71:
</div><div id="section_7">
</div><div id="section_7">


=== feedback (view) ===
===feedback (view)===


Feedback on a view. Will notify the view owner.
Feedback on a view. Will notify the view owner.
Line 79: Line 79:
</div><div id="section_8">
</div><div id="section_8">


=== newview ===
===newview===


A new view is created. Will notify any users who have access to this view (through friends list, user list or group list (view permissions))
A new view is created. Will notify any users who have access to this view (through friends list, user list or group list (view permissions))
Line 87: Line 87:
</div><div id="section_9">
</div><div id="section_9">


=== viewaccess ===
===viewaccess===


View access has changed. Will notify any users who have access to this view (through the same 3 ways as newview), and who AREN'T in the list of oldusers passed in
View access has changed. Will notify any users who have access to this view (through the same 3 ways as newview), and who AREN'T in the list of oldusers passed in
Line 95: Line 95:
</div><div id="section_10">
</div><div id="section_10">


=== contactus ===
===contactus===


The Contact Us form is filled out. Will notify all admin users subscribed (as per <span class="wikiunknown"><u>AdminNotifications</u>[http://old.eduforge.org/wiki/wiki/mahara/wiki?pagename=AdminNotifications&action=create ?]</span>.
The Contact Us form is filled out. Will notify all admin users subscribed (as per <span class="wikiunknown"><u>AdminNotifications</u>[http://old.eduforge.org/wiki/wiki/mahara/wiki?pagename=AdminNotifications&action=create ?]</span>.
Line 103: Line 103:
</div><div id="section_11">
</div><div id="section_11">


=== TODO: other admin messages ===
===TODO: other admin messages===


</div></div>
</div></div>

Revision as of 16:13, 11 Mayıs 2011

Mahara has a notifications framework for getting messages to users through a variety of means.

Notification types are plugins, currently there exists three:

Internal - all activity shows up in the user's 'recent activity' page Email - user gets an email per notification Emaildigest - user gets an email each day with a summary of all notifications.

For each type of activity (discussed later), the user can direct it to one of these different plugins.

Notifications will always go to the activity log, but if a different notification plugin has been selected, they will go there marked as read.

For all the types of activity, you need to call activity_occured and pass it the activity type (described below) and an array (or stdclass object) of information. Each activity type expects different information.

The different types of activity are:

watchlist (artefact)

Activity that occurs on an artefact (edit)

Will notify any users who are monitoring that artefact or any artefacts that have this artefact as a child.

Requires $data->artefact (id of artefact) and should have $data->subject

watchlist (view)

Any new items added to the view, or the view name/description etc changed.

Will notify any users who are monitoring the view.

Requires $data->view (id of view) and $data->subject (eg 'artefact was added')

watchlist (community)

Unclear what activity on a community is so far.

Will notify any users who are monitoring the community.

Requires $data->community (id of community) and $data->subject (eg 'user was added etc)

maharamessage

System message. Will notify all users the message is sent to.

Requires $data->message and $data->subject (contents of message) and $data->users (array of user ids)

usermessage

Message from one user to another. Will notify the user the message is sent to.

Requires $data->message and $data->subject(contents of message), $data->userto (id of user message is sent to), $data->userfrom (id of user message is sent from)

feedback (artefact)

Feedback on an artefact. Will notify the artefact owner.

Requires $data->artefact (id of artefact) and $data->view (id of view) and $data->subject and $data->feedback (contents of feedback)

feedback (view)

Feedback on a view. Will notify the view owner.

Requires $data->view (id of view) and $data->subject and $data->feedback (contents of feedback)

newview

A new view is created. Will notify any users who have access to this view (through friends list, user list or group list (view permissions))

Requires $data->view (id of new view) and $data->owner (id of user owning new view)

viewaccess

View access has changed. Will notify any users who have access to this view (through the same 3 ways as newview), and who AREN'T in the list of oldusers passed in

Requires the same two args as newview and $data->oldusers (as calling activity_get_viewaccess_users($view, $owner); will return)

contactus

The Contact Us form is filled out. Will notify all admin users subscribed (as per AdminNotifications?.

Requires $data->subject, $data->message, $data->userfrom (if loggedin), $data->fromname, $data->fromemail

TODO: other admin messages