5 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
29 $this->
setId(
'tst_fixed_participants_' . $a_parent_obj->object->getRefId());
30 parent::__construct($a_parent_obj, $a_parent_cmd);
40 $this->
setStyle(
'table',
'fullwidth');
43 $this->
addColumn($this->lng->txt(
"name"),
'name',
'');
44 $this->
addColumn($this->lng->txt(
"login"),
'login',
'');
49 $this->
addColumn($this->lng->txt(
"clientip"),
'clientip',
'');
50 $this->
addColumn($this->lng->txt(
"tst_started"),
'started',
'');
51 $this->
addColumn($this->lng->txt(
"tst_nr_of_tries_of_user"),
'passes',
'');
52 $this->
addColumn($this->lng->txt(
"unfinished_passes"),
'unfinished_passes',
'');
53 $this->
addColumn($this->lng->txt(
"tst_finished"),
'finished',
'');
54 $this->
addColumn($this->lng->txt(
"last_access"),
'access',
'');
56 $this->actionsColumnRequired =
false;
57 if( !$this->testQuestionSetDepenciesBroken )
59 $this->actionsColumnRequired =
true;
64 $this->
setTitle($this->lng->txt(
'tst_participating_users'));
66 $this->
setRowTemplate(
"tpl.il_as_tst_fixed_participants_row.html",
"Modules/Test");
69 $this->
addMultiCommand(
'removeParticipant', $this->lng->txt(
'remove_as_participant'));
70 if( !$this->anonymity && !$this->testQuestionSetDepenciesBroken )
72 $this->
addMultiCommand(
'showPassOverview', $this->lng->txt(
'show_pass_overview'));
73 $this->
addMultiCommand(
'showUserAnswers', $this->lng->txt(
'show_user_answers'));
74 $this->
addMultiCommand(
'showDetailedResults', $this->lng->txt(
'show_detailed_results'));
76 $this->
addMultiCommand(
'deleteSingleUserResults', $this->lng->txt(
'delete_user_data'));
78 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
80 if (!$this->anonymity)
95 $this->
enable(
'select_all');
107 $finished =
"<img border=\"0\" align=\"middle\" src=\"".ilUtil::getImagePath(
"icon_ok.svg") .
"\" alt=\"".$this->lng->txt(
"ok").
"\" />";
108 $started =
"<img border=\"0\" align=\"middle\" src=\"".ilUtil::getImagePath(
"icon_ok.svg") .
"\" alt=\"".$this->lng->txt(
"ok").
"\" />" ;
109 $passes = (
$data[
'maxpass']) ? ((
$data[
'maxpass'] == 1) ? sprintf($this->lng->txt(
"pass_finished"),
$data[
'maxpass']) : sprintf($this->lng->txt(
"passes_finished"),
$data[
'maxpass'])) :
'';
110 if (strlen(
$data[
'clientip']))
112 $this->tpl->setVariable(
"CLIENT_IP",
$data[
'clientip']);
114 $this->tpl->setVariable(
"USER_ID",
$data[
'usr_id']);
115 $this->tpl->setVariable(
"LOGIN",
$data[
'login']);
116 $this->tpl->setVariable(
"FULLNAME",
$data[
'name']);
121 $this->tpl->setVariable(
"STARTED", (
$data[
'started']) ? $started :
'');
122 $this->tpl->setVariable(
"PASSES", $passes);
123 $unfinished_passes =
$data[
'unfinished'] == 1 ? $this->lng->txt(
'yes') : $this->lng->txt(
'no');
124 $this->tpl->setVariable(
"UNFINISHED_PASSES", $unfinished_passes );
125 $this->tpl->setVariable(
"FINISHED", (
$data[
'finished']) ? $finished :
'');
128 if(
$data[
'active_id'] > 0 && !$this->testQuestionSetDepenciesBroken )
130 if(
$data[
'unfinished'] == 1)
133 $this->tpl->setCurrentBlock(
'action_results_list');
134 $adv->addItem($this->lng->txt(
'tst_show_results'),
$data[
'result'],
$data[
'result']);
135 $adv->addItem($this->lng->txt(
'finish_test'),
$data[
'finish_link'],
$data[
'finish_link']);
136 $this->tpl->setVariable(
'RESULTS_LIST', $adv->getHTML());
140 $this->tpl->setCurrentBlock(
'action_results');
141 $this->tpl->setVariable(
"RESULTS",
$data[
'result']);
143 $this->tpl->parseCurrentBlock();
147 if( $this->actionsColumnRequired )
149 $this->tpl->setCurrentBlock(
'actions_column');
150 $this->tpl->parseCurrentBlock();
159 return in_array($field,
array(
$testQuestionSetDepenciesBroken
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
setDescription($a_val)
Set description.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setStyle($a_element, $a_style)
__construct($a_parent_obj, $a_parent_cmd, $testQuestionSetDepenciesBroken, $anonymity, $nrOfDatasets)
Constructor.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
addMultiCommand($a_cmd, $a_text)
Add Command button.
enable($a_module_name)
enables particular modules of table
static formatDate(ilDateTime $date)
Format a date public.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
User interface class for advanced drop-down selection lists.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setFormName($a_formname="")
Set Form name.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
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.