4 require_once (
"./Modules/DataCollection/classes/class.ilDataCollectionField.php");
5 require_once (
"./Modules/DataCollection/classes/class.ilDataCollectionTable.php");
6 include_once(
"class.ilDataCollectionDatatype.php");
7 require_once
"class.ilDataCollectionCache.php";
34 $this->main_table_id = $a_parent_obj->object->getMainTableId();
35 $this->table_id = $table_id;
36 $this->parent_obj = $a_parent_obj;
37 $this->obj_id = $a_parent_obj->obj_id;
40 $ilCtrl->redirectByClass(
'ildatacollectionrecordlistgui',
'listRecords');
52 $cmd = $ilCtrl->getCmd();
69 $fields = &$table->getFields();
71 foreach($fields as &$field)
73 $field->setVisible(
$_POST[
'visible'][$field->getId()] ==
"on");
74 $field->setEditable(
$_POST[
'editable'][$field->getId()] ==
"on");
75 $field->setFilterable(
$_POST[
'filterable'][$field->getId()] ==
"on");
76 $field->setLocked(
$_POST[
'locked'][$field->getId()] ==
"on");
77 $field->setOrder(
$_POST[
'order'][$field->getId()]);
80 $table->buildOrderFields();
93 require_once(
"./Modules/DataCollection/classes/class.ilDataCollectionTable.php");
94 $tables = $this->parent_obj->object->getTables();
96 foreach($tables as $table)
98 $options[$table->getId()] = $table->getTitle();
100 include_once
'./Services/Form/classes/class.ilSelectInputGUI.php';
102 $table_selection->setOptions($options);
103 $table_selection->setValue($this->table_id);
105 $ilToolbar->setFormAction($ilCtrl->getFormActionByClass(
"ilDataCollectionFieldListGUI",
"doTableSwitch"));
106 $ilToolbar->addText($lng->txt(
"dcl_table"));
107 $ilToolbar->addInputItem($table_selection);
108 $ilToolbar->addFormButton($lng->txt(
'change'),
'doTableSwitch');
109 $ilToolbar->addSeparator();
110 $ilToolbar->addButton($lng->txt(
"dcl_add_new_table"), $ilCtrl->getLinkTargetByClass(
"ildatacollectiontableeditgui",
"create"));
111 $ilToolbar->addSeparator();
112 $ilCtrl->setParameterByClass(
"ildatacollectiontableeditgui",
"table_id", $this->table_id);
113 $ilToolbar->addButton($lng->txt(
"dcl_table_settings"), $ilCtrl->getLinkTargetByClass(
"ildatacollectiontableeditgui",
"edit"));
114 $ilToolbar->addButton($lng->txt(
"dcl_delete_table"), $ilCtrl->getLinkTargetByClass(
"ildatacollectiontableeditgui",
"confirmDelete"));
115 $ilToolbar->addButton($lng->txt(
"dcl_add_new_field"), $ilCtrl->getLinkTargetByClass(
"ildatacollectionfieldeditgui",
"create"));
120 require_once(
'./Modules/DataCollection/classes/class.ilDataCollectionFieldListTableGUI.php');
123 $tpl->setContent($list->getHTML());
134 $ilCtrl->setParameterByClass(
"ilObjDataCollectionGUI",
"table_id",
$_POST[
'table_id']);
135 $ilCtrl->redirectByClass(
"ilDataCollectionFieldListGUI",
"listFields");
143 $ref_id = $this->parent_obj->getDataCollectionObject()->getRefId();