ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 $ilAppEventHandler;
17 self::$app_event_handler = $ilAppEventHandler;
18 }
19 }
20
21 static protected function raise($a_event, $a_parameter) {
23 self::$app_event_handler->raise(self::$component, $a_event, $a_parameter);
24 }
25
26 static public function userAssigned(ilStudyProgrammeUserAssignment $a_assignment) {
27 self::raise("userAssigned", array
28 ( "root_prg_id" => $a_assignment->getStudyProgramme()->getId()
29 , "usr_id" => $a_assignment->getUserId()
30 , "ass_id" => $a_assignment->getId()
31 ));
32 }
33
34 static public function userDeassigned(ilStudyProgrammeUserAssignment $a_assignment) {
35 self::raise("userDeassigned", array
36 ( "root_prg_id" => $a_assignment->getStudyProgramme()->getId()
37 , "usr_id" => $a_assignment->getUserId()
38 , "ass_id" => $a_assignment->getId()
39 ));
40 }
41
42 static public function userSuccessful(ilStudyProgrammeUserProgress $a_progress) {
43 $ass = $a_progress->getAssignment();
44 self::raise("userSuccessful", array
45 ( "root_prg_id" => $ass->getStudyProgramme()->getId()
46 , "prg_id" => $a_progress->getStudyProgramme()->getId()
47 , "usr_id" => $ass->getUserId()
48 , "ass_id" => $ass->getId()
49 ));
50 }
51}
52
53?>
Events for the StudyProgramme.
static userAssigned(ilStudyProgrammeUserAssignment $a_assignment)
static raise($a_event, $a_parameter)
static userSuccessful(ilStudyProgrammeUserProgress $a_progress)
static userDeassigned(ilStudyProgrammeUserAssignment $a_assignment)
Represents one assignment of a user to a study programme.
getStudyProgramme()
Get the program node where this assignment was made.
getUserId()
Get the id of the user who is assigned.
Represents the progress of a user at one node of a study programme.
getAssignment()
Get the assignment this progress belongs to.
getStudyProgramme()
Get the program node where this progress belongs to was made.