diff --git a/classes/event/notification_received.php b/classes/event/notification_received.php index cc5dd83..ab5c153 100644 --- a/classes/event/notification_received.php +++ b/classes/event/notification_received.php @@ -26,7 +26,9 @@ use tool_emailutils; - +/** + * Event + */ class notification_received extends \core\event\base { /** diff --git a/classes/sns_client.php b/classes/sns_client.php index c7630c5..2321561 100644 --- a/classes/sns_client.php +++ b/classes/sns_client.php @@ -15,6 +15,8 @@ // along with Moodle. If not, see . /** + * Amazon SNS Client Interface + * * @package tool_emailutils * @copyright 2018 onwards Catalyst IT {@link http://www.catalyst-eu.net/} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later @@ -45,14 +47,19 @@ */ class sns_client { + /** Subscribe */ const SUBSCRIPTION_TYPE = 'SubscriptionConfirmation'; + /** Unsubscribe */ const UNSUBSCRIPTION_TYPE = 'UnsubscribeConfirmation'; + /** Notify */ const NOTIFICATION_TYPE = 'Notification'; + /** Complaint */ const COMPLAINT_TYPE = 'Complaint'; + /** Bounce */ const BOUNCE_TYPE = 'Bounce'; /** diff --git a/classes/sns_notification.php b/classes/sns_notification.php index 92808d1..dae6783 100644 --- a/classes/sns_notification.php +++ b/classes/sns_notification.php @@ -15,6 +15,8 @@ // along with Moodle. If not, see . /** + * Amazon SNS Notification Class + * * @package tool_emailutils * @copyright 2018 onwards Catalyst IT {@link http://www.catalyst-eu.net/} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/client.php b/client.php index b25448e..f2a2b5c 100644 --- a/client.php +++ b/client.php @@ -15,6 +15,12 @@ // along with Moodle. If not, see . /** + * An email bounce complaint handler webhook + * + * This is the endpoint that AWS notifies when it receives a complaint. + * This handles the complaint by incrementing the users bounce level and + * emiting a Moodle event. + * * @package tool_emailutils * @copyright 2018 onwards Catalyst IT {@link http://www.catalyst-eu.net/} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/index.php b/index.php index 3de9300..05bccd4 100644 --- a/index.php +++ b/index.php @@ -15,6 +15,8 @@ // along with Moodle. If not, see . /** + * Email bounce handler + * * @package tool_emailutils * @copyright 2019 onwards Catalyst IT {@link http://www.catalyst-eu.net/} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/lib.php b/lib.php index 839966f..12be8ed 100644 --- a/lib.php +++ b/lib.php @@ -15,12 +15,17 @@ // along with Moodle. If not, see . /** + * Lib + * * @package tool_emailutils * @copyright 2018 onwards Catalyst IT {@link http://www.catalyst-eu.net/} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @author Harry Barnard */ +/** + * This adds a new bulk user action to reset a persons bounce count + */ function tool_emailutils_bulk_user_actions() { return [ 'tool_ses_reset_bounces' => new action_link( diff --git a/version.php b/version.php index aefbb54..419f85f 100644 --- a/version.php +++ b/version.php @@ -15,6 +15,8 @@ // along with Moodle. If not, see . /** + * Version + * * @package tool_emailutils * @copyright 2018 onwards Catalyst IT {@link http://www.catalyst-eu.net/} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later