__**Notifications**__ __Learner Notifications__ |Notification | Can be turned On/Off | |sso signup notification | No | |sso signup notification after approval | No | |Signup notification | No | |Signup notification admin approved | No | |Signup notification admin created | No | |Account rejected | No | |Account approved | No | |Account activation | No | |Live event invite | No | |Password reset instructions | No | |Password reset confirmation | Yes | |Message notification | Yes | |Invitation to join group | No | |Group member rejected | No | |Group member approved | No | |Comment notice | Yes | |Follow up comment notice | Yes | |Order payment failed | Yes | |Subscription payment failed | Yes | |Auto enrollment | Yes | __Content Creator__ |Notification | Can be turned On/Off | |Certificate generation error | Yes | |Asset conversion complete | Yes | NOTE: Content creator will receive all the above listed Content Creator notifications and also Learner notifications, as a Content creator is also a learner. __Group Owner__ |Notification | Can be turned On/Off | |Group member awaiting approval | No | NOTE: Group owner will receive all the above listed Group Owner notifications and also Learner notifications, as a Group owner is also a learner. __Admin Notifications__ |Notification | Can be turned On/Off | |New site notification | No | |Site approved | No | |Site confirmation | No | |Site rejected | No | |Trial expired | Yes | |Trial reminder | Yes | |Trial expired deleting site | Yes | |Payment success | Yes | |Payment failure | Yes | |Renewal failed delete site | Yes | |Cancel subscription | Yes | |Canceled subscription delete site | Yes | |Subscription expired delete site | Yes | |Active user overage | Yes | |Sigup notification to company admin | No | |Admin copy order payment failed | Yes | |Admin copy subscription payment failed | Yes | |Contact us | No | NOTE: Admin's will receive all the above listed Admin notifications, Content Creator notifications and also Learner notifications, as an Admin is also a content creator and in turn a learner. Also receives the group owner notifications if he/she owns a group. __Super Admin Notifications__ |Notification | Can be turned On/Off | |Subscription canceled admin notification | Yes | |Company created notification | No | |Live event exception | Yes | |Enterprise plan request | No | NOTE: Super admin's will receive all the above listed Super admin notifications, Admin notifications, content creator notifications and also Learner notifications, as the Super admin is an Admin and inturn a content creator as well as a learner. Also receives the group owner notifications if he/she owns a group. __**General Flow**__ __Disabling notifications:__ - The List of notification emails a user receives are listed in the Notification Settings page with a check box near by. - Enabled notification and disabled notifications can displayed separated by a hr line with a sub heading (As we display enabled features and disabled features inside disable company features popup.) - A user can turn off/on any notifications by unchecking/checking the checkbox next to the notification in Notification Settings page. - Checkboxes are disabled for notifications which cannot be turned on/off (i.e. For default notifications). - Once the user turns off a notification a record in the user_disabled_notification table is created and when the notification is turned on, the record is removed from the user_disabled_notification table. - Before a notification email is sent to a user we check if the notification is turned on for that user. If not the notification email is not sent to the user. This condition check can be made in the notifier models (i.e. Company notifier / User notifier). __**Implementation Details**__ __//Tables//__ __notifications_settings__ |notification | String - Unique key| |notification_type | String (Can be User/Content Creator/Group Owner/Admin/Super Admin)| |can_be_turned_on_or_off | Boolean | __user_disabled_notifications__ |user_id | Integer - Foreign key to users table | |notification | String | |notification_id | Integer - Foreign key to notification_settings table | __//Associations//__ __User__ \\ has_many :user_disabled_notifications, :dependent => :destroy __User Disabled Notification__ \\ belongs_to :user \\ belongs_to :notification_setting \\ __Notification Settings__ \\ has_many :user_disabled_notifications, :dependent => :destroy