ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilLMMailNotification Class Reference
+ Inheritance diagram for ilLMMailNotification:
+ Collaboration diagram for ilLMMailNotification:

Public Member Functions

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

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.
- Protected Member Functions inherited from ilMailNotification
 setSubject ($a_subject)
 Set mail subject.
 getSubject ()
 Get mail subject.
 setBody ($a_body)
 Set mail body.
 appendBody ($a_body)
 Append body text.
 getBody ()
 Get body.
 initLanguageByIso2Code ($a_code= '')
 Init language by ISO2 code.
 setLanguage ($a_language)
 A language.
 getLanguage ()
 get language object
 getLanguageText ($a_keyword)
 Replace new lines.
 getObjectTitle ($a_shorten=false)
 Get object title.
 initMail ()
 Init mail.
 getMail ()
 Get mail object.
 createPermanentLink ($a_params=array(), $a_append= '')
 Create a permanent link for an object.
 userToString ($a_usr_id)
 Utility function.
 isRefIdAccessible ($a_user_id, $a_ref_id, $a_permission="read")
 Check if ref id is accessible for user.

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

ilLMMailNotification::getQuestionId ( )

Get question id.

Returns
int question id

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

Referenced by send().

{
return $this->question_id;
}

+ Here is the caller graph for this function:

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.

References ilMailNotification\getLanguage().

Referenced by send().

{
$this->getLanguage()->loadLanguageModule('content');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLMMailNotification::send ( )

Send notifications.

Returns

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

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(), and ilMailNotification\setSubject().

{
global $ilUser;
switch($this->getType())
{
case self::TYPE_USER_BLOCKED:
foreach($this->getRecipients() as $rcp)
{
$this->initLanguage($rcp);
$this->initMail();
$this->setSubject(
sprintf($this->getLanguageText('cont_user_blocked'),
$this->getObjectTitle(true))
);
$this->setBody(ilMail::getSalutation($rcp,$this->getLanguage()));
$this->appendBody("\n\n");
$this->appendBody(
$this->getLanguageText('cont_user_blocked2'));
$this->appendBody("\n");
$this->appendBody(
$this->getLanguageText('cont_user_blocked3')." '".$this->getLanguageText('objs_qst')."' > '".$this->getLanguageText('cont_blocked_users')."'");
$this->appendBody("\n");
$this->appendBody(
$this->getLanguageText('obj_lm').": ".$this->getObjectTitle(true));
$this->appendBody("\n");
include_once("./Services/User/classes/class.ilUserUtil.php");
$this->appendBody(
$this->getLanguageText('user').": ".ilUserUtil::getNamePresentation($ilUser->getId(), false, false, ""));
$this->appendBody("\n");
include_once("./Modules/TestQuestionPool/classes/class.assQuestion.php");
$this->appendBody(
$this->getLanguageText('question').": ".assQuestion::_getTitle($this->getQuestionId()));
$this->appendBody("\n");
$this->appendBody("\n\n");
$this->appendBody($this->getLanguageText('cont_lm_mail_permanent_link'));
$this->appendBody("\n");
$this->appendBody($this->createPermanentLink(array(), ""));
$this->getMail()->appendInstallationSignature(true);
$this->sendMail(array($rcp),array('system'));
}
break;
}
return true;
}

+ Here is the call graph for this function:

ilLMMailNotification::setQuestionId (   $a_val)

Set question id.

Parameters
int$a_valquestion id

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

{
$this->question_id = $a_val;
}

Field Documentation

const ilLMMailNotification::TYPE_USER_BLOCKED = 10

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

Referenced by ilLMPageGUI\processAnswer().


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