ILIAS
Release_4_4_x_branch Revision 61816
◀ 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
/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
15
class
ilTestFinalMarkLangVarBuilder
16
{
22
private
$passedStatus
= null;
23
29
private
$obligationsAnsweredStatus
= null;
30
36
private
$obligationsEnabled
= null;
37
38
46
public
function
__construct
(
$passedStatus
,
$obligationsAnsweredStatus
,
$obligationsEnabled
)
47
{
48
$this->
setPassedStatus
( (
bool
)
$passedStatus
);
49
$this->
setObligationsAnsweredStatus
( (
bool
)
$obligationsAnsweredStatus
);
50
$this->
setObligationsEnabled
( (
bool
)
$obligationsEnabled
);
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
{
80
return
$this->obligationsAnsweredStatus
;
81
}
82
88
private
function
setObligationsAnsweredStatus
(
$obligationsAnsweredStatus
)
89
{
90
$this->obligationsAnsweredStatus =
$obligationsAnsweredStatus
;
91
}
92
98
private
function
areObligationsEnabled
()
99
{
100
return
$this->obligationsEnabled
;
101
}
102
108
private
function
setObligationsEnabled
(
$obligationsEnabled
)
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
137
private
function
getObligationsLangVarExtension
()
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
}
Modules
Test
classes
class.ilTestFinalMarkLangVarBuilder.php
Generated on Wed Apr 27 2016 20:01:24 for ILIAS by
1.8.1.2 (using
Doxyfile
)