ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
r
s
t
w
+
Functions
_
a
b
c
f
g
h
i
r
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
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
+
Files
File List
+
Globals
+
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
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
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
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
ilAssLacAnswerValueNotExist.php
Go to the documentation of this file.
1
<?php
2
3
require_once
'Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacException.php'
;
4
require_once
'Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacFormAlertProvider.php'
;
5
15
class
ilAssLacAnswerValueNotExist
extends
ilAssLacException
implements
ilAssLacFormAlertProvider
16
{
20
protected
$question_index
;
21
25
protected
$value
;
26
30
protected
$answer_index
;
31
37
public
function
__construct
(
$question_index
,
$value
,
$answer_index
= null)
38
{
39
$this->question_index =
$question_index
;
40
$this->answer_index =
$answer_index
;
41
$this->value =
$value
;
42
43
if
($this->
getQuestionIndex
() === null && $this->
getAnswerIndex
() === null) {
44
$msg = sprintf(
45
'The value "%s" does not exist for the current question'
,
46
$value
47
);
48
} elseif ($this->
getQuestionIndex
() === null) {
49
$msg = sprintf(
50
'The value "%s" does not exist for the answer with index "%s" of the current question'
,
51
$value
,
52
$this->
getAnswerIndex
()
53
);
54
} elseif ($this->
getAnswerIndex
() === null) {
55
$msg = sprintf(
56
'The value "%s" does not exist for the question Q%s'
,
57
$value
,
58
$this->
getQuestionIndex
()
59
);
60
}
else
{
61
$msg = sprintf(
62
'The value "%s" does not exist for the question Q%s[%s]'
,
63
$value
,
64
$this->
getQuestionIndex
(),
65
$this->
getAnswerIndex
()
66
);
67
}
68
69
parent::__construct
($msg);
70
}
71
75
public
function
getQuestionIndex
()
76
{
77
return
$this->question_index
;
78
}
79
83
public
function
getAnswerIndex
()
84
{
85
return
$this->answer_index
;
86
}
87
91
public
function
getValue
()
92
{
93
return
$this->value
;
94
}
95
100
public
function
getFormAlert
(
ilLanguage
$lng
)
101
{
102
if
($this->
getQuestionIndex
() === null && $this->
getAnswerIndex
() === null) {
103
return
sprintf(
104
$lng->
txt
(
"ass_lac_answer_value_not_exists_cur_qst_one_answer"
),
105
$this->
getValue
()
106
);
107
}
108
109
if
($this->
getQuestionIndex
() === null) {
110
return
sprintf(
111
$lng->
txt
(
"ass_lac_answer_value_not_exists_cur_qst"
),
112
$this->
getValue
(),
113
$this->
getAnswerIndex
()
114
);
115
}
116
117
if
($this->
getAnswerIndex
() === null) {
118
return
sprintf(
119
$lng->
txt
(
"ass_lac_answer_value_not_exists_one_answer"
),
120
$this->
getValue
(),
121
$this->
getQuestionIndex
()
122
);
123
}
124
125
return
sprintf(
126
$lng->
txt
(
"ass_lac_answer_value_not_exists"
),
127
$this->
getValue
(),
128
$this->
getQuestionIndex
(),
129
$this->
getAnswerIndex
()
130
);
131
}
132
}
ilAssLacAnswerValueNotExist\getValue
getValue()
Definition:
ilAssLacAnswerValueNotExist.php:91
ilLanguage
ilAssLacAnswerValueNotExist\$value
$value
Definition:
ilAssLacAnswerValueNotExist.php:25
ilAssLacAnswerValueNotExist\$answer_index
$answer_index
Definition:
ilAssLacAnswerValueNotExist.php:30
ilAssLacAnswerValueNotExist
Definition:
ilAssLacAnswerValueNotExist.php:15
ilAssLacAnswerValueNotExist\getQuestionIndex
getQuestionIndex()
Definition:
ilAssLacAnswerValueNotExist.php:75
ilAssLacFormAlertProvider
Definition:
ilAssLacFormAlertProvider.php:10
ilAssLacAnswerValueNotExist\__construct
__construct($question_index, $value, $answer_index=null)
Definition:
ilAssLacAnswerValueNotExist.php:37
$lng
$lng
Definition:
save_question_post_data.php:23
ilAssLacAnswerValueNotExist\getAnswerIndex
getAnswerIndex()
Definition:
ilAssLacAnswerValueNotExist.php:83
ilAssLacAnswerValueNotExist\getFormAlert
getFormAlert(ilLanguage $lng)
Definition:
ilAssLacAnswerValueNotExist.php:100
ILIAS\GlobalScreen\Provider\__construct
__construct(Container $dic, ilPlugin $plugin)
Definition:
PluginProviderHelper.php:40
ilLanguage\txt
txt($a_topic, $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:257
ilAssLacException
Definition:
ilAssLacException.php:12
ilAssLacAnswerValueNotExist\$question_index
$question_index
Definition:
ilAssLacAnswerValueNotExist.php:20
Modules
TestQuestionPool
classes
questions
LogicalAnswerCompare
Exception
ilAssLacAnswerValueNotExist.php
Generated on Sun Apr 27 2025 21:01:12 for ILIAS by
1.8.13 (using
Doxyfile
)