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

Public Member Functions

 __construct (ilParticipantsTestResultsGUI $parent_obj, string $parent_cmd, private UIFactory $ui_factory, private UIRenderer $ui_renderer)
 
 isAccessResultsCommandsEnabled ()
 
 setAccessResultsCommandsEnabled (bool $accessResultsCommandsEnabled)
 
 isManageResultsCommandsEnabled ()
 
 setManageResultsCommandsEnabled (bool $manageResultsCommandsEnabled)
 
 setAnonymity (bool $anonymity)
 
 numericOrdering (string $a_field)
 
 init ()
 
 initColumns ()
 
 initCommands ()
 
 fillRow (array $a_set)
 
- 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 Member Functions

 buildActionsMenu (array $data)
 
 isActionsColumnRequired ()
 
 isMultiRowSelectionRequired ()
 
 buildPassedStatusString (array $data)
 
 buildPassedIcon ()
 
 buildFailedIcon ()
 
 buildImageIcon (string $icon_name, string $label)
 
 buildFormattedAccessDate (array $data)
 
 buildScoredPassString (array $data)
 
 buildScoredPassFinishedString (array $data)
 
 buildAnsweredQuestionsString (array $data)
 
 buildReachedPointsString (array $data)
 
 buildMarkString (array $data)
 
 buildPercentResultString (array $data)
 
- 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...
 

Protected Attributes

bool $accessResultsCommandsEnabled = false
 
bool $manageResultsCommandsEnabled = false
 
bool $anonymity = false
 
bool $is_score_last_pass
 
- 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

 getAnonymity ()
 

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
 

Detailed Description

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

Definition at line 32 of file class.ilParticipantsTestResultsTableGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilParticipantsTestResultsTableGUI::__construct ( ilParticipantsTestResultsGUI  $parent_obj,
string  $parent_cmd,
private UIFactory  $ui_factory,
private UIRenderer  $ui_renderer 
)

Definition at line 41 of file class.ilParticipantsTestResultsTableGUI.php.

References ILIAS\MetaData\Repository\Validation\Data\__construct(), ILIAS\Repository\ctrl(), ilTableGUI\enable(), ilParticipantsTestResultsGUI\getTestObj(), SCORE_LAST_PASS, ilTable2GUI\setDefaultOrderDirection(), ilTable2GUI\setDefaultOrderField(), ilTable2GUI\setFormAction(), ilTable2GUI\setFormName(), ilTable2GUI\setId(), ilTable2GUI\setRowTemplate(), ilTable2GUI\setSelectAllCheckbox(), and ilTableGUI\setStyle().

46  {
47  $this->setId('tst_participants_' . $parent_obj->getTestObj()->getRefId());
48  parent::__construct($parent_obj, $parent_cmd);
49 
50  $this->is_score_last_pass = $parent_obj->getTestObj()->getScoreSettings()
51  ->getScoringSettings()->getPassScoring() === SCORE_LAST_PASS;
52 
53  $this->setStyle('table', 'fullwidth');
54 
55  $this->setFormName('partResultsForm');
56  $this->setFormAction($this->ctrl->getFormAction($parent_obj, $parent_cmd));
57 
58  $this->setRowTemplate("tpl.il_as_tst_scorings_row.html", "Modules/Test");
59 
60  $this->enable('header');
61  $this->enable('sort');
62 
63  $this->setSelectAllCheckbox('chbUser');
64 
65  $this->setDefaultOrderField('name');
66  $this->setDefaultOrderDirection('asc');
67  }
enable(string $a_module_name)
setFormAction(string $a_form_action, bool $a_multipart=false)
const SCORE_LAST_PASS
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
setFormName(string $a_name="")
setId(string $a_val)
setStyle(string $a_element, string $a_style)
__construct(VocabulariesInterface $vocabularies)
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
+ Here is the call graph for this function:

Member Function Documentation

◆ buildActionsMenu()

ilParticipantsTestResultsTableGUI::buildActionsMenu ( array  $data)
protected

Definition at line 183 of file class.ilParticipantsTestResultsTableGUI.php.

References ILIAS\Repository\ctrl(), isAccessResultsCommandsEnabled(), and ILIAS\Repository\lng().

Referenced by fillRow().

183  : string
184  {
185  $this->ctrl->setParameterByClass('iltestevaluationgui', 'active_id', $data['active_id']);
186 
187  $actions = [];
188  if ($this->isAccessResultsCommandsEnabled()) {
189  $resultsHref = $this->ctrl->getLinkTargetByClass([ilTestResultsGUI::class, ilParticipantsTestResultsGUI::class, ilTestEvaluationGUI::class], 'outParticipantsResultsOverview');
190  $actions[] = $this->ui_factory->link()->standard($this->lng->txt('tst_show_results'), $resultsHref);
191  }
192  $dropdown = $this->ui_factory->dropdown()->standard($actions);
193  return $this->ui_renderer->render($dropdown);
194  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildAnsweredQuestionsString()

ilParticipantsTestResultsTableGUI::buildAnsweredQuestionsString ( array  $data)
protected

Definition at line 268 of file class.ilParticipantsTestResultsTableGUI.php.

References ILIAS\Repository\lng().

Referenced by fillRow().

268  : string
269  {
270  return sprintf(
271  $this->lng->txt('tst_answered_questions_of_total'),
272  $data['answered_questions'],
273  $data['total_questions']
274  );
275  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildFailedIcon()

ilParticipantsTestResultsTableGUI::buildFailedIcon ( )
protected

Definition at line 236 of file class.ilParticipantsTestResultsTableGUI.php.

References buildImageIcon(), ilUtil\getImagePath(), and ILIAS\Repository\lng().

Referenced by buildPassedStatusString().

236  : string
237  {
238  return $this->buildImageIcon(ilUtil::getImagePath("standard/icon_not_ok.svg"), $this->lng->txt("failed"));
239  }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildFormattedAccessDate()

ilParticipantsTestResultsTableGUI::buildFormattedAccessDate ( array  $data)
protected

Definition at line 250 of file class.ilParticipantsTestResultsTableGUI.php.

References ilDatePresentation\formatDate(), and IL_CAL_DATETIME.

250  : string
251  {
253  }
const IL_CAL_DATETIME
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
+ Here is the call graph for this function:

◆ buildImageIcon()

ilParticipantsTestResultsTableGUI::buildImageIcon ( string  $icon_name,
string  $label 
)
protected

Definition at line 241 of file class.ilParticipantsTestResultsTableGUI.php.

References ilTableGUI\$icon.

Referenced by buildFailedIcon(), and buildPassedIcon().

241  : string
242  {
243  $icon = $this->ui_factory->symbol()->icon()->custom(
244  $icon_name,
245  $label
246  );
247  return $this->ui_renderer->render($icon);
248  }
+ Here is the caller graph for this function:

◆ buildMarkString()

ilParticipantsTestResultsTableGUI::buildMarkString ( array  $data)
protected

Definition at line 286 of file class.ilParticipantsTestResultsTableGUI.php.

Referenced by fillRow().

286  : string
287  {
288  if ($data['has_unfinished_passes'] && $this->is_score_last_pass) {
289  return '';
290  }
291  return $data['final_mark'];
292  }
+ Here is the caller graph for this function:

◆ buildPassedIcon()

ilParticipantsTestResultsTableGUI::buildPassedIcon ( )
protected

Definition at line 231 of file class.ilParticipantsTestResultsTableGUI.php.

References buildImageIcon(), ilUtil\getImagePath(), and ILIAS\Repository\lng().

Referenced by buildPassedStatusString().

231  : string
232  {
233  return $this->buildImageIcon(ilUtil::getImagePath("standard/icon_ok.svg"), $this->lng->txt("passed"));
234  }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildPassedStatusString()

ilParticipantsTestResultsTableGUI::buildPassedStatusString ( array  $data)
protected

Definition at line 218 of file class.ilParticipantsTestResultsTableGUI.php.

References buildFailedIcon(), buildPassedIcon(), and ILIAS\Repository\lng().

Referenced by fillRow().

218  : string
219  {
220  if ($data['has_unfinished_passes'] && $this->is_score_last_pass) {
221  return '';
222  }
223 
224  if ($data['passed_status']) {
225  return $this->buildPassedIcon() . ' ' . $this->lng->txt('tst_passed');
226  }
227 
228  return $this->buildFailedIcon() . ' ' . $this->lng->txt('tst_failed');
229  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildPercentResultString()

ilParticipantsTestResultsTableGUI::buildPercentResultString ( array  $data)
protected

Definition at line 294 of file class.ilParticipantsTestResultsTableGUI.php.

Referenced by fillRow().

294  : string
295  {
296  return sprintf('%0.2f %%', $data['percent_result'] * 100);
297  }
+ Here is the caller graph for this function:

◆ buildReachedPointsString()

ilParticipantsTestResultsTableGUI::buildReachedPointsString ( array  $data)
protected

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

References ILIAS\Repository\lng().

Referenced by fillRow().

277  : string
278  {
279  return sprintf(
280  $this->lng->txt('tst_reached_points_of_max'),
281  $data['reached_points'],
282  $data['max_points']
283  );
284  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildScoredPassFinishedString()

ilParticipantsTestResultsTableGUI::buildScoredPassFinishedString ( array  $data)
protected

Definition at line 260 of file class.ilParticipantsTestResultsTableGUI.php.

References ilDatePresentation\formatDate(), and IL_CAL_UNIX.

Referenced by fillRow().

260  : string
261  {
262  if (isset($data['scored_pass_finished_timestamp'])) {
263  return ilDatePresentation::formatDate(new ilDateTime($data['scored_pass_finished_timestamp'], IL_CAL_UNIX));
264  }
265  return '';
266  }
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
const IL_CAL_UNIX
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildScoredPassString()

ilParticipantsTestResultsTableGUI::buildScoredPassString ( array  $data)
protected

Definition at line 255 of file class.ilParticipantsTestResultsTableGUI.php.

References ILIAS\Repository\lng().

Referenced by fillRow().

255  : string
256  {
257  return $this->lng->txt('pass') . ' ' . ($data['scored_pass'] + 1);
258  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillRow()

ilParticipantsTestResultsTableGUI::fillRow ( array  $a_set)

Definition at line 154 of file class.ilParticipantsTestResultsTableGUI.php.

References buildActionsMenu(), buildAnsweredQuestionsString(), buildMarkString(), buildPassedStatusString(), buildPercentResultString(), buildReachedPointsString(), buildScoredPassFinishedString(), buildScoredPassString(), isActionsColumnRequired(), and isMultiRowSelectionRequired().

154  : void
155  {
156  if ($this->isMultiRowSelectionRequired()) {
157  $this->tpl->setCurrentBlock('checkbox_column');
158  $this->tpl->setVariable("CHB_ROW_KEY", $a_set['active_id']);
159  $this->tpl->parseCurrentBlock();
160  }
161 
162  if ($this->isActionsColumnRequired()) {
163  $this->tpl->setCurrentBlock('actions_column');
164  $this->tpl->setVariable('ACTIONS', $this->buildActionsMenu($a_set));
165  $this->tpl->parseCurrentBlock();
166  }
167 
168  $this->tpl->setVariable("ROW_KEY", $a_set['active_id']);
169  $this->tpl->setVariable("LOGIN", $a_set['login']);
170  $this->tpl->setVariable("FULLNAME", $a_set['name']);
171 
172  $this->tpl->setVariable("SCORED_PASS", $this->buildScoredPassString($a_set));
173  $this->tpl->setVariable("SCORED_PASS_FINISHED", $this->buildScoredPassFinishedString($a_set));
174 
175  $this->tpl->setVariable("ANSWERED_QUESTIONS", $this->buildAnsweredQuestionsString($a_set));
176  $this->tpl->setVariable("REACHED_POINTS", $this->buildReachedPointsString($a_set));
177  $this->tpl->setVariable("PERCENT_RESULT", $this->buildPercentResultString($a_set));
178 
179  $this->tpl->setVariable("PASSED_STATUS", $this->buildPassedStatusString($a_set));
180  $this->tpl->setVariable("FINAL_MARK", $this->buildMarkString($a_set));
181  }
+ Here is the call graph for this function:

◆ getAnonymity()

ilParticipantsTestResultsTableGUI::getAnonymity ( )
private

Definition at line 89 of file class.ilParticipantsTestResultsTableGUI.php.

References $anonymity.

Referenced by initCommands(), and isMultiRowSelectionRequired().

+ Here is the caller graph for this function:

◆ init()

ilParticipantsTestResultsTableGUI::init ( )

Definition at line 106 of file class.ilParticipantsTestResultsTableGUI.php.

References initColumns(), initCommands(), ilTable2GUI\initFilter(), isMultiRowSelectionRequired(), and ilTable2GUI\setShowRowsSelector().

106  : void
107  {
108  if ($this->isMultiRowSelectionRequired()) {
109  $this->setShowRowsSelector(true);
110  }
111 
112  $this->initColumns();
113  $this->initCommands();
114  $this->initFilter();
115  }
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
+ Here is the call graph for this function:

◆ initColumns()

ilParticipantsTestResultsTableGUI::initColumns ( )

Definition at line 117 of file class.ilParticipantsTestResultsTableGUI.php.

References ilTable2GUI\addColumn(), isActionsColumnRequired(), isMultiRowSelectionRequired(), and ILIAS\Repository\lng().

Referenced by init().

117  : void
118  {
119  if ($this->isMultiRowSelectionRequired()) {
120  $this->addColumn('', '', '1%', true);
121  }
122 
123  $this->addColumn($this->lng->txt("name"), 'name');
124  $this->addColumn($this->lng->txt("login"), 'login');
125 
126  $this->addColumn($this->lng->txt("tst_tbl_col_scored_pass"), 'scored_pass');
127  $this->addColumn($this->lng->txt("tst_tbl_col_pass_finished"), 'scored_pass_finished_timestamp');
128 
129  $this->addColumn($this->lng->txt("tst_tbl_col_answered_questions"), 'answered_questions');
130  $this->addColumn($this->lng->txt("tst_tbl_col_reached_points"), 'reached_points');
131  $this->addColumn($this->lng->txt("tst_tbl_col_percent_result"), 'percent_result');
132 
133  $this->addColumn($this->lng->txt("tst_tbl_col_passed_status"), 'passed_status');
134  $this->addColumn($this->lng->txt("tst_tbl_col_final_mark"), 'final_mark');
135 
136  if ($this->isActionsColumnRequired()) {
137  $this->addColumn($this->lng->txt('actions'), '', '');
138  }
139  }
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:
+ Here is the caller graph for this function:

◆ initCommands()

ilParticipantsTestResultsTableGUI::initCommands ( )

Definition at line 141 of file class.ilParticipantsTestResultsTableGUI.php.

References ilTable2GUI\addMultiCommand(), getAnonymity(), isAccessResultsCommandsEnabled(), isManageResultsCommandsEnabled(), and ILIAS\Repository\lng().

Referenced by init().

141  : void
142  {
143  if ($this->isAccessResultsCommandsEnabled() && !$this->getAnonymity()) {
144  $this->addMultiCommand('showPassOverview', $this->lng->txt('show_pass_overview'));
145  $this->addMultiCommand('showUserAnswers', $this->lng->txt('show_user_answers'));
146  $this->addMultiCommand('showDetailedResults', $this->lng->txt('show_detailed_results'));
147  }
148 
149  if ($this->isManageResultsCommandsEnabled()) {
150  $this->addMultiCommand('deleteSingleUserResults', $this->lng->txt('delete_user_data'));
151  }
152  }
addMultiCommand(string $a_cmd, string $a_text)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isAccessResultsCommandsEnabled()

ilParticipantsTestResultsTableGUI::isAccessResultsCommandsEnabled ( )

◆ isActionsColumnRequired()

ilParticipantsTestResultsTableGUI::isActionsColumnRequired ( )
protected

Definition at line 196 of file class.ilParticipantsTestResultsTableGUI.php.

References isAccessResultsCommandsEnabled().

Referenced by fillRow(), and initColumns().

196  : bool
197  {
198  if ($this->isAccessResultsCommandsEnabled()) {
199  return true;
200  }
201 
202  return false;
203  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isManageResultsCommandsEnabled()

ilParticipantsTestResultsTableGUI::isManageResultsCommandsEnabled ( )

Definition at line 79 of file class.ilParticipantsTestResultsTableGUI.php.

References $manageResultsCommandsEnabled.

Referenced by initCommands(), and isMultiRowSelectionRequired().

+ Here is the caller graph for this function:

◆ isMultiRowSelectionRequired()

ilParticipantsTestResultsTableGUI::isMultiRowSelectionRequired ( )
protected

Definition at line 205 of file class.ilParticipantsTestResultsTableGUI.php.

References getAnonymity(), isAccessResultsCommandsEnabled(), and isManageResultsCommandsEnabled().

Referenced by fillRow(), init(), and initColumns().

205  : bool
206  {
207  if ($this->isAccessResultsCommandsEnabled() && !$this->getAnonymity()) {
208  return true;
209  }
210 
211  if ($this->isManageResultsCommandsEnabled()) {
212  return true;
213  }
214 
215  return false;
216  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ numericOrdering()

ilParticipantsTestResultsTableGUI::numericOrdering ( string  $a_field)

Definition at line 99 of file class.ilParticipantsTestResultsTableGUI.php.

99  : bool
100  {
101  return in_array($a_field, array(
102  'scored_pass', 'answered_questions', 'reached_points', 'percent_result'
103  ));
104  }

◆ setAccessResultsCommandsEnabled()

ilParticipantsTestResultsTableGUI::setAccessResultsCommandsEnabled ( bool  $accessResultsCommandsEnabled)

Definition at line 74 of file class.ilParticipantsTestResultsTableGUI.php.

References $accessResultsCommandsEnabled.

74  : void
75  {
76  $this->accessResultsCommandsEnabled = $accessResultsCommandsEnabled;
77  }

◆ setAnonymity()

ilParticipantsTestResultsTableGUI::setAnonymity ( bool  $anonymity)

Definition at line 94 of file class.ilParticipantsTestResultsTableGUI.php.

References $anonymity.

94  : void
95  {
96  $this->anonymity = $anonymity;
97  }

◆ setManageResultsCommandsEnabled()

ilParticipantsTestResultsTableGUI::setManageResultsCommandsEnabled ( bool  $manageResultsCommandsEnabled)

Definition at line 84 of file class.ilParticipantsTestResultsTableGUI.php.

References $manageResultsCommandsEnabled.

84  : void
85  {
86  $this->manageResultsCommandsEnabled = $manageResultsCommandsEnabled;
87  }

Field Documentation

◆ $accessResultsCommandsEnabled

bool ilParticipantsTestResultsTableGUI::$accessResultsCommandsEnabled = false
protected

◆ $anonymity

bool ilParticipantsTestResultsTableGUI::$anonymity = false
protected

Definition at line 37 of file class.ilParticipantsTestResultsTableGUI.php.

Referenced by getAnonymity(), and setAnonymity().

◆ $is_score_last_pass

bool ilParticipantsTestResultsTableGUI::$is_score_last_pass
protected

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

◆ $manageResultsCommandsEnabled

bool ilParticipantsTestResultsTableGUI::$manageResultsCommandsEnabled = false
protected

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