ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilTestFinalMarkLangVarBuilder Class Reference

builds the language variable identifier corresponding to the given passed status considering the given obligations answered status and the fact wether obligations are enabled or not in general More...

+ Collaboration diagram for ilTestFinalMarkLangVarBuilder:

Public Member Functions

 __construct ($passedStatus, $obligationsAnsweredStatus, $obligationsEnabled)
 constructer More...
 
 build ()
 builds the final statement language variable identifier based on "Passed-LangVar-Basename" and "Obligations-LangVar-Extension" More...
 

Private Member Functions

 getPassedStatus ()
 getter for passedStatus More...
 
 setPassedStatus ($passedStatus)
 setter for passedStatus More...
 
 getObligationsAnsweredStatus ()
 getter for obligationsAnsweredStatus More...
 
 setObligationsAnsweredStatus ($obligationsAnsweredStatus)
 setter for obligationsAnsweredStatus More...
 
 areObligationsEnabled ()
 getter for obligationsEnabled More...
 
 setObligationsEnabled ($obligationsEnabled)
 setter for obligationsEnabled More...
 
 getPassedLangVarBasename ()
 returns the final statement language variable identifier basename that regards to given passed status as well as to the fact wether obligations are answered or not if obligations are enabled in general More...
 
 getObligationsLangVarExtension ()
 returns the final statement language variable identifier extension that regards to the given obligations status if More...
 

Private Attributes

 $passedStatus = null
 
 $obligationsAnsweredStatus = null
 
 $obligationsEnabled = null
 

Detailed Description

builds the language variable identifier corresponding to the given passed status considering the given obligations answered status and the fact wether obligations are enabled or not in general

Author
Björn Heyser bheys.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 15 of file class.ilTestFinalMarkLangVarBuilder.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestFinalMarkLangVarBuilder::__construct (   $passedStatus,
  $obligationsAnsweredStatus,
  $obligationsEnabled 
)

constructer

Parameters
boolean$passedStatus
boolean$obligationsAnsweredStatus
boolean$obligationsEnabled

Definition at line 46 of file class.ilTestFinalMarkLangVarBuilder.php.

References $obligationsAnsweredStatus, $obligationsEnabled, $passedStatus, setObligationsAnsweredStatus(), setObligationsEnabled(), and setPassedStatus().

+ Here is the call graph for this function:

Member Function Documentation

◆ areObligationsEnabled()

ilTestFinalMarkLangVarBuilder::areObligationsEnabled ( )
private

getter for obligationsEnabled

Returns
boolean

Definition at line 98 of file class.ilTestFinalMarkLangVarBuilder.php.

References $obligationsEnabled.

Referenced by getObligationsLangVarExtension(), and getPassedLangVarBasename().

+ Here is the caller graph for this function:

◆ build()

ilTestFinalMarkLangVarBuilder::build ( )

builds the final statement language variable identifier based on "Passed-LangVar-Basename" and "Obligations-LangVar-Extension"

Returns
string

Definition at line 158 of file class.ilTestFinalMarkLangVarBuilder.php.

References getObligationsLangVarExtension(), and getPassedLangVarBasename().

159  {
160  $langVar = $this->getPassedLangVarBasename();
161 
162  $langVar .= $this->getObligationsLangVarExtension();
163 
164  return $langVar;
165  }
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...
+ Here is the call graph for this function:

◆ getObligationsAnsweredStatus()

ilTestFinalMarkLangVarBuilder::getObligationsAnsweredStatus ( )
private

getter for obligationsAnsweredStatus

Returns
boolean

Definition at line 78 of file class.ilTestFinalMarkLangVarBuilder.php.

References $obligationsAnsweredStatus.

Referenced by getObligationsLangVarExtension(), and getPassedLangVarBasename().

+ Here is the caller graph for this function:

◆ getObligationsLangVarExtension()

ilTestFinalMarkLangVarBuilder::getObligationsLangVarExtension ( )
private

returns the final statement language variable identifier extension that regards to the given obligations status if

Returns
type

Definition at line 137 of file class.ilTestFinalMarkLangVarBuilder.php.

References areObligationsEnabled(), and getObligationsAnsweredStatus().

Referenced by build().

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  }
areObligationsEnabled()
getter for obligationsEnabled
getObligationsAnsweredStatus()
getter for obligationsAnsweredStatus
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPassedLangVarBasename()

ilTestFinalMarkLangVarBuilder::getPassedLangVarBasename ( )
private

returns the final statement language variable identifier basename that regards to given passed status as well as to the fact wether obligations are answered or not if obligations are enabled in general

Returns
string

Definition at line 121 of file class.ilTestFinalMarkLangVarBuilder.php.

References areObligationsEnabled(), getObligationsAnsweredStatus(), and getPassedStatus().

Referenced by build().

122  {
123  if( $this->getPassedStatus() && (!$this->areObligationsEnabled() || $this->getObligationsAnsweredStatus()) )
124  {
125  return 'mark_tst_passed';
126  }
127 
128  return 'mark_tst_failed';
129  }
areObligationsEnabled()
getter for obligationsEnabled
getObligationsAnsweredStatus()
getter for obligationsAnsweredStatus
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPassedStatus()

ilTestFinalMarkLangVarBuilder::getPassedStatus ( )
private

getter for passedStatus

Returns
boolean

Definition at line 58 of file class.ilTestFinalMarkLangVarBuilder.php.

References $passedStatus.

Referenced by getPassedLangVarBasename().

+ Here is the caller graph for this function:

◆ setObligationsAnsweredStatus()

ilTestFinalMarkLangVarBuilder::setObligationsAnsweredStatus (   $obligationsAnsweredStatus)
private

setter for obligationsAnsweredStatus

Parameters
boolean$obligationsAnsweredStatus

Definition at line 88 of file class.ilTestFinalMarkLangVarBuilder.php.

References $obligationsAnsweredStatus.

Referenced by __construct().

89  {
90  $this->obligationsAnsweredStatus = $obligationsAnsweredStatus;
91  }
+ Here is the caller graph for this function:

◆ setObligationsEnabled()

ilTestFinalMarkLangVarBuilder::setObligationsEnabled (   $obligationsEnabled)
private

setter for obligationsEnabled

Parameters
boolean$obligationsEnabled

Definition at line 108 of file class.ilTestFinalMarkLangVarBuilder.php.

References $obligationsEnabled.

Referenced by __construct().

109  {
110  $this->obligationsEnabled = $obligationsEnabled;
111  }
+ Here is the caller graph for this function:

◆ setPassedStatus()

ilTestFinalMarkLangVarBuilder::setPassedStatus (   $passedStatus)
private

setter for passedStatus

Parameters
boolean$passedStatus

Definition at line 68 of file class.ilTestFinalMarkLangVarBuilder.php.

References $passedStatus.

Referenced by __construct().

69  {
70  $this->passedStatus = $passedStatus;
71  }
+ Here is the caller graph for this function:

Field Documentation

◆ $obligationsAnsweredStatus

ilTestFinalMarkLangVarBuilder::$obligationsAnsweredStatus = null
private

◆ $obligationsEnabled

ilTestFinalMarkLangVarBuilder::$obligationsEnabled = null
private

◆ $passedStatus

ilTestFinalMarkLangVarBuilder::$passedStatus = null
private

The documentation for this class was generated from the following file: