3 declare(strict_types=1);
41 $this->
lng = $DIC->language();
42 $this->
ctrl = $DIC->ctrl();
44 $this->
lng->loadLanguageModule(
'crs');
45 $this->
lng->loadLanguageModule(
'sess');
50 public function init(): void
52 $this->delete_enabled =
true;
53 $this->cut_enabled =
true;
54 $this->copy_enabled =
true;
55 $this->subscribe_enabled =
true;
56 $this->link_enabled =
true;
57 $this->info_screen_enabled =
true;
58 $this->subitems_enabled =
true;
60 $this->gui_class_name =
"ilobjsessiongui";
77 $title = strlen($this->title) ? (
': ' .
$this->title) :
'';
79 $app_info[
'start'] ?? 0,
80 $app_info[
'end'] ?? 0,
81 (
bool) ($app_info[
'fullday'] ??
false)
91 $cmd_link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui", $a_cmd);
92 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->requested_ref_id);
99 public function checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id = null): bool
101 if ($a_cmd !=
'register' && $a_cmd !=
'unregister') {
104 return parent::checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id);
115 if ($session_data->isRegistrationUserLimitEnabled()) {
116 if ($part->getCountMembers() <= $session_data->getRegistrationMaxUsers()) {
119 'property' => $this->
lng->txt(
'sess_list_reg_limit_places'),
122 $session_data->getRegistrationMaxUsers() - $part->getCountMembers()
129 if ($items = self::lookupAssignedMaterials($this->obj_id)) {
132 'property' => $this->
lng->txt(
'event_ass_materials_prop'),
133 'value' => count($items)
140 if (strlen($session_data[
'location'])) {
143 'property' => $this->
lng->txt(
'event_location'),
144 'value' => $session_data[
'location']
147 if (strlen($session_data[
'details'])) {
150 'property' => $this->
lng->txt(
'event_details_workflow'),
151 'value' => nl2br($session_data[
'details']),
155 $has_new_line =
false;
156 if (strlen($session_data[
'name'])) {
159 'property' => $this->
lng->txt(
'event_lecturer'),
160 'value' => $session_data[
'name'],
163 $has_new_line =
true;
165 if (strlen($session_data[
'email'])) {
168 'property' => $this->
lng->txt(
'tutor_email'),
169 'value' => $session_data[
'email'],
170 'newline' => $has_new_line ? false : true
172 $has_new_line =
true;
174 if (strlen($session_data[
'phone'])) {
177 'property' => $this->
lng->txt(
'tutor_phone'),
178 'value' => $session_data[
'phone'],
179 'newline' => $has_new_line ? false : true
181 $has_new_line =
true;
189 $props = $book_info->appendProperties($this->obj_id, $props);
196 if (isset($this->app_info[$this->obj_id])) {
206 $ilDB = $DIC->database();
208 $query =
'SELECT * FROM event_items ei ' .
209 'JOIN tree ON item_id = child ' .
210 'WHERE event_id = ' .
$ilDB->quote($a_sess_id,
'integer') .
' ' .
215 $items[] = $row->item_id;
static lookupAssignedMaterials(int $a_sess_id)
setParameterByClass(string $a_class, string $a_parameter, $a_value)
Sets a parameter for the given GUI class and appends the given value as well.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getBookingInfoRepo()
static _lookupAppointment(int $a_obj_id)
static getInstance(int $a_ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getTitle()
get title Overwritten since sessions prepend the date of the session to the title ...
checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id=null)
Only check cmd access for cmd 'register' and 'unregister'.
static lookupSession(int $a_obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _appointmentToString(int $start, int $end, bool $fulltime)
enableSubstitutions(bool $status)
__construct(Container $dic, ilPlugin $plugin)
static _getInstanceByObjectType(string $a_type)