public function sendFeedbackNotifications($a_ass_id) { global $ilDB; $ass = new self($a_ass_id); // valid assignment? if (!$ass->hasFeedbackCron() || !$ass->getFeedbackFile()) { return false; } // already done? $set = $ilDB->query("SELECT fb_cron_done" . " FROM exc_assignment" . " WHERE id = " . $ilDB->quote($a_ass_id, "integer")); $row = $ilDB->fetchAssoc($set); if ($row["fb_cron_done"]) { return false; } include_once "./Services/Notification/classes/class.ilSystemNotification.php"; $ntf = new ilSystemNotification(); $ntf->setLangModules(array("exc")); $ntf->setObjId($ass->getExerciseId()); $ntf->setSubjectLangId("exc_feedback_notification_subject"); $ntf->setIntroductionLangId("exc_feedback_notification_body"); $ntf->addAdditionalInfo("exc_assignment", $ass->getTitle()); $ntf->setGotoLangId("exc_feedback_notification_link"); $ntf->setReasonLangId("exc_feedback_notification_reason"); include_once "./Modules/Exercise/classes/class.ilExerciseMembers.php"; $ntf->sendMail(ilExerciseMembers::_getMembers($ass->getExerciseId())); $ilDB->manipulate("UPDATE exc_assignment" . " SET fb_cron_done = " . $ilDB->quote(1, "integer") . " WHERE id = " . $ilDB->quote($a_ass_id, "integer")); return true; }