Skip to content

Commit

Permalink
Plugin: SendMailWhenLpIsPublish: Send mail to dhrm - refs BT#18214
Browse files Browse the repository at this point in the history
  • Loading branch information
carlangas159 committed Jan 18, 2021
1 parent 482e6ad commit 6987f0f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions main/cron/learning_path_reminder.php
Expand Up @@ -31,6 +31,7 @@

function SendMessage($toUser, $fromUser, $courseName, $lpName, $link)
{
$toUserId = $toUser['user_id'];
$subjectTemplate = new Template(
null,
false,
Expand Down Expand Up @@ -60,7 +61,7 @@ function SendMessage($toUser, $fromUser, $courseName, $lpName, $link)
$tittle = $subjectTemplate->fetch($subjectLayout);
$content = $bodyTemplate->fetch($bodyLayout);
MessageManager::send_message_simple(
$toUser,
$toUserId,
$tittle,
$content,
$fromUser,
Expand Down Expand Up @@ -158,7 +159,7 @@ function LearningPaths()
$fromUser = isUserSubscribeToLp($user['id'], $courseId, $lpId);
if ($fromUser != 0) {
$userInfo = api_get_user_info($user['id']);
// $HrUsers = getHrUserOfUser($user['id']);
$HrUsers = getHrUserOfUser($user['id']);
$href = api_get_path(WEB_CODE_PATH).
"lp/lp_controller.php?cidReq=".htmlspecialchars($courseCode).
"&id_session=$sessionId &action=view&lp_id=$lpId&gidReq=0&gradebook=0&origin=";
Expand All @@ -170,19 +171,19 @@ function LearningPaths()
$lpName,
$link
);
/*

if (count($HrUsers) != 0) {
foreach ($HrUsers as $userHr) {
SendMessage(
$userHr,
$admin,
$fromUser,
$courseName,
$lpName,
$link
);
}
}
*/

}
}
}
Expand Down

0 comments on commit 6987f0f

Please sign in to comment.