Merge branch 'MDL-87396-500' of https://github.com/izendegi/moodle into MOODLE_500_STABLE

This commit is contained in:
Huong Nguyen
2026-02-03 10:37:16 +07:00
@@ -352,6 +352,12 @@ class notification_helper {
return;
}
// Check if the module is visible to the user.
$cm = $assignmentobj->get_course_module();
if (!\core_availability\info_module::is_user_visible($cm, $userid)) {
return;
}
// Check if the due date still within range.
$assignmentobj->update_effective_access($userid);
$duedate = $assignmentobj->get_instance($userid)->duedate;
@@ -449,6 +455,12 @@ class notification_helper {
return;
}
// Check if the module is visible to the user.
$cm = $assignmentobj->get_course_module();
if (!\core_availability\info_module::is_user_visible($cm, $userid)) {
return;
}
// Check if the due date still considered overdue.
$assignmentobj->update_effective_access($userid);
$duedate = $assignmentobj->get_instance($userid)->duedate;