ILIAS
release_4-3 Revision
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
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
16
class
ilTestFinalMarkLangVarBuilder
17
{
23
private
$passedStatus
= null;
24
30
private
$obligationsAnsweredStatus
= null;
31
37
private
$obligationsEnabled
= null;
38
39
47
public
function
__construct
(
$passedStatus
,
$obligationsAnsweredStatus
,
$obligationsEnabled
)
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
{
83
return
$this->obligationsAnsweredStatus
;
84
}
85
91
private
function
setObligationsAnsweredStatus
(
$obligationsAnsweredStatus
)
92
{
93
$this->obligationsAnsweredStatus =
$obligationsAnsweredStatus
;
94
}
95
101
private
function
areObligationsEnabled
()
102
{
103
return
$this->obligationsEnabled
;
104
}
105
111
private
function
setObligationsEnabled
(
$obligationsEnabled
)
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
140
private
function
getObligationsLangVarExtension
()
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
}
Modules
Test
classes
class.ilTestFinalMarkLangVarBuilder.php
Generated on Sat Apr 30 2016 19:00:45 for ILIAS by
1.8.1.2 (using
Doxyfile
)