46 $this->ui_factory =
$DIC[
'ui.factory'];
47 $this->ui_renderer =
$DIC[
'ui.renderer'];
49 $this->
ctrl = $DIC[
'ilCtrl'];
51 $this->
setId(
'tstAnswerStatistic');
55 $this->
setRowTemplate(
'tpl.tst_corrections_answer_row.html',
'components/ILIAS/Test');
80 $this->additionalHtml = $additional_html;
85 $this->additionalHtml .= $additional_html;
100 $this->
addColumn($this->
language->txt(
'tst_corr_answ_stat_tbl_header_answer'),
'');
101 $this->
addColumn($this->
language->txt(
'tst_corr_answ_stat_tbl_header_frequency'),
'');
103 foreach ($this->
getData() as $row) {
104 if (isset($row[
'addable'])) {
116 $this->tpl->setCurrentBlock(
'answer');
117 $this->tpl->setVariable(
'ANSWER', $a_set[
'answer']);
118 $this->tpl->parseCurrentBlock();
120 $this->tpl->setCurrentBlock(
'frequency');
121 $this->tpl->setVariable(
'FREQUENCY', $a_set[
'frequency']);
122 $this->tpl->parseCurrentBlock();
125 if (isset($a_set[
'addable'])) {
126 $this->tpl->setCurrentBlock(
'actions');
128 $this->tpl->parseCurrentBlock();
130 $this->tpl->setCurrentBlock(
'actions');
131 $this->tpl->touchBlock(
'actions');
132 $this->tpl->parseCurrentBlock();
139 $data[
'question_id'] = $this->question->getId();
147 ))->buildAddAnswerModal($this->question->getTitleForHTMLOutput(),
$data);
149 $show_modal_button = $this->ui_factory->button()->standard(
150 $this->
language->txt(
'tst_corr_add_as_answer_btn'),
151 $modal->getShowSignal()
156 return $this->ui_renderer->render($show_modal_button);
Builds a Color from either hex- or rgb values.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setActionsColumnEnabled(bool $actionsColumnEnabled)
bool $actionsColumnEnabled
buildAddAnswerAction($data)
setQuestionIndex(int $questionIndex)
addAdditionalHtml(string $additional_html)
RefineryFactory $refinery
setAdditionalHtml(string $additional_html)
fillRow(array $a_set)
Standard Version of Fill Row.
Class ilCtrl provides processing control methods.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(?object $a_parent_obj, string $a_parent_cmd="", string $a_template_context="")
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
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...
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)
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
An entity that renders components to a string output.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc