19 declare(strict_types=1);
59 $this->
setStyle(
'table',
'fullwidth');
61 $this->
setRowTemplate(
"tpl.il_as_tst_list_of_questions_row.html",
"Modules/Test");
72 public function init(): void
77 $this->
setTitle($this->
lng->txt(
'obligations_summary'));
79 $this->
setTitle($this->
lng->txt(
'question_summary'));
84 $this->
addColumn($this->
lng->txt(
"tst_qst_order"),
'order',
'');
85 $this->
addColumn($this->
lng->txt(
"tst_question_title"),
'title',
'');
88 $this->
addColumn($this->
lng->txt(
"obligatory"),
'obligatory',
'');
94 $this->
addColumn($this->
lng->txt(
"tst_maximum_points"),
'points',
'');
97 #$this->addColumn($this->lng->txt("worked_through"),'worked_through', ''); 98 $this->
addColumn($this->
lng->txt(
"answered"),
'answered',
'');
101 $this->
addColumn($this->
lng->txt(
"answered"),
'answered',
'');
105 $this->
addColumn($this->
lng->txt(
"tst_question_marker"),
'marked',
'');
109 $this->command_buttons[] = $this->ui_factory->button()->standard(
110 $this->
lng->txt(
'tst_resume_test'),
133 if ($this->parent_obj->getObject()->getMainSettings()->getFinishingSettings()->getShowAnswerOverview()) {
134 $this->command_buttons[] = $this->ui_factory->button()->standard(
135 $this->
lng->txt(
'finish_test'),
136 $this->
ctrl->getLinkTargetByClass(
'ilTestSubmissionReviewGUI',
'show')
141 $message = $this->
lng->txt(
'tst_finish_confirmation_question_no_attempts_left');
143 $message = $this->
lng->txt(
'tst_finish_confirmation_question');
146 $this->finish_test_modal = $this->parent_obj->buildFinishTestModal();
148 $this->command_buttons[] = $this->ui_factory->button()->standard($this->
lng->txt(
'finish_test'),
'')
149 ->withOnClick($this->finish_test_modal->getShowSignal());
154 foreach ($this->command_buttons as $top_item) {
155 $this->tpl->setCurrentBlock(
'tbl_header_html');
156 $this->tpl->setVariable(
158 $this->ui_renderer->render($top_item)
160 $this->tpl->parseCurrentBlock();
163 $finish_test_modal = isset($this->finish_test_modal)
164 ? $this->ui_renderer->render($this->finish_test_modal) :
'';
172 $this->tpl->setCurrentBlock(
'points');
173 $this->tpl->setVariable(
"POINTS", $a_set[
'points'] .
' ' . $this->
lng->txt(
"points_short"));
174 $this->tpl->parseCurrentBlock();
176 if (strlen($a_set[
'description'])) {
177 $this->tpl->setCurrentBlock(
'description');
179 $this->tpl->parseCurrentBlock();
182 if ($a_set[
'marked']) {
183 $this->tpl->setCurrentBlock(
'marked_img');
184 $this->tpl->setVariable(
188 $this->
lng->txt(
"tst_question_marked"),
193 $this->tpl->parseCurrentBlock();
195 $this->tpl->touchBlock(
'marker');
202 if ($a_set[
'isAnswered']) {
203 $value = $this->
lng->txt(
"yes");
205 $this->tpl->setCurrentBlock(
'answered_col');
206 $this->tpl->setVariable(
'ANSWERED', $value);
207 $this->tpl->parseCurrentBlock();
211 if ($a_set[
"obligatory"]) {
212 $obligatory = $this->ui_renderer->render(
213 $this->ui_factory->symbol()->icon()->custom(
215 $this->
lng->txt(
'question_obligatory')
221 $this->tpl->setVariable(
"QUESTION_OBLIGATORY", $obligatory);
225 $a_set[
'postponed'] ? $this->
lng->txt(
'postponed') :
'' 228 if ($a_set[
'disabled']) {
229 $this->tpl->setCurrentBlock(
'static_title');
231 $this->tpl->parseCurrentBlock();
233 $this->
ctrl->setParameter($this->parent_obj,
'sequence', $a_set[
'sequence']);
234 $this->
ctrl->setParameter($this->parent_obj,
'pmode',
'');
237 $this->tpl->setCurrentBlock(
'linked_title');
239 $this->tpl->setVariable(
"HREF", $href);
240 $this->tpl->parseCurrentBlock();
243 $this->tpl->setVariable(
"ORDER", $a_set[
'order']);
244 $this->tpl->setVariable(
"POSTPONED", $postponed);
245 if ($a_set[
"worked_through"]) {
246 $this->tpl->setVariable(
"WORKED_THROUGH", $this->
lng->txt(
"yes"));
248 $this->tpl->setVariable(
"WORKED_THROUGH",
' ');
bool $user_has_attempts_left
enable(string $a_module_name)
setFormAction(string $a_form_action, bool $a_multipart=false)
setUserHasAttemptsLeft(bool $user_has_attempts_left)
setShowPointsEnabled($showPointsEnabled)
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
setFinishTestButtonEnabled(bool $finishTestButtonEnabled)
isFinishTestButtonEnabled()
setFormName(string $a_name="")
static img(string $a_src, ?string $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
__construct(ilTestPlayerAbstractGUI $parent_obj, string $parent_cmd, private UIFactory $ui_factory, private UIRenderer $ui_renderer)
setStyle(string $a_element, string $a_style)
isObligationsFilterEnabled()
setObligationsNotAnswered($obligationsNotAnswered)
setShowObligationsEnabled($showObligationsEnabled)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
bool $obligationsFilterEnabled
isShowObligationsEnabled()
bool $showObligationsEnabled
Interruptive $finish_test_modal
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
bool $obligationsNotAnswered
setLimit(int $a_limit=0, int $a_default_limit=0)
setObligationsFilterEnabled($obligationsFilterEnabled)
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)
disable(string $a_module_name)
bool $finishTestButtonEnabled
setShowMarkerEnabled($showMarkerEnabled)
areObligationsNotAnswered()
Output class for assessment test execution.