From 2e458712c8b8ff038ab0f255b43eace4321cda3c Mon Sep 17 00:00:00 2001 From: Cameron Ball Date: Tue, 24 May 2016 18:19:54 +0800 Subject: [PATCH] MDL-46721 assign: Make blind marking participant numbers match Previously emails were setting the "From" header to the incorrect participant number. --- mod/assign/locallib.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index c5a2b1e7a94..078b27ef428 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -5466,11 +5466,9 @@ class assign { * @param int $updatetime * @return void */ - public function send_notification($userfrom, - $userto, - $messagetype, - $eventtype, - $updatetime) { + public function send_notification($userfrom, $userto, $messagetype, $eventtype, $updatetime) { + global $USER; + $uniqueid = $this->get_uniqueid_for_user(core_user::is_real_user($userfrom->id) ? $userfrom->id : $USER->id); self::send_assignment_notification($userfrom, $userto, $messagetype, @@ -5482,7 +5480,7 @@ class assign { $this->get_module_name(), $this->get_instance()->name, $this->is_blind_marking(), - $this->get_uniqueid_for_user($userfrom->id)); + $uniqueid); } /**