ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilTestFinalMarkLangVarBuilder.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
16 {
22  private $passedStatus = null;
23 
30 
36  private $obligationsEnabled = null;
37 
38 
47  {
48  $this->setPassedStatus( (bool)$passedStatus );
51  }
52 
58  private function getPassedStatus()
59  {
60  return $this->passedStatus;
61  }
62 
68  private function setPassedStatus($passedStatus)
69  {
70  $this->passedStatus = $passedStatus;
71  }
72 
78  private function getObligationsAnsweredStatus()
79  {
81  }
82 
89  {
90  $this->obligationsAnsweredStatus = $obligationsAnsweredStatus;
91  }
92 
98  private function areObligationsEnabled()
99  {
101  }
102 
109  {
110  $this->obligationsEnabled = $obligationsEnabled;
111  }
112 
113 
121  private function getPassedLangVarBasename()
122  {
123  if( $this->getPassedStatus() && (!$this->areObligationsEnabled() || $this->getObligationsAnsweredStatus()) )
124  {
125  return 'mark_tst_passed';
126  }
127 
128  return 'mark_tst_failed';
129  }
130 
138  {
139  if( $this->areObligationsEnabled() && $this->getObligationsAnsweredStatus() )
140  {
141  return '_obligations_answered';
142  }
143  elseif( $this->areObligationsEnabled() && !$this->getObligationsAnsweredStatus() )
144  {
145  return '_obligations_missing';
146  }
147 
148  return '';
149  }
150 
151 
158  public function build()
159  {
160  $langVar = $this->getPassedLangVarBasename();
161 
162  $langVar .= $this->getObligationsLangVarExtension();
163 
164  return $langVar;
165  }
166 }