ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
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)
 

Protected Attributes

array $events = []
 
ilStudyProgrammeEvents $prg_events
 

Additional Inherited Members

- Data Fields inherited from StudyProgrammeEvents
const COMPONENT = "Modules/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.

References $prg_events.

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

Member Function Documentation

◆ collect()

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

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

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

31  : void
32  {
33  $this->events[] = [$event, $parameter];
34  }
+ 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.

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

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)
+ Here is the call graph for this function:

◆ informUserByMailToRestart()

PRGEventsDelayed::informUserByMailToRestart ( ilPRGAssignment  $assignment)

Implements StudyProgrammeEvents.

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

References collect(), ilPRGAssignment\getId(), ilPRGAssignment\getRootId(), and ILIAS\Repository\int().

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  }
collect(string $event, array $parameter)
+ 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.

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

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  }
collect(string $event, array $parameter)
+ Here is the call graph for this function:

◆ userAssigned()

PRGEventsDelayed::userAssigned ( ilPRGAssignment  $assignment)

Implements StudyProgrammeEvents.

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

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

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  }
collect(string $event, array $parameter)
+ 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.

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

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  }
collect(string $event, array $parameter)
+ Here is the call graph for this function:

◆ userReAssigned()

PRGEventsDelayed::userReAssigned ( ilPRGAssignment  $assignment)

Implements StudyProgrammeEvents.

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

References collect(), ilPRGAssignment\getId(), ilPRGAssignment\getRootId(), and ILIAS\Repository\int().

59  : void
60  {
61  $this->collect(self::EVENT_USER_REASSIGNED, [
62  "ass_id" => $assignment->getId(),
63  "root_prg_id" => (int) $assignment->getRootId()
64  ]);
65  }
collect(string $event, array $parameter)
+ 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.

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

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  }
collect(string $event, array $parameter)
+ Here is the call graph for this function:

◆ userRiskyToFail()

PRGEventsDelayed::userRiskyToFail ( ilPRGAssignment  $assignment)

Implements StudyProgrammeEvents.

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

References collect(), ilPRGAssignment\getId(), ilPRGAssignment\getRootId(), and ILIAS\Repository\int().

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  }
collect(string $event, array $parameter)
+ 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.

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

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  }
collect(string $event, array $parameter)
+ 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.

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

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  }
collect(string $event, array $parameter)
+ 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: