5 include_once
"Services/Cron/classes/class.ilCronJob.php";
17 return "mem_min_members";
26 return $lng->txt(
"mem_cron_min_members");
35 return $lng->txt(
"mem_cron_min_members_info");
40 return self::SCHEDULE_TYPE_DAILY;
63 $recipients_map = array();
68 if (
sizeof($recipients_map)) {
69 foreach ($recipients_map as $reci_id => $items) {
74 $message =
sizeof($recipients_map) .
" notifications sent";
86 include_once
"Modules/Course/classes/class.ilObjCourse.php";
88 $too_few = (bool) $item[0];
98 foreach ($item[1] as $reci_id) {
99 $a_recipients_map[$reci_id][] = array(
"crs", $obj_id, $item[0]);
111 include_once
"Modules/Group/classes/class.ilObjGroup.php";
113 $too_few = (bool) $item[0];
123 foreach ($item[1] as $reci_id) {
124 $a_recipients_map[$reci_id][] = array(
"grp", $obj_id, $item[0]);
140 include_once
"Services/Link/classes/class.ilLink.php";
141 include_once
"./Services/Notification/classes/class.ilSystemNotification.php";
143 $ntf->setLangModules(array(
"crs"));
146 $ntf->setReasonLangId(
"mem_cron_min_members_reason");
149 $lng = $ntf->getUserLanguage($a_reci_id);
152 foreach ($a_items as $item) {
153 $obj_type = $item[0];
162 $list = implode($ntf->getBlockBorder(),
$list);
164 $ntf->addAdditionalInfo(
"mem_cron_min_members_intro",
$list,
true);
165 $ntf->addAdditionalInfo(
"mem_cron_min_members_task",
"");
167 $mail =
new ilMail(ANONYMOUS_USER_ID);
168 $mail->enableSOAP(
false);
173 $lng->txt(
"mem_cron_min_members_subject"),
174 $ntf->composeAndGetMessage($a_reci_id, null,
"read",
true),
static _lookupLogin($a_user_id)
lookup login
if(isset($_REQUEST['delete'])) $list
Cron job application base class.
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
Cron for course/group minimum members.
static findGroupsWithNotEnoughMembers()
Minimum members check $ilDB $ilDB.
catch(Exception $e) $message
sendMessage($a_reci_id, array $a_items)
getDefaultScheduleValue()
static findCoursesWithNotEnoughMembers()
Minimum members check type $ilDB.
Cron job result data container.
getGroups(array &$a_recipients_map)
Wrapper classes for system notifications.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
getCourses(array &$a_recipients_map)