ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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{
12 protected static $component = "Modules/StudyProgramme";
13 public static $app_event_handler = null;
14
15 protected static function initAppEventHandler()
16 {
17 if (self::$app_event_handler === null) {
18 global $DIC;
19 $ilAppEventHandler = $DIC['ilAppEventHandler'];
20 self::$app_event_handler = $ilAppEventHandler;
21 }
22 }
23
24 protected static function raise($a_event, $a_parameter)
25 {
27 self::$app_event_handler->raise(self::$component, $a_event, $a_parameter);
28 }
29
30 public static function userAssigned(ilStudyProgrammeUserAssignment $a_assignment)
31 {
32 self::raise("userAssigned", array( "root_prg_id" => $a_assignment->getStudyProgramme()->getId()
33 , "usr_id" => $a_assignment->getUserId()
34 , "ass_id" => $a_assignment->getId()
35 ));
36 }
37
38 public static function userDeassigned(ilStudyProgrammeUserAssignment $a_assignment)
39 {
40 self::raise("userDeassigned", array( "root_prg_id" => $a_assignment->getStudyProgramme()->getId()
41 , "usr_id" => $a_assignment->getUserId()
42 , "ass_id" => $a_assignment->getId()
43 ));
44 }
45
46 public static function userSuccessful(ilStudyProgrammeUserProgress $a_progress)
47 {
48 $ass = $a_progress->getAssignment();
49 self::raise("userSuccessful", array( "root_prg_id" => $ass->getStudyProgramme()->getId()
50 , "prg_id" => $a_progress->getStudyProgramme()->getId()
51 , "usr_id" => $ass->getUserId()
52 , "ass_id" => $ass->getId()
53 ));
54 }
55}
An exception for terminatinating execution or to throw for unit testing.
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.
global $DIC
Definition: saml.php:7