ILIAS  Release_4_4_x_branch Revision 61816
 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 ()
- 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.

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.
 isRefIdAccessible ($a_user_id, $a_ref_id, $a_permission="read")
 Check if ref id is accessible for user.
- 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

Constructor & Destructor Documentation

ilTestManScoringParticipantNotification::__construct (   $userId,
  $testRefId 
)

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

References $userId, 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 44 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 37 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 104 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 99 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 ( )

Definition at line 26 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 94 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 9 of file class.ilTestManScoringParticipantNotification.php.

Referenced by __construct(), and setRecipient().


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