4 require_once
'Services/Table/classes/class.ilTable2GUI.php';
44 parent::__construct($parentGUI, $parentCMD);
49 $this->definitionEditModeEnabled =
false;
50 $this->questionAmountColumnEnabled =
false;
55 $this->taxonomyLabelTranslater = $translater;
82 $this->tpl->setCurrentBlock(
'col_selection_checkbox');
84 $this->tpl->parseCurrentBlock();
86 $this->tpl->setCurrentBlock(
'col_actions');
87 $this->tpl->setVariable(
'ACTIONS_HTML', $this->
getActionsHTML($set[
'def_id']));
88 $this->tpl->parseCurrentBlock();
90 $this->tpl->setCurrentBlock(
'col_order_checkbox');
94 $this->tpl->parseCurrentBlock();
102 $set[
'def_id'], $set[
'question_amount']
107 $questionAmountHTML = $set[
'question_amount'];
110 $this->tpl->setCurrentBlock(
'col_question_amount');
111 $this->tpl->setVariable(
'QUESTION_AMOUNT_INPUT_HTML', $questionAmountHTML);
112 $this->tpl->parseCurrentBlock();
115 $this->tpl->setVariable(
'SOURCE_POOL_LABEL', $set[
'source_pool_label']);
116 $this->tpl->setVariable(
'FILTER_TAXONOMY', $this->
getTaxonomyTreeLabel($set[
'filter_taxonomy']));
117 $this->tpl->setVariable(
'FILTER_TAX_NODE', $this->
getTaxonomyNodeLabel($set[
'filter_tax_node']));
122 return '<input type="checkbox" value="'.$sourcePoolDefinitionId.
'" name="src_pool_def_ids[]" />';
127 return '<input type="text" size="2" value="'.$defOrderNumber.
'" name="def_order['.$srcPoolDefId.
']" />';
132 return '<input type="text" size="4" value="'.$questionAmount.
'" name="quest_amount['.$srcPoolDefId.
']" />';
137 require_once
'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
141 $selectionList->setId(
'sourcePoolDefinitionActions_'.$sourcePoolDefinitionId);
142 $selectionList->setListTitle($this->lng->txt(
"actions"));
144 $selectionList->addItem($this->lng->txt(
'edit'),
'', $this->
getEditHref($sourcePoolDefinitionId));
145 $selectionList->addItem($this->lng->txt(
'delete'),
'', $this->
getDeleteHref($sourcePoolDefinitionId));
147 return $selectionList->getHTML();
152 $href = $this->ctrl->getLinkTarget(
163 $href = $this->ctrl->getLinkTarget(
174 return ( $sequencePosition * 10 );
179 if( !$taxonomyTreeId )
184 return $this->taxonomyLabelTranslater->getTaxonomyTreeLabel($taxonomyTreeId);
189 if( !$taxonomyNodeId )
194 return $this->taxonomyLabelTranslater->getTaxonomyNodeLabel($taxonomyNodeId);
201 $this->
setTitle($this->lng->txt(
'tst_src_quest_pool_def_list_table'));
203 $this->
setRowTemplate(
"tpl.il_tst_rnd_quest_set_src_pool_def_row.html",
"Modules/Test");
208 $this->
enable(
'select_all');
214 $this->
setFormAction($this->ctrl->getFormAction($this->parent_obj));
222 $this->
setId(self::IDENTIFIER);
240 $this->
addColumn(
'',
'select',
'1%',
true);
241 $this->
addColumn(
'',
'order',
'1%',
true);
244 $this->
addColumn($this->lng->txt(
"tst_source_question_pool"),
'source_question_pool',
'');
245 $this->
addColumn($this->lng->txt(
"tst_filter_taxonomy"),
'tst_filter_taxonomy',
'');
246 $this->
addColumn($this->lng->txt(
"tst_filter_tax_node"),
'tst_filter_tax_node',
'');
250 $this->
addColumn($this->lng->txt(
"tst_question_amount"),
'tst_question_amount',
'');
255 $this->
addColumn($this->lng->txt(
"actions"),
'actions',
'');
263 foreach($sourcePoolDefinitionList as $sourcePoolDefinition)
269 $set[
'def_id'] = $sourcePoolDefinition->getId();
270 $set[
'sequence_position'] = $sourcePoolDefinition->getSequencePosition();
271 $set[
'source_pool_label'] = $sourcePoolDefinition->getPoolTitle();
272 $set[
'filter_taxonomy'] = $sourcePoolDefinition->getMappedFilterTaxId();
273 $set[
'filter_tax_node'] = $sourcePoolDefinition->getMappedFilterTaxNodeId();
274 $set[
'question_amount'] = $sourcePoolDefinition->getQuestionAmount();
284 foreach($sourcePoolDefinitionList as $sourcePoolDefinition)
289 $sourcePoolDefinition->setSequencePosition($orderNumber);
294 $sourcePoolDefinition->setQuestionAmount($questionAmount);
298 $sourcePoolDefinition->setQuestionAmount(null);
305 return (
int)
$_POST[
'def_order'][$definition->
getId()];
310 return (
int)
$_POST[
'quest_amount'][$definition->
getId()];
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
__construct(ilCtrl $ctrl, ilLanguage $lng, $parentGUI, $parentCMD)
setQuestionAmountColumnEnabled($questionAmountColumnEnabled)
This class provides processing control methods.
getDefinitionOrderInputHTML($srcPoolDefId, $defOrderNumber)
getDeleteHref($sourcePoolDefinitionId)
setExternalSegmentation($a_val)
Set external segmentation.
const CMD_SHOW_EDIT_SRC_POOL_DEF_FORM
getTaxonomyNodeLabel($taxonomyNodeId)
$questionAmountColumnEnabled
isDefinitionEditModeEnabled()
const CMD_DELETE_SINGLE_SRC_POOL_DEF
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
fetchOrderNumberParameter(ilTestRandomQuestionSetSourcePoolDefinition $definition)
setTaxonomyFilterLabelTranslater(ilTestTaxonomyFilterLabelTranslater $translater)
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
setDefinitionEditModeEnabled($definitionEditModeEnabled)
getTaxonomyTreeLabel($taxonomyTreeId)
addMultiCommand($a_cmd, $a_text)
Add Command button.
enable($a_module_name)
enables particular modules of table
isQuestionAmountColumnEnabled()
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
const CMD_SAVE_SRC_POOL_DEF_LIST
getOrderNumberForSequencePosition($sequencePosition)
getQuestionAmountInputHTML($srcPoolDefId, $questionAmount)
User interface class for advanced drop-down selection lists.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
disable($a_module_name)
diesables particular modules of table
setFormName($a_formname="")
Set Form name.
fetchQuestionAmountParameter(ilTestRandomQuestionSetSourcePoolDefinition $definition)
getEditHref($sourcePoolDefinitionId)
getActionsHTML($sourcePoolDefinitionId)
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
getSelectionCheckboxHTML($sourcePoolDefinitionId)
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.
$definitionEditModeEnabled
setLimit($a_limit=0, $a_default_limit=0)
const CMD_DELETE_MULTI_SRC_POOL_DEFS