4 require_once
'Services/Table/classes/class.ilTable2GUI.php';
5 require_once
'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
6 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
82 parent::__construct($parentGUI, $parentCmd);
84 $this->
setTitle(sprintf($lng->txt(
'tst_question_hints_table_header'), $questionOBJ->
getTitle()));
93 if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
94 require_once
'Modules/TestQuestionPool/classes/class.ilAssHintPageGUI.php';
98 $pageObjectGUI->setOutputMode(
"presentation");
99 $tableData[
$key][
'hint_text'] = $pageObjectGUI->presentation();
105 if ($this->tableMode == self::TBL_MODE_ADMINISTRATION) {
106 $this->
setRowTemplate(
'tpl.tst_question_hints_administration_table_row.html',
'Modules/TestQuestionPool');
110 $rowCount = count($tableData);
114 $this->
setRowTemplate(
'tpl.tst_question_hints_testoutput_table_row.html',
'Modules/TestQuestionPool');
134 $this->
setFormAction($ilCtrl->getFormAction($this->parent_obj));
136 if ($this->hintOrderingClipboard->hasStored()) {
139 $lng->txt(
'tst_questions_hints_table_multicmd_paste_hint_before')
144 $lng->txt(
'tst_questions_hints_table_multicmd_paste_hint_after')
146 } elseif ($rowCount > 0) {
149 $lng->txt(
'tst_questions_hints_table_multicmd_delete_hint')
155 $lng->txt(
'tst_questions_hints_table_multicmd_cut_hint')
161 $lng->txt(
'tst_questions_hints_table_cmd_save_order')
182 $this->
setFormAction($ilCtrl->getFormAction($this->parent_obj));
186 $lng->txt(
'tst_question_hints_back_to_question')
204 $this->
addColumn($lng->txt(
'tst_question_hints_table_column_hint_order'),
'hint_index',
'60');
205 $this->
addColumn($lng->txt(
'tst_question_hints_table_column_hint_text'),
'hint_text');
206 $this->
addColumn($lng->txt(
'tst_question_hints_table_column_hint_points'),
'hint_points',
'250');
229 $this->
addColumn($lng->txt(
'tst_question_hints_table_column_hint_index'),
'hint_index',
'200');
230 $this->
addColumn($lng->txt(
'tst_question_hints_table_column_hint_text'),
'hint_text');
231 $this->
addColumn($lng->txt(
'tst_question_hints_table_column_hint_points'),
'hint_points',
'200');
269 if ($this->tableMode == self::TBL_MODE_ADMINISTRATION) {
271 $list->setListTitle($lng->txt(
'actions'));
272 $list->setId(
"advsl_hint_{$rowData['hint_id']}_actions");
274 if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
277 $list->addItem($lng->txt(
'tst_question_hints_table_link_edit_hint_points'),
'', $editPointsHref);
279 $editPageHref = $ilCtrl->getLinkTargetByClass(
'ilasshintpagegui',
'edit');
281 $list->addItem($lng->txt(
'tst_question_hints_table_link_edit_hint_page'),
'', $editPageHref);
285 $list->addItem($lng->txt(
'tst_question_hints_table_link_edit_hint'),
'', $editHref);
290 $list->addItem($lng->txt(
'tst_question_hints_table_link_delete_hint'),
'', $deleteHref);
292 $this->tpl->setVariable(
'ACTIONS',
$list->getHTML());
294 $this->tpl->setVariable(
'HINT_ID', $rowData[
'hint_id']);
296 $hintIndex = $rowData[
'hint_index'] * self::INDEX_TO_POSITION_FACTOR;
298 $showHref = $this->parent_obj->getHintPresentationLinkTarget($rowData[
'hint_id']);
300 $this->tpl->setVariable(
'HINT_HREF', $showHref);
305 $this->tpl->setVariable(
'HINT_INDEX', $hintIndex);
307 $this->tpl->setVariable(
'HINT_TEXT',
$txt);
308 $this->tpl->setVariable(
'HINT_POINTS', $rowData[
'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...
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
const CMD_CUT_TO_ORDERING_CLIPBOARD
if(isset($_REQUEST['delete'])) $list
numericOrdering($field)
returns the fact wether the passed field is to be ordered numerically or not
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
Abstract basic class which is to be extended by the concrete assessment question type classes...
__construct(assQuestion $questionOBJ, ilAssQuestionHintList $questionHintList, ilAssQuestionHintAbstractGUI $parentGUI, $parentCmd, $tableMode=self::TBL_MODE_TESTOUTPUT, ilAssQuestionHintsOrderingClipboard $hintOrderingClipboard=null)
Constructor.
static prepareTextareaOutput($txt_output, $prepare_for_latex_output=false, $omitNl2BrWhenTextArea=false)
Prepares a string for a text area output where latex code may be in it If the text is HTML-free...
setExternalSegmentation($a_val)
Set external segmentation.
initAdministrationColumns($rowCount)
inits the required columns for administration table mode
setNoEntriesText($a_text)
Set text for an empty table.
const CMD_SAVE_LIST_ORDER
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
static getHintIndexLabel(ilLanguage $lng, $hintIndex)
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
const TBL_MODE_ADMINISTRATION
const TBL_MODE_TESTOUTPUT
the available table modes controlling the tables behaviour
initTestoutputColumns()
inits the required columns for testoutput table mode
Assessment hint page GUI class.
addMultiCommand($a_cmd, $a_text)
Add Command button.
const CMD_PASTE_FROM_ORDERING_CLIPBOARD_BEFORE
setRowTemplate($a_template, $a_template_dir="")
Set row template.
const CMD_SHOW_FORM
command constants
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
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.
initAdministrationCommands($rowCount)
inits the required command buttons / multi selection commands for administration table mode ...
getTitle()
Gets the title string of the assQuestion object.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
const CMD_PASTE_FROM_ORDERING_CLIPBOARD_AFTER
initTestoutputCommands()
inits the required command buttons / multi selection commands for testoutput table mode ...
fillRow($rowData)
renders a table row by filling wor data to table row template
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