ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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  {
26  self::initAppEventHandler();
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 }
static userSuccessful(ilStudyProgrammeUserProgress $a_progress)
global $DIC
Definition: saml.php:7
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.
Represents one assignment of a user to a study programme.
Represents the progress of a user at one node of a study programme.