19 declare(strict_types=1);
50 $this->
setId(
'tst_participants_' . $parent_obj->
getTestObj()->getRefId());
54 $this->
setStyle(
'table',
'fullwidth');
59 $this->
setRowTemplate(
"tpl.il_as_tst_participants_row.html",
"Modules/Test");
86 if ($manageInviteesCommandsEnabled) {
126 return in_array($a_field, array(
143 $this->
addColumn($this->
lng->txt(
"login"),
'login',
'');
146 $this->
addColumn($this->
lng->txt(
"clientip"),
'clientip',
'');
149 $this->
addColumn($this->
lng->txt(
"tst_started"),
'started',
'');
150 $this->
addColumn($this->
lng->txt(
"tst_nr_of_tries_of_user"),
'tries',
'');
152 $this->
addColumn($this->
lng->txt(
"unfinished_passes"),
'unfinished',
'');
153 $this->
addColumn($this->
lng->txt(
"tst_finished"),
'finished',
'');
155 $this->
addColumn($this->
lng->txt(
"last_access"),
'access',
'');
166 $this->
addMultiCommand(
'removeParticipants', $this->
lng->txt(
'remove_as_participant'));
176 'all' => $this->
lng->txt(
'all_participants'),
177 'withSolutions' => $this->
lng->txt(
'with_solutions_participants'),
178 'withoutSolutions' => $this->
lng->txt(
'without_solutions_participants')
182 $ti->readFromSession();
183 $this->
filter[
'title'] = $ti->getValue();
190 $this->tpl->setCurrentBlock(
'checkbox_column');
191 $this->tpl->setVariable(
"CHB_ROW_KEY", $this->
fetchRowKey($a_set));
192 $this->tpl->parseCurrentBlock();
196 $this->tpl->setCurrentBlock(
'client_ip_column');
197 $this->tpl->setVariable(
"CLIENT_IP", $a_set[
'clientip']);
198 $this->tpl->setVariable(
"CIP_ROW_KEY", $this->
fetchRowKey($a_set));
199 $this->tpl->parseCurrentBlock();
203 $this->tpl->setCurrentBlock(
'actions_column');
205 if ($a_set[
'active_id'] > 0) {
208 $this->tpl->touchBlock(
'actions_column');
211 $this->tpl->parseCurrentBlock();
214 $this->tpl->setVariable(
"ROW_KEY", $this->
fetchRowKey($a_set));
215 $this->tpl->setVariable(
"LOGIN", $a_set[
'login']);
216 $this->tpl->setVariable(
"FULLNAME", $a_set[
'name']);
218 $this->tpl->setVariable(
"STARTED", ($a_set[
'started']) ? $this->
buildOkIcon() :
'');
222 $this->tpl->setVariable(
"FINISHED", ($a_set[
'finished']) ? $this->
buildOkIcon() :
'');
228 $this->
ctrl->setParameterByClass(
'iltestevaluationgui',
'active_id', $data[
'active_id']);
231 $finishHref = $this->
ctrl->getLinkTargetByClass(
'ilTestEvaluationGUI',
'finishTestPassForSingleUser');
232 $actions[] = $this->ui_factory->link()->standard($this->
lng->txt(
'finish_test'), $finishHref);
234 $dropdown = $this->ui_factory->dropdown()->standard($actions);
235 return $this->ui_renderer->render($dropdown);
254 if ($data[
'tries'] < 1) {
258 if ($data[
'tries'] > 1) {
259 return sprintf($this->
lng->txt(
"passes_finished"), $data[
'tries']);
262 return sprintf($this->
lng->txt(
"pass_finished"), $data[
'tries']);
267 if ($data[
'unfinished']) {
268 return $this->
lng->txt(
'yes');
271 return $this->
lng->txt(
'no');
276 return $this->ui_renderer->render($this->ui_factory->symbol()->icon()->custom(
278 $this->
lng->txt(
"ok")
buildUnfinishedPassesStatusString(array $data)
enable(string $a_module_name)
setFormAction(string $a_form_action, bool $a_multipart=false)
addFilterItem(ilTableFilterItem $a_input_item, bool $a_optional=false)
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
fetchTriesValue(array $data)
isParticipantHasSolutionsFilterEnabled()
setManageResultsCommandsEnabled(bool $manageResultsCommandsEnabled)
setFormName(string $a_name="")
isManageResultsCommandsEnabled()
numericOrdering(string $a_field)
setStyle(string $a_element, string $a_style)
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
setParticipantHasSolutionsFilterEnabled(bool $participantHasSolutionsFilterEnabled)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
bool $manageInviteesCommandsEnabled
setManageInviteesCommandsEnabled(bool $manageInviteesCommandsEnabled)
__construct(ilTestParticipantsGUI $parent_obj, string $parent_cmd, protected UIFactory $ui_factory, protected UIRenderer $ui_renderer)
buildFormattedAccessDate(array $data)
bool $participantHasSolutionsFilterEnabled
buildActionsMenu(array $data)
isManageInviteesCommandsEnabled()
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)
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
addMultiCommand(string $a_cmd, string $a_text)
isActionsColumnRequired()
setRowKeyDataField(string $rowKeyDataField)
bool $manageResultsCommandsEnabled