19 declare(strict_types=1);
31 $this->
lng->loadLanguageModule(
"crs");
42 $crs_ref_id = current($refs);
49 $this->has_files =
true;
52 if ($app[
'event']->isAutoGenerated()) {
55 if ($crs->getImportantInformation()) {
57 $this->
lng->txt(
"crs_important_info"),
62 if ($crs->getSyllabus()) {
64 $this->
lng->txt(
"crs_syllabus"),
69 if ($this->has_files) {
71 foreach ($files as $file) {
72 $this->
ctrl->setParameter($this,
'file_id', $file->getFileId());
73 $this->
ctrl->setParameterByClass(
'ilobjcoursegui',
'file_id', $file->getFileId());
74 $this->
ctrl->setParameterByClass(
'ilobjcoursegui',
'ref_id', $crs_ref_id);
76 $file_name = $file->getFileName();
77 $links[$file_name] = $this->
ui->renderer()->render(($this->
ui->factory()->button()->shy(
79 $this->
ctrl->getLinkTargetByClass(array(
"ilRepositoryGUI",
"ilobjcoursegui"),
'sendfile')
82 $this->
ctrl->setParameterByClass(
'ilobjcoursegui',
'ref_id',
'');
84 ksort($links, SORT_NATURAL | SORT_FLAG_CASE);
93 $contacts = $parts->getContacts();
97 foreach ($sorted_ids as $usr_id) {
98 $name_presentation = $this->
getUserName((
int) $usr_id,
true);
99 if (strlen($name_presentation)) {
100 $names[] = $name_presentation;
104 $this->
addInfoProperty($this->
lng->txt(
'crs_mem_contacts'), implode(
'<br/>', $names));
110 if ($crs->getContactName()) {
112 'name' => $this->
lng->txt(
'crs_contact_name'),
113 'value' => $crs->getContactName()
117 if ($crs->getContactEmail()) {
120 $emails = explode(
",", $crs->getContactEmail());
121 foreach ($emails as $email) {
122 $email = trim($email);
123 $etpl =
new ilTemplate(
"tpl.crs_contact_email.html",
true,
true,
'components/ILIAS/Course');
137 'ref_id' => $crs->getRefId(),
142 $etpl->setVariable(
"CONTACT_EMAIL", $email);
144 'name' => $this->
lng->txt(
'crs_contact_email'),
145 'value' => $etpl->get()
150 if ($crs->getContactPhone()) {
152 'name' => $this->
lng->txt(
'crs_contact_phone'),
153 'value' => $crs->getContactPhone()
156 if ($crs->getContactResponsibility()) {
158 'name' => $this->
lng->txt(
'crs_contact_responsibility'),
159 'value' => $crs->getContactResponsibility()
162 if ($crs->getContactConsultation()) {
164 'name' => $this->
lng->txt(
'crs_contact_consultation'),
165 'value' => nl2br($crs->getContactConsultation())
168 if ($contact_info !== []) {
170 foreach ($contact_info as $info) {
186 if ($settings->isCGRegistrationEnabled()) {
187 if (!$app[
'event']->isAutoGenerated()) {
190 if ($reg->isRegistered(
191 $this->user->getId(),
196 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id', $app[
'event']->getEntryId());
197 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'dstart', $app[
'dstart']);
198 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'dend', $app[
'dend']);
201 $this->
lng->txt(
'cal_reg_unregister'),
202 $this->
ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'confirmUnregister')
206 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id', $app[
'event']->getEntryId());
207 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'dstart', $app[
'dstart']);
208 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'dend', $app[
'dend']);
211 $this->
lng->txt(
'cal_reg_register'),
212 $this->
ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'confirmRegister')
216 $registered = $reg->getRegisteredUsers(
222 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)