ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
PRGEventsDelayed Class Reference
+ Inheritance diagram for PRGEventsDelayed:
+ Collaboration diagram for PRGEventsDelayed:

Public Member Functions

 __construct (ilStudyProgrammeEvents $prg_events)
 
 collect (string $event, array $parameter)
 
 raiseCollected ()
 
 userAssigned (ilPRGAssignment $assignment)
 
 userReAssigned (ilPRGAssignment $assignment)
 
 userDeassigned (ilPRGAssignment $a_assignment)
 
 informUserByMailToRestart (ilPRGAssignment $assignment)
 
 userRiskyToFail (ilPRGAssignment $assignment)
 
 userSuccessful (ilPRGAssignment $assignment, int $pgs_node_id)
 
 validityChange (ilPRGAssignment $assignment, int $pgs_node_id)
 
 deadlineChange (ilPRGAssignment $assignment, int $pgs_node_id)
 
 scoreChange (ilPRGAssignment $assignment, int $pgs_node_id)
 
 userRevertSuccessful (ilPRGAssignment $assignment, int $pgs_node_id)
 
 userAssigned (ilPRGAssignment $assignment)
 
 userReAssigned (ilPRGAssignment $assignment)
 
 userDeassigned (ilPRGAssignment $a_assignment)
 
 userSuccessful (ilPRGAssignment $assignment, int $pgs_node_id)
 
 userRevertSuccessful (ilPRGAssignment $assignment, int $pgs_node_id)
 
 validityChange (ilPRGAssignment $assignment, int $pgs_node_id)
 
 deadlineChange (ilPRGAssignment $assignment, int $pgs_node_id)
 
 scoreChange (ilPRGAssignment $assignment, int $pgs_node_id)
 
 userRiskyToFail (ilPRGAssignment $assignment)
 
 informUserByMailToRestart (ilPRGAssignment $assignment)
 

Protected Attributes

array $events = []
 
ilStudyProgrammeEvents $prg_events
 

Additional Inherited Members

- Data Fields inherited from StudyProgrammeEvents
const COMPONENT = "components/ILIAS/StudyProgramme"
 
const EVENT_USER_ASSIGNED = 'userAssigned'
 
const EVENT_USER_REASSIGNED = 'userReAssigned'
 
const EVENT_USER_DEASSIGNED = 'userDeassigned'
 
const EVENT_USER_SUCCESSFUL = 'userSuccessful'
 
const EVENT_USER_TO_RESTART = 'informUserToRestart'
 
const EVENT_USER_ABOUT_TO_FAIL = 'userRiskyToFail'
 
const EVENT_VALIDITY_CHANGE = 'vqChange'
 
const EVENT_DEADLINE_CHANGE = 'deadlineChange'
 
const EVENT_SCORE_CHANGE = 'currentPointsChange'
 
const EVENT_USER_NOT_SUCCESSFUL = 'userNotSuccessful'
 

Detailed Description

Definition at line 20 of file class.PRGEventsDelayed.php.

Constructor & Destructor Documentation

◆ __construct()

PRGEventsDelayed::__construct ( ilStudyProgrammeEvents  $prg_events)

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

27 {
28 $this->prg_events = $prg_events;
29 }
ilStudyProgrammeEvents $prg_events

References $prg_events.

Member Function Documentation

◆ collect()

PRGEventsDelayed::collect ( string  $event,
array  $parameter 
)

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

31 : void
32 {
33 $this->events[] = [$event, $parameter];
34 }

Referenced by deadlineChange(), informUserByMailToRestart(), scoreChange(), userAssigned(), userDeassigned(), userReAssigned(), userRevertSuccessful(), userRiskyToFail(), userSuccessful(), and validityChange().

+ Here is the caller graph for this function:

◆ deadlineChange()

PRGEventsDelayed::deadlineChange ( ilPRGAssignment  $assignment,
int  $pgs_node_id 
)

Implements StudyProgrammeEvents.

Definition at line 113 of file class.PRGEventsDelayed.php.

113 : void
114 {
115 $this->collect(self::EVENT_DEADLINE_CHANGE, [
116 "ass_id" => $assignment->getId(),
117 "root_prg_id" => $assignment->getRootId(),
118 "prg_id" => $pgs_node_id,
119 "usr_id" => $assignment->getUserId()
120 ]);
121 }
collect(string $event, array $parameter)

References collect(), ilPRGAssignment\getId(), ilPRGAssignment\getRootId(), and ilPRGAssignment\getUserId().

+ Here is the call graph for this function:

◆ informUserByMailToRestart()

PRGEventsDelayed::informUserByMailToRestart ( ilPRGAssignment  $assignment)

Implements StudyProgrammeEvents.

Definition at line 77 of file class.PRGEventsDelayed.php.

77 : void
78 {
79 $this->collect(self::EVENT_USER_TO_RESTART, [
80 "ass_id" => (int) $assignment->getId(),
81 "root_prg_id" => (int) $assignment->getRootId()
82 ]);
83 }

References collect(), ilPRGAssignment\getId(), and ilPRGAssignment\getRootId().

+ Here is the call graph for this function:

◆ raiseCollected()

PRGEventsDelayed::raiseCollected ( )

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

36 : void
37 {
38 $accounted_for = [];
39 foreach (array_filter($this->events) as $entry) {
40 list($event, $parameter) = $entry;
41 $k = $event . print_r($parameter, true);
42 if (!array_key_exists($k, $accounted_for)) {
43 $accounted_for[$k] = true;
44 $this->prg_events->raise($event, $parameter);
45 }
46 }
47 $this->events[] = [];
48 }

◆ scoreChange()

PRGEventsDelayed::scoreChange ( ilPRGAssignment  $assignment,
int  $pgs_node_id 
)

Implements StudyProgrammeEvents.

Definition at line 123 of file class.PRGEventsDelayed.php.

123 : void
124 {
125 $this->collect(self::EVENT_SCORE_CHANGE, [
126 "ass_id" => $assignment->getId(),
127 "root_prg_id" => $assignment->getRootId(),
128 "prg_id" => $pgs_node_id,
129 "usr_id" => $assignment->getUserId()
130 ]);
131 }

References collect(), ilPRGAssignment\getId(), ilPRGAssignment\getRootId(), and ilPRGAssignment\getUserId().

+ Here is the call graph for this function:

◆ userAssigned()

PRGEventsDelayed::userAssigned ( ilPRGAssignment  $assignment)

Implements StudyProgrammeEvents.

Definition at line 50 of file class.PRGEventsDelayed.php.

50 : void
51 {
52 $this->collect(self::EVENT_USER_ASSIGNED, [
53 "root_prg_id" => $assignment->getRootId(),
54 "usr_id" => $assignment->getUserId(),
55 "ass_id" => $assignment->getId()
56 ]);
57 }

References collect(), ilPRGAssignment\getId(), ilPRGAssignment\getRootId(), and ilPRGAssignment\getUserId().

+ Here is the call graph for this function:

◆ userDeassigned()

PRGEventsDelayed::userDeassigned ( ilPRGAssignment  $a_assignment)

Implements StudyProgrammeEvents.

Definition at line 67 of file class.PRGEventsDelayed.php.

67 : void
68 {
69 $this->collect(self::EVENT_USER_DEASSIGNED, [
70 "root_prg_id" => $a_assignment->getRootId(),
71 "usr_id" => $a_assignment->getUserId(),
72 "ass_id" => $a_assignment->getId()
73 ]);
74 }

References collect(), ilPRGAssignment\getId(), ilPRGAssignment\getRootId(), and ilPRGAssignment\getUserId().

+ Here is the call graph for this function:

◆ userReAssigned()

PRGEventsDelayed::userReAssigned ( ilPRGAssignment  $assignment)

Implements StudyProgrammeEvents.

Definition at line 59 of file class.PRGEventsDelayed.php.

59 : void
60 {
61 $this->collect(self::EVENT_USER_REASSIGNED, [
62 "ass_id" => $assignment->getId(),
63 "root_prg_id" => (int) $assignment->getRootId()
64 ]);
65 }

References collect(), ilPRGAssignment\getId(), and ilPRGAssignment\getRootId().

+ Here is the call graph for this function:

◆ userRevertSuccessful()

PRGEventsDelayed::userRevertSuccessful ( ilPRGAssignment  $assignment,
int  $pgs_node_id 
)

Implements StudyProgrammeEvents.

Definition at line 133 of file class.PRGEventsDelayed.php.

133 : void
134 {
135 $this->collect(self::EVENT_USER_NOT_SUCCESSFUL, [
136 "ass_id" => $assignment->getId(),
137 "root_prg_id" => $assignment->getRootId(),
138 "prg_id" => $pgs_node_id,
139 "usr_id" => $assignment->getUserId()
140 ]);
141 }

References collect(), ilPRGAssignment\getId(), ilPRGAssignment\getRootId(), and ilPRGAssignment\getUserId().

+ Here is the call graph for this function:

◆ userRiskyToFail()

PRGEventsDelayed::userRiskyToFail ( ilPRGAssignment  $assignment)

Implements StudyProgrammeEvents.

Definition at line 85 of file class.PRGEventsDelayed.php.

85 : void
86 {
87 $this->collect(self::EVENT_USER_ABOUT_TO_FAIL, [
88 "ass_id" => (int) $assignment->getId(),
89 "root_prg_id" => (int) $assignment->getRootId()
90 ]);
91 }

References collect(), ilPRGAssignment\getId(), and ilPRGAssignment\getRootId().

+ Here is the call graph for this function:

◆ userSuccessful()

PRGEventsDelayed::userSuccessful ( ilPRGAssignment  $assignment,
int  $pgs_node_id 
)

Implements StudyProgrammeEvents.

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

93 : void
94 {
95 $this->collect(self::EVENT_USER_SUCCESSFUL, [
96 "root_prg_id" => $assignment->getRootId(),
97 "prg_id" => $pgs_node_id,
98 "usr_id" => $assignment->getUserId(),
99 "ass_id" => $assignment->getId()
100 ]);
101 }

References collect(), ilPRGAssignment\getId(), ilPRGAssignment\getRootId(), and ilPRGAssignment\getUserId().

+ Here is the call graph for this function:

◆ validityChange()

PRGEventsDelayed::validityChange ( ilPRGAssignment  $assignment,
int  $pgs_node_id 
)

Implements StudyProgrammeEvents.

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

103 : void
104 {
105 $this->collect(self::EVENT_VALIDITY_CHANGE, [
106 "ass_id" => $assignment->getId(),
107 "root_prg_id" => $assignment->getRootId(),
108 "prg_id" => $pgs_node_id,
109 "usr_id" => $assignment->getUserId()
110 ]);
111 }

References collect(), ilPRGAssignment\getId(), ilPRGAssignment\getRootId(), and ilPRGAssignment\getUserId().

+ Here is the call graph for this function:

Field Documentation

◆ $events

array PRGEventsDelayed::$events = []
protected

Definition at line 22 of file class.PRGEventsDelayed.php.

◆ $prg_events

ilStudyProgrammeEvents PRGEventsDelayed::$prg_events
protected

Definition at line 23 of file class.PRGEventsDelayed.php.

Referenced by __construct().


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