52         string $a_comment = 
""    56         $this->ilUser = $DIC->user();
    58         $this->
lng = $DIC->language();
    59         $this->
lng->loadLanguageModule(
"content");
    61         $this->action = $a_action;
    62         $this->type = $a_type;
    63         $this->learning_module = $a_learning_module;
    64         $this->page_id = $a_page_id;
    66         $this->lm_ref_id = $this->learning_module->getRefId();
    72     public function send(): void
    74         $lm_id = $this->learning_module->getId();
    77         $ignore_threshold = ($this->action == self::ACTION_COMMENT);
    83             $users = array_merge($users, $page_users);
    87         if (!
sizeof($users)) {
    94         foreach (array_unique($users) as $idx => $user_id) {
    95             if ($user_id != $this->ilUser->getId() &&
    96                 $this->
ilAccess->checkAccessOfUser($user_id, 
'read', 
'', $this->lm_ref_id)) {
    99                 $ulng->loadLanguageModule(
'content');
   105                 $mail_obj->appendInstallationSignature(
true);
   121         if ($this->page_id) {
   123             return ilLink::_getLink(null, 
"pg", [], $this->page_id . 
"_" . $this->lm_ref_id);
   126         return ilLink::_getLink($this->lm_ref_id);
   133             $this->learning_module->getPageHeader(),
   134             $this->learning_module->isActiveNumbering(),
   135             (bool) $this->lm_set->get(
"time_scheduled_page_activation"),
   138             $this->
lng->getLangKey()
   144         if ($this->action == self::ACTION_COMMENT) {
   145             return sprintf($ulng->
txt(
'cont_notification_comment_subject_lm'), $this->learning_module->getTitle(), 
$this->pg_title);
   148         return sprintf($ulng->
txt(
'cont_change_notification_subject_lm'), $this->learning_module->getTitle(), 
$this->pg_title);
   154         $message .= $a_ulng->
txt(
'cont_notification_' . $this->action . 
"_lm") . 
":\n\n";
   155         $message .= $a_ulng->
txt(
'learning module') . 
": " . $this->learning_module->getTitle() . 
"\n";
   156         $message .= $a_ulng->
txt(
'page') . 
": " . $this->pg_title . 
"\n";
   157         if ($this->action == self::ACTION_COMMENT) {
   173         $page->setRawPageContent(
true);
   174         $page->setAbstractOnly(
true);
   175         $page->setFileDownloadLink(
".");
   176         $page->setFullscreenLink(
".");
   177         $page->setSourcecodeDownloadScript(
".");
   178         $str = $page->showPage();
   181         $str = str_replace(
'<br/>', 
"\n", $str);
   182         $str = str_replace(
'<br />', 
"\n", $str);
   183         $str = str_replace(
'</p>', 
"\n", $str);
   184         $str = str_replace(
'</div>', 
"\n", $str);
   185         $str = trim(strip_tags($str));
   187         $content = 
"\n" . $a_ulng->
txt(
'content') . 
"\n" .
   188             "----------------------------------------\n" .
   190             "----------------------------------------\n";
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
static _lookupFullname(int $a_user_id)
 
getMailSubject(ilLanguage $ulng)
 
static getNotificationsForObject(int $type, int $id, ?int $page_id=null, bool $ignore_threshold=false)
Get all users/recipients for given object. 
 
static truncateHTML(string $a_text, int $a_length=100, string $a_ending='...', bool $a_exact=false, bool $a_consider_html=true)
Truncate (html) string. 
 
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is: 
 
static _getLanguageOfUser(int $a_usr_id)
Get language object of user. 
 
Extension of ilPageObjectGUI for learning modules. 
 
ilObjLearningModule $learning_module
 
__construct(string $a_action, int $a_type, ilObjLearningModule $a_learning_module, int $a_page_id, string $a_comment="")
 
static updateNotificationTime(int $type, int $id, array $user_ids, ?int $page_id=null, bool $activate_new_entries=true)
Update the last mail timestamp for given object and users. 
 
static _getPresentationTitle(int $a_pg_id, string $a_mode=self::CHAPTER_TITLE, bool $a_include_numbers=false, bool $a_time_scheduled_activation=false, bool $a_force_content=false, int $a_lm_id=0, string $a_lang="-", bool $a_include_short=false)
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...
 
getPreviewText(ilLanguage $a_ulng)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
link(string $caption, string $href, bool $new_viewport=false)
 
ilAccessHandler $ilAccess
 
static _lookupLogin(int $a_user_id)
 
getMailBody(ilLanguage $a_ulng, int $a_user_id)