/** * Send feedback file notification to user */ function sendFeedbackFileNotification($a_feedback_file, $a_user_id, $a_ass_id) { $user_ids = $a_user_id; if (!is_array($user_ids)) { $user_ids = array($user_ids); } include_once "./Modules/Exercise/classes/class.ilExerciseMailNotification.php"; $not = new ilExerciseMailNotification(); $not->setType(ilExerciseMailNotification::TYPE_FEEDBACK_FILE_ADDED); $not->setAssignmentId($a_ass_id); $not->setRefId($this->getRefId()); $not->setRecipients($user_ids); $not->send(); }
/** * Send submission notifications * @param int $assignment_id */ protected function sendNotifications($assignment_id) { include_once "./Services/Notification/classes/class.ilNotification.php"; $users = ilNotification::getNotificationsForObject(ilNotification::TYPE_EXERCISE_SUBMISSION, $this->object->getId()); include_once "./Modules/Exercise/classes/class.ilExerciseMailNotification.php"; $not = new ilExerciseMailNotification(); $not->setType(ilExerciseMailNotification::TYPE_SUBMISSION_UPLOAD); $not->setAssignmentId($assignment_id); $not->setRefId($this->ref_id); $not->setRecipients($users); $not->send(); }
/** * Send feedback file notification to user */ function sendFeedbackFileNotification($a_feedback_file, $a_user_id, $a_ass_id, $a_is_text_feedback = false) { $user_ids = $a_user_id; if (!is_array($user_ids)) { $user_ids = array($user_ids); } include_once "./Modules/Exercise/classes/class.ilExerciseMailNotification.php"; $type = (bool) $a_is_text_feedback ? ilExerciseMailNotification::TYPE_FEEDBACK_TEXT_ADDED : ilExerciseMailNotification::TYPE_FEEDBACK_FILE_ADDED; $not = new ilExerciseMailNotification(); $not->setType($type); $not->setAssignmentId($a_ass_id); $not->setObjId($this->getId()); if ($this->getRefId() > 0) { $not->setRefId($this->getRefId()); } $not->setRecipients($user_ids); $not->send(); }