ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTestMailNotification Class Reference

Class ilTestMailNotification. More...

+ Inheritance diagram for ilTestMailNotification:
+ Collaboration diagram for ilTestMailNotification:

Public Member Functions

 __construct ()
 Constructor.
 sendSimpleNotification ($owner_id, $title, $usr_data)
 Send a simple notification to the owner of the test.
 sendAdvancedNotification ($owner_id, $title, $usr_data, $file_names)
 send an advanced notification to the owner of the test
- Public Member Functions inherited from ilMailNotification
 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)
 getAttachments ()
 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.
 send ()
 Send notifications.
 sendMail ($a_rcp, $a_type, $a_parse_recipients=true)
 Send Mail.

Additional Inherited Members

- Data Fields inherited from ilMailNotification
const SUBJECT_TITLE_LENGTH = 60
- 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.
 initLanguage ($a_usr_id)
 Init language.
 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.
- Protected Attributes inherited from ilMailNotification
 $language = null

Detailed Description

Class ilTestMailNotification.

Author
Nadia Ahmad nahma.nosp@m.d@da.nosp@m.tabay.nosp@m..de
Version
$Id:$

Definition at line 13 of file class.ilTestMailNotification.php.

Constructor & Destructor Documentation

ilTestMailNotification::__construct ( )

Constructor.

Returns

Reimplemented from ilMailNotification.

Definition at line 15 of file class.ilTestMailNotification.php.

Member Function Documentation

ilTestMailNotification::sendAdvancedNotification (   $owner_id,
  $title,
  $usr_data,
  $file_names 
)

send an advanced notification to the owner of the test

Parameters
int$owner_id
string$title
sting$usr_data
array$file_names

Definition at line 61 of file class.ilTestMailNotification.php.

References $title, ilMailNotification\appendBody(), ilDatePresentation\formatDate(), ilMailNotification\getLanguage(), ilMailNotification\getMail(), ilMail\getSalutation(), IL_CAL_UNIX, ilMailNotification\initLanguage(), ilMailNotification\initMail(), ilMailNotification\sendMail(), ilMailNotification\setAttachments(), ilMailNotification\setBody(), ilMailNotification\setSubject(), and ilDatePresentation\setUseRelativeDates().

{
$this->initLanguage($owner_id);
$this->language->loadLanguageModule('assessment');
$this->initMail();
$this->setSubject(sprintf($this->language->txt('tst_user_finished_test'), $title));
$this->setBody(ilMail::getSalutation($owner_id, $this->getLanguage()));
$this->appendBody("\n\n");
$this->appendBody($this->language->txt('user_has_finished_a_test'));
$this->appendBody("\n\n");
$this->appendBody($this->language->txt('title').': '. $title);
$this->appendBody("\n");
$this->appendBody($this->language->txt('username').': '. $usr_data);
$this->appendBody("\n");
$this->appendBody($this->language->txt('tst_finished').': '. ilDatePresentation::formatDate(new ilDateTime(time(), IL_CAL_UNIX)));
$this->appendBody("\n\n");
$this->appendBody($this->language->txt('tst_attached_xls_file'));
$this->appendBody("\n\n");
$this->appendBody($this->language->txt('tst_notification_explanation_admin'));
$this->appendBody("\n");
$this->setAttachments($file_names);
$this->getMail()->appendInstallationSignature(true);
$this->sendMail(array($owner_id),array('system'));
}

+ Here is the call graph for this function:

ilTestMailNotification::sendSimpleNotification (   $owner_id,
  $title,
  $usr_data 
)

Send a simple notification to the owner of the test.

Parameters
int$owner_id
string$title
string$usr_data

Definition at line 27 of file class.ilTestMailNotification.php.

References $title, ilMailNotification\appendBody(), ilDatePresentation\formatDate(), ilMailNotification\getLanguage(), ilMailNotification\getMail(), ilMail\getSalutation(), IL_CAL_UNIX, ilMailNotification\initLanguage(), ilMailNotification\initMail(), ilMailNotification\sendMail(), ilMailNotification\setBody(), ilMailNotification\setSubject(), and ilDatePresentation\setUseRelativeDates().

{
$this->initLanguage($owner_id);
$this->language->loadLanguageModule('assessment');
$this->initMail();
$this->setSubject(sprintf($this->language->txt('tst_user_finished_test'), $title));
$this->setBody(ilMail::getSalutation($owner_id, $this->getLanguage()));
$this->appendBody("\n\n");
$this->appendBody($this->language->txt('user_has_finished_a_test'));
$this->appendBody("\n\n");
$this->appendBody($this->language->txt('title').': '. $title);
$this->appendBody("\n");
$this->appendBody($this->language->txt('username').': '. $usr_data);
$this->appendBody("\n");
$this->appendBody($this->language->txt('tst_finished').': '. ilDatePresentation::formatDate(new ilDateTime(time(), IL_CAL_UNIX)));
$this->appendBody("\n\n");
$this->appendBody($this->language->txt('tst_notification_explanation_admin'));
$this->appendBody("\n");
$this->getMail()->appendInstallationSignature(true);
$this->sendMail(array($owner_id),array('system'));
}

+ Here is the call graph for this function:


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