4 include_once
'Services/Mail/classes/class.ilMailNotification.php';
5 include_once
'Services/Mail/classes/class.ilMail.php';
20 $last_run = $setting->get(get_class($this));
23 if($last_run == date(
"Y-m-d"))
30 $set = $ilDB->query(
"SELECT usr_id,keyword FROM usr_pref".
31 " WHERE ".$ilDB->like(
"keyword",
"text",
"grpcrs_ntf_%").
32 " AND value = ".$ilDB->quote(
"1",
"text"));
33 while(
$row = $ilDB->fetchAssoc($set))
47 include_once
"Services/News/classes/class.ilNewsItem.php";
48 foreach($objects as
$type => $ref_ids)
51 foreach($ref_ids as
$ref_id => $user_ids)
55 if($news_item->checkNewsExistsForGroupCourse(
$ref_id))
57 foreach($user_ids as $user_id)
60 $user_news = $news_item->getNewsForRefId(
$ref_id,
61 false,
false, 1,
false,
false,
false,
false,
76 $setting->set(get_class($this), date(
"Y-m-d"));
88 public function sendMail($a_user_id, $a_ref_id, array $news)
119 foreach($news as $item)
122 $item[
"title"], $item[
"content_is_lang_var"], $item[
"agg_ref_id"],
123 $item[
"aggregation"]);
125 $item[
"content"], $item[
"content_text_is_lang_var"]);
160 include_once
'./Services/Locator/classes/class.ilLocatorGUI.php';
162 $cont_loc->addContextItems($item[
"ref_id"],
true);
163 $cont_loc->setTextOnly(
true);
167 @include_once
"HTML/Template/ITX.php";
168 if (class_exists(
"HTML_Template_ITX"))
170 include_once
"./Services/UICore/classes/class.ilTemplateHTMLITX.php";
174 include_once
"HTML/ITX.php";
175 include_once
"./Services/UICore/classes/class.ilTemplateITX.php";
177 require_once
"./Services/UICore/classes/class.ilTemplate.php";
179 $loc =
"[".$cont_loc->getHTML().
"]";
181 $this->
appendBody(
"----------------------------------------------------------------------------------------------");
183 $this->
appendBody(
'#'.$counter.
" - ".$loc.
" ".$obj_title.
"\n\n");
194 $this->
appendBody(
"----------------------------------------------------------------------------------------------");
201 $object_link .=
"/goto.php?target=".$obj_type.
"_".$a_ref_id.
202 "&client_id=".CLIENT_ID;
211 $mail->enableSOAP(
false);