79 $ilCtrl = $DIC[
'ilCtrl'];
100 if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
101 require_once
'Modules/TestQuestionPool/classes/class.ilAssHintPageGUI.php';
104 $this->questionOBJ->ensureHintPageObjectExists(
$data[
'hint_id']);
106 $pageObjectGUI->setOutputMode(
"presentation");
107 $tableData[
$key][
'hint_text'] = $pageObjectGUI->presentation();
113 if ($this->tableMode == self::TBL_MODE_ADMINISTRATION) {
114 $this->
setRowTemplate(
'tpl.tst_question_hints_administration_table_row.html',
'Modules/TestQuestionPool');
118 $rowCount = count($tableData);
122 $this->
setRowTemplate(
'tpl.tst_question_hints_testoutput_table_row.html',
'Modules/TestQuestionPool');
141 $ilCtrl = $DIC[
'ilCtrl'];
144 $this->
setFormAction($ilCtrl->getFormAction($this->parent_obj));
146 if ($this->hintOrderingClipboard->hasStored()) {
149 $lng->
txt(
'tst_questions_hints_table_multicmd_paste_hint_before')
154 $lng->
txt(
'tst_questions_hints_table_multicmd_paste_hint_after')
156 } elseif ($rowCount > 0) {
159 $lng->
txt(
'tst_questions_hints_table_multicmd_delete_hint')
165 $lng->
txt(
'tst_questions_hints_table_multicmd_cut_hint')
171 $lng->
txt(
'tst_questions_hints_table_cmd_save_order')
191 $ilCtrl = $DIC[
'ilCtrl'];
194 $this->
setFormAction($ilCtrl->getFormAction($this->parent_obj));
198 $lng->
txt(
'tst_question_hints_back_to_question')
217 $this->
addColumn(
$lng->
txt(
'tst_question_hints_table_column_hint_order'),
'hint_index',
'60');
218 $this->
addColumn(
$lng->
txt(
'tst_question_hints_table_column_hint_text'),
'hint_text');
219 $this->
addColumn(
$lng->
txt(
'tst_question_hints_table_column_hint_points'),
'hint_points',
'250');
243 $this->
addColumn(
$lng->
txt(
'tst_question_hints_table_column_hint_index'),
'hint_index',
'200');
244 $this->
addColumn(
$lng->
txt(
'tst_question_hints_table_column_hint_text'),
'hint_text');
245 $this->
addColumn(
$lng->
txt(
'tst_question_hints_table_column_hint_points'),
'hint_points',
'200');
280 $ilCtrl = $DIC[
'ilCtrl'];
283 if ($this->tableMode == self::TBL_MODE_ADMINISTRATION) {
285 $list->setListTitle(
$lng->
txt(
'actions'));
286 $list->setId(
"advsl_hint_{$a_set['hint_id']}_actions");
288 if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
291 $list->addItem(
$lng->
txt(
'tst_question_hints_table_link_edit_hint_points'),
'', $editPointsHref);
293 $editPageHref = $ilCtrl->getLinkTargetByClass(
'ilasshintpagegui',
'edit');
295 $list->addItem(
$lng->
txt(
'tst_question_hints_table_link_edit_hint_page'),
'', $editPageHref);
299 $list->addItem(
$lng->
txt(
'tst_question_hints_table_link_edit_hint'),
'', $editHref);
304 $list->addItem(
$lng->
txt(
'tst_question_hints_table_link_delete_hint'),
'', $deleteHref);
306 $this->tpl->setVariable(
'ACTIONS', $list->getHTML());
308 $this->tpl->setVariable(
'HINT_ID', $a_set[
'hint_id']);
310 $hintIndex = $a_set[
'hint_index'] * self::INDEX_TO_POSITION_FACTOR;
312 $showHref = $this->parent_obj->getHintPresentationLinkTarget($a_set[
'hint_id']);
314 $this->tpl->setVariable(
'HINT_HREF', $showHref);
319 $this->tpl->setVariable(
'HINT_INDEX', $hintIndex);
321 $this->tpl->setVariable(
'HINT_TEXT',
$txt);
322 $this->tpl->setVariable(
'HINT_POINTS', $a_set[
'hint_points']);
const INDEX_TO_POSITION_FACTOR
the factor the ordering position value is multiplicated with (so the user gets non decimal gaps for r...
setNoEntriesText(string $a_text)
const CMD_CUT_TO_ORDERING_CLIPBOARD
static appendUrlParameterString(string $a_url, string $a_par, bool $xml_style=false)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setFormAction(string $a_form_action, bool $a_multipart=false)
Abstract basic class which is to be extended by the concrete assessment question type classes...
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
__construct(assQuestion $questionOBJ, ilAssQuestionHintList $questionHintList, ilAssQuestionHintAbstractGUI $parentGUI, $parentCmd, $tableMode=self::TBL_MODE_TESTOUTPUT, ilAssQuestionHintsOrderingClipboard $hintOrderingClipboard=null)
Constructor.
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
initAdministrationColumns($rowCount)
inits the required columns for administration table mode
const CMD_SAVE_LIST_ORDER
static getHintIndexLabel(ilLanguage $lng, $hintIndex)
const TBL_MODE_ADMINISTRATION
const TBL_MODE_TESTOUTPUT
the available table modes controlling the tables behaviour
setDefaultOrderField(string $a_defaultorderfield)
initTestoutputColumns()
inits the required columns for testoutput table mode
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
fillRow(array $a_set)
renders a table row by filling wor data to table row template public
const CMD_PASTE_FROM_ORDERING_CLIPBOARD_BEFORE
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
const CMD_SHOW_FORM
command constants
__construct(Container $dic, ilPlugin $plugin)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
initAdministrationCommands($rowCount)
inits the required command buttons / multi selection commands for administration table mode ...
disable(string $a_module_name)
numericOrdering(string $a_field)
returns the fact wether the passed field is to be ordered numerically or not public ...
const CMD_PASTE_FROM_ORDERING_CLIPBOARD_AFTER
addMultiCommand(string $a_cmd, string $a_text)
initTestoutputCommands()
inits the required command buttons / multi selection commands for testoutput table mode ...
getTableData()
returns an array with data of the hints in this list that is adopted to be used as table gui data ...
const CMD_BACK_TO_QUESTION
setExternalSegmentation(bool $a_val)
setPrefix(string $a_prefix)