|
string const | TYPE_DUE_DIGEST = 'assign_due_digest' |
| Due digest notification type.
|
|
string const | TYPE_DUE_SOON = 'assign_due_soon' |
| Due soon notification type.
|
|
string const | TYPE_OVERDUE = 'assign_overdue' |
| Overdue notification type.
|
|
◆ get_assignment_data()
static mod_assign\notification_helper::get_assignment_data |
( |
int | $assignmentid | ) |
|
|
staticprotected |
Get the assignment object, including the course and course module.
- Parameters
-
int | $assignmentid | The assignment id. |
- Return values
-
assign | Returns the assign object. |
◆ get_day_start_and_end()
static mod_assign\notification_helper::get_day_start_and_end |
( |
int | $timestamp | ) |
|
|
staticprotected |
Get the timestamps for the start (00:00:00) and end (23:59:59) of the provided day.
- Parameters
-
int | $timestamp | The timestamp to base the calculation on. |
- Return values
-
array | Day start and end timestamps. |
◆ get_due_digest_assignments()
static mod_assign\notification_helper::get_due_digest_assignments |
( |
| ) |
|
|
static |
Get all assignments that are due in 7 days (includes users and groups with due date overrides).
- Return values
-
◆ get_due_digest_assignments_for_user()
static mod_assign\notification_helper::get_due_digest_assignments_for_user |
( |
int | $userid | ) |
|
|
static |
Get all assignments for a user that are due in 7 days (includes users and groups with due date overrides).
- Parameters
-
- Return values
-
◆ get_due_soon_assignments()
static mod_assign\notification_helper::get_due_soon_assignments |
( |
| ) |
|
|
static |
Get all assignments that have an approaching due date (includes users and groups with due date overrides).
- Return values
-
◆ get_future_time()
static mod_assign\notification_helper::get_future_time |
( |
int | $interval | ) |
|
|
staticprotected |
Get a future time.
- Parameters
-
int | $interval | Amount of seconds added to the now time. |
- Return values
-
int | The time now value plus the interval. |
◆ get_overdue_assignments()
static mod_assign\notification_helper::get_overdue_assignments |
( |
| ) |
|
|
static |
Get all assignments that are overdue, but not exceeding the cut-off date (includes users and groups with due date overrides).
We don't want to get every single overdue assignment ever. We just want the ones within the specified window.
- Return values
-
◆ get_time_now()
static mod_assign\notification_helper::get_time_now |
( |
| ) |
|
|
staticprotected |
Get the time now.
- Return values
-
int | The time now as a timestamp. |
◆ get_users_within_assignment()
static mod_assign\notification_helper::get_users_within_assignment |
( |
int | $assignmentid, |
|
|
string | $type ) |
|
static |
Get all assignment users that we should send the notification to.
- Parameters
-
int | $assignmentid | The assignment id. |
string | $type | The notification type. |
- Return values
-
array | The users after all filtering has been applied. |
◆ has_user_been_sent_a_notification_already()
static mod_assign\notification_helper::has_user_been_sent_a_notification_already |
( |
int | $userid, |
|
|
string | $match, |
|
|
string | $type ) |
|
staticprotected |
Check if a user has been sent a notification already.
- Parameters
-
int | $userid | The user id. |
string | $match | The custom data string to match on. |
string | $type | The notification/event type to match. |
- Return values
-
bool | Returns true if already sent. |
◆ is_time_within_range()
static mod_assign\notification_helper::is_time_within_range |
( |
int | $time, |
|
|
array | $range ) |
|
staticprotected |
Check if a time is within the current time now and the future time values (inclusive).
- Parameters
-
int | $time | The timestamp to check. |
array | $range | Lower and upper times to check. |
- Return values
-
◆ send_due_digest_notification_to_user()
static mod_assign\notification_helper::send_due_digest_notification_to_user |
( |
int | $userid | ) |
|
|
static |
Get all the assignments and send the due digest notification to the user.
- Parameters
-
◆ send_due_soon_notification_to_user()
static mod_assign\notification_helper::send_due_soon_notification_to_user |
( |
int | $assignmentid, |
|
|
int | $userid ) |
|
static |
Send the due soon notification to the user.
- Parameters
-
int | $assignmentid | The assignment id. |
int | $userid | The user id. |
◆ send_overdue_notification_to_user()
static mod_assign\notification_helper::send_overdue_notification_to_user |
( |
int | $assignmentid, |
|
|
int | $userid ) |
|
static |
Send the overdue notification to the user.
- Parameters
-
int | $assignmentid | The assignment id. |
int | $userid | The user id. |
The documentation for this class was generated from the following file:
- mod/assign/classes/notification_helper.php