/** * Fill row * * @access public * @param array row data * */ public function fillRow($a_set) { global $ilCtrl; $this->tpl->setVariable('S_ID', $this->getServer()->getServerId()); $this->tpl->setVariable('M_ID', $a_set['mid']); $this->tpl->setVariable('VAL_ID', $this->getServer()->getServerId() . '_' . $a_set['mid']); $this->tpl->setVariable('VAL_ORG', (string) $a_set['org']); $this->tpl->setVariable('VAL_CHECKED', $a_set['checked'] ? 'checked="checked"' : ''); $this->tpl->setVariable('VAL_TITLE', $a_set['participants']); $this->tpl->setVariable('VAL_DESC', $a_set['description']); $this->tpl->setVariable('VAL_EMAIL', $a_set['email']); $this->tpl->setVariable('VAL_DNS', $a_set['dns']); $this->tpl->setVariable('VAL_ABR', $a_set['abr']); $this->tpl->setVariable('TXT_EMAIL', $this->lng->txt('ecs_email')); $this->tpl->setVariable('TXT_DNS', $this->lng->txt('ecs_dns')); $this->tpl->setVariable('TXT_ABR', $this->lng->txt('ecs_abr')); $this->tpl->setVariable('TXT_ID', $this->lng->txt('ecs_unique_id')); $this->tpl->setVariable('TXT_ORG', $this->lng->txt('organization')); include_once './Services/WebServices/ECS/classes/class.ilECSParticipantSetting.php'; $part = new ilECSParticipantSetting($this->getServer()->getServerId(), $a_set['mid']); if ($part->isExportEnabled()) { foreach ($part->getExportTypes() as $obj_type) { $this->tpl->setCurrentBlock('obj_erow'); $this->tpl->setVariable('TXT_OBJ_EINFO', $this->lng->txt('objs_' . $obj_type)); $this->tpl->parseCurrentBlock(); } } else { $this->lng->loadLanguageModule('administration'); $this->tpl->setVariable('TXT_OBJ_EINFO', $this->lng->txt('disabled')); } if ($part->isImportEnabled()) { foreach ($part->getImportTypes() as $obj_type) { $this->tpl->setCurrentBlock('obj_irow'); $this->tpl->setVariable('TXT_OBJ_IINFO', $this->lng->txt('objs_' . $obj_type)); $this->tpl->parseCurrentBlock(); } } else { $this->lng->loadLanguageModule('administration'); $this->tpl->setVariable('TXT_OBJ_IINFO', $this->lng->txt('disabled')); } // :TODO: what types are to be supported? $sel = ilUtil::formSelect($part->getImportType(), 'import_type[' . $this->getServer()->getServerId() . '][' . $a_set['mid'] . ']', array(ilECSParticipantSetting::IMPORT_RCRS => $this->lng->txt('obj_rcrs'), ilECSParticipantSetting::IMPORT_CRS => $this->lng->txt('obj_crs'), ilECSParticipantSetting::IMPORT_CMS => $this->lng->txt('ecs_import_cms')), false, true); $this->tpl->setVariable('IMPORT_SEL', $sel); include_once './Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php'; $list = new ilAdvancedSelectionListGUI(); $list->setItemLinkClass('small'); $list->setSelectionHeaderClass('small'); $list->setId('actl_' . $a_set['server_id'] . '_' . $a_set['mid']); $list->setListTitle($this->lng->txt('actions')); $ilCtrl->setParameter($this->getParentObject(), 'server_id', $this->getServer()->getServerId()); $ilCtrl->setParameter($this->getParentObject(), 'mid', $a_set['mid']); $list->addItem($this->lng->txt('edit'), '', $ilCtrl->getLinkTargetByClass('ilecsparticipantsettingsgui', 'settings')); switch ($part->getImportType()) { case ilECSParticipantSetting::IMPORT_RCRS: // Do nothing break; case ilECSParticipantSetting::IMPORT_CRS: // Possible action => Edit course allocation $ilCtrl->setParameter($this->getParentObject(), 'server_id', $this->getServer()->getServerId()); $ilCtrl->setParameter($this->getParentObject(), 'mid', $a_set['mid']); $list->addItem($this->lng->txt('ecs_crs_alloc_set'), '', $ilCtrl->getLinkTargetByClass('ilecsmappingsettingsgui', 'cStart')); break; case ilECSParticipantSetting::IMPORT_CMS: $ilCtrl->setParameter($this->getParentObject(), 'server_id', $this->getServer()->getServerId()); $ilCtrl->setParameter($this->getParentObject(), 'mid', $a_set['mid']); // Possible action => Edit course allocation, edit node mapping $list->addItem($this->lng->txt('ecs_dir_alloc_set'), '', $ilCtrl->getLinkTargetByClass('ilecsmappingsettingsgui', 'dStart')); $list->addItem($this->lng->txt('ecs_crs_alloc_set'), '', $ilCtrl->getLinkTargetByClass('ilecsmappingsettingsgui', 'cStart')); break; } $this->tpl->setVariable('ACTIONS', $list->getHTML()); }