4require_once
'Services/Table/classes/class.ilTable2GUI.php';
5require_once
'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
6require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
74 $ilCtrl =
$DIC[
'ilCtrl'];
95 if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
96 require_once
'Modules/TestQuestionPool/classes/class.ilAssHintPageGUI.php';
98 foreach ($tableData as $key =>
$data) {
101 $pageObjectGUI->setOutputMode(
"presentation");
102 $tableData[$key][
'hint_text'] = $pageObjectGUI->presentation();
108 if ($this->tableMode == self::TBL_MODE_ADMINISTRATION) {
109 $this->
setRowTemplate(
'tpl.tst_question_hints_administration_table_row.html',
'Modules/TestQuestionPool');
113 $rowCount = count($tableData);
117 $this->
setRowTemplate(
'tpl.tst_question_hints_testoutput_table_row.html',
'Modules/TestQuestionPool');
136 $ilCtrl =
$DIC[
'ilCtrl'];
139 $this->
setFormAction($ilCtrl->getFormAction($this->parent_obj));
141 if ($this->hintOrderingClipboard->hasStored()) {
144 $lng->txt(
'tst_questions_hints_table_multicmd_paste_hint_before')
149 $lng->txt(
'tst_questions_hints_table_multicmd_paste_hint_after')
151 } elseif ($rowCount > 0) {
154 $lng->txt(
'tst_questions_hints_table_multicmd_delete_hint')
160 $lng->txt(
'tst_questions_hints_table_multicmd_cut_hint')
166 $lng->txt(
'tst_questions_hints_table_cmd_save_order')
186 $ilCtrl =
$DIC[
'ilCtrl'];
189 $this->
setFormAction($ilCtrl->getFormAction($this->parent_obj));
193 $lng->txt(
'tst_question_hints_back_to_question')
212 $this->
addColumn(
$lng->txt(
'tst_question_hints_table_column_hint_order'),
'hint_index',
'60');
213 $this->
addColumn(
$lng->txt(
'tst_question_hints_table_column_hint_text'),
'hint_text');
214 $this->
addColumn(
$lng->txt(
'tst_question_hints_table_column_hint_points'),
'hint_points',
'250');
238 $this->
addColumn(
$lng->txt(
'tst_question_hints_table_column_hint_index'),
'hint_index',
'200');
239 $this->
addColumn(
$lng->txt(
'tst_question_hints_table_column_hint_text'),
'hint_text');
240 $this->
addColumn(
$lng->txt(
'tst_question_hints_table_column_hint_points'),
'hint_points',
'200');
277 $ilCtrl =
$DIC[
'ilCtrl'];
280 if ($this->tableMode == self::TBL_MODE_ADMINISTRATION) {
282 $list->setListTitle(
$lng->txt(
'actions'));
283 $list->setId(
"advsl_hint_{$rowData['hint_id']}_actions");
285 if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
288 $list->addItem(
$lng->txt(
'tst_question_hints_table_link_edit_hint_points'),
'', $editPointsHref);
290 $editPageHref = $ilCtrl->getLinkTargetByClass(
'ilasshintpagegui',
'edit');
292 $list->addItem(
$lng->txt(
'tst_question_hints_table_link_edit_hint_page'),
'', $editPageHref);
296 $list->addItem(
$lng->txt(
'tst_question_hints_table_link_edit_hint'),
'', $editHref);
301 $list->addItem(
$lng->txt(
'tst_question_hints_table_link_delete_hint'),
'', $deleteHref);
303 $this->tpl->setVariable(
'ACTIONS', $list->getHTML());
305 $this->tpl->setVariable(
'HINT_ID', $rowData[
'hint_id']);
309 $showHref = $this->parent_obj->getHintPresentationLinkTarget($rowData[
'hint_id']);
311 $this->tpl->setVariable(
'HINT_HREF', $showHref);
316 $this->tpl->setVariable(
'HINT_INDEX', $hintIndex);
318 $this->tpl->setVariable(
'HINT_TEXT',
$txt);
319 $this->tpl->setVariable(
'HINT_POINTS', $rowData[
'hint_points']);
326 $pageObject->setParentId($this->questionOBJ->getId());
327 $pageObject->setId($pageObjectId);
328 $pageObject->createFromXML();
An exception for terminatinating execution or to throw for unit testing.
Abstract basic class which is to be extended by the concrete assessment question type classes.
User interface class for advanced drop-down selection lists.
Assessment hint page GUI class.
Assessment hint page object.
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
ensurePageObjectExists($pageObjectType, $pageObjectId)
const TBL_MODE_TESTOUTPUT
the available table modes controlling the tables behaviour
fillRow($rowData)
renders a table row by filling wor data to table row template
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.
numericOrdering($field)
returns the fact wether the passed field is to be ordered numerically or not
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
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
setPrefix($a_prefix)
set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort...
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setNoEntriesText($a_text)
Set text for an empty table.
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.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
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.
setExternalSegmentation($a_val)
Set external segmentation.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
disable($a_module_name)
diesables particular modules of table
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
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,...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc