ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Exercise\Notification\NotificationManager Class Reference
+ Collaboration diagram for ILIAS\Exercise\Notification\NotificationManager:

Public Member Functions

 __construct (InternalDomainService $domain, int $ref_id)
 
 sendUploadNotification (int $ass_id)
 
 sendFeedbackNotification (int $ass_id, array $user_ids, string $feedback_file="", bool $is_text_feedback=false)
 
 sendMessageFromPeerfeedbackGiverNotification (int $ass_id, int $rcp_id, string $text)
 
 sendMessageFromPeerfeedbackRecipientNotification (int $ass_id, int $peer_id, int $notification_rcp_id, string $text)
 
 sendDeadlineRequestNotification (int $ass_id)
 
 sendDeadlineSetNotification (int $ass_id, int $part_id)
 

Protected Attributes

int $ref_id
 
ILIAS Exercise Object ObjectManager $object
 

Detailed Description

Definition at line 25 of file NotificationManager.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Exercise\Notification\NotificationManager::__construct ( InternalDomainService  $domain,
int  $ref_id 
)

Definition at line 30 of file NotificationManager.php.

33 {
34 $this->object = $domain->object($ref_id);
35 $this->ref_id = $ref_id;
36 }

References ILIAS\Exercise\Notification\NotificationManager\$ref_id, and ILIAS\Exercise\InternalDomainService\object().

+ Here is the call graph for this function:

Member Function Documentation

◆ sendDeadlineRequestNotification()

ILIAS\Exercise\Notification\NotificationManager::sendDeadlineRequestNotification ( int  $ass_id)

Definition at line 102 of file NotificationManager.php.

102 : void
103 {
106 $this->object->getId()
107 );
108
109 $not = new \ilExerciseMailNotification();
111 $not->setAssignmentId($ass_id);
112 $not->setRefId($this->ref_id);
113 $not->setRecipients($users);
114 $not->send();
115 }
static getNotificationsForObject(int $type, int $id, ?int $page_id=null, bool $ignore_threshold=false)
Get all users/recipients for given object.

References $ass_id, ilNotification\getNotificationsForObject(), ILIAS\Repository\object(), ilExerciseMailNotification\TYPE_DEADLINE_REQUESTED, and ilNotification\TYPE_EXERCISE_SUBMISSION.

+ Here is the call graph for this function:

◆ sendDeadlineSetNotification()

ILIAS\Exercise\Notification\NotificationManager::sendDeadlineSetNotification ( int  $ass_id,
int  $part_id 
)

Definition at line 117 of file NotificationManager.php.

117 : void
118 {
119 $not = new \ilExerciseMailNotification();
121 $not->setAssignmentId($ass_id);
122 $not->setRefId($this->ref_id);
123 $not->setRecipients([$part_id]);
124 $not->send();
125 }

References $ass_id, and ilExerciseMailNotification\TYPE_IDL_DEADLINE_SET.

◆ sendFeedbackNotification()

ILIAS\Exercise\Notification\NotificationManager::sendFeedbackNotification ( int  $ass_id,
array  $user_ids,
string  $feedback_file = "",
bool  $is_text_feedback = false 
)

Definition at line 54 of file NotificationManager.php.

59 : void {
60 $type = $is_text_feedback
63
64 $not = new \ilExerciseMailNotification();
65 $not->setType($type);
66 $not->setAssignmentId($ass_id);
67 $not->setRefId($this->ref_id);
68 $not->setRecipients($user_ids);
69 $not->send();
70 }

◆ sendMessageFromPeerfeedbackGiverNotification()

ILIAS\Exercise\Notification\NotificationManager::sendMessageFromPeerfeedbackGiverNotification ( int  $ass_id,
int  $rcp_id,
string  $text 
)

Definition at line 72 of file NotificationManager.php.

76 : void {
77 $not = new \ilExerciseMailNotification();
79 $not->setAssignmentId($ass_id);
80 $not->setRefId($this->ref_id);
81 $not->setRecipients([$rcp_id]);
82 $not->setAdditionalText($text);
83 $not->send();
84 }

◆ sendMessageFromPeerfeedbackRecipientNotification()

ILIAS\Exercise\Notification\NotificationManager::sendMessageFromPeerfeedbackRecipientNotification ( int  $ass_id,
int  $peer_id,
int  $notification_rcp_id,
string  $text 
)

Definition at line 86 of file NotificationManager.php.

91 : void {
92 $not = new \ilExerciseMailNotification();
94 $not->setAssignmentId($ass_id);
95 $not->setRefId($this->ref_id);
96 $not->setPeerId($peer_id);
97 $not->setRecipients([$notification_rcp_id]);
98 $not->setAdditionalText($text);
99 $not->send();
100 }

◆ sendUploadNotification()

ILIAS\Exercise\Notification\NotificationManager::sendUploadNotification ( int  $ass_id)

Definition at line 39 of file NotificationManager.php.

39 : void
40 {
43 $this->object->getId()
44 );
45
46 $not = new \ilExerciseMailNotification();
48 $not->setAssignmentId($ass_id);
49 $not->setRefId($this->ref_id);
50 $not->setRecipients($users);
51 $not->send();
52 }

References $ass_id, ilNotification\getNotificationsForObject(), ILIAS\Repository\object(), ilNotification\TYPE_EXERCISE_SUBMISSION, and ilExerciseMailNotification\TYPE_SUBMISSION_UPLOAD.

+ Here is the call graph for this function:

Field Documentation

◆ $object

ILIAS Exercise Object ObjectManager ILIAS\Exercise\Notification\NotificationManager::$object
protected

Definition at line 28 of file NotificationManager.php.

◆ $ref_id

int ILIAS\Exercise\Notification\NotificationManager::$ref_id
protected

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