24 include_once(
'Services/Table/classes/class.ilTable2GUI.php');
25 include_once(
'Services/WebServices/ECS/classes/class.ilECSParticipantSettings.php');
57 $ilAccess = $DIC[
'ilAccess'];
65 parent::__construct($a_parent_obj, $a_parent_cmd);
66 $this->
addColumn($this->lng->txt(
'ecs_participants'),
'participants',
"35%");
67 $this->
addColumn($this->lng->txt(
'ecs_participants_infos'),
'infos',
"35%");
68 $this->
addColumn($this->lng->txt(
'ecs_tbl_export'),
'export',
'5%');
69 $this->
addColumn($this->lng->txt(
'ecs_tbl_import'),
'import',
'5%');
70 $this->
addColumn($this->lng->txt(
'ecs_tbl_import_type'),
'type',
'10%');
72 if ($ilAccess->checkAccess(
'write',
'', $_REQUEST[
"ref_id"])) {
77 $this->
setRowTemplate(
"tpl.participant_row.html",
"Services/WebServices/ECS");
106 $ilAccess = $DIC[
'ilAccess'];
108 $this->tpl->setVariable(
'S_ID', $this->
getServer()->getServerId());
109 $this->tpl->setVariable(
'M_ID', $a_set[
'mid']);
110 $this->tpl->setVariable(
'VAL_ID', $this->
getServer()->getServerId() .
'_' . $a_set[
'mid']);
111 $this->tpl->setVariable(
'VAL_ORG', (
string) $a_set[
'org']);
112 $this->tpl->setVariable(
'VAL_CHECKED', $a_set[
'checked'] ?
'checked="checked"' :
'');
113 $this->tpl->setVariable(
'VAL_TITLE', $a_set[
'participants']);
114 $this->tpl->setVariable(
'VAL_DESC', $a_set[
'description']);
115 $this->tpl->setVariable(
'VAL_EMAIL', $a_set[
'email']);
116 $this->tpl->setVariable(
'VAL_DNS', $a_set[
'dns']);
117 $this->tpl->setVariable(
'VAL_ABR', $a_set[
'abr']);
118 $this->tpl->setVariable(
'TXT_EMAIL', $this->lng->txt(
'ecs_email'));
119 $this->tpl->setVariable(
'TXT_DNS', $this->lng->txt(
'ecs_dns'));
120 $this->tpl->setVariable(
'TXT_ABR', $this->lng->txt(
'ecs_abr'));
121 $this->tpl->setVariable(
'TXT_ID', $this->lng->txt(
'ecs_unique_id'));
122 $this->tpl->setVariable(
'TXT_ORG', $this->lng->txt(
'organization'));
124 include_once
'./Services/WebServices/ECS/classes/class.ilECSParticipantSetting.php';
128 if ($part->isExportEnabled()) {
129 foreach ($part->getExportTypes() as $obj_type) {
130 $this->tpl->setCurrentBlock(
'obj_erow');
131 $this->tpl->setVariable(
'TXT_OBJ_EINFO', $this->lng->txt(
'objs_' . $obj_type));
132 $this->tpl->parseCurrentBlock();
135 $this->lng->loadLanguageModule(
'administration');
136 $this->tpl->setVariable(
'TXT_OBJ_EINFO', $this->lng->txt(
'disabled'));
139 if ($part->isImportEnabled()) {
140 foreach ($part->getImportTypes() as $obj_type) {
141 $this->tpl->setCurrentBlock(
'obj_irow');
142 $this->tpl->setVariable(
'TXT_OBJ_IINFO', $this->lng->txt(
'objs_' . $obj_type));
143 $this->tpl->parseCurrentBlock();
146 $this->lng->loadLanguageModule(
'administration');
147 $this->tpl->setVariable(
'TXT_OBJ_IINFO', $this->lng->txt(
'disabled'));
151 $part->getImportType(),
152 'import_type[' . $this->
getServer()->getServerId() .
'][' . $a_set[
'mid'] .
']',
161 $this->tpl->setVariable(
'IMPORT_SEL', $sel);
163 include_once
'./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
165 $list->setItemLinkClass(
'small');
166 $list->setSelectionHeaderClass(
'small');
167 $list->setId(
'actl_' . $a_set[
'server_id'] .
'_' . $a_set[
'mid']);
168 $list->setListTitle($this->lng->txt(
'actions'));
173 $this->lng->txt(
'edit'),
175 $ilCtrl->getLinkTargetByClass(
'ilecsparticipantsettingsgui',
'settings')
178 switch ($part->getImportType()) {
188 $this->lng->txt(
'ecs_crs_alloc_set'),
190 $ilCtrl->getLinkTargetByClass(
'ilecsmappingsettingsgui',
'cStart')
200 $this->lng->txt(
'ecs_dir_alloc_set'),
202 $ilCtrl->getLinkTargetByClass(
'ilecsmappingsettingsgui',
'dStart')
205 $this->lng->txt(
'ecs_crs_alloc_set'),
207 $ilCtrl->getLinkTargetByClass(
'ilecsmappingsettingsgui',
'cStart')
212 if ($ilAccess->checkAccess(
'write',
'', $_REQUEST[
"ref_id"])) {
213 $this->tpl->setCurrentBlock(
"actions");
214 $this->tpl->setVariable(
'ACTIONS',
$list->getHTML());
215 $this->tpl->parseCurrentBlock();
226 public function parse($a_participants)
228 foreach ($a_participants as $participant) {
229 $tmp_arr[
'mid'] = $participant->getMID();
230 $tmp_arr[
'participants'] = $participant->getParticipantName();
231 $tmp_arr[
'description'] = $participant->getDescription();
232 $tmp_arr[
'email'] = $participant->getEmail();
233 $tmp_arr[
'dns'] = $participant->getDNS();
236 $tmp_arr[
'abr'] = $participant->getOrganisation()->getAbbreviation();
237 $tmp_arr[
'org'] = $participant->getOrganisation()->getName();
if(isset($_REQUEST['delete'])) $list
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
getServerId()
Get current server id.
getParentObject()
Get parent object.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
User interface class for advanced drop-down selection lists.
disable($a_module_name)
diesables particular modules of table
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.