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']);
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']);
Abstract basic class which is to be extended by the concrete assessment question type classes.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const CMD_SHOW_FORM
command constants
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
static getHintIndexLabel(ilLanguage $lng, $hintIndex)
const CMD_PASTE_FROM_ORDERING_CLIPBOARD_AFTER
const CMD_PASTE_FROM_ORDERING_CLIPBOARD_BEFORE
const CMD_SAVE_LIST_ORDER
const CMD_CUT_TO_ORDERING_CLIPBOARD
initAdministrationColumns($rowCount)
inits the required columns for administration table mode
const TBL_MODE_TESTOUTPUT
the available table modes controlling the tables behaviour
numericOrdering(string $a_field)
returns the fact wether the passed field is to be ordered numerically or not @access public
const TBL_MODE_ADMINISTRATION
const INDEX_TO_POSITION_FACTOR
the factor the ordering position value is multiplicated with (so the user gets non decimal gaps for r...
initTestoutputColumns()
inits the required columns for testoutput table mode
__construct(assQuestion $questionOBJ, ilAssQuestionHintList $questionHintList, ilAssQuestionHintAbstractGUI $parentGUI, $parentCmd, $tableMode=self::TBL_MODE_TESTOUTPUT, ilAssQuestionHintsOrderingClipboard $hintOrderingClipboard=null)
Constructor.
fillRow(array $a_set)
renders a table row by filling wor data to table row template @access public
initTestoutputCommands()
inits the required command buttons / multi selection commands for testoutput table mode
initAdministrationCommands($rowCount)
inits the required command buttons / multi selection commands for administration table mode
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
setExternalSegmentation(bool $a_val)
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
addMultiCommand(string $a_cmd, string $a_text)
setPrefix(string $a_prefix)
set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort...
setFormAction(string $a_form_action, bool $a_multipart=false)
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)
setDefaultOrderField(string $a_defaultorderfield)
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
setNoEntriesText(string $a_text)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
setData(array $a_data)
Set table data.
disable(string $a_module_name)
static appendUrlParameterString(string $a_url, string $a_par, bool $xml_style=false)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc