ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilListOfQuestionsTableGUI Class Reference
+ Inheritance diagram for ilListOfQuestionsTableGUI:
+ Collaboration diagram for ilListOfQuestionsTableGUI:

Public Member Functions

 __construct (ilTestPlayerAbstractGUI $parent_obj, string $parent_cmd, private UIFactory $ui_factory, private UIRenderer $ui_renderer)
 
 init ()
 
 userHasAttemptsLeft ()
 
 setUserHasAttemptsLeft (bool $user_has_attempts_left)
 
 getHTML ()
 
 fillRow (array $a_set)
 
 isShowPointsEnabled ()
 
 setShowPointsEnabled ($showPointsEnabled)
 
 isShowMarkerEnabled ()
 
 setShowMarkerEnabled ($showMarkerEnabled)
 
 isShowObligationsEnabled ()
 
 setShowObligationsEnabled ($showObligationsEnabled)
 
 isObligationsFilterEnabled ()
 
 setObligationsFilterEnabled ($obligationsFilterEnabled)
 
 areObligationsNotAnswered ()
 
 setObligationsNotAnswered ($obligationsNotAnswered)
 
 isFinishTestButtonEnabled ()
 
 setFinishTestButtonEnabled (bool $finishTestButtonEnabled)
 
- Public Member Functions inherited from ilTable2GUI
 __construct (?object $a_parent_obj, string $a_parent_cmd="", string $a_template_context="")
 
 setOpenFormTag (bool $a_val)
 
 getOpenFormTag ()
 
 setCloseFormTag (bool $a_val)
 
 getCloseFormTag ()
 
 determineLimit ()
 
 getSelectableColumns ()
 Get selectable columns. More...
 
 determineSelectedColumns ()
 
 isColumnSelected (string $col)
 
 getSelectedColumns ()
 
 resetOffset (bool $a_in_determination=false)
 
 initFilter ()
 
 getParentObject ()
 
 getParentCmd ()
 
 setTopAnchor (string $a_val)
 
 getTopAnchor ()
 
 setNoEntriesText (string $a_text)
 
 getNoEntriesText ()
 
 setIsDataTable (bool $a_val)
 
 getIsDataTable ()
 
 setEnableTitle (bool $a_enabletitle)
 
 getEnableTitle ()
 
 setEnableHeader (bool $a_enableheader)
 
 getEnableHeader ()
 
 setEnableNumInfo (bool $a_val)
 
 getEnableNumInfo ()
 
 setTitle (string $a_title, string $a_icon="", string $a_icon_alt="")
 
 setDescription (string $a_val)
 
 getDescription ()
 
 setOrderField (string $a_order_field)
 
 getOrderField ()
 
 setData (array $a_data)
 
 getData ()
 
 dataExists ()
 
 setPrefix (string $a_prefix)
 
 getPrefix ()
 
 addFilterItem (ilTableFilterItem $a_input_item, bool $a_optional=false)
 
 addFilterItemByMetaType (string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
 Add filter by standard type. More...
 
 getFilterItems (bool $a_optionals=false)
 
 getFilterItemByPostVar (string $a_post_var)
 
 setFilterCols (int $a_val)
 
 getFilterCols ()
 
 setDisableFilterHiding (bool $a_val=true)
 
 getDisableFilterHiding ()
 
 isFilterSelected (string $a_col)
 Is given filter selected? More...
 
 getSelectedFilters ()
 
 determineSelectedFilters ()
 
 setCustomPreviousNext (string $a_prev_link, string $a_next_link)
 
 setFormAction (string $a_form_action, bool $a_multipart=false)
 
 getFormAction ()
 
 setFormName (string $a_name="")
 
 getFormName ()
 
 setId (string $a_val)
 
 getId ()
 
 setDisplayAsBlock (bool $a_val)
 
 getDisplayAsBlock ()
 
 setSelectAllCheckbox (string $a_select_all_checkbox, bool $a_select_all_on_top=false)
 
 setExternalSorting (bool $a_val)
 
 getExternalSorting ()
 
 setFilterCommand (string $a_val, string $a_caption="")
 
 getFilterCommand ()
 
 setResetCommand (string $a_val, string $a_caption="")
 
 getResetCommand ()
 
 setExternalSegmentation (bool $a_val)
 
 getExternalSegmentation ()
 
 setRowTemplate (string $a_template, string $a_template_dir="")
 Set row template. More...
 
 setDefaultOrderField (string $a_defaultorderfield)
 
 getDefaultOrderField ()
 
 setDefaultOrderDirection (string $a_defaultorderdirection)
 
 getDefaultOrderDirection ()
 
 setDefaultFilterVisiblity (bool $a_status)
 
 getDefaultFilterVisibility ()
 
 clearCommandButtons ()
 
 addCommandButton (string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
 
 addCommandButtonInstance (ilButtonBase $a_button)
 
 addMultiItemSelectionButton (string $a_sel_var, array $a_options, string $a_cmd, string $a_text, string $a_default_selection='')
 
 setCloseCommand (string $a_link)
 
 addMultiCommand (string $a_cmd, string $a_text)
 
 addHiddenInput (string $a_name, string $a_value)
 
 addHeaderCommand (string $a_href, string $a_text, string $a_target="", string $a_img="")
 
 setTopCommands (bool $a_val)
 
 getTopCommands ()
 
 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)
 
 getNavParameter ()
 
 setOrderLink (string $key, string $order_dir)
 
 fillHeader ()
 
 determineOffsetAndOrder (bool $a_omit_offset=false)
 
 storeNavParameter ()
 
 getHTML ()
 Get HTML. More...
 
 numericOrdering (string $a_field)
 Should this field be sorted numeric? More...
 
 render ()
 
 writeFilterToSession ()
 
 resetFilter ()
 
 fillFooter ()
 
 getLinkbar (string $a_num)
 
 fillHiddenRow ()
 
 fillActionRow ()
 
 setHeaderHTML (string $html)
 
 storeProperty (string $type, string $value)
 
 loadProperty (string $type)
 
 getCurrentState ()
 get current settings for order, limit, columns and filter More...
 
 setContext (string $id)
 
 getContext ()
 
 setShowRowsSelector (bool $a_value)
 Toggle rows-per-page selector. More...
 
 getShowRowsSelector ()
 
 setShowTemplates (bool $a_value)
 
 getShowTemplates ()
 
 restoreTemplate (string $a_name)
 Restore state from template. More...
 
 saveTemplate (string $a_name)
 Save current state as template. More...
 
 deleteTemplate (string $a_name)
 
 getLimit ()
 
 getOffset ()
 
 setExportFormats (array $formats)
 Set available export formats. More...
 
 setPrintMode (bool $a_value=false)
 
 getPrintMode ()
 
 getExportMode ()
 
 exportData (int $format, bool $send=false)
 Export and optionally send current table data. More...
 
 setEnableAllCommand (bool $a_value)
 
 setRowSelectorLabel (string $row_selector_label)
 
 getRowSelectorLabel ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 setLimit (int $a_limit=0, int $a_default_limit=0)
 
- Public Member Functions inherited from ilTableGUI
 __construct (array $a_data=[], bool $a_global_tpl=true)
 
 setTemplate (ilTemplate $a_tpl)
 
 getTemplateObject ()
 
 setData (array $a_data)
 Set table data. More...
 
 getData ()
 
 setTitle (string $a_title, string $a_icon="", string $a_icon_alt="")
 
 setHelp (string $a_help_page, string $a_help_icon, string $a_help_icon_alt="")
 
 setHeaderNames (array $a_header_names)
 
 getColumnCount ()
 
 setHeaderVars (array $a_header_vars, array $a_header_params=[])
 
 setColumnWidth (array $a_column_width)
 set table column widths More...
 
 setOneColumnWidth (string $a_column_width, int $a_column_number)
 
 setMaxCount (int $a_max_count)
 set max. More...
 
 setLimit (int $a_limit=0, int $a_default_limit=0)
 set max. More...
 
 getLimit ()
 
 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 separately) More...
 
 setOffset (int $a_offset)
 set dataset offset More...
 
 getOffset ()
 
 setOrderColumn (string $a_order_column="", string $a_default_column="")
 
 getOrderColumn ()
 
 setOrderDirection (string $a_order_direction)
 
 getOrderDirection ()
 
 setFooter (string $a_style, string $a_previous="", string $a_next="")
 
 enable (string $a_module_name)
 
 disable (string $a_module_name)
 
 sortData ()
 
 render ()
 
 renderHeader ()
 
 setOrderLink (string $key, string $order_dir)
 
 setStyle (string $a_element, string $a_style)
 
 getStyle (string $a_element)
 
 setBase (string $a_base)
 
 getBase ()
 
 getFormName ()
 get the name of the parent form More...
 
 setFormName (string $a_name="cmd")
 
 getSelectAllCheckbox ()
 get the name of the checkbox that should be toggled with a select all button More...
 
 setSelectAllCheckbox (string $a_select_all_checkbox)
 
 clearActionButtons ()
 
 addActionButton (string $btn_name, string $btn_value)
 

Protected Attributes

bool $showPointsEnabled = false
 
bool $showMarkerEnabled = false
 
bool $showObligationsEnabled = false
 
bool $obligationsFilterEnabled = false
 
bool $obligationsNotAnswered = false
 
bool $finishTestButtonEnabled = false
 
- Protected Attributes inherited from ilTable2GUI
string $requested_tmpl_delete
 
string $requested_tmpl_create
 
string $requested_nav_par2 = ""
 
string $requested_nav_par = ""
 
string $requested_nav_par1 = ""
 
ILIAS Table TableGUIRequest $table_request = null
 
array $selected_columns = []
 
ilCtrl $ctrl
 
object $parent_obj = null
 
string $parent_cmd = ""
 
string $close_command = ""
 
string $top_anchor = "il_table_top"
 
array $filters = array()
 
array $optional_filters = array()
 
string $filter_cmd = 'applyFilter'
 
string $reset_cmd = 'resetFilter'
 
int $filter_cols = 5
 
bool $ext_sort = false
 
bool $ext_seg = false
 
string $context = ""
 
array $mi_sel_buttons = []
 
bool $disable_filter_hiding = false
 
bool $top_commands = true
 
array $selectable_columns = array()
 
array $selected_column = array()
 
bool $show_templates = false
 
bool $show_rows_selector = true
 
bool $rows_selector_off = false
 
bool $nav_determined = false
 
bool $limit_determined = false
 
bool $filters_determined = false
 
bool $columns_determined = false
 
bool $open_form_tag = true
 
bool $close_form_tag = true
 
array $export_formats = []
 
int $export_mode = 0
 
bool $print_mode = false
 
bool $enable_command_for_all = false
 
bool $restore_filter = false
 
array $restore_filter_values = []
 
bool $default_filter_visibility = false
 
array $sortable_fields = array()
 
bool $prevent_double_submission = true
 
string $row_selector_label = ""
 
bool $select_all_on_top = false
 
array $sel_buttons = []
 
string $nav_value = ''
 
string $noentriestext = ''
 
string $css_row = ''
 
bool $display_as_block = false
 
string $description = ''
 
string $id = ""
 
bool $custom_prev_next = false
 
string $reset_cmd_txt = ""
 
string $defaultorderfield = ""
 
string $defaultorderdirection = ""
 
array $column = []
 
bool $datatable = false
 
bool $num_info = false
 
bool $form_multipart = false
 
array $row_data = []
 
string $order_field = ""
 
array $selected_filter = []
 
string $form_action = ""
 
string $formname = ""
 
string $sort_order = ""
 
array $buttons = []
 
array $multi = []
 
array $hidden_inputs = []
 
array $header_commands = []
 
string $row_template = ""
 
string $row_template_dir = ""
 
string $filter_cmd_txt = ""
 
string $custom_prev = ""
 
string $custom_next = ""
 
array $raw_post_data = null
 
ilGlobalTemplateInterface $main_tpl
 
- Protected Attributes inherited from ilTableGUI
string $sort_order
 
string $link_params
 
array $header_params
 
 $tpl
 
ilLanguage $lng
 

Private Member Functions

 addFinishTestButton ()
 

Private Attributes

bool $user_has_attempts_left = true
 
array $command_buttons = []
 
Interruptive $finish_test_modal
 

Additional Inherited Members

- Static Public Member Functions inherited from ilTable2GUI
static getAllCommandLimit ()
 
- Static Public Member Functions inherited from ilTableGUI
static linkbar (string $AScript, int $AHits, int $ALimit, int $AOffset, array $AParams=array(), array $ALayout=array(), string $prefix='')
 
- Data Fields inherited from ilTable2GUI
const FILTER_TEXT = 1
 
const FILTER_SELECT = 2
 
const FILTER_DATE = 3
 
const FILTER_LANGUAGE = 4
 
const FILTER_NUMBER_RANGE = 5
 
const FILTER_DATE_RANGE = 6
 
const FILTER_DURATION_RANGE = 7
 
const FILTER_DATETIME_RANGE = 8
 
const FILTER_CHECKBOX = 9
 
const EXPORT_EXCEL = 1
 
const EXPORT_CSV = 2
 
const ACTION_ALL_LIMIT = 1000
 
- Data Fields inherited from ilTableGUI
string $title = ""
 
string $icon = ""
 
string $icon_alt = ""
 
string $help_page = ""
 
string $help_icon = ""
 
string $help_icon_alt = ""
 
array $header_names = []
 
array $header_vars = []
 
array $linkbar_vars = []
 
array $data = []
 
int $column_count = 0
 
array $column_width = []
 
int $max_count = 0
 
int $limit = 0
 
bool $max_limit = false
 
int $offset = 0
 
string $order_column = ""
 
string $order_direction = ""
 
string $footer_style = ""
 
string $footer_previous = ""
 
string $footer_next = ""
 
bool $lang_support = true
 
bool $global_tpl = false
 
string $form_name = ""
 
string $select_all_checkbox = ""
 
array $action_buttons = []
 
string $prefix = ""
 
string $base = ""
 
array $enabled
 
array $styles
 
- Protected Member Functions inherited from ilTable2GUI
 getRequestedValues ()
 
 prepareOutput ()
 Anything that must be done before HTML is generated. More...
 
 isFilterVisible ()
 Check if filter is visible: manually shown (session, db) or default value set. More...
 
 isAdvMDFilter (ilAdvancedMDRecordGUI $a_gui, ilTableFilterItem $a_element)
 Check if filter element is based on adv md. More...
 
 fillRow (array $a_set)
 Standard Version of Fill Row. More...
 
 getFilterValue (ilTableFilterItem $a_item)
 Get current filter value. More...
 
 setFilterValue (ilTableFilterItem $a_item, $a_value)
 
 fillMetaExcel (ilExcel $a_excel, int &$a_row)
 Add meta information to excel export. More...
 
 fillHeaderExcel (ilExcel $a_excel, int &$a_row)
 Excel Version of Fill Header. More...
 
 fillRowExcel (ilExcel $a_excel, int &$a_row, array $a_set)
 Excel Version of Fill Row. More...
 
 fillMetaCSV (ilCSVWriter $a_csv)
 Add meta information to csv export. More...
 
 fillHeaderCSV (ilCSVWriter $a_csv)
 CSV Version of Fill Header. More...
 
 fillRowCSV (ilCSVWriter $a_csv, array $a_set)
 CSV Version of Fill Row. More...
 

Detailed Description

Author
Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..de
Version
$Id$

Definition at line 34 of file class.ilListOfQuestionsTableGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilListOfQuestionsTableGUI::__construct ( ilTestPlayerAbstractGUI  $parent_obj,
string  $parent_cmd,
private UIFactory  $ui_factory,
private UIRenderer  $ui_renderer 
)

Definition at line 50 of file class.ilListOfQuestionsTableGUI.php.

References ILIAS\MetaData\Repository\Validation\Data\__construct(), ILIAS\Repository\ctrl(), ilTableGUI\disable(), ilTableGUI\enable(), ilTable2GUI\setFormAction(), ilTable2GUI\setFormName(), ilTable2GUI\setLimit(), ilTable2GUI\setRowTemplate(), and ilTableGUI\setStyle().

55  {
56  parent::__construct($parent_obj, $parent_cmd);
57 
58  $this->setFormName('listofquestions');
59  $this->setStyle('table', 'fullwidth');
60 
61  $this->setRowTemplate("tpl.il_as_tst_list_of_questions_row.html", "Modules/Test");
62 
63  $this->setLimit(999);
64 
65  $this->setFormAction($this->ctrl->getFormAction($parent_obj, $parent_cmd));
66 
67  $this->enable('header');
68  $this->disable('sort');
69  $this->disable('select_all');
70  }
enable(string $a_module_name)
setFormAction(string $a_form_action, bool $a_multipart=false)
setFormName(string $a_name="")
setStyle(string $a_element, string $a_style)
__construct(VocabulariesInterface $vocabularies)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setLimit(int $a_limit=0, int $a_default_limit=0)
disable(string $a_module_name)
+ Here is the call graph for this function:

Member Function Documentation

◆ addFinishTestButton()

ilListOfQuestionsTableGUI::addFinishTestButton ( )
private

Definition at line 129 of file class.ilListOfQuestionsTableGUI.php.

References $message, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and userHasAttemptsLeft().

Referenced by init().

129  : void
130  {
131 
132  // Examview enabled & !reviewed & requires_confirmation? test_submission_overview (review gui)
133  if ($this->parent_obj->getObject()->getMainSettings()->getFinishingSettings()->getShowAnswerOverview()) {
134  $this->command_buttons[] = $this->ui_factory->button()->standard(
135  $this->lng->txt('finish_test'),
136  $this->ctrl->getLinkTargetByClass('ilTestSubmissionReviewGUI', 'show')
137  );
138  return;
139  }
140 
141  $message = $this->lng->txt('tst_finish_confirmation_question_no_attempts_left');
142  if ($this->userHasAttemptsLeft()) {
143  $message = $this->lng->txt('tst_finish_confirmation_question');
144  }
145 
146  $this->finish_test_modal = $this->parent_obj->buildFinishTestModal();
147 
148  $this->command_buttons[] = $this->ui_factory->button()->standard($this->lng->txt('finish_test'), '')
149  ->withOnClick($this->finish_test_modal->getShowSignal());
150  }
$message
Definition: xapiexit.php:32
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ areObligationsNotAnswered()

ilListOfQuestionsTableGUI::areObligationsNotAnswered ( )

Definition at line 292 of file class.ilListOfQuestionsTableGUI.php.

References $obligationsNotAnswered.

Referenced by init().

292  : bool
293  {
295  }
+ Here is the caller graph for this function:

◆ fillRow()

ilListOfQuestionsTableGUI::fillRow ( array  $a_set)

Definition at line 169 of file class.ilListOfQuestionsTableGUI.php.

References ILIAS\Repository\ctrl(), ilUtil\getImagePath(), ilUtil\img(), isShowMarkerEnabled(), isShowObligationsEnabled(), isShowPointsEnabled(), ILIAS\Repository\lng(), ilLegacyFormElementsUtil\prepareFormOutput(), and ilTestPlayerCommands\SHOW_QUESTION.

169  : void
170  {
171  if ($this->isShowPointsEnabled()) {
172  $this->tpl->setCurrentBlock('points');
173  $this->tpl->setVariable("POINTS", $a_set['points'] . ' ' . $this->lng->txt("points_short"));
174  $this->tpl->parseCurrentBlock();
175  }
176  if (strlen($a_set['description'])) {
177  $this->tpl->setCurrentBlock('description');
178  $this->tpl->setVariable("DESCRIPTION", ilLegacyFormElementsUtil::prepareFormOutput($a_set['description']));
179  $this->tpl->parseCurrentBlock();
180  }
181  if ($this->isShowMarkerEnabled()) {
182  if ($a_set['marked']) {
183  $this->tpl->setCurrentBlock('marked_img');
184  $this->tpl->setVariable(
185  "HREF_MARKED",
186  ilUtil::img(
187  ilUtil::getImagePath('object/marked.svg'),
188  $this->lng->txt("tst_question_marked"),
189  '24px',
190  '24px'
191  )
192  );
193  $this->tpl->parseCurrentBlock();
194  } else {
195  $this->tpl->touchBlock('marker');
196  }
197  }
198  if ($this->isShowObligationsEnabled()) {
199  // obligatory answer status
200  if (false) {
201  $value = ' ';
202  if ($a_set['isAnswered']) {
203  $value = $this->lng->txt("yes");
204  }
205  $this->tpl->setCurrentBlock('answered_col');
206  $this->tpl->setVariable('ANSWERED', $value);
207  $this->tpl->parseCurrentBlock();
208  }
209 
210  // obligatory icon
211  if ($a_set["obligatory"]) {
212  $obligatory = $this->ui_renderer->render(
213  $this->ui_factory->symbol()->icon()->custom(
214  ilUtil::getImagePath('standard/icon_alert.svg'),
215  $this->lng->txt('question_obligatory')
216  )
217  );
218  } else {
219  $obligatory = '';
220  }
221  $this->tpl->setVariable("QUESTION_OBLIGATORY", $obligatory);
222  }
223 
224  $postponed = (
225  $a_set['postponed'] ? $this->lng->txt('postponed') : ''
226  );
227 
228  if ($a_set['disabled']) {
229  $this->tpl->setCurrentBlock('static_title');
230  $this->tpl->setVariable("STATIC_TITLE", ilLegacyFormElementsUtil::prepareFormOutput($a_set['title']));
231  $this->tpl->parseCurrentBlock();
232  } else {
233  $this->ctrl->setParameter($this->parent_obj, 'sequence', $a_set['sequence']);
234  $this->ctrl->setParameter($this->parent_obj, 'pmode', '');
235  $href = $this->ctrl->getLinkTarget($this->parent_obj, ilTestPlayerCommands::SHOW_QUESTION);
236 
237  $this->tpl->setCurrentBlock('linked_title');
238  $this->tpl->setVariable("LINKED_TITLE", ilLegacyFormElementsUtil::prepareFormOutput($a_set['title']));
239  $this->tpl->setVariable("HREF", $href);
240  $this->tpl->parseCurrentBlock();
241  }
242 
243  $this->tpl->setVariable("ORDER", $a_set['order']);
244  $this->tpl->setVariable("POSTPONED", $postponed);
245  if ($a_set["worked_through"]) {
246  $this->tpl->setVariable("WORKED_THROUGH", $this->lng->txt("yes"));
247  } else {
248  $this->tpl->setVariable("WORKED_THROUGH", ' ');
249  }
250  }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static prepareFormOutput($a_str, bool $a_strip=false)
static img(string $a_src, ?string $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
+ Here is the call graph for this function:

◆ getHTML()

ilListOfQuestionsTableGUI::getHTML ( )

Definition at line 152 of file class.ilListOfQuestionsTableGUI.php.

References $finish_test_modal.

152  : string
153  {
154  foreach ($this->command_buttons as $top_item) {
155  $this->tpl->setCurrentBlock('tbl_header_html');
156  $this->tpl->setVariable(
157  "HEADER_HTML",
158  $this->ui_renderer->render($top_item)
159  );
160  $this->tpl->parseCurrentBlock();
161  }
162 
163  $finish_test_modal = isset($this->finish_test_modal)
164  ? $this->ui_renderer->render($this->finish_test_modal) : '';
165 
166  return parent::getHTML() . $finish_test_modal;
167  }

◆ init()

ilListOfQuestionsTableGUI::init ( )

Definition at line 72 of file class.ilListOfQuestionsTableGUI.php.

References ilTable2GUI\addColumn(), addFinishTestButton(), areObligationsNotAnswered(), ILIAS\Repository\ctrl(), isFinishTestButtonEnabled(), isObligationsFilterEnabled(), isShowMarkerEnabled(), isShowObligationsEnabled(), isShowPointsEnabled(), ILIAS\Repository\lng(), ilTable2GUI\setTitle(), and ilTestPlayerCommands\SHOW_QUESTION.

72  : void
73  {
74  // table title
75 
76  if ($this->isObligationsFilterEnabled()) {
77  $this->setTitle($this->lng->txt('obligations_summary'));
78  } else {
79  $this->setTitle($this->lng->txt('question_summary'));
80  }
81 
82  // columns
83 
84  $this->addColumn($this->lng->txt("tst_qst_order"), 'order', '');
85  $this->addColumn($this->lng->txt("tst_question_title"), 'title', '');
86 
87  if ($this->isShowObligationsEnabled()) {
88  $this->addColumn($this->lng->txt("obligatory"), 'obligatory', '');
89  }
90 
91  $this->addColumn('', 'postponed', '');
92 
93  if ($this->isShowPointsEnabled()) {
94  $this->addColumn($this->lng->txt("tst_maximum_points"), 'points', '');
95  }
96 
97  #$this->addColumn($this->lng->txt("worked_through"),'worked_through', '');
98  $this->addColumn($this->lng->txt("answered"), 'answered', '');
99 
100  if (false && $this->isShowObligationsEnabled()) {
101  $this->addColumn($this->lng->txt("answered"), 'answered', '');
102  }
103 
104  if ($this->isShowMarkerEnabled()) {
105  $this->addColumn($this->lng->txt("tst_question_marker"), 'marked', '');
106  }
107 
108  // command buttons
109  $this->command_buttons[] = $this->ui_factory->button()->standard(
110  $this->lng->txt('tst_resume_test'),
111  $this->ctrl->getLinkTarget($this->parent_obj, ilTestPlayerCommands::SHOW_QUESTION)
112  );
113 
114  if (!$this->areObligationsNotAnswered() && $this->isFinishTestButtonEnabled()) {
115  $this->addFinishTestButton();
116  }
117  }
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
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)
+ Here is the call graph for this function:

◆ isFinishTestButtonEnabled()

ilListOfQuestionsTableGUI::isFinishTestButtonEnabled ( )

Definition at line 302 of file class.ilListOfQuestionsTableGUI.php.

References $finishTestButtonEnabled.

Referenced by init().

302  : bool
303  {
305  }
+ Here is the caller graph for this function:

◆ isObligationsFilterEnabled()

ilListOfQuestionsTableGUI::isObligationsFilterEnabled ( )

Definition at line 282 of file class.ilListOfQuestionsTableGUI.php.

References $obligationsFilterEnabled.

Referenced by init().

282  : bool
283  {
285  }
+ Here is the caller graph for this function:

◆ isShowMarkerEnabled()

ilListOfQuestionsTableGUI::isShowMarkerEnabled ( )

Definition at line 262 of file class.ilListOfQuestionsTableGUI.php.

References $showMarkerEnabled.

Referenced by fillRow(), and init().

262  : bool
263  {
265  }
+ Here is the caller graph for this function:

◆ isShowObligationsEnabled()

ilListOfQuestionsTableGUI::isShowObligationsEnabled ( )

Definition at line 272 of file class.ilListOfQuestionsTableGUI.php.

References $showObligationsEnabled.

Referenced by fillRow(), and init().

272  : bool
273  {
275  }
+ Here is the caller graph for this function:

◆ isShowPointsEnabled()

ilListOfQuestionsTableGUI::isShowPointsEnabled ( )

Definition at line 252 of file class.ilListOfQuestionsTableGUI.php.

References $showPointsEnabled.

Referenced by fillRow(), and init().

252  : bool
253  {
255  }
+ Here is the caller graph for this function:

◆ setFinishTestButtonEnabled()

ilListOfQuestionsTableGUI::setFinishTestButtonEnabled ( bool  $finishTestButtonEnabled)

Definition at line 307 of file class.ilListOfQuestionsTableGUI.php.

References $finishTestButtonEnabled.

307  : void
308  {
309  $this->finishTestButtonEnabled = $finishTestButtonEnabled;
310  }

◆ setObligationsFilterEnabled()

ilListOfQuestionsTableGUI::setObligationsFilterEnabled (   $obligationsFilterEnabled)

Definition at line 287 of file class.ilListOfQuestionsTableGUI.php.

References $obligationsFilterEnabled.

287  : void
288  {
289  $this->obligationsFilterEnabled = $obligationsFilterEnabled;
290  }

◆ setObligationsNotAnswered()

ilListOfQuestionsTableGUI::setObligationsNotAnswered (   $obligationsNotAnswered)

Definition at line 297 of file class.ilListOfQuestionsTableGUI.php.

References $obligationsNotAnswered.

297  : void
298  {
299  $this->obligationsNotAnswered = $obligationsNotAnswered;
300  }

◆ setShowMarkerEnabled()

ilListOfQuestionsTableGUI::setShowMarkerEnabled (   $showMarkerEnabled)

Definition at line 267 of file class.ilListOfQuestionsTableGUI.php.

References $showMarkerEnabled.

267  : void
268  {
269  $this->showMarkerEnabled = $showMarkerEnabled;
270  }

◆ setShowObligationsEnabled()

ilListOfQuestionsTableGUI::setShowObligationsEnabled (   $showObligationsEnabled)

Definition at line 277 of file class.ilListOfQuestionsTableGUI.php.

References $showObligationsEnabled.

277  : void
278  {
279  $this->showObligationsEnabled = $showObligationsEnabled;
280  }

◆ setShowPointsEnabled()

ilListOfQuestionsTableGUI::setShowPointsEnabled (   $showPointsEnabled)

Definition at line 257 of file class.ilListOfQuestionsTableGUI.php.

References $showPointsEnabled.

257  : void
258  {
259  $this->showPointsEnabled = $showPointsEnabled;
260  }

◆ setUserHasAttemptsLeft()

ilListOfQuestionsTableGUI::setUserHasAttemptsLeft ( bool  $user_has_attempts_left)

Definition at line 124 of file class.ilListOfQuestionsTableGUI.php.

References $user_has_attempts_left.

124  : void
125  {
126  $this->user_has_attempts_left = $user_has_attempts_left;
127  }

◆ userHasAttemptsLeft()

ilListOfQuestionsTableGUI::userHasAttemptsLeft ( )

Definition at line 119 of file class.ilListOfQuestionsTableGUI.php.

References $user_has_attempts_left.

Referenced by addFinishTestButton().

119  : bool
120  {
122  }
+ Here is the caller graph for this function:

Field Documentation

◆ $command_buttons

array ilListOfQuestionsTableGUI::$command_buttons = []
private

Definition at line 38 of file class.ilListOfQuestionsTableGUI.php.

◆ $finish_test_modal

Interruptive ilListOfQuestionsTableGUI::$finish_test_modal
private

Definition at line 39 of file class.ilListOfQuestionsTableGUI.php.

Referenced by getHTML().

◆ $finishTestButtonEnabled

bool ilListOfQuestionsTableGUI::$finishTestButtonEnabled = false
protected

◆ $obligationsFilterEnabled

bool ilListOfQuestionsTableGUI::$obligationsFilterEnabled = false
protected

◆ $obligationsNotAnswered

bool ilListOfQuestionsTableGUI::$obligationsNotAnswered = false
protected

◆ $showMarkerEnabled

bool ilListOfQuestionsTableGUI::$showMarkerEnabled = false
protected

◆ $showObligationsEnabled

bool ilListOfQuestionsTableGUI::$showObligationsEnabled = false
protected

◆ $showPointsEnabled

bool ilListOfQuestionsTableGUI::$showPointsEnabled = false
protected

◆ $user_has_attempts_left

bool ilListOfQuestionsTableGUI::$user_has_attempts_left = true
private

The documentation for this class was generated from the following file: