ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilTestFinalMarkLangVarBuilder.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
17 {
23  private $passedStatus = null;
24 
31 
37  private $obligationsEnabled = null;
38 
39 
48  {
49  $this->passedStatus = (bool)$passedStatus;
50 
51  $this->obligationsAnsweredStatus = (bool)$obligationsAnsweredStatus;
52 
53  $this->obligationsEnabled = (bool)$obligationsEnabled;
54  }
55 
61  private function getPassedStatus()
62  {
63  return $this->passedStatus;
64  }
65 
71  private function setPassedStatus($passedStatus)
72  {
73  $this->passedStatus = $passedStatus;
74  }
75 
81  private function getObligationsAnsweredStatus()
82  {
84  }
85 
92  {
93  $this->obligationsAnsweredStatus = $obligationsAnsweredStatus;
94  }
95 
101  private function areObligationsEnabled()
102  {
104  }
105 
112  {
113  $this->obligationsEnabled = $obligationsEnabled;
114  }
115 
116 
124  private function getPassedLangVarBasename()
125  {
126  if( $this->getPassedStatus() && (!$this->areObligationsEnabled() || $this->getObligationsAnsweredStatus()) )
127  {
128  return 'mark_tst_passed';
129  }
130 
131  return 'mark_tst_failed';
132  }
133 
141  {
142  if( $this->areObligationsEnabled() && $this->getObligationsAnsweredStatus() )
143  {
144  return '_obligations_answered';
145  }
146  elseif( $this->areObligationsEnabled() && !$this->getObligationsAnsweredStatus() )
147  {
148  return '_obligations_missing';
149  }
150 
151  return '';
152  }
153 
154 
161  public function build()
162  {
163  $langVar = $this->getPassedLangVarBasename();
164 
165  $langVar .= $this->getObligationsLangVarExtension();
166 
167  return $langVar;
168  }
169 }