4 require_once
'Services/Table/classes/class.ilTable2GUI.php';
56 $this->definitionEditModeEnabled =
false;
57 $this->questionAmountColumnEnabled =
false;
62 $this->taxonomyLabelTranslater = $translater;
95 $this->tpl->setCurrentBlock(
'col_selection_checkbox');
97 $this->tpl->parseCurrentBlock();
99 $this->tpl->setCurrentBlock(
'col_actions');
100 $this->tpl->setVariable(
'ACTIONS_HTML', $this->
getActionsHTML($set[
'def_id']));
101 $this->tpl->parseCurrentBlock();
103 $this->tpl->setCurrentBlock(
'col_order_checkbox');
108 $this->tpl->parseCurrentBlock();
112 $this->tpl->setCurrentBlock(
'col_order_checkbox');
113 $this->tpl->setVariable(
'ORDER_INPUT_HTML', $set[
'sequence_position']);
114 $this->tpl->parseCurrentBlock();
122 $set[
'question_amount']
125 $questionAmountHTML = $set[
'question_amount'];
128 $this->tpl->setCurrentBlock(
'col_question_amount');
129 $this->tpl->setVariable(
'QUESTION_AMOUNT_INPUT_HTML', $questionAmountHTML);
130 $this->tpl->parseCurrentBlock();
133 $this->tpl->setVariable(
'SOURCE_POOL_LABEL', $set[
'source_pool_label']);
135 $this->tpl->setVariable(
'TAXONOMY_FILTER', $this->taxonomyLabelTranslater->getTaxonomyFilterLabel($set[
'taxonomy_filter'],
'<br />'));
136 #$this->tpl->setVariable('FILTER_TAXONOMY', $this->getTaxonomyTreeLabel($set['filter_taxonomy'])); 137 #$this->tpl->setVariable('FILTER_TAX_NODE', $this->getTaxonomyNodeLabel($set['filter_tax_node'])); 138 $this->tpl->setVariable(
'LIFECYCLE_FILTER', $this->taxonomyLabelTranslater->getLifecycleFilterLabel($set[
'lifecycle_filter']));
139 $this->tpl->setVariable(
'TYPE_FILTER', $this->taxonomyLabelTranslater->getTypeFilterLabel($set[
'type_filter']));
145 return '<input type="checkbox" value="' . $sourcePoolDefinitionId .
'" name="src_pool_def_ids[]" />';
150 return '<input type="text" size="2" value="' . $defOrderNumber .
'" name="def_order[' . $srcPoolDefId .
']" />';
155 return '<input type="text" size="4" value="' . $questionAmount .
'" name="quest_amount[' . $srcPoolDefId .
']" />';
160 require_once
'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
164 $selectionList->setId(
'sourcePoolDefinitionActions_' . $sourcePoolDefinitionId);
165 $selectionList->setListTitle($this->lng->txt(
"actions"));
167 $selectionList->addItem($this->lng->txt(
'edit'),
'', $this->
getEditHref($sourcePoolDefinitionId));
168 $selectionList->addItem($this->lng->txt(
'delete'),
'', $this->
getDeleteHref($sourcePoolDefinitionId));
170 return $selectionList->getHTML();
175 $href = $this->ctrl->getLinkTarget(
187 $href = $this->ctrl->getLinkTarget(
199 return ($sequencePosition * 10);
204 if (!$taxonomyTreeId) {
208 return $this->taxonomyLabelTranslater->getTaxonomyTreeLabel($taxonomyTreeId);
213 if (!$taxonomyNodeId) {
217 return $this->taxonomyLabelTranslater->getTaxonomyNodeLabel($taxonomyNodeId);
224 $this->
setTitle($this->lng->txt(
'tst_src_quest_pool_def_list_table'));
226 $this->
setRowTemplate(
"tpl.il_tst_rnd_quest_set_src_pool_def_row.html",
"Modules/Test");
231 $this->
enable(
'select_all');
237 $this->
setFormAction($this->ctrl->getFormAction($this->parent_obj));
245 $this->
setId(self::IDENTIFIER);
261 $this->
addColumn(
'',
'select',
'1%',
true);
262 $this->
addColumn(
'',
'order',
'1%',
true);
266 $this->
addColumn($this->lng->txt(
"position"));
270 $this->
addColumn($this->lng->txt(
"tst_source_question_pool"),
'source_question_pool',
'');
272 $this->
addColumn($this->lng->txt(
"tst_filter_taxonomy") .
' / ' . $this->lng->txt(
"tst_filter_tax_node"),
'tst_filter_taxonomy',
'');
273 #$this->addColumn($this->lng->txt("tst_filter_taxonomy"),'tst_filter_taxonomy', ''); 274 #$this->addColumn($this->lng->txt("tst_filter_tax_node"),'tst_filter_tax_node', ''); 275 $this->
addColumn($this->lng->txt(
"qst_lifecycle"),
'tst_filter_lifecycle',
'');
276 $this->
addColumn($this->lng->txt(
"tst_filter_question_type"),
'tst_filter_question_type',
'');
280 $this->
addColumn($this->lng->txt(
"tst_question_amount"),
'tst_question_amount',
'');
284 $this->
addColumn($this->lng->txt(
"actions"),
'actions',
'');
292 foreach ($sourcePoolDefinitionList as $sourcePoolDefinition) {
297 $set[
'def_id'] = $sourcePoolDefinition->getId();
298 $set[
'sequence_position'] = $sourcePoolDefinition->getSequencePosition();
299 $set[
'source_pool_label'] = $sourcePoolDefinition->getPoolTitle();
301 if ($this->showMappedTaxonomyFilter) {
303 $set[
'taxonomy_filter'] = $sourcePoolDefinition->getMappedTaxonomyFilter();
306 $set[
'taxonomy_filter'] = $sourcePoolDefinition->getOriginalTaxonomyFilter();
308 #$set['filter_taxonomy'] = $sourcePoolDefinition->getMappedFilterTaxId(); 309 #$set['filter_tax_node'] = $sourcePoolDefinition->getMappedFilterTaxNodeId(); 310 $set[
'lifecycle_filter'] = $sourcePoolDefinition->getLifecycleFilter();
311 $set[
'type_filter'] = $sourcePoolDefinition->getTypeFilter();
313 $set[
'question_amount'] = $sourcePoolDefinition->getQuestionAmount();
323 foreach ($sourcePoolDefinitionList as $sourcePoolDefinition) {
327 $sourcePoolDefinition->setSequencePosition($orderNumber);
331 $sourcePoolDefinition->setQuestionAmount($questionAmount);
333 $sourcePoolDefinition->setQuestionAmount(null);
340 return (
int)
$_POST[
'def_order'][$definition->
getId()];
345 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)
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
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.
const CMD_SAVE_SRC_POOL_DEF_LIST
getOrderNumberForSequencePosition($sequencePosition)
getQuestionAmountInputHTML($srcPoolDefId, $questionAmount)
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.
__construct(Container $dic, ilPlugin $plugin)
setShowMappedTaxonomyFilter($showMappedTaxonomyFilter)
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.
fetchQuestionAmountParameter(ilTestRandomQuestionSetSourcePoolDefinition $definition)
getEditHref($sourcePoolDefinitionId)
getActionsHTML($sourcePoolDefinitionId)
$showMappedTaxonomyFilter
getSelectionCheckboxHTML($sourcePoolDefinitionId)
$definitionEditModeEnabled
setLimit($a_limit=0, $a_default_limit=0)
const CMD_DELETE_MULTI_SRC_POOL_DEFS