4 require_once
'Services/Table/classes/class.ilTable2GUI.php';
51 parent::__construct($parentGUI, $parentCMD);
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(
'TYPE_FILTER', $this->taxonomyLabelTranslater->getTypeFilterLabel($set[
'type_filter']));
144 return '<input type="checkbox" value="' . $sourcePoolDefinitionId .
'" name="src_pool_def_ids[]" />';
149 return '<input type="text" size="2" value="' . $defOrderNumber .
'" name="def_order[' . $srcPoolDefId .
']" />';
154 return '<input type="text" size="4" value="' . $questionAmount .
'" name="quest_amount[' . $srcPoolDefId .
']" />';
159 require_once
'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
163 $selectionList->setId(
'sourcePoolDefinitionActions_' . $sourcePoolDefinitionId);
164 $selectionList->setListTitle($this->lng->txt(
"actions"));
166 $selectionList->addItem($this->lng->txt(
'edit'),
'', $this->
getEditHref($sourcePoolDefinitionId));
167 $selectionList->addItem($this->lng->txt(
'delete'),
'', $this->
getDeleteHref($sourcePoolDefinitionId));
169 return $selectionList->getHTML();
174 $href = $this->ctrl->getLinkTarget(
186 $href = $this->ctrl->getLinkTarget(
198 return ($sequencePosition * 10);
203 if (!$taxonomyTreeId) {
207 return $this->taxonomyLabelTranslater->getTaxonomyTreeLabel($taxonomyTreeId);
212 if (!$taxonomyNodeId) {
216 return $this->taxonomyLabelTranslater->getTaxonomyNodeLabel($taxonomyNodeId);
223 $this->
setTitle($this->lng->txt(
'tst_src_quest_pool_def_list_table'));
225 $this->
setRowTemplate(
"tpl.il_tst_rnd_quest_set_src_pool_def_row.html",
"Modules/Test");
230 $this->
enable(
'select_all');
236 $this->
setFormAction($this->ctrl->getFormAction($this->parent_obj));
244 $this->
setId(self::IDENTIFIER);
260 $this->
addColumn(
'',
'select',
'1%',
true);
261 $this->
addColumn(
'',
'order',
'1%',
true);
265 $this->
addColumn($this->lng->txt(
"position"));
269 $this->
addColumn($this->lng->txt(
"tst_source_question_pool"),
'source_question_pool',
'');
271 $this->
addColumn($this->lng->txt(
"tst_filter_taxonomy") .
' / ' . $this->lng->txt(
"tst_filter_tax_node"),
'tst_filter_taxonomy',
'');
272 #$this->addColumn($this->lng->txt("tst_filter_taxonomy"),'tst_filter_taxonomy', ''); 273 #$this->addColumn($this->lng->txt("tst_filter_tax_node"),'tst_filter_tax_node', ''); 274 $this->
addColumn($this->lng->txt(
"tst_filter_question_type"),
'tst_filter_question_type',
'');
278 $this->
addColumn($this->lng->txt(
"tst_question_amount"),
'tst_question_amount',
'');
282 $this->
addColumn($this->lng->txt(
"actions"),
'actions',
'');
290 foreach ($sourcePoolDefinitionList as $sourcePoolDefinition) {
295 $set[
'def_id'] = $sourcePoolDefinition->getId();
296 $set[
'sequence_position'] = $sourcePoolDefinition->getSequencePosition();
297 $set[
'source_pool_label'] = $sourcePoolDefinition->getPoolTitle();
299 if ($this->showMappedTaxonomyFilter) {
301 $set[
'taxonomy_filter'] = $sourcePoolDefinition->getMappedTaxonomyFilter();
304 $set[
'taxonomy_filter'] = $sourcePoolDefinition->getOriginalTaxonomyFilter();
306 #$set['filter_taxonomy'] = $sourcePoolDefinition->getMappedFilterTaxId(); 307 #$set['filter_tax_node'] = $sourcePoolDefinition->getMappedFilterTaxNodeId(); 308 $set[
'type_filter'] = $sourcePoolDefinition->getTypeFilter();
310 $set[
'question_amount'] = $sourcePoolDefinition->getQuestionAmount();
320 foreach ($sourcePoolDefinitionList as $sourcePoolDefinition) {
324 $sourcePoolDefinition->setSequencePosition($orderNumber);
328 $sourcePoolDefinition->setQuestionAmount($questionAmount);
330 $sourcePoolDefinition->setQuestionAmount(null);
337 return (
int)
$_POST[
'def_order'][$definition->
getId()];
342 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.
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)
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
$showMappedTaxonomyFilter
getSelectionCheckboxHTML($sourcePoolDefinitionId)
$definitionEditModeEnabled
setLimit($a_limit=0, $a_default_limit=0)
const CMD_DELETE_MULTI_SRC_POOL_DEFS