ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilEvaluationAllTableGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilEvaluationAllTableGUI:
+ Collaboration diagram for ilEvaluationAllTableGUI:

Public Member Functions

 __construct ($a_parent_obj, $a_parent_cmd, $anonymity=false, $offeringQuestionHintsEnabled=false)
 
 numericOrdering (string $a_field)
 Should this field be sorted numeric? More...
 
 getSelectableColumns ()
 
 initFilter ()
 Init filter. More...
 
 getSelectedColumns ()
 
- 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

 fillRow (array $a_set)
 Standard Version of Fill Row. More...
 
 getCountryTranslation ($countryCode)
 
 isFieldEnabledEnoughByAdministration ($fieldIdentifier)
 
- 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

 $anonymity
 
 $offeringQuestionHintsEnabled = null
 
- 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
 

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

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning TableGUI class for evaluation of all users

Author
Helmut Schottmüller helmu.nosp@m.t.sc.nosp@m.hottm.nosp@m.uell.nosp@m.er@ma.nosp@m.c.co.nosp@m.m
Version
$Id$

Definition at line 28 of file class.ilEvaluationAllTableGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilEvaluationAllTableGUI::__construct (   $a_parent_obj,
  $a_parent_cmd,
  $anonymity = false,
  $offeringQuestionHintsEnabled = false 
)

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

References $anonymity, $c, $DIC, ilTableGUI\$lng, $offeringQuestionHintsEnabled, ILIAS\GlobalScreen\Provider\__construct(), ilTable2GUI\addColumn(), ILIAS\Repository\ctrl(), ilTableGUI\enable(), getSelectedColumns(), initFilter(), isFieldEnabledEnoughByAdministration(), ILIAS\Repository\lng(), ilTable2GUI\setDefaultOrderDirection(), ilTable2GUI\setDefaultOrderField(), ilTable2GUI\setFilterCommand(), ilTable2GUI\setFormAction(), ilTable2GUI\setFormName(), ilTable2GUI\setId(), ilTable2GUI\setResetCommand(), ilTable2GUI\setRowTemplate(), ilTableGUI\setStyle(), and ilLanguage\txt().

40  {
41  global $DIC;
42  $ilCtrl = $DIC['ilCtrl'];
43  $lng = $DIC['lng'];
44 
45  $this->setId("tst_eval_all");
46  parent::__construct($a_parent_obj, $a_parent_cmd);
47 
48  $this->lng = $lng;
49  $this->ctrl = $ilCtrl;
50  $this->setFormName('evaluation_all');
51  $this->setStyle('table', 'fullwidth');
52  $this->addColumn($lng->txt("name"), "name", "");
53  $this->addColumn($lng->txt("login"), "login", "");
54 
55  $this->anonymity = $anonymity;
56  $this->offeringQuestionHintsEnabled = $offeringQuestionHintsEnabled;
57 
58  if (!$this->anonymity) {
59  foreach ($this->getSelectedColumns() as $c) {
60  if (strcmp($c, 'gender') == 0) {
61  $this->addColumn($this->lng->txt("gender"), 'gender', '');
62  }
63  if (strcmp($c, 'email') == 0) {
64  $this->addColumn($this->lng->txt("email"), 'email', '');
65  }
66  if (strcmp($c, 'exam_id') == 0 && $this->parent_obj->getObject()->isShowExamIdInTestResultsEnabled()) {
67  $this->addColumn($this->lng->txt("exam_id_label"), 'exam_id', '');
68  }
69  if (strcmp($c, 'institution') == 0) {
70  $this->addColumn($this->lng->txt("institution"), 'institution', '');
71  }
72  if (strcmp($c, 'street') == 0) {
73  $this->addColumn($this->lng->txt("street"), 'street', '');
74  }
75  if (strcmp($c, 'city') == 0) {
76  $this->addColumn($this->lng->txt("city"), 'city', '');
77  }
78  if (strcmp($c, 'zipcode') == 0) {
79  $this->addColumn($this->lng->txt("zipcode"), 'zipcode', '');
80  }
81 
82  if ($this->isFieldEnabledEnoughByAdministration('country') && $c == 'country') {
83  $this->addColumn($this->lng->txt("country"), 'country', '');
84  }
85 
86  if ($this->isFieldEnabledEnoughByAdministration('sel_country') && $c == 'sel_country') {
87  $this->addColumn($this->lng->txt("country"), 'sel_country', '');
88  }
89 
90  if (strcmp($c, 'department') == 0) {
91  $this->addColumn($this->lng->txt("department"), 'department', '');
92  }
93  if (strcmp($c, 'matriculation') == 0) {
94  $this->addColumn($this->lng->txt("matriculation"), 'matriculation', '');
95  }
96  }
97  }
98 
99  $this->addColumn($lng->txt("tst_reached_points"), "reached", "");
100 
101  if ($this->offeringQuestionHintsEnabled) {
102  $this->addColumn($lng->txt("tst_question_hints_requested_hint_count_header"), "hint_count", "");
103  }
104 
105  $this->addColumn($lng->txt("tst_mark"), "mark", "");
106 
107  if ($this->parent_obj->getObject()->getECTSOutput()) {
108  foreach ($this->getSelectedColumns() as $c) {
109  if (strcmp($c, 'ects_grade') == 0) {
110  $this->addColumn($this->lng->txt("ects_grade"), 'ects_grade', '');
111  }
112  }
113  }
114  $this->addColumn($lng->txt("tst_answered_questions"), "answered", "");
115  $this->addColumn($lng->txt("working_time"), "working_time", "");
116  $this->addColumn($lng->txt("detailed_evaluation"), "", "");
117 
118  $this->setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
119  $this->setRowTemplate("tpl.table_evaluation_all.html", "Modules/Test");
120  $this->setDefaultOrderField("name");
121  $this->setDefaultOrderDirection("asc");
122  $this->enable('sort');
123  $this->enable('header');
124 
125  $this->setFilterCommand('filterEvaluation');
126  $this->setResetCommand('resetfilterEvaluation');
127  $this->initFilter();
128 
129  if ($this->isFieldEnabledEnoughByAdministration('sel_country')) {
130  $this->lng->loadLanguageModule('meta');
131  }
132  }
enable(string $a_module_name)
$c
Definition: cli.php:38
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...
setFormAction(string $a_form_action, bool $a_multipart=false)
setResetCommand(string $a_val, string $a_caption="")
setFormName(string $a_name="")
ilLanguage $lng
setId(string $a_val)
global $DIC
Definition: feed.php:28
setStyle(string $a_element, string $a_style)
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setFilterCommand(string $a_val, string $a_caption="")
isFieldEnabledEnoughByAdministration($fieldIdentifier)
setDefaultOrderDirection(string $a_defaultorderdirection)
__construct(Container $dic, ilPlugin $plugin)
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:

Member Function Documentation

◆ fillRow()

ilEvaluationAllTableGUI::fillRow ( array  $a_set)
protected

Standard Version of Fill Row.

Most likely to be overwritten by derived class.

Definition at line 273 of file class.ilEvaluationAllTableGUI.php.

References $c, getCountryTranslation(), getSelectedColumns(), isFieldEnabledEnoughByAdministration(), and ILIAS\Repository\lng().

273  : void
274  {
275  $this->tpl->setVariable("NAME", $a_set['name']);
276  $this->tpl->setVariable("LOGIN", $a_set['login']);
277  foreach ($this->getSelectedColumns() as $c) {
278  if (!$this->anonymity) {
279  if (strcmp($c, 'gender') == 0) {
280  $this->tpl->setCurrentBlock('gender');
281  $this->tpl->setVariable("GENDER", strlen($a_set['gender']) ? $this->lng->txt('gender_' . $a_set['gender']) : ' ');
282  $this->tpl->parseCurrentBlock();
283  }
284  if (strcmp($c, 'email') == 0) {
285  $this->tpl->setCurrentBlock('email');
286  $this->tpl->setVariable("EMAIL", strlen($a_set['email']) ? $a_set['email'] : ' ');
287  $this->tpl->parseCurrentBlock();
288  }
289  if (strcmp($c, 'institution') == 0) {
290  $this->tpl->setCurrentBlock('institution');
291  $this->tpl->setVariable("INSTITUTION", strlen($a_set['institution']) ? $a_set['institution'] : ' ');
292  $this->tpl->parseCurrentBlock();
293  }
294  if (strcmp($c, 'street') == 0) {
295  $this->tpl->setCurrentBlock('street');
296  $this->tpl->setVariable("STREET", strlen($a_set['street']) ? $a_set['street'] : ' ');
297  $this->tpl->parseCurrentBlock();
298  }
299  if (strcmp($c, 'city') == 0) {
300  $this->tpl->setCurrentBlock('city');
301  $this->tpl->setVariable("CITY", strlen($a_set['city']) ? $a_set['city'] : ' ');
302  $this->tpl->parseCurrentBlock();
303  }
304  if (strcmp($c, 'zipcode') == 0) {
305  $this->tpl->setCurrentBlock('zipcode');
306  $this->tpl->setVariable("ZIPCODE", strlen($a_set['zipcode']) ? $a_set['zipcode'] : ' ');
307  $this->tpl->parseCurrentBlock();
308  }
309  if ($this->isFieldEnabledEnoughByAdministration('country') && $c == 'country') {
310  $this->tpl->setCurrentBlock('country');
311  $this->tpl->setVariable("COUNTRY", strlen($a_set['country']) ? $a_set['country'] : ' ');
312  $this->tpl->parseCurrentBlock();
313  }
314  if ($this->isFieldEnabledEnoughByAdministration('sel_country') && $c == 'sel_country') {
315  $this->tpl->setCurrentBlock('country');
316  $this->tpl->setVariable("COUNTRY", strlen($a_set['sel_country']) ? $this->getCountryTranslation($a_set['sel_country']) : ' ');
317  $this->tpl->parseCurrentBlock();
318  }
319  if (strcmp($c, 'department') == 0) {
320  $this->tpl->setCurrentBlock('department');
321  $this->tpl->setVariable("DEPARTMENT", strlen($a_set['department']) ? $a_set['department'] : ' ');
322  $this->tpl->parseCurrentBlock();
323  }
324  if (strcmp($c, 'matriculation') == 0) {
325  $this->tpl->setCurrentBlock('matriculation');
326  $this->tpl->setVariable("MATRICULATION", strlen($a_set['matriculation']) ? $a_set['matriculation'] : ' ');
327  $this->tpl->parseCurrentBlock();
328  }
329  if (strcmp($c, 'exam_id') == 0 && $this->parent_obj->object->isShowExamIdInTestResultsEnabled()) {
330  $this->tpl->setCurrentBlock('exam_id');
331  $examId = is_string($a_set['exam_id']) && strlen($a_set['exam_id']) ? $a_set['exam_id'] : ' ';
332  $this->tpl->setVariable('EXAM_ID', $examId);
333  $this->tpl->parseCurrentBlock();
334  }
335  }
336  if ($this->parent_obj->object->getECTSOutput()) {
337  if (strcmp($c, 'ects_grade') == 0) {
338  $this->tpl->setCurrentBlock('ects_grade');
339  $this->tpl->setVariable("ECTS_GRADE", $a_set['ects_grade']);
340  $this->tpl->parseCurrentBlock();
341  }
342  }
343  }
344  $reachedPercent = !$a_set['max'] ? 0 : $a_set['reached'] / $a_set['max'] * 100;
345  $reached = $a_set['reached'] . " " . strtolower($this->lng->txt("of")) . " " . $a_set['max'] . " (" . sprintf("%2.2f", $reachedPercent) . " %)";
346  $this->tpl->setVariable("REACHED", $reached);
347 
348  if ($this->offeringQuestionHintsEnabled) {
349  $this->tpl->setVariable("HINT_COUNT", $a_set['hint_count']);
350  }
351 
352  $a_set['answered'] = $a_set['questions_worked_through'] . " " . strtolower($this->lng->txt("of")) . " " . $a_set['number_of_questions'] . " (" . sprintf("%2.2f", $a_set['answered']) . " %" . ")";
353 
354  $this->tpl->setVariable("MARK", $a_set['mark']);
355  $this->tpl->setVariable("ANSWERED", $a_set['answered']);
356  $this->tpl->setVariable("WORKING_TIME", $a_set['working_time']);
357  $this->tpl->setVariable("DETAILED", $a_set['details']);
358  }
$c
Definition: cli.php:38
isFieldEnabledEnoughByAdministration($fieldIdentifier)
+ Here is the call graph for this function:

◆ getCountryTranslation()

ilEvaluationAllTableGUI::getCountryTranslation (   $countryCode)
protected

Definition at line 378 of file class.ilEvaluationAllTableGUI.php.

References ILIAS\Repository\lng().

Referenced by fillRow().

379  {
380  return $this->lng->txt('meta_c_' . $countryCode);
381  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSelectableColumns()

ilEvaluationAllTableGUI::getSelectableColumns ( )

Definition at line 160 of file class.ilEvaluationAllTableGUI.php.

References $cols, $DIC, ilTableGUI\$lng, isFieldEnabledEnoughByAdministration(), and ilLanguage\txt().

Referenced by getSelectedColumns(), and ilEvaluationAllTableGUITest\testGetSelectableColumns().

160  : array
161  {
162  global $DIC;
163  $lng = $DIC['lng'];
164  $cols = [];
165  if (!$this->anonymity) {
166  $cols["gender"] = array(
167  "txt" => $lng->txt("gender"),
168  "default" => false
169  );
170  $cols["email"] = array(
171  "txt" => $lng->txt("email"),
172  "default" => false
173  );
174  $cols["institution"] = array(
175  "txt" => $lng->txt("institution"),
176  "default" => false
177  );
178  $cols["street"] = array(
179  "txt" => $lng->txt("street"),
180  "default" => false
181  );
182  $cols["city"] = array(
183  "txt" => $lng->txt("city"),
184  "default" => false
185  );
186  $cols["zipcode"] = array(
187  "txt" => $lng->txt("zipcode"),
188  "default" => false
189  );
190  if ($this->isFieldEnabledEnoughByAdministration('country')) {
191  $cols["country"] = array(
192  "txt" => $lng->txt("country"),
193  "default" => false
194  );
195  }
196  if ($this->isFieldEnabledEnoughByAdministration('sel_country')) {
197  $cols["sel_country"] = array(
198  "txt" => $lng->txt("country"),
199  "default" => false
200  );
201  }
202  $cols["department"] = array(
203  "txt" => $lng->txt("department"),
204  "default" => false
205  );
206  $cols["matriculation"] = array(
207  "txt" => $lng->txt("matriculation"),
208  "default" => false
209  );
210  if ($this->parent_obj->getObject()->isShowExamIdInTestResultsEnabled()) {
211  $cols["exam_id"] = array(
212  "txt" => $lng->txt("exam_id_label"),
213  "default" => false
214  );
215  }
216  }
217  if ($this->parent_obj->getObject()->getECTSOutput()) {
218  $cols["ects_grade"] = array(
219  "txt" => $lng->txt("ects_grade"),
220  "default" => false
221  );
222  }
223  return $cols;
224  }
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...
ilLanguage $lng
global $DIC
Definition: feed.php:28
isFieldEnabledEnoughByAdministration($fieldIdentifier)
$cols
Definition: xhr_table.php:11
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSelectedColumns()

ilEvaluationAllTableGUI::getSelectedColumns ( )

Definition at line 360 of file class.ilEvaluationAllTableGUI.php.

References $cols, ILIAS\LTI\ToolProvider\$key, and getSelectableColumns().

Referenced by __construct(), and fillRow().

360  : array
361  {
362  $scol = parent::getSelectedColumns();
363 
364  $cols = $this->getSelectableColumns();
365  if (!is_array($cols)) {
366  $cols = array();
367  }
368 
369  $fields_to_unset = array_diff(array_keys($scol), array_keys($cols));
370 
371  foreach ($fields_to_unset as $key) {
372  unset($scol[$key]);
373  }
374 
375  return $scol;
376  }
string $key
Consumer key/client ID value.
Definition: System.php:193
$cols
Definition: xhr_table.php:11
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFilter()

ilEvaluationAllTableGUI::initFilter ( )

Init filter.

Definition at line 229 of file class.ilEvaluationAllTableGUI.php.

References $DIC, $ilUser, ilTableGUI\$lng, ilTable2GUI\addFilterItem(), ILIAS\Repository\lng(), and ilLanguage\txt().

Referenced by __construct().

229  : void
230  {
231  global $DIC;
232  $lng = $DIC['lng'];
233  $rbacreview = $DIC['rbacreview'];
234  $ilUser = $DIC['ilUser'];
235 
236  // name
237  include_once("./Services/Form/classes/class.ilTextInputGUI.php");
238  $ti = new ilTextInputGUI($lng->txt("name"), "name");
239  $ti->setMaxLength(64);
240  $ti->setValidationRegexp('/^[^%]*$/is');
241  $ti->setSize(20);
242  $this->addFilterItem($ti);
243  $ti->readFromSession();
244 
245  // group
246  $ti = new ilTextInputGUI($lng->txt("grp"), "group");
247  $ti->setMaxLength(64);
248  $ti->setValidationRegexp('/^[^%]*$/is');
249  $ti->setSize(20);
250  $this->addFilterItem($ti);
251  $ti->readFromSession();
252 
253  // course
254  $ti = new ilTextInputGUI($lng->txt("course"), "course");
255  $ti->setMaxLength(64);
256  $ti->setSize(20);
257  $ti->setValidationRegexp('/^[^%]*$/is');
258  $this->addFilterItem($ti);
259  $ti->readFromSession();
260 
261  // passed tests
262  include_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
263  $si = new ilCheckboxInputGUI($this->lng->txt("passed_only"), "passed_only");
264  // $si->setOptionTitle();
265  $this->addFilterItem($si);
266  $si->readFromSession();
267  }
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...
addFilterItem(ilTableFilterItem $a_input_item, bool $a_optional=false)
This class represents a checkbox property in a property form.
ilLanguage $lng
global $DIC
Definition: feed.php:28
$ilUser
Definition: imgupload.php:34
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isFieldEnabledEnoughByAdministration()

ilEvaluationAllTableGUI::isFieldEnabledEnoughByAdministration (   $fieldIdentifier)
protected

Definition at line 383 of file class.ilEvaluationAllTableGUI.php.

References $DIC, and $ilSetting.

Referenced by __construct(), fillRow(), and getSelectableColumns().

383  : bool
384  {
385  global $DIC;
386  $ilSetting = $DIC['ilSetting'];
387 
388  if ($ilSetting->get("usr_settings_hide_" . $fieldIdentifier)) { // visible
389  return false;
390  }
391 
392  if (!$ilSetting->get('usr_settings_visib_reg_' . $fieldIdentifier)) { // visib_reg
393  return false;
394  }
395 
396  if (!$ilSetting->get('usr_settings_visib_lua_' . $fieldIdentifier)) { // visib_lua
397  return false;
398  }
399 
400  if ($ilSetting->get("usr_settings_disable_" . $fieldIdentifier)) { // changeable
401  return false;
402  }
403 
404  if (!$ilSetting->get('usr_settings_changeable_lua_' . $fieldIdentifier)) { // changeable_lua
405  return false;
406  }
407 
408  return true;
409  }
global $DIC
Definition: feed.php:28
global $ilSetting
Definition: privfeed.php:17
+ Here is the caller graph for this function:

◆ numericOrdering()

ilEvaluationAllTableGUI::numericOrdering ( string  $a_field)

Should this field be sorted numeric?

Returns
boolean numeric ordering; default is false

Definition at line 138 of file class.ilEvaluationAllTableGUI.php.

Referenced by ilEvaluationAllTableGUITest\testNumericOrdering().

138  : bool
139  {
140  switch ($a_field) {
141  case 'name':
142  if ($this->anonymity) {
143  return true;
144  } else {
145  return false;
146  }
147  break;
148  case 'reached':
149  case 'hint_count':
150  case 'exam_id':
151  case 'answered':
152  return true;
153  break;
154  default:
155  return false;
156  break;
157  }
158  }
+ Here is the caller graph for this function:

Field Documentation

◆ $anonymity

ilEvaluationAllTableGUI::$anonymity
protected

Definition at line 30 of file class.ilEvaluationAllTableGUI.php.

Referenced by __construct().

◆ $offeringQuestionHintsEnabled

ilEvaluationAllTableGUI::$offeringQuestionHintsEnabled = null
protected

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

Referenced by __construct().


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