ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
ilAssLacAnswerIndexNotExist.php
Go to the documentation of this file.
1
<?php
2
28
class
ilAssLacAnswerIndexNotExist
extends
ilAssLacException
implements
ilAssLacFormAlertProvider
29
{
33
protected
$question_index
;
34
38
protected
$answer_index
;
39
44
public
function
__construct
(
$question_index
,
$answer_index
)
45
{
46
$this->question_index =
$question_index
;
47
$this->answer_index =
$answer_index
;
48
49
if
($this->
getQuestionIndex
() ===
null
) {
50
$msg = sprintf(
51
'The Current Question does not have an answer with the index "%s"'
,
52
$this->
getAnswerIndex
()
53
);
54
}
else
{
55
$msg = sprintf(
56
'The Question with index "Q%s" does not have an answer with the index "%s" '
,
57
$this->
getQuestionIndex
(),
58
$this->
getAnswerIndex
()
59
);
60
}
61
62
parent::__construct
($msg);
63
}
64
68
public
function
getQuestionIndex
():
int
69
{
70
return
$this->question_index
;
71
}
72
76
public
function
getAnswerIndex
():
int
77
{
78
return
$this->answer_index
;
79
}
80
85
public
function
getFormAlert
(
ilLanguage
$lng
): string
86
{
87
if
($this->
getQuestionIndex
() ===
null
) {
88
return
sprintf(
89
$lng->
txt
(
"ass_lac_answer_index_not_exist_cur_qst"
),
90
$this->
getAnswerIndex
()
91
);
92
}
93
94
return
sprintf(
95
$lng->
txt
(
"ass_lac_answer_index_not_exist"
),
96
$this->
getQuestionIndex
(),
97
$this->
getAnswerIndex
()
98
);
99
}
100
}
ilAssLacAnswerIndexNotExist\$question_index
$question_index
Definition:
ilAssLacAnswerIndexNotExist.php:33
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
ilAssLacAnswerIndexNotExist\$answer_index
$answer_index
Definition:
ilAssLacAnswerIndexNotExist.php:38
ilAssLacAnswerIndexNotExist\getQuestionIndex
getQuestionIndex()
Definition:
ilAssLacAnswerIndexNotExist.php:68
ilAssLacAnswerIndexNotExist\__construct
__construct($question_index, $answer_index)
Definition:
ilAssLacAnswerIndexNotExist.php:44
null
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Definition:
shib_logout.php:144
ilAssLacFormAlertProvider
Definition:
ilAssLacFormAlertProvider.php:25
ILIAS\GlobalScreen\Provider\__construct
__construct(Container $dic, ilPlugin $plugin)
Definition:
PluginProviderHelper.php:37
$lng
global $lng
Definition:
privfeed.php:31
ilAssLacAnswerIndexNotExist
Definition:
ilAssLacAnswerIndexNotExist.php:28
ilAssLacException
Definition:
ilAssLacException.php:25
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
ilAssLacAnswerIndexNotExist\getAnswerIndex
getAnswerIndex()
Definition:
ilAssLacAnswerIndexNotExist.php:76
ilAssLacAnswerIndexNotExist\getFormAlert
getFormAlert(ilLanguage $lng)
Definition:
ilAssLacAnswerIndexNotExist.php:85
components
ILIAS
TestQuestionPool
classes
questions
LogicalAnswerCompare
Exception
ilAssLacAnswerIndexNotExist.php
Generated on Sun Aug 31 2025 23:04:04 for ILIAS by
1.8.13 (using
Doxyfile
)