ILIAS  release_7 Revision v7.30-3-g800a261c036
ilStudyProgrammeEvents Class Reference
+ Collaboration diagram for ilStudyProgrammeEvents:

Public Member Functions

 __construct (\ilAppEventHandler $app_event_handler, \ilStudyProgrammeAssignmentRepository $assignment_repo)
 
 raise ($a_event, $a_parameter)
 
 userAssigned (ilStudyProgrammeAssignment $a_assignment)
 
 userReAssigned (ilStudyProgrammeAssignment $a_assignment)
 
 userDeassigned (ilStudyProgrammeAssignment $a_assignment)
 
 userSuccessful (ilStudyProgrammeProgress $a_progress)
 
 informUserByMailToRestart (ilStudyProgrammeProgress $progress)
 
 userRiskyToFail (ilStudyProgrammeProgress $progress)
 

Data Fields

const COMPONENT = "Modules/StudyProgramme"
 
 $app_event_handler
 

Protected Attributes

 $assignment_repo
 

Detailed Description

Definition at line 8 of file class.ilStudyProgrammeEvents.php.

Constructor & Destructor Documentation

◆ __construct()

ilStudyProgrammeEvents::__construct ( \ilAppEventHandler  $app_event_handler,
\ilStudyProgrammeAssignmentRepository  $assignment_repo 
)

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

25 {
26 $this->app_event_handler = $app_event_handler;
27 $this->assignment_repo = $assignment_repo;
28 }

References $app_event_handler, and $assignment_repo.

Member Function Documentation

◆ informUserByMailToRestart()

ilStudyProgrammeEvents::informUserByMailToRestart ( ilStudyProgrammeProgress  $progress)

Definition at line 96 of file class.ilStudyProgrammeEvents.php.

96 : void
97 {
98 $this->raise(
99 'informUserToRestart',
100 [
101 "usr_id" => (int) $progress->getUserId(),
102 "progress_id" => (int) $progress->getId(),
103 "ass_id" => (int) $progress->getAssignmentId()
104 ]
105 );
106 }
getId()
Get the id of the progress.
getAssignmentId()
Get the assignment this progress belongs to.
getUserId()
Get the id of the user this progress is for.

References ilStudyProgrammeProgress\getAssignmentId(), ilStudyProgrammeProgress\getId(), and ilStudyProgrammeProgress\getUserId().

+ Here is the call graph for this function:

◆ raise()

ilStudyProgrammeEvents::raise (   $a_event,
  $a_parameter 
)

Definition at line 30 of file class.ilStudyProgrammeEvents.php.

30 : void
31 {
32 $this->app_event_handler->raise(self::COMPONENT, $a_event, $a_parameter);
33 }

◆ userAssigned()

ilStudyProgrammeEvents::userAssigned ( ilStudyProgrammeAssignment  $a_assignment)
Exceptions
ilException

Definition at line 38 of file class.ilStudyProgrammeEvents.php.

38 : void
39 {
40 $this->raise(
41 "userAssigned",
42 [
43 "root_prg_id" => $a_assignment->getRootId(),
44 "usr_id" => $a_assignment->getUserId(),
45 "ass_id" => $a_assignment->getId()
46 ]
47 );
48 }

References ilStudyProgrammeAssignment\getId(), ilStudyProgrammeAssignment\getRootId(), and ilStudyProgrammeAssignment\getUserId().

+ Here is the call graph for this function:

◆ userDeassigned()

ilStudyProgrammeEvents::userDeassigned ( ilStudyProgrammeAssignment  $a_assignment)
Exceptions
ilException

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

67 : void
68 {
69 $this->raise(
70 "userDeassigned",
71 [
72 "root_prg_id" => $a_assignment->getRootId(),
73 "usr_id" => $a_assignment->getUserId(),
74 "ass_id" => $a_assignment->getId()
75 ]
76 );
77 }

References ilStudyProgrammeAssignment\getId(), ilStudyProgrammeAssignment\getRootId(), and ilStudyProgrammeAssignment\getUserId().

+ Here is the call graph for this function:

◆ userReAssigned()

ilStudyProgrammeEvents::userReAssigned ( ilStudyProgrammeAssignment  $a_assignment)
Exceptions
ilException

Definition at line 53 of file class.ilStudyProgrammeEvents.php.

53 : void
54 {
55 $this->raise(
56 "userReAssigned",
57 [
58 "root_prg_ref_id" => (int) ilObjStudyProgramme::getRefIdFor($a_assignment->getRootId()),
59 "usr_id" => (int) $a_assignment->getUserId()
60 ]
61 );
62 }
static getRefIdFor(int $obj_id)

References ilObjStudyProgramme\getRefIdFor(), ilStudyProgrammeAssignment\getRootId(), and ilStudyProgrammeAssignment\getUserId().

+ Here is the call graph for this function:

◆ userRiskyToFail()

ilStudyProgrammeEvents::userRiskyToFail ( ilStudyProgrammeProgress  $progress)

Definition at line 108 of file class.ilStudyProgrammeEvents.php.

108 : void
109 {
110 $this->raise(
111 "userRiskyToFail",
112 [
113 "progress_id" => $progress->getId(),
114 "usr_id" => $progress->getUserId()
115 ]
116 );
117 }

References ilStudyProgrammeProgress\getId(), and ilStudyProgrammeProgress\getUserId().

+ Here is the call graph for this function:

◆ userSuccessful()

ilStudyProgrammeEvents::userSuccessful ( ilStudyProgrammeProgress  $a_progress)
Exceptions
ilException

Definition at line 82 of file class.ilStudyProgrammeEvents.php.

82 : void
83 {
84 $ass = $this->assignment_repo->get($a_progress->getAssignmentId());
85 $this->raise(
86 "userSuccessful",
87 [
88 "root_prg_id" => $ass->getRootId(),
89 "prg_id" => $a_progress->getNodeId(),
90 "usr_id" => $ass->getUserId(),
91 "ass_id" => $ass->getId()
92 ]
93 );
94 }
getNodeId()
Get the obj_id of the program node this progress belongs to.

References ilStudyProgrammeProgress\getAssignmentId(), and ilStudyProgrammeProgress\getNodeId().

+ Here is the call graph for this function:

Field Documentation

◆ $app_event_handler

ilStudyProgrammeEvents::$app_event_handler

Definition at line 15 of file class.ilStudyProgrammeEvents.php.

Referenced by __construct().

◆ $assignment_repo

ilStudyProgrammeEvents::$assignment_repo
protected

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

Referenced by __construct().

◆ COMPONENT

const ilStudyProgrammeEvents::COMPONENT = "Modules/StudyProgramme"

Definition at line 10 of file class.ilStudyProgrammeEvents.php.


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