ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilTestAnswerOptionalQuestionsConfirmationGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
5
13{
17 protected $lng;
18
22 protected $cancelCmd;
23
27 protected $confirmCmd;
28
32 public function __construct(ilLanguage $lng)
33 {
34 $this->lng = $lng;
35
36 $this->cancelCmd = null;
37 $this->confirmCmd = null;
38 }
39
43 public function getCancelCmd()
44 {
45 return $this->cancelCmd;
46 }
47
51 public function setCancelCmd($cancelCmd)
52 {
53 $this->cancelCmd = $cancelCmd;
54 }
55
59 public function getConfirmCmd()
60 {
61 return $this->confirmCmd;
62 }
63
67 public function setConfirmCmd($confirmCmd)
68 {
69 $this->confirmCmd = $confirmCmd;
70 }
71
72 public function build($isFixedTest)
73 {
74 $this->setHeaderText($this->buildHeaderText($isFixedTest));
75 $this->setCancel($this->lng->txt('back'), $this->getCancelCmd());
76 $this->setConfirm($this->lng->txt('proceed'), $this->getConfirmCmd());
77 }
78
79 private function buildHeaderText($isFixedTest)
80 {
81 if($isFixedTest)
82 {
83 return $this->lng->txt('tst_optional_questions_confirmation_fixed_test');
84 }
85
86 return $this->lng->txt('tst_optional_questions_confirmation_non_fixed_test');
87 }
88}
Confirmation screen class.
setCancel($a_txt, $a_cmd)
Set cancel button command and text.
setHeaderText($a_headertext)
Set Set header text.
setConfirm($a_txt, $a_cmd)
Set confirmation button command and text.
language handling