Skip to content

Commit

Permalink
Test: Fix LangVars and Small Visual Kinks
Browse files Browse the repository at this point in the history
  • Loading branch information
kergomard committed Oct 23, 2024
1 parent e4ee371 commit 0a385d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion components/ILIAS/Test/src/Questions/Presentation/Printer.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function printSelectedQuestions(
)->withActive($selected_print_view_type->getLabel($this->lng))
);

$this->toolbar->addSeparator();
$this->addPrintButtonToToolbar();

$template = new \ilTemplate('tpl.il_as_tst_print_questions_preview.html', true, true, 'components/ILIAS/Test');
Expand Down Expand Up @@ -229,7 +230,7 @@ private function addResultUserInfoToTemplate(
private function addPrintButtonToToolbar(): void
{
$this->toolbar->addComponent(
$this->ui_factory->button()->standard('print', '')
$this->ui_factory->button()->standard($this->lng->txt('print'), '')
->withOnLoadCode(fn($id) => "$('#$id').on('click', ()=>{window.print();})")
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public function handleCommand(
case self::ACTION_DELETE_CONFIRMED:
$row_ids = $this->request->getParsedBody()['interruptive_items'] ?? [];
if (array_filter($row_ids) === []) {
$this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_selection'));
$this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_no_questions_selected'));
return true;
}
$protect_by_write_protection();
Expand All @@ -240,7 +240,7 @@ public function handleCommand(

case self::ACTION_COPY:
if (array_filter($row_ids) === []) {
$this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_selection'));
$this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_no_questions_selected'));
return true;
}
$protect_by_write_protection();
Expand All @@ -262,7 +262,7 @@ public function handleCommand(

case self::ACTION_PRINT_QUESTIONS:
if (array_filter($row_ids) === []) {
$this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_selection'));
$this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_no_questions_selected'));
return true;
}
$protect_by_write_protection();
Expand Down

0 comments on commit 0a385d1

Please sign in to comment.