ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilLMMailNotification Class Reference
+ Inheritance diagram for ilLMMailNotification:
+ Collaboration diagram for ilLMMailNotification:

Public Member Functions

 setQuestionId ($a_val)
 Set question id. More...
 
 getQuestionId ()
 Get question id. More...
 
 send ()
 Send notifications. More...
 
- Public Member Functions inherited from ilMailNotification
 __construct ($a_is_personal_workspace=false)
 
 setType ($a_type)
 Set notification type. More...
 
 getType ()
 Get notification type. More...
 
 setSender ($a_usr_id)
 Set sender of mail. More...
 
 getSender ()
 get sender of mail More...
 
 setRecipients (array $a_rcp)
 
 getRecipients ()
 get array of recipients More...
 
 setAttachments ($a_att)
 Set attachments
More...
 
 getAttachments ()
 Get attachments
More...
 
 setLangModules (array $a_modules)
 Set lang modules. More...
 
 getUserLanguage ($a_usr_id)
 Get user language. More...
 
 setRefId ($a_id)
 
 getRefId ()
 
 getObjId ()
 
 setObjId ($a_obj_id)
 
 getObjType ()
 Get object type. More...
 
 setAdditionalInformation (array $a_info)
 Additional information for creating notification mails. More...
 
 getAdditionalInformation ()
 
 sendMail (array $a_rcp, $a_type, $a_parse_recipients=true)
 
 getBlockBorder ()
 Get (ascii) block border. More...
 

Data Fields

const TYPE_USER_BLOCKED = 10
 
- Data Fields inherited from ilMailNotification
const SUBJECT_TITLE_LENGTH = 60
 

Protected Member Functions

 initLanguage ($a_usr_id)
 Init language. More...
 
- Protected Member Functions inherited from ilMailNotification
 setSubject ($a_subject)
 
 getSubject ()
 
 setBody ($a_body)
 
 appendBody ($a_body)
 Append body text. More...
 
 getBody ()
 
 initLanguage ($a_usr_id)
 Init language. More...
 
 initLanguageByIso2Code ($a_code='')
 Init language by ISO2 code. More...
 
 setLanguage ($a_language)
 
 getLanguage ()
 
 getLanguageText ($a_keyword)
 
 getObjectTitle ($a_shorten=false)
 
 initMail ()
 
 getMail ()
 
 createPermanentLink ($a_params=array(), $a_append='')
 
 userToString ($a_usr_id)
 
 isRefIdAccessible ($a_user_id, $a_ref_id, $a_permission="read")
 Check if ref id is accessible for user. More...
 

Additional Inherited Members

- Protected Attributes inherited from ilMailNotification
 $type = null
 
 $sender = null
 
 $mail = null
 
 $subject = ''
 
 $body = ''
 
 $attachments = array()
 
 $language = null
 
 $lang_modules = array()
 
 $recipients = array()
 
 $ref_id = null
 
 $obj_id = null
 
 $obj_type = null
 
 $additional_info = array()
 
 $is_in_wsp
 
 $wsp_tree
 
 $wsp_access_handler
 

Detailed Description

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 12 of file class.ilLMMailNotification.php.

Member Function Documentation

◆ getQuestionId()

ilLMMailNotification::getQuestionId ( )

Get question id.

Returns
int question id

Definition at line 31 of file class.ilLMMailNotification.php.

32 {
33 return $this->question_id;
34 }

Referenced by send().

+ Here is the caller graph for this function:

◆ initLanguage()

ilLMMailNotification::initLanguage (   $a_usr_id)
protected

Init language.

Parameters
int$a_usr_iduser id

Reimplemented from ilMailNotification.

Definition at line 94 of file class.ilLMMailNotification.php.

95 {
96 parent::initLanguage($a_usr_id);
97 $this->getLanguage()->loadLanguageModule('content');
98 }

References ilMailNotification\getLanguage().

Referenced by send().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ send()

ilLMMailNotification::send ( )

Send notifications.

Returns

Definition at line 40 of file class.ilLMMailNotification.php.

41 {
42 global $ilUser;
43
44 switch($this->getType())
45 {
47
48 foreach($this->getRecipients() as $rcp)
49 {
50 $this->initLanguage($rcp);
51 $this->initMail();
52 $this->setSubject(
53 sprintf($this->getLanguageText('cont_user_blocked'),
54 $this->getObjectTitle(true))
55 );
56 $this->setBody(ilMail::getSalutation($rcp,$this->getLanguage()));
57 $this->appendBody("\n\n");
58 $this->appendBody(
59 $this->getLanguageText('cont_user_blocked2'));
60 $this->appendBody("\n");
61 $this->appendBody(
62 $this->getLanguageText('cont_user_blocked3')." '".$this->getLanguageText('objs_qst')."' > '".$this->getLanguageText('cont_blocked_users')."'");
63 $this->appendBody("\n");
64 $this->appendBody(
65 $this->getLanguageText('obj_lm').": ".$this->getObjectTitle(true));
66 $this->appendBody("\n");
67 include_once("./Services/User/classes/class.ilUserUtil.php");
68 $this->appendBody(
69 $this->getLanguageText('user').": ".ilUserUtil::getNamePresentation($ilUser->getId(), false, false, ""));
70 $this->appendBody("\n");
71
72 include_once("./Modules/TestQuestionPool/classes/class.assQuestion.php");
73 $this->appendBody(
74 $this->getLanguageText('question').": ".assQuestion::_getTitle($this->getQuestionId()));
75 $this->appendBody("\n");
76 $this->appendBody("\n\n");
77 $this->appendBody($this->getLanguageText('cont_lm_mail_permanent_link'));
78 $this->appendBody("\n");
79 $this->appendBody($this->createPermanentLink(array(), ""));
80 $this->getMail()->appendInstallationSignature(true);
81 $this->sendMail(array($rcp),array('system'));
82 }
83 break;
84
85 }
86 return true;
87 }
_getTitle($a_q_id)
Returns the title of a question.
initLanguage($a_usr_id)
Init language.
appendBody($a_body)
Append body text.
sendMail(array $a_rcp, $a_type, $a_parse_recipients=true)
getType()
Get notification type.
getRecipients()
get array of recipients
getObjectTitle($a_shorten=false)
createPermanentLink($a_params=array(), $a_append='')
static getSalutation($a_usr_id, $a_language=null)
Get salutation.
static getNamePresentation($a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false)
Default behaviour is:
global $ilUser
Definition: imgupload.php:15

References $ilUser, assQuestion\_getTitle(), ilMailNotification\appendBody(), ilMailNotification\createPermanentLink(), ilMailNotification\getLanguage(), ilMailNotification\getLanguageText(), ilMailNotification\getMail(), ilUserUtil\getNamePresentation(), ilMailNotification\getObjectTitle(), getQuestionId(), ilMailNotification\getRecipients(), ilMail\getSalutation(), ilMailNotification\getType(), initLanguage(), ilMailNotification\initMail(), ilMailNotification\sendMail(), ilMailNotification\setBody(), ilMailNotification\setSubject(), and TYPE_USER_BLOCKED.

+ Here is the call graph for this function:

◆ setQuestionId()

ilLMMailNotification::setQuestionId (   $a_val)

Set question id.

Parameters
int$a_valquestion id

Definition at line 21 of file class.ilLMMailNotification.php.

22 {
23 $this->question_id = $a_val;
24 }

Field Documentation

◆ TYPE_USER_BLOCKED

const ilLMMailNotification::TYPE_USER_BLOCKED = 10

Definition at line 14 of file class.ilLMMailNotification.php.

Referenced by ilLMPageGUI\processAnswer(), and send().


The documentation for this class was generated from the following file: