ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTestManScoringParticipantNotification Class Reference
+ Inheritance diagram for ilTestManScoringParticipantNotification:
+ Collaboration diagram for ilTestManScoringParticipantNotification:

Public Member Functions

 __construct ($userId, $testRefId)
 send ()
 Send notifications.
- Public Member Functions inherited from ilMailNotification
 __construct ()
 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)
 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.
 sendMail ($a_rcp, $a_type, $a_parse_recipients=true)
 Send Mail.

Private Member Functions

 buildSubject ()
 buildBody ()
 setRecipient ($userId)
 getRecipient ()
 convertFeedbackForMail ($feedback)

Private Attributes

 $userId = null
 $questionGuiList = null
 $notificationData = null

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

Constructor & Destructor Documentation

ilTestManScoringParticipantNotification::__construct (   $userId,
  $testRefId 
)

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

References $userId, ilMailNotification\__construct(), ilMailNotification\getLanguage(), getRecipient(), ilMailNotification\initLanguage(), ilMailNotification\initMail(), setRecipient(), and ilMailNotification\setRefId().

{
$this->setRefId($testRefId);
$this->initLanguage( $this->getRecipient() );
$this->getLanguage()->loadLanguageModule('assessment');
$this->initMail()->enableSoap(false);
}

+ Here is the call graph for this function:

Member Function Documentation

ilTestManScoringParticipantNotification::buildBody ( )
private

Definition at line 43 of file class.ilTestManScoringParticipantNotification.php.

References ilMailNotification\appendBody(), convertFeedbackForMail(), ilMailNotification\getAdditionalInformation(), ilMailNotification\getLanguage(), ilMailNotification\getLanguageText(), ilMailNotification\getMail(), getRecipient(), ilMail\getSalutation(), and ilMailNotification\setBody().

Referenced by send().

{
// Salutation
$this->setBody(
);
$this->appendBody("\n\n");
// Message (What has happened?)
$this->appendBody( $this->getLanguageText('tst_notify_manscoring_done_body_msg_topic') );
$this->appendBody("\n\n");
$info = $this->getAdditionalInformation();
$this->appendBody( $this->getLanguageText('obj_tst').': '.$info['test_title'] );
$this->appendBody("\n");
$this->appendBody( $this->getLanguageText('pass').': '.$info['test_pass'] );
$this->appendBody("\n\n");
foreach($info['questions_gui_list'] as $questionId => $questionGui)
{
$points = $info['questions_scoring_data'][$questionId]['points'];
$feedback = $info['questions_scoring_data'][$questionId]['feedback'];
$feedback = $this->convertFeedbackForMail($feedback);
$this->appendBody( $this->getLanguageText('tst_question').': '.$questionGui->object->getTitle() );
$this->appendBody("\n");
$this->appendBody( $this->getLanguageText('tst_reached_points').': '.$points );
$this->appendBody("\n");
$this->appendBody( $this->getLanguageText('set_manual_feedback').":\n".$feedback );
$this->appendBody("\n\n");
}
// Task (What do I have to do?
/* NOTHING TODO FOR PARTICIPANT */
// Explanation (Why do I receive the following message?)
$this->appendBody("\n");
$this->appendBody($this->getLanguageText('tst_notify_manscoring_done_body_msg_reason'));
// Signature
$this->getMail()->appendInstallationSignature(true);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestManScoringParticipantNotification::buildSubject ( )
private

Definition at line 36 of file class.ilTestManScoringParticipantNotification.php.

References ilMailNotification\getAdditionalInformation(), ilMailNotification\getLanguageText(), and ilMailNotification\setSubject().

Referenced by send().

{
$info = $this->getAdditionalInformation();
$this->setSubject( sprintf($this->getLanguageText('tst_notify_manscoring_done_body_msg_subject'), $info['test_title']) );
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestManScoringParticipantNotification::convertFeedbackForMail (   $feedback)
private

Definition at line 103 of file class.ilTestManScoringParticipantNotification.php.

Referenced by buildBody().

{
if( strip_tags($feedback) != $feedback )
{
$feedback = preg_replace('/<br(.*\/)>/m', "\n", $feedback);
$feedback = strip_tags($feedback);
}
return $feedback;
}

+ Here is the caller graph for this function:

ilTestManScoringParticipantNotification::getRecipient ( )
private

Definition at line 98 of file class.ilTestManScoringParticipantNotification.php.

References ilMailNotification\getRecipients().

Referenced by __construct(), and buildBody().

{
return current( $this->getRecipients() );
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestManScoringParticipantNotification::send ( )

Send notifications.

Returns

Reimplemented from ilMailNotification.

Definition at line 25 of file class.ilTestManScoringParticipantNotification.php.

References buildBody(), buildSubject(), ilMailNotification\getRecipients(), and ilMailNotification\sendMail().

{
$this->buildSubject();
$this->buildBody();
$this->sendMail(
$this->getRecipients(), array('system')
);
}

+ Here is the call graph for this function:

ilTestManScoringParticipantNotification::setRecipient (   $userId)
private

Definition at line 93 of file class.ilTestManScoringParticipantNotification.php.

References $userId, and ilMailNotification\setRecipients().

Referenced by __construct().

{
$this->setRecipients( array($userId) );
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilTestManScoringParticipantNotification::$notificationData = null
private
ilTestManScoringParticipantNotification::$questionGuiList = null
private
ilTestManScoringParticipantNotification::$userId = null
private

Definition at line 8 of file class.ilTestManScoringParticipantNotification.php.

Referenced by __construct(), and setRecipient().


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