/** * init form * * @access protected * @param * @return */ protected function initEditForm() { include_once './Services/Form/classes/class.ilPropertyFormGUI.php'; include_once './Services/Calendar/classes/class.ilDateTime.php'; $form = new ilPropertyFormGUI(); $form->setTitle($this->lng->txt('crs_edit')); $form->addCommandButton('update', $this->lng->txt('save')); $form->addCommandButton('cancel', $this->lng->txt('cancel')); $form->setFormAction($this->ctrl->getFormAction($this, 'update')); // title $title = new ilTextInputGUI($this->lng->txt('title'), 'title'); $title->setSubmitFormOnEnter(true); $title->setValue($this->object->getTitle()); $title->setSize(min(40, ilObject::TITLE_LENGTH)); $title->setMaxLength(ilObject::TITLE_LENGTH); $title->setRequired(true); $form->addItem($title); // desc $desc = new ilTextAreaInputGUI($this->lng->txt('description'), 'desc'); $desc->setValue($this->object->getLongDescription()); $desc->setRows(2); $desc->setCols(40); $form->addItem($desc); // Show didactic template type $this->initDidacticTemplate($form); // activation/availability $this->lng->loadLanguageModule('rep'); $section = new ilFormSectionHeaderGUI(); $section->setTitle($this->lng->txt('rep_activation_availability')); $form->addItem($section); $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'activation_online'); $online->setChecked(!$this->object->getOfflineStatus()); $online->setInfo($this->lng->txt('crs_activation_online_info')); $form->addItem($online); $act_type = new ilCheckboxInputGUI($this->lng->txt('crs_visibility_until'), 'activation_type'); $act_type->setChecked($this->object->getActivationType() == IL_CRS_ACTIVATION_LIMITED); // $act_type->setInfo($this->lng->txt('crs_availability_until_info')); $this->tpl->addJavaScript('./Services/Form/js/date_duration.js'); include_once "Services/Form/classes/class.ilDateDurationInputGUI.php"; $dur = new ilDateDurationInputGUI($this->lng->txt('rep_time_period'), "access_period"); $dur->setShowTime(true); $dur->setStart(new ilDateTime($this->object->getActivationStart(), IL_CAL_UNIX)); $dur->setStartText($this->lng->txt('rep_activation_limited_start')); $dur->setEnd(new ilDateTime($this->object->getActivationEnd(), IL_CAL_UNIX)); $dur->setEndText($this->lng->txt('rep_activation_limited_end')); $act_type->addSubItem($dur); $visible = new ilCheckboxInputGUI($this->lng->txt('rep_activation_limited_visibility'), 'activation_visibility'); $visible->setInfo($this->lng->txt('crs_activation_limited_visibility_info')); $visible->setChecked($this->object->getActivationVisibility()); $act_type->addSubItem($visible); $form->addItem($act_type); $section = new ilFormSectionHeaderGUI(); $section->setTitle($this->lng->txt('crs_reg')); $form->addItem($section); $reg_proc = new ilRadioGroupInputGUI($this->lng->txt('crs_registration_type'), 'subscription_type'); $reg_proc->setValue($this->object->getSubscriptionLimitationType() != IL_CRS_SUBSCRIPTION_DEACTIVATED ? $this->object->getSubscriptionType() : IL_CRS_SUBSCRIPTION_DEACTIVATED); // $reg_proc->setInfo($this->lng->txt('crs_reg_type_info')); $opt = new ilRadioOption($this->lng->txt('crs_subscription_options_direct'), IL_CRS_SUBSCRIPTION_DIRECT); $reg_proc->addOption($opt); $opt = new ilRadioOption($this->lng->txt('crs_subscription_options_password'), IL_CRS_SUBSCRIPTION_PASSWORD); $pass = new ilTextInputGUI($this->lng->txt("password"), 'subscription_password'); $pass->setInfo($this->lng->txt('crs_reg_password_info')); $pass->setSubmitFormOnEnter(true); $pass->setSize(12); $pass->setMaxLength(12); $pass->setValue($this->object->getSubscriptionPassword()); $opt->addSubItem($pass); $reg_proc->addOption($opt); $opt = new ilRadioOption($this->lng->txt('crs_subscription_options_confirmation'), IL_CRS_SUBSCRIPTION_CONFIRMATION); $opt->setInfo($this->lng->txt('crs_registration_confirmation_info')); $reg_proc->addOption($opt); $opt = new ilRadioOption($this->lng->txt('crs_reg_no_selfreg'), IL_CRS_SUBSCRIPTION_DEACTIVATED); $opt->setInfo($this->lng->txt('crs_registration_deactivated')); $reg_proc->addOption($opt); $form->addItem($reg_proc); // Registration codes $reg_code = new ilCheckboxInputGUI($this->lng->txt('crs_reg_code'), 'reg_code_enabled'); $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled()); $reg_code->setValue(1); $reg_code->setInfo($this->lng->txt('crs_reg_code_enabled_info')); /* $code = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_value')); $code->setValue($this->object->getRegistrationAccessCode()); $reg_code->addSubItem($code); */ #$link = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_link')); // Create default access code if (!$this->object->getRegistrationAccessCode()) { include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php'; $this->object->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode()); } $reg_link = new ilHiddenInputGUI('reg_code'); $reg_link->setValue($this->object->getRegistrationAccessCode()); $form->addItem($reg_link); $link = new ilCustomInputGUI($this->lng->txt('crs_reg_code_link')); include_once './Services/Link/classes/class.ilLink.php'; $val = ilLink::_getLink($this->object->getRefId(), $this->object->getType(), array(), '_rcode' . $this->object->getRegistrationAccessCode()); $link->setHTML('<font class="small">' . $val . '</font>'); $reg_code->addSubItem($link); $form->addItem($reg_code); // time limit $time_limit = new ilCheckboxInputGUI($this->lng->txt('crs_registration_limited'), 'subscription_limitation_type'); $time_limit->setChecked($this->object->getSubscriptionLimitationType() == IL_CRS_SUBSCRIPTION_LIMITED ? true : false); include_once "Services/Form/classes/class.ilDateDurationInputGUI.php"; $sdur = new ilDateDurationInputGUI($this->lng->txt('crs_registration_period'), "subscription_period"); $sdur->setShowTime(true); $sdur->setStart(new ilDateTime($this->object->getSubscriptionStart(), IL_CAL_UNIX)); $sdur->setStartText($this->lng->txt('crs_start')); $sdur->setEnd(new ilDateTime($this->object->getSubscriptionEnd(), IL_CAL_UNIX)); $sdur->setEndText($this->lng->txt('crs_end')); $time_limit->addSubItem($sdur); $form->addItem($time_limit); // Max members $lim = new ilCheckboxInputGUI($this->lng->txt('crs_subscription_max_members_short'), 'subscription_membership_limitation'); $lim->setValue(1); $lim->setChecked($this->object->isSubscriptionMembershipLimited()); $max = new ilTextInputGUI('', 'subscription_max'); $max->setSubmitFormOnEnter(true); $max->setSize(4); $max->setMaxLength(4); $max->setValue($this->object->getSubscriptionMaxMembers() ? $this->object->getSubscriptionMaxMembers() : ''); $max->setTitle($this->lng->txt('crs_subscription_max_members')); $max->setInfo($this->lng->txt('crs_reg_max_info')); $lim->addSubItem($max); $wait = new ilCheckboxInputGUI($this->lng->txt('crs_waiting_list'), 'waiting_list'); $wait->setChecked($this->object->enabledWaitingList()); $wait->setInfo($this->lng->txt('crs_wait_info')); $lim->addSubItem($wait); $form->addItem($lim); $pres = new ilFormSectionHeaderGUI(); $pres->setTitle($this->lng->txt('crs_view_mode')); $form->addItem($pres); // presentation type $view_type = new ilRadioGroupInputGUI($this->lng->txt('crs_presentation_type'), 'view_mode'); $view_type->setValue($this->object->getViewMode()); $opts = new ilRadioOption($this->lng->txt('cntr_view_sessions'), IL_CRS_VIEW_SESSIONS); $opts->setInfo($this->lng->txt('cntr_view_info_sessions')); $view_type->addOption($opts); // Limited sessions $sess = new ilCheckboxInputGUI($this->lng->txt('sess_limit'), 'sl'); $sess->setValue(1); $sess->setChecked($this->object->isSessionLimitEnabled()); $sess->setInfo($this->lng->txt('sess_limit_info')); $prev = new ilNumberInputGUI($this->lng->txt('sess_num_prev'), 'sp'); #$prev->setSubmitFormOnEnter(true); $prev->setMinValue(0); $prev->setValue($this->object->getNumberOfPreviousSessions() == -1 ? '' : $this->object->getNumberOfPreviousSessions()); $prev->setSize(2); $prev->setMaxLength(3); $sess->addSubItem($prev); $next = new ilNumberInputGUI($this->lng->txt('sess_num_next'), 'sn'); #$next->setSubmitFormOnEnter(true); $next->setMinValue(0); $next->setValue($this->object->getNumberOfNextSessions() == -1 ? '' : $this->object->getNumberOfnextSessions()); $next->setSize(2); $next->setMaxLength(3); $sess->addSubItem($next); $opts->addSubItem($sess); $optsi = new ilRadioOption($this->lng->txt('cntr_view_simple'), IL_CRS_VIEW_SIMPLE); $optsi->setInfo($this->lng->txt('cntr_view_info_simple')); $view_type->addOption($optsi); $optbt = new ilRadioOption($this->lng->txt('cntr_view_by_type'), IL_CRS_VIEW_BY_TYPE); $optbt->setInfo($this->lng->txt('cntr_view_info_by_type')); $view_type->addOption($optbt); $opto = new ilRadioOption($this->lng->txt('crs_view_objective'), IL_CRS_VIEW_OBJECTIVE); $opto->setInfo($this->lng->txt('crs_view_info_objective')); $view_type->addOption($opto); $optt = new ilRadioOption($this->lng->txt('crs_view_timing'), IL_CRS_VIEW_TIMING); $optt->setInfo($this->lng->txt('crs_view_info_timing')); $view_type->addOption($optt); $form->addItem($view_type); $this->initSortingForm($form, array(ilContainer::SORT_TITLE, ilContainer::SORT_MANUAL, ilContainer::SORT_CREATION, ilContainer::SORT_ACTIVATION)); // lp vs. course status include_once "Services/Tracking/classes/class.ilObjUserTracking.php"; if (ilObjUserTracking::_enabledLearningProgress()) { include_once './Services/Object/classes/class.ilObjectLP.php'; $olp = ilObjectLP::getInstance($this->object->getId()); if ($olp->getCurrentMode()) { $lp_status = new ilFormSectionHeaderGUI(); $lp_status->setTitle($this->lng->txt('crs_course_status_of_users')); $form->addItem($lp_status); $lp_status_options = new ilRadioGroupInputGUI($this->lng->txt('crs_status_determination'), "status_dt"); // $lp_status_options->setRequired(true); $lp_status_options->setValue($this->object->getStatusDetermination()); $lp_option = new ilRadioOption($this->lng->txt('crs_status_determination_lp'), ilObjCourse::STATUS_DETERMINATION_LP, $this->lng->txt('crs_status_determination_lp_info')); $lp_status_options->addOption($lp_option); $lp_status_options->addOption(new ilRadioOption($this->lng->txt('crs_status_determination_manual'), ilObjCourse::STATUS_DETERMINATION_MANUAL)); $form->addItem($lp_status_options); } } // additional features $feat = new ilFormSectionHeaderGUI(); $feat->setTitle($this->lng->txt('obj_features')); $form->addItem($feat); include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php'; ilObjectServiceSettingsGUI::initServiceSettingsForm($this->object->getId(), $form, array(ilObjectServiceSettingsGUI::CALENDAR_VISIBILITY, ilObjectServiceSettingsGUI::NEWS_VISIBILITY, ilObjectServiceSettingsGUI::AUTO_RATING_NEW_OBJECTS, ilObjectServiceSettingsGUI::TAG_CLOUD)); $mem = new ilCheckboxInputGUI($this->lng->txt('crs_show_members'), 'show_members'); $mem->setChecked($this->object->getShowMembers()); $mem->setInfo($this->lng->txt('crs_show_members_info')); $form->addItem($mem); // Show members type $mail_type = new ilRadioGroupInputGUI($this->lng->txt('crs_mail_type'), 'mail_type'); $mail_type->setValue($this->object->getMailToMembersType()); $mail_tutors = new ilRadioOption($this->lng->txt('crs_mail_tutors_only'), ilCourseConstants::MAIL_ALLOWED_TUTORS, $this->lng->txt('crs_mail_tutors_only_info')); $mail_type->addOption($mail_tutors); $mail_all = new ilRadioOption($this->lng->txt('crs_mail_all'), ilCourseConstants::MAIL_ALLOWED_ALL, $this->lng->txt('crs_mail_all_info')); $mail_type->addOption($mail_all); $form->addItem($mail_type); // Notification Settings /*$notification = new ilFormSectionHeaderGUI(); $notification->setTitle($this->lng->txt('crs_notification')); $form->addItem($notification);*/ // Self notification $not = new ilCheckboxInputGUI($this->lng->txt('crs_auto_notification'), 'auto_notification'); $not->setValue(1); $not->setInfo($this->lng->txt('crs_auto_notification_info')); $not->setChecked($this->object->getAutoNotification()); $form->addItem($not); // Further information //$further = new ilFormSectionHeaderGUI(); //$further->setTitle($this->lng->txt('crs_further_settings')); //$form->addItem($further); $desk = new ilCheckboxInputGUI($this->lng->txt('crs_add_remove_from_desktop'), 'abo'); $desk->setChecked($this->object->getAboStatus()); $desk->setInfo($this->lng->txt('crs_add_remove_from_desktop_info')); $form->addItem($desk); // Edit ecs export settings include_once 'Modules/Course/classes/class.ilECSCourseSettings.php'; $ecs = new ilECSCourseSettings($this->object); $ecs->addSettingsToForm($form, 'crs'); return $form; }
/** * init form * * @access protected * @param * @return */ protected function initEditForm() { include_once './Services/Form/classes/class.ilPropertyFormGUI.php'; include_once './Services/Calendar/classes/class.ilDateTime.php'; $form = new ilPropertyFormGUI(); $form->setTitle($this->lng->txt('crs_edit')); $form->setTitleIcon(ilUtil::getImagePath('icon_crs_s.png')); $form->addCommandButton('update', $this->lng->txt('save')); $form->addCommandButton('cancel', $this->lng->txt('cancel')); $form->setFormAction($this->ctrl->getFormAction($this, 'update')); // title $title = new ilTextInputGUI($this->lng->txt('title'), 'title'); $title->setSubmitFormOnEnter(true); $title->setValue($this->object->getTitle()); $title->setSize(40); $title->setMaxLength(128); $title->setRequired(true); $form->addItem($title); // desc $desc = new ilTextAreaInputGUI($this->lng->txt('description'), 'desc'); $desc->setValue($this->object->getLongDescription()); $desc->setRows(2); $desc->setCols(40); $form->addItem($desc); // Show didactic template type $this->initDidacticTemplate($form); // activation/availability $this->lng->loadLanguageModule('rep'); $section = new ilFormSectionHeaderGUI(); $section->setTitle($this->lng->txt('rep_activation_availability')); $form->addItem($section); $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'activation_online'); $online->setChecked(!$this->object->getOfflineStatus()); $online->setInfo($this->lng->txt('crs_activation_online_info')); $form->addItem($online); $act_type = new ilRadioGroupInputGUI($this->lng->txt('rep_activation_access'), 'activation_type'); $act_type->setValue($this->object->getActivationType()); $opt = new ilRadioOption($this->lng->txt('crs_visibility_limitless'), IL_CRS_ACTIVATION_UNLIMITED); $opt->setInfo($this->lng->txt('crs_availability_limitless_info')); $act_type->addOption($opt); $opt = new ilRadioOption($this->lng->txt('crs_visibility_until'), IL_CRS_ACTIVATION_LIMITED); $opt->setInfo($this->lng->txt('crs_availability_until_info')); $start = new ilDateTimeInputGUI($this->lng->txt('rep_activation_limited_start'), 'activation_start'); #$start->setMode(ilDateTimeInputGUI::MODE_INPUT); $start->setShowTime(true); $start_date = new ilDateTime($this->object->getActivationStart(), IL_CAL_UNIX); $start->setDate($start_date); $opt->addSubItem($start); $end = new ilDateTimeInputGUI($this->lng->txt('rep_activation_limited_end'), 'activation_end'); #$end->setMode(ilDateTimeInputGUI::MODE_INPUT); $end->setShowTime(true); $end_date = new ilDateTime($this->object->getActivationEnd(), IL_CAL_UNIX); $end->setDate($end_date); $opt->addSubItem($end); $visible = new ilCheckboxInputGUI($this->lng->txt('rep_activation_limited_visibility'), 'activation_visibility'); $visible->setInfo($this->lng->txt('crs_activation_limited_visibility_info')); $visible->setChecked($this->object->getActivationVisibility()); $opt->addSubItem($visible); $act_type->addOption($opt); $form->addItem($act_type); $section = new ilFormSectionHeaderGUI(); $section->setTitle($this->lng->txt('crs_reg')); $form->addItem($section); $reg_type = new ilRadioGroupInputGUI($this->lng->txt('crs_reg_period'), 'subscription_limitation_type'); $reg_type->setValue($this->object->getSubscriptionLimitationType()); $opt = new ilRadioOption($this->lng->txt('crs_reg_deactivated'), IL_CRS_SUBSCRIPTION_DEACTIVATED); $opt->setInfo($this->lng->txt('crs_registration_deactivated')); $reg_type->addOption($opt); $opt = new ilRadioOption($this->lng->txt('crs_registration_unlimited'), IL_CRS_SUBSCRIPTION_UNLIMITED); $opt->setInfo($this->lng->txt('crs_reg_unlim_info')); $reg_type->addOption($opt); $opt = new ilRadioOption($this->lng->txt('crs_registration_limited'), IL_CRS_SUBSCRIPTION_LIMITED); $opt->setInfo($this->lng->txt('crs_reg_lim_info')); $start = new ilDateTimeInputGUI($this->lng->txt('crs_start'), 'subscription_start'); $start->setShowTime(true); $start_date = new ilDateTime($this->object->getSubscriptionStart(), IL_CAL_UNIX); $start->setDate($start_date); $opt->addSubItem($start); $end = new ilDateTimeInputGUI($this->lng->txt('crs_end'), 'subscription_end'); $end->setShowTime(true); $end_date = new ilDateTime($this->object->getSubscriptionEnd(), IL_CAL_UNIX); $end->setDate($end_date); $opt->addSubItem($end); $reg_type->addOption($opt); $form->addItem($reg_type); $reg_proc = new ilRadioGroupInputGUI($this->lng->txt('crs_registration_type'), 'subscription_type'); $reg_proc->setValue($this->object->getSubscriptionType()); $reg_proc->setInfo($this->lng->txt('crs_reg_type_info')); $opt = new ilRadioOption($this->lng->txt('crs_subscription_options_confirmation'), IL_CRS_SUBSCRIPTION_CONFIRMATION); $reg_proc->addOption($opt); $opt = new ilRadioOption($this->lng->txt('crs_subscription_options_direct'), IL_CRS_SUBSCRIPTION_DIRECT); $reg_proc->addOption($opt); $opt = new ilRadioOption($this->lng->txt('crs_subscription_options_password'), IL_CRS_SUBSCRIPTION_PASSWORD); $pass = new ilTextInputGUI('', 'subscription_password'); $pass->setSubmitFormOnEnter(true); $pass->setSize(12); $pass->setMaxLength(12); $pass->setValue($this->object->getSubscriptionPassword()); $opt->addSubItem($pass); $reg_proc->addOption($opt); $form->addItem($reg_proc); // Registration codes $reg_code = new ilCheckboxInputGUI('', 'reg_code_enabled'); $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled()); $reg_code->setValue(1); $reg_code->setInfo($this->lng->txt('crs_reg_code_enabled_info')); $reg_code->setOptionTitle($this->lng->txt('crs_reg_code')); /* $code = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_value')); $code->setValue($this->object->getRegistrationAccessCode()); $reg_code->addSubItem($code); */ #$link = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_link')); // Create default access code if (!$this->object->getRegistrationAccessCode()) { include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php'; $this->object->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode()); } $reg_link = new ilHiddenInputGUI('reg_code'); $reg_link->setValue($this->object->getRegistrationAccessCode()); $form->addItem($reg_link); $link = new ilCustomInputGUI($this->lng->txt('crs_reg_code_link')); include_once './Services/Link/classes/class.ilLink.php'; $val = ilLink::_getLink($this->object->getRefId(), $this->object->getType(), array(), '_rcode' . $this->object->getRegistrationAccessCode()); $link->setHTML('<font class="small">' . $val . '</font>'); $reg_code->addSubItem($link); $form->addItem($reg_code); // Max members $lim = new ilCheckboxInputGUI($this->lng->txt('crs_subscription_max_members_short'), 'subscription_membership_limitation'); $lim->setValue(1); $lim->setOptionTitle($this->lng->txt('crs_subscription_max_members')); $lim->setChecked($this->object->isSubscriptionMembershipLimited()); $max = new ilTextInputGUI('', 'subscription_max'); $max->setSubmitFormOnEnter(true); $max->setSize(4); $max->setMaxLength(4); $max->setValue($this->object->getSubscriptionMaxMembers() ? $this->object->getSubscriptionMaxMembers() : ''); $max->setTitle($this->lng->txt('members') . ':'); $max->setInfo($this->lng->txt('crs_reg_max_info')); $lim->addSubItem($max); $wait = new ilCheckboxInputGUI('', 'waiting_list'); $wait->setOptionTitle($this->lng->txt('crs_waiting_list')); $wait->setChecked($this->object->enabledWaitingList()); $wait->setInfo($this->lng->txt('crs_wait_info')); $lim->addSubItem($wait); $form->addItem($lim); $not = new ilCheckboxInputGUI($this->lng->txt('crs_auto_notification'), 'auto_notification'); $not->setValue(1); $not->setInfo($this->lng->txt('crs_auto_notification_info')); $not->setChecked($this->object->getAutoNotification()); $form->addItem($not); $pres = new ilFormSectionHeaderGUI(); $pres->setTitle($this->lng->txt('crs_view_mode')); $form->addItem($pres); // presentation type $view_type = new ilRadioGroupInputGUI($this->lng->txt('crs_presentation_type'), 'view_mode'); $view_type->setValue($this->object->getViewMode()); $opts = new ilRadioOption($this->lng->txt('cntr_view_sessions'), IL_CRS_VIEW_SESSIONS); $opts->setInfo($this->lng->txt('cntr_view_info_sessions')); $view_type->addOption($opts); // Limited sessions $sess = new ilCheckboxInputGUI($this->lng->txt('sess_limit'), 'sl'); $sess->setValue(1); $sess->setChecked($this->object->isSessionLimitEnabled()); $sess->setInfo($this->lng->txt('sess_limit_info')); $prev = new ilNumberInputGUI($this->lng->txt('sess_num_prev'), 'sp'); #$prev->setSubmitFormOnEnter(true); $prev->setMinValue(0); $prev->setValue($this->object->getNumberOfPreviousSessions() == -1 ? '' : $this->object->getNumberOfPreviousSessions()); $prev->setSize(2); $prev->setMaxLength(3); $sess->addSubItem($prev); $next = new ilNumberInputGUI($this->lng->txt('sess_num_next'), 'sn'); #$next->setSubmitFormOnEnter(true); $next->setMinValue(0); $next->setValue($this->object->getNumberOfNextSessions() == -1 ? '' : $this->object->getNumberOfnextSessions()); $next->setSize(2); $next->setMaxLength(3); $sess->addSubItem($next); $opts->addSubItem($sess); $optsi = new ilRadioOption($this->lng->txt('cntr_view_simple'), IL_CRS_VIEW_SIMPLE); $optsi->setInfo($this->lng->txt('cntr_view_info_simple')); $view_type->addOption($optsi); $optbt = new ilRadioOption($this->lng->txt('cntr_view_by_type'), IL_CRS_VIEW_BY_TYPE); $optbt->setInfo($this->lng->txt('cntr_view_info_by_type')); $view_type->addOption($optbt); $opto = new ilRadioOption($this->lng->txt('crs_view_objective'), IL_CRS_VIEW_OBJECTIVE); $opto->setInfo($this->lng->txt('crs_view_info_objective')); $view_type->addOption($opto); $optt = new ilRadioOption($this->lng->txt('crs_view_timing'), IL_CRS_VIEW_TIMING); $optt->setInfo($this->lng->txt('crs_view_info_timing')); $view_type->addOption($optt); /* $opt = new ilRadioOption($this->lng->txt('crs_view_archive'),IL_CRS_VIEW_ARCHIVE); $opt->setInfo($this->lng->txt('crs_archive_info')); $down = new ilCheckboxInputGUI('','archive_type'); $down->setOptionTitle($this->lng->txt('crs_archive_download')); $down->setChecked($this->object->getArchiveType() == IL_CRS_ARCHIVE_DOWNLOAD); $opt->addSubItem($down); $start = new ilDateTimeInputGUI($this->lng->txt('crs_start'),'archive_start'); $start->setShowTime(true); $start_date = new ilDateTime($this->object->getArchiveStart(),IL_CAL_UNIX); $start->setDate($start_date); $opt->addSubItem($start); $end = new ilDateTimeInputGUI($this->lng->txt('crs_end'),'archive_end'); $end->setShowTime(true); $end_date = new ilDateTime($this->object->getArchiveEnd(),IL_CAL_UNIX); $end->setDate($end_date); $opt->addSubItem($end); $view_type->addOption($opt); */ $form->addItem($view_type); // sorting type $sort = new ilRadioGroupInputGUI($this->lng->txt('crs_sortorder_abo'), 'order_type'); $sort->setValue($this->object->getOrderType()); $opt = new ilRadioOption($this->lng->txt('crs_sort_title'), ilContainer::SORT_TITLE); $opt->setInfo($this->lng->txt('crs_sort_title_info')); $sort->addOption($opt); $opt = new ilRadioOption($this->lng->txt('crs_sort_manual'), ilContainer::SORT_MANUAL); $opt->setInfo($this->lng->txt('crs_sort_manual_info')); $sort->addOption($opt); $opt = new ilRadioOption($this->lng->txt('crs_sort_activation'), ilContainer::SORT_ACTIVATION); $opt->setInfo($this->lng->txt('crs_sort_timing_info')); $sort->addOption($opt); $form->addItem($sort); include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php'; ilObjectServiceSettingsGUI::initServiceSettingsForm($this->object->getId(), $form, array(ilObjectServiceSettingsGUI::CALENDAR_VISIBILITY, ilObjectServiceSettingsGUI::NEWS_VISIBILITY)); // lp vs. course status include_once "Services/Tracking/classes/class.ilObjUserTracking.php"; if (ilObjUserTracking::_enabledLearningProgress()) { include_once './Services/Tracking/classes/class.ilLPObjSettings.php'; $lp_settings = new ilLPObjSettings($this->object->getId()); if ($lp_settings->getMode()) { $lp_status = new ilFormSectionHeaderGUI(); $lp_status->setTitle($this->lng->txt('crs_course_status_of_users')); $form->addItem($lp_status); $lp_status_options = new ilRadioGroupInputGUI($this->lng->txt('crs_status_determination'), "status_dt"); $lp_status_options->setRequired(true); $lp_status_options->setValue($this->object->getStatusDetermination()); $lp_option = new ilRadioOption($this->lng->txt('crs_status_determination_lp'), ilObjCourse::STATUS_DETERMINATION_LP); $lp_status_options->addOption($lp_option); $lp_status_options->addOption(new ilRadioOption($this->lng->txt('crs_status_determination_manual'), ilObjCourse::STATUS_DETERMINATION_MANUAL)); $form->addItem($lp_status_options); } } $further = new ilFormSectionHeaderGUI(); $further->setTitle($this->lng->txt('crs_further_settings')); $form->addItem($further); $desk = new ilCheckboxInputGUI($this->lng->txt('crs_add_remove_from_desktop'), 'abo'); $desk->setChecked($this->object->getAboStatus()); $desk->setInfo($this->lng->txt('crs_add_remove_from_desktop_info')); $form->addItem($desk); $mem = new ilCheckboxInputGUI($this->lng->txt('crs_show_members'), 'show_members'); $mem->setChecked($this->object->getShowMembers()); $mem->setInfo($this->lng->txt('crs_show_members_info')); $form->addItem($mem); // Edit ecs export settings include_once 'Modules/Course/classes/class.ilECSCourseSettings.php'; $ecs = new ilECSCourseSettings($this->object); $ecs->addSettingsToForm($form, 'crs'); return $form; }