/**
  * Show released materials 
  *
  * @access protected
  * @return
  */
 protected function released()
 {
     global $ilUser, $ilToolbar;
     $this->tabs_gui->setSubTabActive('ecs_released');
     if ($this->settings->isEnabled()) {
         $ilToolbar->addButton($this->lng->txt('ecs_read_remote_links'), $this->ctrl->getLinkTarget($this, 'readAll'));
         $ilToolbar->addSeparator();
     }
     $sel_type = $_REQUEST["otype"];
     if (!$sel_type) {
         $sel_type = "rcrs";
     }
     include "Services/WebServices/ECS/classes/class.ilECSUtils.php";
     $options = ilECSUtils::getPossibleReleaseTypes(true);
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $sel = new ilSelectInputGUI("", "otype");
     $sel->setOptions($options);
     $sel->setValue($sel_type);
     $ilToolbar->addInputItem($sel);
     $ilToolbar->setFormAction($this->ctrl->getFormAction($this, "released"));
     $ilToolbar->addFormButton($this->lng->txt("submit"), "released");
     include_once './Services/WebServices/ECS/classes/class.ilECSExport.php';
     $exported = ilECSExport::getExportedIdsByType($sel_type);
     if (count($exported)) {
         $ilToolbar->addSeparator();
         $ilToolbar->addButton($this->lng->txt('csv_export'), $this->ctrl->getLinkTarget($this, 'exportReleased'));
     }
     include_once 'Services/WebServices/ECS/classes/class.ilECSReleasedContentTableGUI.php';
     $table_gui = new ilECSReleasedContentTableGUI($this, 'released');
     $table_gui->setTitle($this->lng->txt('ecs_released_content'));
     $table_gui->parse($exported);
     $this->tpl->setContent($table_gui->getHTML());
     return true;
 }
 /**
  * Init settings form
  */
 protected function initFormSettings()
 {
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->getCtrl()->getFormAction($this));
     $form->setTitle($this->getLang()->txt('ecs_part_settings') . ' ' . $this->getParticipant()->getTitle());
     $token = new ilCheckboxInputGUI($this->getLang()->txt('ecs_token_mechanism'), 'token');
     $token->setInfo($this->getLang()->txt('ecs_token_mechanism_info'));
     $token->setValue(1);
     $token->setChecked($this->getParticipant()->isTokenEnabled());
     $form->addItem($token);
     $dtoken = new ilCheckboxInputGUI($this->getLang()->txt('ecs_deprecated_token'), 'dtoken');
     $dtoken->setInfo($this->getLang()->txt('ecs_deprecated_token_info'));
     $dtoken->setValue(1);
     $dtoken->setChecked($this->getParticipant()->isDeprecatedTokenEnabled());
     $form->addItem($dtoken);
     // Export
     $export = new ilCheckboxInputGUI($this->getLang()->txt('ecs_tbl_export'), 'export');
     $export->setValue(1);
     $export->setChecked($this->getParticipant()->isExportEnabled());
     $form->addItem($export);
     // Export types
     $obj_types = new ilCheckboxGroupInputGUI($this->getLang()->txt('ecs_export_types'), 'export_types');
     $obj_types->setValue($this->getParticipant()->getExportTypes());
     include_once './Services/WebServices/ECS/classes/class.ilECSUtils.php';
     foreach (ilECSUtils::getPossibleReleaseTypes(TRUE) as $type => $trans) {
         $obj_types->addOption(new ilCheckboxOption($trans, $type));
     }
     $export->addSubItem($obj_types);
     // Import
     $import = new ilCheckboxInputGUI($this->getLang()->txt('ecs_tbl_import'), 'import');
     $import->setValue(1);
     $import->setChecked($this->getParticipant()->isImportEnabled());
     $form->addItem($import);
     // Export types
     $imp_types = new ilCheckboxGroupInputGUI($this->getLang()->txt('ecs_import_types'), 'import_types');
     $imp_types->setValue($this->getParticipant()->getImportTypes());
     include_once './Services/WebServices/ECS/classes/class.ilECSUtils.php';
     foreach (ilECSUtils::getPossibleRemoteTypes(TRUE) as $type => $trans) {
         $imp_types->addOption(new ilCheckboxOption($trans, $type));
     }
     $import->addSubItem($imp_types);
     $form->addCommandButton('saveSettings', $this->getLang()->txt('save'));
     $form->addCommandButton('abort', $this->getLang()->txt('cancel'));
     return $form;
 }