This commit is contained in:
Dan Poltawski 2016-11-01 12:13:19 +00:00
commit 57911c1f40

View File

@ -723,7 +723,7 @@ function badges_notify_badge_award(badge $badge, $userid, $issued, $filepathhash
// Notify recipient.
$eventdata = new \core\message\message();
$eventdata->courseid = $badge->courseid;
$eventdata->courseid = is_null($badge->courseid) ? SITEID : $badge->courseid; // Profile/site come with no courseid.
$eventdata->component = 'moodle';
$eventdata->name = 'badgerecipientnotice';
$eventdata->userfrom = $userfrom;