Browse Source

Student publication: Add teacher comment to the notification BT#14141

jmontoyaa 7 years ago
parent
commit
d04996a32c
1 changed files with 4 additions and 0 deletions
  1. 4 0
      main/work/work.lib.php

+ 4 - 0
main/work/work.lib.php

@@ -3410,6 +3410,10 @@ function addWorkComment($courseInfo, $userId, $parentWork, $work, $data)
     $subject = sprintf(get_lang('ThereIsANewWorkFeedback'), $parentWork['title']);
     $content = sprintf(get_lang('ThereIsANewWorkFeedbackInWorkXHere'), $work['title'], $url);
 
+    if (!empty($data['comment'])) {
+        $content .= '<br /><b>'.get_lang('Comment').':</b><br />'.$data['comment'];
+    }
+
     if (!empty($userIdListToSend)) {
         foreach ($userIdListToSend as $userIdToSend) {
             MessageManager::send_message_simple(