19 declare(strict_types=1);
31 $this->
lng->loadLanguageModule(
"crs");
42 $crs_ref_id = current($refs);
48 if ($app[
'event']->isAutoGenerated()) {
51 $this->has_files =
true;
56 if ($crs->getImportantInformation()) {
58 $this->
lng->txt(
"crs_important_info"),
63 if ($crs->getSyllabus()) {
65 $this->
lng->txt(
"crs_syllabus"),
70 if ($this->has_files) {
72 foreach ($files as $file) {
73 $this->
ctrl->setParameter($this,
'file_id', $file->getFileId());
74 $this->
ctrl->setParameterByClass(
'ilobjcoursegui',
'file_id', $file->getFileId());
75 $this->
ctrl->setParameterByClass(
'ilobjcoursegui',
'ref_id', $crs_ref_id);
77 $file_name = $file->getFileName();
78 $links[$file_name] = $this->
ui->renderer()->render(($this->
ui->factory()->button()->shy(
80 $this->
ctrl->getLinkTargetByClass(array(
"ilRepositoryGUI",
"ilobjcoursegui"),
'sendfile')
83 $this->
ctrl->setParameterByClass(
'ilobjcoursegui',
'ref_id',
'');
85 ksort($links, SORT_NATURAL | SORT_FLAG_CASE);
94 $contacts = $parts->getContacts();
98 foreach ($sorted_ids as $usr_id) {
99 $name_presentation = $this->
getUserName((
int) $usr_id,
true);
100 if (strlen($name_presentation)) {
101 $names[] = $name_presentation;
105 $this->
addInfoProperty($this->
lng->txt(
'crs_mem_contacts'), implode(
'<br/>', $names));
111 if ($crs->getContactName()) {
113 'name' => $this->
lng->txt(
'crs_contact_name'),
114 'value' => $crs->getContactName()
118 if ($crs->getContactEmail()) {
121 $emails = explode(
",", $crs->getContactEmail());
122 foreach ($emails as $email) {
123 $email = trim($email);
124 $etpl =
new ilTemplate(
"tpl.crs_contact_email.html",
true,
true,
'components/ILIAS/Course');
138 'ref_id' => $crs->getRefId(),
143 $etpl->setVariable(
"CONTACT_EMAIL", $email);
145 'name' => $this->
lng->txt(
'crs_contact_email'),
146 'value' => $etpl->get()
151 if ($crs->getContactPhone()) {
153 'name' => $this->
lng->txt(
'crs_contact_phone'),
154 'value' => $crs->getContactPhone()
157 if ($crs->getContactResponsibility()) {
159 'name' => $this->
lng->txt(
'crs_contact_responsibility'),
160 'value' => $crs->getContactResponsibility()
163 if ($crs->getContactConsultation()) {
165 'name' => $this->
lng->txt(
'crs_contact_consultation'),
166 'value' => nl2br($crs->getContactConsultation())
169 if ($contact_info !== []) {
171 foreach ($contact_info as
$info) {
187 if ($settings->isCGRegistrationEnabled()) {
188 if (!$app[
'event']->isAutoGenerated()) {
191 if ($reg->isRegistered(
192 $this->user->getId(),
197 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id', $app[
'event']->getEntryId());
198 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'dstart', $app[
'dstart']);
199 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'dend', $app[
'dend']);
202 $this->
lng->txt(
'cal_reg_unregister'),
203 $this->
ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'confirmUnregister')
207 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id', $app[
'event']->getEntryId());
208 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'dstart', $app[
'dstart']);
209 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'dend', $app[
'dend']);
212 $this->
lng->txt(
'cal_reg_register'),
213 $this->
ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'confirmRegister')
217 $registered = $reg->getRegisteredUsers(
223 foreach ($registered as
$user) {
addListItemProperty(string $a_txt, string $a_val)
Add list item property.
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
static _getAllReferences(int $id)
get all reference ids for object ID
static getInstanceByObjId(int $a_obj_id)
Get instance by obj type.
static _readFilesByCourse(int $a_course_id)
addInfoSection(string $a_txt)
Add info section.
addInfoProperty(string $a_txt, string $a_val)
Add info property.
addLastUpdate(array $a_app)
Add last update.
collectPropertiesAndActions()
registration for calendar appointments
static _getStaticLink(?int $a_ref_id, string $a_type='', bool $a_fallback_goto=true, string $append="")
getUserName(int $a_user_id, bool $a_force_name=false)
Get (linked if possible) user name.
static _sortIds(array $a_ids, string $a_table, string $a_field, string $a_id_name)
Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,7),'usr_data','lastname','usr_id') => sorts by lastname.
addCommonSection(array $a_app, int $a_obj_id=0, ?array $cat_info=null, bool $a_container_info=false)
addAction(string $a_txt, string $a_link)
Add action.
addMetaData(string $a_obj_type, int $a_obj_id, ?string $a_sub_obj_type=null, ?int $a_sub_obj_id=null)
static makeClickable(string $a_text, bool $detectGotoLinks=false)