43 if($a_parameters[
'type'] !=
'crs')
45 $this->
getLogger()->debug(
'Ignoring event for type '. $a_parameters[
'type']);
49 if($a_event ==
'assignUser')
51 $this->
getLogger()->debug(
'Handling assign user event for type crs.');
54 elseif($a_event ==
'deassignUser')
56 $this->
getLogger()->debug(
'Handling assign user event for type crs.');
63 include_once
'./Modules/Course/classes/class.ilCourseParticipant.php';
65 $a_parameters[
'obj_id'],
66 $a_parameters[
'usr_id'],
67 $a_parameters[
'role_id'],
71 if($a_event ==
'deassignUser')
73 self::doAutoFill($a_parameters[
'obj_id']);
85 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
88 $course->handleAutoFill();
98 static function handleEvent($a_component, $a_event, $a_parameter)
100 if($a_component ==
'Services/AccessControl')
102 $listener =
new self();
103 $listener->handleUserAssignments($a_event, $a_parameter);
106 if($a_component ==
"Services/Tracking" && $a_event ==
"updateStatus")
109 if((
bool)self::$blocked_for_lp)
115 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
121 $obj_id = $a_parameter[
"obj_id"];
122 $user_id = $a_parameter[
"usr_id"];
123 $status = $a_parameter[
"status"];
125 if($obj_id && $user_id)
133 if(!isset(self::$course_mode[$obj_id]))
135 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
139 include_once
'./Services/Object/classes/class.ilObjectLP.php';
141 $mode = $olp->getCurrentMode();
147 self::$course_mode[$obj_id] = $mode;
153 switch(self::$course_mode[$obj_id])
157 include_once
"Modules/Course/classes/class.ilCourseParticipants.php";
165 $do_update = $is_completed;
166 include_once
"Modules/Course/classes/class.ilCourseParticipants.php";
170 $passed = $part->getPassedInfo($user_id);
171 if(!is_array($passed) ||
172 $passed[
"user_id"] == -1)
194 self::$blocked_for_lp = (bool)$a_status;
const LP_STATUS_COMPLETED_NUM
static updateMemberRoles($a_obj_id, $a_usr_id, $a_role_id, $a_status)
Update member roles ilDB $ilDB.
const LP_MODE_MANUAL_BY_TUTOR
__construct()
Constructor.
static doAutoFill($a_obj_id)
Trigger autofill from waiting list.
const STATUS_DETERMINATION_LP
static handleEvent($a_component, $a_event, $a_parameter)
Handle an event in a listener.
static _getAllReferences($a_id)
get all reference ids of object
static _enabledLearningProgress()
check wether learing progress is enabled or not
handleUserAssignments($a_event, $a_parameters)
handle user assignments
static _lookupType($a_id, $a_reference=false)
lookup object type
static _updatePassed($a_obj_id, $a_usr_id, $a_passed, $a_manual=false, $a_no_origin=false)
Update passed status (static)
static getInstance($a_obj_id)
static setBlockedForLP($a_status)
Toggle LP blocking property status.