ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilStudyProgrammeEvents.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 2015 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4 
11  static protected $component = "Modules/StudyProgramme";
12  static public $app_event_handler = null;
13 
14  static protected function initAppEventHandler() {
15  if (self::$app_event_handler === null) {
16  global $DIC;
17  $ilAppEventHandler = $DIC['ilAppEventHandler'];
18  self::$app_event_handler = $ilAppEventHandler;
19  }
20  }
21 
22  static protected function raise($a_event, $a_parameter) {
23  self::initAppEventHandler();
24  self::$app_event_handler->raise(self::$component, $a_event, $a_parameter);
25  }
26 
27  static public function userAssigned(ilStudyProgrammeUserAssignment $a_assignment) {
28  self::raise("userAssigned", array
29  ( "root_prg_id" => $a_assignment->getStudyProgramme()->getId()
30  , "usr_id" => $a_assignment->getUserId()
31  , "ass_id" => $a_assignment->getId()
32  ));
33  }
34 
35  static public function userDeassigned(ilStudyProgrammeUserAssignment $a_assignment) {
36  self::raise("userDeassigned", array
37  ( "root_prg_id" => $a_assignment->getStudyProgramme()->getId()
38  , "usr_id" => $a_assignment->getUserId()
39  , "ass_id" => $a_assignment->getId()
40  ));
41  }
42 
43  static public function userSuccessful(ilStudyProgrammeUserProgress $a_progress) {
44  $ass = $a_progress->getAssignment();
45  self::raise("userSuccessful", array
46  ( "root_prg_id" => $ass->getStudyProgramme()->getId()
47  , "prg_id" => $a_progress->getStudyProgramme()->getId()
48  , "usr_id" => $ass->getUserId()
49  , "ass_id" => $ass->getId()
50  ));
51  }
52 }
53 
54 ?>
static userSuccessful(ilStudyProgrammeUserProgress $a_progress)
getStudyProgramme()
Get the program node where this assignment was made.
getStudyProgramme()
Get the program node where this progress belongs to was made.
static userAssigned(ilStudyProgrammeUserAssignment $a_assignment)
Events for the StudyProgramme.
getAssignment()
Get the assignment this progress belongs to.
getUserId()
Get the id of the user who is assigned.
static userDeassigned(ilStudyProgrammeUserAssignment $a_assignment)
Create styles array
The data for the language used.
global $DIC
Represents one assignment of a user to a study programme.
Represents the progress of a user at one node of a study programme.