3 declare(strict_types=1);
32 $this->
lng->loadLanguageModule(
"crs");
43 $crs_ref_id = current($refs);
50 $this->has_files =
true;
53 if (
$app[
'event']->isAutoGenerated()) {
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));
110 $contact_fields =
false;
112 if ($crs->getContactName()) {
113 $str .= $crs->getContactName() .
"<br>";
116 if ($crs->getContactEmail()) {
119 $emails = explode(
",", $crs->getContactEmail());
120 foreach ($emails as
$email) {
121 $email = trim($email);
122 $etpl =
new ilTemplate(
"tpl.crs_contact_email.html",
true,
true,
'Modules/Course');
136 'ref_id' => $crs->getRefId(),
141 $etpl->setVariable(
"CONTACT_EMAIL", $email);
142 $str .= $etpl->get() .
"<br />";
146 if ($crs->getContactPhone()) {
147 $str .= $this->
lng->txt(
"crs_contact_phone") .
": " . $crs->getContactPhone() .
"<br>";
149 if ($crs->getContactResponsibility()) {
150 $str .= $crs->getContactResponsibility() .
"<br>";
152 if ($crs->getContactConsultation()) {
153 $str .= $crs->getContactConsultation() .
"<br>";
170 if (
$settings->isCGRegistrationEnabled()) {
171 if (!
$app[
'event']->isAutoGenerated()) {
174 if ($reg->isRegistered(
175 $this->user->getId(),
180 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id',
$app[
'event']->getEntryId());
181 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'dstart',
$app[
'dstart']);
182 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'dend',
$app[
'dend']);
185 $this->
lng->txt(
'cal_reg_unregister'),
186 $this->
ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'confirmUnregister')
190 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id',
$app[
'event']->getEntryId());
191 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'dstart',
$app[
'dstart']);
192 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'dend',
$app[
'dend']);
195 $this->
lng->txt(
'cal_reg_register'),
196 $this->
ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'confirmRegister')
200 $registered = $reg->getRegisteredUsers(
206 foreach ($registered as
$user) {
addListItemProperty(string $a_txt, string $a_val)
Add list item property.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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="")
Get static link.
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)