2 include_once
'./Services/Calendar/interfaces/interface.ilCalendarAppointmentPresentation.php';
3 include_once
'./Services/Calendar/classes/AppointmentPresentation/class.ilAppointmentPresentationGUI.php';
26 include_once(
'./Services/Link/classes/class.ilLink.php');
28 $this->lng->loadLanguageModule(
"crs");
32 $this->ctrl = $DIC->ctrl();
34 include_once
"./Modules/Course/classes/class.ilObjCourse.php";
35 include_once
"./Modules/Course/classes/class.ilCourseFile.php";
44 $crs_ref_id = current($refs);
51 $this->has_files =
true;
54 if ($app[
'event']->isAutoGenerated()) {
57 if ($crs->getImportantInformation()) {
61 if ($crs->getSyllabus()) {
65 if ($this->has_files) {
67 foreach (
$files as $file) {
68 $this->ctrl->setParameter($this,
'file_id', $file->getFileId());
69 $this->ctrl->setParameterByClass(
'ilobjcoursegui',
'file_id', $file->getFileId());
70 $this->ctrl->setParameterByClass(
'ilobjcoursegui',
'ref_id', $crs_ref_id);
72 $file_name = $file->getFileName();
73 $links[$file_name] = $this->ui->renderer()->render(($this->ui->factory()->button()->shy(
75 $this->ctrl->getLinkTargetByClass(array(
"ilRepositoryGUI",
"ilobjcoursegui"),
'sendfile')
78 $this->ctrl->setParameterByClass(
'ilobjcoursegui',
'ref_id',
$_GET[
"ref_id"]);
80 ksort(
$links, SORT_NATURAL | SORT_FLAG_CASE);
89 $contacts = $parts->getContacts();
93 foreach ($sorted_ids as $usr_id) {
94 $name_presentation = $this->
getUserName($usr_id,
true);
95 if (strlen($name_presentation)) {
96 $names[] = $name_presentation;
100 $this->
addInfoProperty($this->lng->txt(
'crs_mem_contacts'), implode(
'<br/>', $names));
101 $this->
addListItemProperty($this->lng->txt(
'crs_mem_contacts'), implode(
'<br />', $names));
105 $contact_fields =
false;
107 if ($crs->getContactName()) {
108 $str .= $crs->getContactName() .
"<br>";
111 if ($crs->getContactEmail()) {
114 $emails = explode(
",", $crs->getContactEmail());
115 foreach ($emails as
$email) {
116 $email = trim($email);
117 $etpl =
new ilTemplate(
"tpl.crs_contact_email.html",
true,
true,
'Modules/Course');
131 'ref_id' => $crs->getRefId(),
136 $etpl->setVariable(
"CONTACT_EMAIL", $email);
137 $str .= $etpl->get() .
"<br />";
141 if ($crs->getContactPhone()) {
142 $str .= $this->lng->txt(
"crs_contact_phone") .
": " . $crs->getContactPhone() .
"<br>";
144 if ($crs->getContactResponsibility()) {
145 $str .= $crs->getContactResponsibility() .
"<br>";
147 if ($crs->getContactConsultation()) {
148 $str .= $crs->getContactConsultation() .
"<br>";
153 $this->
addListItemProperty($this->lng->txt(
"crs_contact"), str_replace(
"<br>",
", ", $str));
165 if ($settings->isCGRegistrationEnabled()) {
166 if (!$app[
'event']->isAutoGenerated()) {
167 include_once
'./Services/Calendar/classes/class.ilCalendarRegistration.php';
172 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id', $app[
'event']->getEntryId());
173 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'dstart', $app[
'dstart']);
174 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'dend', $app[
'dend']);
176 $this->
addAction($this->lng->txt(
'cal_reg_unregister'), $this->ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'confirmUnregister'));
179 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id', $app[
'event']->getEntryId());
180 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'dstart', $app[
'dstart']);
181 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'dend', $app[
'dend']);
183 $this->
addAction($this->lng->txt(
'cal_reg_register'), $this->ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'confirmRegister'));
186 $registered = $reg->getRegisteredUsers(
192 foreach ($registered as
$user) {
addInfoProperty($a_txt, $a_val)
Add info property.
static _getInstance()
get singleton instance
getUserName($a_user_id, $a_force_name=false)
Get (linked if possible) user name.
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
static _getAllReferences($a_id)
get all reference ids of object
addCommonSection($a_app, $a_obj_id=0, $cat_info=null, $a_container_info=false)
Add common section.
static _sortIds($a_ids, $a_table, $a_field, $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.
collectPropertiesAndActions()
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
registration for calendar appointments
special template class to simplify handling of ITX/PEAR
addLastUpdate($a_app)
Add last update.
static _readFilesByCourse($a_course_id)
addMetaData($a_obj_type, $a_obj_id, $a_sub_obj_type=null, $a_sub_obj_id=null)
Add metadata.
addListItemProperty($a_txt, $a_val)
Add list item property.
addAction($a_txt, $a_link)
Add action.
static getInstanceByObjId($a_obj_id)
Get instance by obj type.
addInfoSection($a_txt)
Add info section.