ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilStudyProgrammeEvents Class Reference
+ Collaboration diagram for ilStudyProgrammeEvents:

Public Member Functions

 __construct (\ilAppEventHandler $app_event_handler, \ilStudyProgrammeAssignmentRepository $assignment_repo)
 
 raise ($a_event, $a_parameter)
 
 userAssigned (ilStudyProgrammeUserAssignment $a_assignment)
 
 userReAssigned (ilStudyProgrammeUserAssignment $a_assignment)
 
 userDeassigned (ilStudyProgrammeUserAssignment $a_assignment)
 
 userSuccessful (ilStudyProgrammeUserProgress $a_progress)
 
 informUserByMailToRestart (ilStudyProgrammeUserAssignment $assignment)
 
 userRiskyToFail (ilStudyProgrammeUserProgress $a_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.

References $app_event_handler, and $assignment_repo.

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

Member Function Documentation

◆ informUserByMailToRestart()

ilStudyProgrammeEvents::informUserByMailToRestart ( ilStudyProgrammeUserAssignment  $assignment)
Exceptions
ilException

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

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

99  : void
100  {
101  $this->raise(
102  'informUserToRestart',
103  [
104  "usr_id" => (int) $assignment->getUserId(),
105  "ass_id" => (int) $assignment->getId()
106  ]
107  );
108  }
+ 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 ( ilStudyProgrammeUserAssignment  $a_assignment)
Exceptions
ilException

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

References ilStudyProgrammeUserAssignment\getId(), ilStudyProgrammeUserAssignment\getStudyProgramme(), and ilStudyProgrammeUserAssignment\getUserId().

38  : void
39  {
40  $this->raise(
41  "userAssigned",
42  [
43  "root_prg_id" => $a_assignment->getStudyProgramme()->getId(),
44  "usr_id" => $a_assignment->getUserId(),
45  "ass_id" => $a_assignment->getId()
46  ]
47  );
48  }
getStudyProgramme()
Get the program node where this assignment was made.
+ Here is the call graph for this function:

◆ userDeassigned()

ilStudyProgrammeEvents::userDeassigned ( ilStudyProgrammeUserAssignment  $a_assignment)
Exceptions
ilException

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

References ilStudyProgrammeUserAssignment\getId(), ilStudyProgrammeUserAssignment\getStudyProgramme(), and ilStudyProgrammeUserAssignment\getUserId().

67  : void
68  {
69  $this->raise(
70  "userDeassigned",
71  [
72  "root_prg_id" => $a_assignment->getStudyProgramme()->getId(),
73  "usr_id" => $a_assignment->getUserId(),
74  "ass_id" => $a_assignment->getId()
75  ]
76  );
77  }
getStudyProgramme()
Get the program node where this assignment was made.
+ Here is the call graph for this function:

◆ userReAssigned()

ilStudyProgrammeEvents::userReAssigned ( ilStudyProgrammeUserAssignment  $a_assignment)
Exceptions
ilException

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

References ilStudyProgrammeUserAssignment\getStudyProgramme(), and ilStudyProgrammeUserAssignment\getUserId().

53  : void
54  {
55  $this->raise(
56  "userReAssigned",
57  [
58  "root_prg_ref_id" => (int) $a_assignment->getStudyProgramme()->getRefId(),
59  "usr_id" => (int) $a_assignment->getUserId()
60  ]
61  );
62  }
getStudyProgramme()
Get the program node where this assignment was made.
+ Here is the call graph for this function:

◆ userRiskyToFail()

ilStudyProgrammeEvents::userRiskyToFail ( ilStudyProgrammeUserProgress  $a_progress)

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

References ilStudyProgrammeUserProgress\getAssignmentId(), and ilStudyProgrammeUserProgress\getId().

110  : void
111  {
112  $ass = $this->assignment_repo->read($a_progress->getAssignmentId());
113  $this->raise(
114  "userRiskyToFail",
115  [
116  "progress_id" => $a_progress->getId(),
117  "usr_id" => $ass->getUserId()
118  ]
119  );
120  }
getAssignmentId()
Get the assignment this progress belongs to.
+ Here is the call graph for this function:

◆ userSuccessful()

ilStudyProgrammeEvents::userSuccessful ( ilStudyProgrammeUserProgress  $a_progress)
Exceptions
ilException

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

References ilStudyProgrammeUserProgress\getAssignmentId(), and ilStudyProgrammeUserProgress\getStudyProgramme().

82  : void
83  {
84  $ass = $this->assignment_repo->read($a_progress->getAssignmentId());
85  $this->raise(
86  "userSuccessful",
87  [
88  "root_prg_id" => $ass->getRootId(),
89  "prg_id" => $a_progress->getStudyProgramme()->getId(),
90  "usr_id" => $ass->getUserId(),
91  "ass_id" => $ass->getId()
92  ]
93  );
94  }
getStudyProgramme()
Get the program node this progress belongs to.
getAssignmentId()
Get the assignment this progress belongs to.
+ 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: