mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-43908 mod_assign: Defer notifications for unavailable assignments
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
This commit is contained in:
parent
40f0ad21a3
commit
ccd6839a7b
@ -1699,8 +1699,12 @@ class assign {
|
||||
// Context lookups are already cached.
|
||||
$contextmodule = context_module::instance($mod->id);
|
||||
|
||||
if (!$mod->visible) {
|
||||
// Hold mail notification for hidden assignments until later.
|
||||
// Get assignment visibility information for user.
|
||||
$modinfo = get_fast_modinfo($course, $user->id);
|
||||
$cm = $modinfo->get_cm($mod->id);
|
||||
|
||||
if (!$cm->uservisible) {
|
||||
// Hold mail notification for assignments the user cannot access until later.
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user