/** * Init form * * @param string $a_cmd * @return ilPropertyFormGUI */ public function initForm($a_cmd = "") { global $ilCtrl, $lng; $lng->loadLanguageModule('crs'); include_once './Services/Form/classes/class.ilPropertyFormGUI.php'; $form = new ilPropertyFormGUI(); $form->setFormAction($ilCtrl->getFormAction($this->parent_obj, $a_cmd)); $form->setTarget('_blank'); $form->setTitle($lng->txt('sess_gen_attendance_list')); $title = new ilTextInputGUI($lng->txt('title'), 'title'); $title->setValue($this->title); $form->addItem($title); $desc = new ilTextInputGUI($lng->txt('description'), 'desc'); $desc->setValue($this->description); $form->addItem($desc); if (sizeof($this->presets)) { $preset = new ilCheckboxGroupInputGUI($lng->txt('user_detail'), 'preset'); $preset_value = array(); foreach ($this->presets as $id => $item) { $preset->addOption(new ilCheckboxOption($item[0], $id)); if ($item[1]) { $preset_value[] = $id; } } $preset->setValue($preset_value); $form->addItem($preset); } $blank = new ilTextInputGUI($lng->txt('event_blank_columns'), 'blank'); $blank->setMulti(true); $form->addItem($blank); if ($this->pre_blanks) { $blank->setValue($this->pre_blanks); } $part = new ilFormSectionHeaderGUI(); $part->setTitle($lng->txt('event_participant_selection')); $form->addItem($part); // Admins $admin = new ilCheckboxInputGUI($lng->txt('event_tbl_admins'), 'show_admins'); $admin->setOptionTitle($lng->txt('event_inc_admins')); $admin->setValue(1); $form->addItem($admin); // Tutors $tutor = new ilCheckboxInputGUI($lng->txt('event_tbl_tutors'), 'show_tutors'); $tutor->setOptionTitle($lng->txt('event_inc_tutors')); $tutor->setValue(1); $form->addItem($tutor); // Members $member = new ilCheckboxInputGUI($lng->txt('event_tbl_members'), 'show_members'); $member->setOptionTitle($lng->txt('event_inc_members')); $member->setValue(1); $member->setChecked(true); $form->addItem($member); $form->addCommandButton($a_cmd, $lng->txt('sess_print_attendance_list')); if ($this->id && $a_cmd) { include_once "Services/User/classes/class.ilUserFormSettings.php"; $settings = new ilUserFormSettings($this->id); $settings->exportToForm($form); } return $form; }
/** * Init form * * @param string $a_cmd * @return ilPropertyFormGUI */ public function initForm($a_cmd = "") { global $ilCtrl, $lng; $lng->loadLanguageModule('crs'); include_once './Services/Form/classes/class.ilPropertyFormGUI.php'; $form = new ilPropertyFormGUI(); $form->setFormAction($ilCtrl->getFormAction($this->parent_obj, $a_cmd)); $form->setTarget('_blank'); $form->setTitle($lng->txt('sess_gen_attendance_list')); $title = new ilTextInputGUI($lng->txt('title'), 'title'); $title->setValue($this->title); $form->addItem($title); $desc = new ilTextInputGUI($lng->txt('description'), 'desc'); $desc->setValue($this->description); $form->addItem($desc); if (sizeof($this->presets)) { $preset = new ilCheckboxGroupInputGUI($lng->txt('user_detail'), 'preset'); $preset_value = array(); foreach ($this->presets as $id => $item) { $preset->addOption(new ilCheckboxOption($item[0], $id)); if ($item[1]) { $preset_value[] = $id; } } $preset->setValue($preset_value); $form->addItem($preset); } $blank = new ilTextInputGUI($lng->txt('event_blank_columns'), 'blank'); $blank->setMulti(true); $form->addItem($blank); if ($this->pre_blanks) { $blank->setValue($this->pre_blanks); } $part = new ilFormSectionHeaderGUI(); $part->setTitle($lng->txt('event_participant_selection')); $form->addItem($part); // participants by roles foreach ($this->role_data as $role_id => $role_data) { $chk = new ilCheckboxInputGUI($role_data[0], 'role_' . $role_id); $chk->setValue(1); $chk->setChecked(1); $form->addItem($chk); } // not in sessions if ($this->waiting_list) { $chk = new ilCheckboxInputGUI($lng->txt('group_new_registrations'), 'subscr'); $chk->setValue(1); $form->addItem($chk); $chk = new ilCheckboxInputGUI($lng->txt('crs_waiting_list'), 'wlist'); $chk->setValue(1); $form->addItem($chk); } if ($this->user_filters) { foreach ($this->user_filters as $sub_id => $sub_item) { $sub = new ilCheckboxInputGUI($sub_item[0], 'members_' . $sub_id); if ($sub_item[1]) { $sub->setChecked(true); } $form->addItem($sub); } } $form->addCommandButton($a_cmd, $lng->txt('sess_print_attendance_list')); if ($this->id && $a_cmd) { include_once "Services/User/classes/class.ilUserFormSettings.php"; $settings = new ilUserFormSettings($this->id); $settings->deleteValue('desc'); // #11340 $settings->exportToForm($form); } return $form; }