Beispiel #1
0
                 } else {
                     if ($event_category == "survey") {
                         $condition = $form->exportValue('available_lessons');
                         $condition = array("lessons_ID" => $condition);
                     } else {
                         $condition = array();
                     }
                 }
             }
         }
     }
 }
 if (isset($_GET['add_notification'])) {
     //Added because course not completion notification for already assigned users (rows added while creating notification) has not replaced formulations
     //only users assigned to course after creating the notification was correct (since it is created via triggerEvent) (#5918)
     $template_formulations = EfrontNotification::createSubstitutionsArrayForDateNotifications($condition);
     $subject = eF_formulateTemplateMessage($subject, $template_formulations);
     $message = eF_formulateTemplateMessage($message, $template_formulations);
     EfrontNotification::addEventNotification($events_type, $subject, $message, $condition, $_POST['event_recipients'], $html_message, $after_time, $send_immediately);
 } else {
     // if we changed from simple notification event -> on/after event notification
     if (!isset($_GET['event'])) {
         eF_deleteTableData("notifications", "id = '" . $_GET['edit_notification'] . "'");
         //$notification = array ("event_type"        => $events_type, "send_conditions" => serialize($condition),"send_recipients" => $_POST['event_recipients'], "message"          => $message,"subject"       => $subject);
         EfrontNotification::addEventNotification($events_type, $subject, $message, $condition, $_POST['event_recipients'], $html_message, $after_time, $send_immediately);
     } else {
         EfrontNotification::editEventNotification($_GET['edit_notification'], $events_type, $subject, $message, $condition, $_POST['event_recipients'], $html_message, $after_time, $send_immediately);
     }
 }
 $message = _NOTIFICATIONSETUPSUCCESSFULLY;
 $message_type = 'success';