ILIAS
trunk Revision v11.0_alpha-1749-g1a06bdef097
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
ilAssLacAnswerValueNotExist.php
Go to the documentation of this file.
1
<?php
2
28
class
ilAssLacAnswerValueNotExist
extends
ilAssLacException
implements
ilAssLacFormAlertProvider
29
{
33
protected
$question_index
;
34
38
protected
$value
;
39
43
protected
$answer_index
;
44
50
public
function
__construct
(
$question_index
,
$value
,
$answer_index
=
null
)
51
{
52
$this->question_index =
$question_index
;
53
$this->answer_index =
$answer_index
;
54
$this->value =
$value
;
55
56
if
($this->
getQuestionIndex
() ===
null
&& $this->
getAnswerIndex
() ===
null
) {
57
$msg = sprintf(
58
'The value "%s" does not exist for the current question'
,
59
$value
60
);
61
} elseif ($this->
getQuestionIndex
() ===
null
) {
62
$msg = sprintf(
63
'The value "%s" does not exist for the answer with index "%s" of the current question'
,
64
$value
,
65
$this->
getAnswerIndex
()
66
);
67
} elseif ($this->
getAnswerIndex
() ===
null
) {
68
$msg = sprintf(
69
'The value "%s" does not exist for the question Q%s'
,
70
$value
,
71
$this->
getQuestionIndex
()
72
);
73
}
else
{
74
$msg = sprintf(
75
'The value "%s" does not exist for the question Q%s[%s]'
,
76
$value
,
77
$this->
getQuestionIndex
(),
78
$this->
getAnswerIndex
()
79
);
80
}
81
82
parent::__construct
($msg);
83
}
84
88
public
function
getQuestionIndex
():
int
89
{
90
return
$this->question_index
;
91
}
92
96
public
function
getAnswerIndex
(): ?
int
97
{
98
return
$this->answer_index
;
99
}
100
104
public
function
getValue
(): string
105
{
106
return
$this->value
;
107
}
108
113
public
function
getFormAlert
(
ilLanguage
$lng
): string
114
{
115
if
($this->
getQuestionIndex
() ===
null
&& $this->
getAnswerIndex
() ===
null
) {
116
return
sprintf(
117
$lng->
txt
(
"ass_lac_answer_value_not_exists_cur_qst_one_answer"
),
118
$this->
getValue
()
119
);
120
}
121
122
if
($this->
getQuestionIndex
() ===
null
) {
123
return
sprintf(
124
$lng->
txt
(
"ass_lac_answer_value_not_exists_cur_qst"
),
125
$this->
getValue
(),
126
$this->
getAnswerIndex
()
127
);
128
}
129
130
if
($this->
getAnswerIndex
() ===
null
) {
131
return
sprintf(
132
$lng->
txt
(
"ass_lac_answer_value_not_exists_one_answer"
),
133
$this->
getValue
(),
134
$this->
getQuestionIndex
()
135
);
136
}
137
138
return
sprintf(
139
$lng->
txt
(
"ass_lac_answer_value_not_exists"
),
140
$this->
getValue
(),
141
$this->
getQuestionIndex
(),
142
$this->
getAnswerIndex
()
143
);
144
}
145
}
ilAssLacAnswerValueNotExist\getValue
getValue()
Definition:
ilAssLacAnswerValueNotExist.php:104
ilLanguage
ilLanguage\txt
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
Definition:
class.ilLanguage.php:170
ilAssLacAnswerValueNotExist\$value
$value
Definition:
ilAssLacAnswerValueNotExist.php:38
ilAssLacAnswerValueNotExist\$answer_index
$answer_index
Definition:
ilAssLacAnswerValueNotExist.php:43
ilAssLacAnswerValueNotExist
Definition:
ilAssLacAnswerValueNotExist.php:28
null
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Definition:
shib_logout.php:142
ilAssLacAnswerValueNotExist\getQuestionIndex
getQuestionIndex()
Definition:
ilAssLacAnswerValueNotExist.php:88
ilAssLacFormAlertProvider
Definition:
ilAssLacFormAlertProvider.php:25
ilAssLacAnswerValueNotExist\__construct
__construct($question_index, $value, $answer_index=null)
Definition:
ilAssLacAnswerValueNotExist.php:50
ilAssLacAnswerValueNotExist\getAnswerIndex
getAnswerIndex()
Definition:
ilAssLacAnswerValueNotExist.php:96
ilAssLacAnswerValueNotExist\getFormAlert
getFormAlert(ilLanguage $lng)
Definition:
ilAssLacAnswerValueNotExist.php:113
ILIAS\GlobalScreen\Provider\__construct
__construct(Container $dic, ilPlugin $plugin)
Definition:
PluginProviderHelper.php:37
$lng
global $lng
Definition:
privfeed.php:31
ilAssLacException
Definition:
ilAssLacException.php:25
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
ilAssLacAnswerValueNotExist\$question_index
$question_index
Definition:
ilAssLacAnswerValueNotExist.php:33
components
ILIAS
TestQuestionPool
classes
questions
LogicalAnswerCompare
Exception
ilAssLacAnswerValueNotExist.php
Generated on Wed Apr 9 2025 23:04:19 for ILIAS by
1.8.13 (using
Doxyfile
)