HR managers did not receive a copy of the messages #3333

Prevents error when "user_id" is not found but "id" if it exists.

Copy condition added to RH
pull/3349/head
carlos alvarado 5 years ago
parent d3c839ceb9
commit 2ea82415dd
  1. 3
      main/announcements/announcements.php
  2. 3
      main/inc/lib/message.lib.php

@ -732,7 +732,8 @@ switch ($action) {
api_get_course_info(), api_get_course_info(),
api_get_session_id(), api_get_session_id(),
$insert_id, $insert_id,
$sendToUsersInSession $sendToUsersInSession,
isset($data['send_to_hrm_users'])
); );
} }

@ -782,6 +782,9 @@ class MessageManager
get_lang('CopyOfMessageSentToXUser'), get_lang('CopyOfMessageSentToXUser'),
$userInfo['complete_name'] $userInfo['complete_name']
).' <br />'.$message; ).' <br />'.$message;
if(!isset( $drhInfo['user_id']) and isset( $drhInfo['id'])){
$drhInfo['user_id'] = $drhInfo['id'];
}
self::send_message_simple( self::send_message_simple(
$drhInfo['user_id'], $drhInfo['user_id'],

Loading…
Cancel
Save