ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
ilAssLacAnswerIndexNotExist.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
ilAssLacAnswerIndexNotExist
extends
ilAssLacException
implements
ilAssLacFormAlertProvider
16
{
20
protected
$question_index
;
21
25
protected
$answer_index
;
26
31
public
function
__construct
(
$question_index
,
$answer_index
)
32
{
33
$this->question_index =
$question_index
;
34
$this->answer_index =
$answer_index
;
35
36
if
($this->
getQuestionIndex
() === null) {
37
$msg = sprintf(
38
'The Current Question does not have an answer with the index "%s"'
,
39
$this->
getAnswerIndex
()
40
);
41
}
else
{
42
$msg = sprintf(
43
'The Question with index "Q%s" does not have an answer with the index "%s" '
,
44
$this->
getQuestionIndex
(),
45
$this->
getAnswerIndex
()
46
);
47
}
48
49
parent::__construct($msg);
50
}
51
55
public
function
getQuestionIndex
()
56
{
57
return
$this->question_index
;
58
}
59
63
public
function
getAnswerIndex
()
64
{
65
return
$this->answer_index
;
66
}
67
72
public
function
getFormAlert
(
ilLanguage
$lng
)
73
{
74
if
($this->
getQuestionIndex
() === null) {
75
return
sprintf(
76
$lng->
txt
(
"ass_lac_answer_index_not_exist_cur_qst"
),
77
$this->
getAnswerIndex
()
78
);
79
}
80
81
return
sprintf(
82
$lng->
txt
(
"ass_lac_answer_index_not_exist"
),
83
$this->
getQuestionIndex
(),
84
$this->
getAnswerIndex
()
85
);
86
}
87
}
ilAssLacAnswerIndexNotExist\$question_index
$question_index
Definition:
ilAssLacAnswerIndexNotExist.php:20
ilAssLacAnswerIndexNotExist\$answer_index
$answer_index
Definition:
ilAssLacAnswerIndexNotExist.php:25
ilAssLacAnswerIndexNotExist\getQuestionIndex
getQuestionIndex()
Definition:
ilAssLacAnswerIndexNotExist.php:55
ilAssLacAnswerIndexNotExist\__construct
__construct($question_index, $answer_index)
Definition:
ilAssLacAnswerIndexNotExist.php:31
ilAssLacFormAlertProvider
Definition:
ilAssLacFormAlertProvider.php:10
$lng
$lng
Definition:
save_question_post_data.php:23
ilLanguage
language handling
Definition:
class.ilLanguage.php:26
php
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:237
ilAssLacAnswerIndexNotExist
Definition:
ilAssLacAnswerIndexNotExist.php:15
ilAssLacException
Definition:
ilAssLacException.php:12
ilAssLacAnswerIndexNotExist\getAnswerIndex
getAnswerIndex()
Definition:
ilAssLacAnswerIndexNotExist.php:63
ilAssLacAnswerIndexNotExist\getFormAlert
getFormAlert(ilLanguage $lng)
Definition:
ilAssLacAnswerIndexNotExist.php:72
Modules
TestQuestionPool
classes
questions
LogicalAnswerCompare
Exception
ilAssLacAnswerIndexNotExist.php
Generated on Thu Jan 16 2025 19:02:14 for ILIAS by
1.8.13 (using
Doxyfile
)