ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
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 21 of file class.PRGEventsDelayed.php.

Constructor & Destructor Documentation

◆ __construct()

PRGEventsDelayed::__construct ( ilStudyProgrammeEvents  $prg_events)

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

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

References $prg_events.

Member Function Documentation

◆ collect()

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

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

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

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 114 of file class.PRGEventsDelayed.php.

114 : void
115 {
116 $this->collect(self::EVENT_DEADLINE_CHANGE, [
117 "ass_id" => $assignment->getId(),
118 "root_prg_id" => $assignment->getRootId(),
119 "prg_id" => $pgs_node_id,
120 "usr_id" => $assignment->getUserId()
121 ]);
122 }
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 78 of file class.PRGEventsDelayed.php.

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

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

+ Here is the call graph for this function:

◆ raiseCollected()

PRGEventsDelayed::raiseCollected ( )

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

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

◆ scoreChange()

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

Implements StudyProgrammeEvents.

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

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

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 51 of file class.PRGEventsDelayed.php.

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

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 68 of file class.PRGEventsDelayed.php.

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

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 60 of file class.PRGEventsDelayed.php.

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

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 134 of file class.PRGEventsDelayed.php.

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

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 86 of file class.PRGEventsDelayed.php.

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

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 94 of file class.PRGEventsDelayed.php.

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

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 104 of file class.PRGEventsDelayed.php.

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

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 23 of file class.PRGEventsDelayed.php.

◆ $prg_events

ilStudyProgrammeEvents PRGEventsDelayed::$prg_events
protected

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

Referenced by __construct().


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