5include_once 
"Services/Cron/classes/class.ilCronJob.php";
 
   16                return "mem_notification";
 
   23                return $lng->txt(
"enable_course_group_notifications");
 
   30                return $lng->txt(
"enable_course_group_notifications_desc");
 
   58                $status_details = 
null;
 
   61                $last_run = $setting->get(get_class($this));
 
   64                if($last_run == date(
"Y-m-d"))
 
   67                        $status_details = 
"Did already run today.";
 
   73                        $set = 
$ilDB->query(
"SELECT usr_id,keyword FROM usr_pref".
 
   74                                " WHERE ".
$ilDB->like(
"keyword", 
"text", 
"grpcrs_ntf_%").
 
   75                                " AND value = ".$ilDB->quote(
"1", 
"text"));
 
   91                                include_once 
"Services/News/classes/class.ilNewsItem.php";
 
   92                                foreach($objects as $type => $ref_ids)
 
   95                                        foreach($ref_ids as 
$ref_id => $user_ids)
 
   99                                                if($news_item->checkNewsExistsForGroupCourse(
$ref_id))
 
  101                                                        foreach($user_ids as $user_id)
 
  104                                                                $user_news = $news_item->getNewsForRefId(
$ref_id,
 
  105                                                                        false, 
false, 1, 
false, 
false, 
false, 
false,
 
  124                        $setting->set(get_class($this), date(
"Y-m-d")); 
 
  137                        $result->setMessage($status_details);
 
  150        protected function sendMail($a_user_id, $a_ref_id, array $news)
 
  157                include_once 
"./Services/Notification/classes/class.ilSystemNotification.php";
 
  159                $ntf->setLangModules(array(
"crs", 
"news"));
 
  160                $ntf->setRefId($a_ref_id);      
 
  161                $ntf->setGotoLangId(
'url');
 
  162                $ntf->setSubjectLangId(
'crs_subject_course_group_notification');
 
  165                $lng = $ntf->getUserLanguage($a_user_id);
 
  168                $ntf->setIntroductionDirect(sprintf(
$lng->txt(
"crs_intro_course_group_notification_for"), $obj_title));
 
  170                $subject = sprintf(
$lng->txt(
"crs_subject_course_group_notification"), $obj_title);
 
  175                foreach($news as $item)
 
  178                                $item[
"title"], $item[
"content_is_lang_var"], $item[
"agg_ref_id"], 
 
  179                                $item[
"aggregation"]);
 
  181                                $item[
"content"], $item[
"content_text_is_lang_var"]);
 
  187                        include_once 
'./Services/Locator/classes/class.ilLocatorGUI.php';                       
 
  189                        $cont_loc->addContextItems($item[
"ref_id"], 
true);
 
  190                        $cont_loc->setTextOnly(
true);
 
  194                        @include_once 
"HTML/Template/ITX.php";          
 
  195                        if (class_exists(
"HTML_Template_ITX"))
 
  197                                include_once 
"./Services/UICore/classes/class.ilTemplateHTMLITX.php";
 
  201                                include_once 
"HTML/ITX.php";            
 
  202                                include_once 
"./Services/UICore/classes/class.ilTemplateITX.php";
 
  204                        require_once 
"./Services/UICore/classes/class.ilTemplate.php";                  
 
  205                        $loc = 
"[".$cont_loc->getHTML().
"]";
 
  209                                $txt .= $ntf->getBlockBorder();
 
  211                        $txt .= 
'#'.$counter.
" - ".$loc.
" ".$obj_title.
"\n\n";
 
  215                                $txt .= 
"\n".$content;
 
  221                $ntf->addAdditionalInfo(
"news", 
$txt, 
true);
 
  225                $mail->enableSOAP(
false); 
 
  230                        $ntf->composeAndGetMessage($a_user_id, 
null, 
"read", 
true), 
 
  243                                $a_fields[
"enable_course_group_notifications"] = $a_is_active ? 
 
  244                                        $lng->txt(
"enabled") :
 
  245                                        $lng->txt(
"disabled");
 
  255                $ilSetting->set(
"crsgrp_ntf", (
bool)$a_currently_active);               
 
Cron job result data container.
Cron job application base class.
const SCHEDULE_TYPE_DAILY
static ping($a_job_id)
Keep cron job alive.
Class Mail this class handles base functions for mail handling.
Course/group notifications.
getDefaultScheduleValue()
Get schedule value.
getDescription()
Get description.
activationWasToggled($a_currently_active)
Cron job status was changed.
getDefaultScheduleType()
Get schedule type.
sendMail($a_user_id, $a_ref_id, array $news)
Send news mail for 1 object and 1 user.
addToExternalSettingsForm($a_form_id, array &$a_fields, $a_is_active)
Add external settings to form.
hasFlexibleSchedule()
Can the schedule be configured?
hasAutoActivation()
Is to be activated on "installation".
static determineNewsContent($a_context_obj_type, $a_content, $a_is_lang_var)
Determine new content.
static determineNewsTitle($a_context_obj_type, $a_title, $a_content_is_lang_var, $a_agg_ref_id=0, $a_aggregation="")
Determine title for news item entry.
_lookupLogin($a_user_id)
lookup login
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
Wrapper classes for system notifications.