ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules 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 }
areObligationsEnabled()
getter for obligationsEnabled
setObligationsEnabled($obligationsEnabled)
setter for obligationsEnabled
setObligationsAnsweredStatus($obligationsAnsweredStatus)
setter for obligationsAnsweredStatus
builds the language variable identifier corresponding to the given passed status considering the give...
getPassedLangVarBasename()
returns the final statement language variable identifier basename that regards to given passed status...
getObligationsLangVarExtension()
returns the final statement language variable identifier extension that regards to the given obligati...
build()
builds the final statement language variable identifier based on "Passed-LangVar-Basename" and "Oblig...
getObligationsAnsweredStatus()
getter for obligationsAnsweredStatus
__construct($passedStatus, $obligationsAnsweredStatus, $obligationsEnabled)
constructer
setPassedStatus($passedStatus)
setter for passedStatus