ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ 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
{
38
$msg = sprintf(
39
'The Current Question does not have an answer with the index "%s"'
, $this->
getAnswerIndex
()
40
);
41
}
42
else
43
{
44
$msg = sprintf(
45
'The Question with index "Q%s" does not have an answer with the index "%s" '
,
46
$this->
getQuestionIndex
(), $this->
getAnswerIndex
()
47
);
48
}
49
50
parent::__construct($msg);
51
}
52
56
public
function
getQuestionIndex
()
57
{
58
return
$this->question_index
;
59
}
60
64
public
function
getAnswerIndex
()
65
{
66
return
$this->answer_index
;
67
}
68
73
public
function
getFormAlert
(
ilLanguage
$lng
)
74
{
75
if
($this->
getQuestionIndex
() === null )
76
{
77
return
sprintf(
78
$lng->
txt
(
"ass_lac_answer_index_not_exist_cur_qst"
), $this->
getAnswerIndex
()
79
);
80
}
81
82
return
sprintf(
83
$lng->
txt
(
"ass_lac_answer_index_not_exist"
), $this->
getQuestionIndex
(), $this->
getAnswerIndex
()
84
);
85
}
86
}
ilAssLacAnswerIndexNotExist\$question_index
$question_index
Definition:
ilAssLacAnswerIndexNotExist.php:20
ilAssLacAnswerIndexNotExist\$answer_index
$answer_index
Definition:
ilAssLacAnswerIndexNotExist.php:25
ilAssLacAnswerIndexNotExist\getQuestionIndex
getQuestionIndex()
Definition:
ilAssLacAnswerIndexNotExist.php:56
ilAssLacAnswerIndexNotExist\__construct
__construct($question_index, $answer_index)
Definition:
ilAssLacAnswerIndexNotExist.php:31
ilAssLacFormAlertProvider
Definition:
ilAssLacFormAlertProvider.php:10
$lng
global $lng
Definition:
privfeed.php:17
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:253
ilAssLacAnswerIndexNotExist
Definition:
ilAssLacAnswerIndexNotExist.php:15
ilAssLacException
Definition:
ilAssLacException.php:12
ilAssLacAnswerIndexNotExist\getAnswerIndex
getAnswerIndex()
Definition:
ilAssLacAnswerIndexNotExist.php:64
ilAssLacAnswerIndexNotExist\getFormAlert
getFormAlert(ilLanguage $lng)
Definition:
ilAssLacAnswerIndexNotExist.php:73
Modules
TestQuestionPool
classes
questions
LogicalAnswerCompare
Exception
ilAssLacAnswerIndexNotExist.php
Generated on Fri Jan 17 2025 19:01:06 for ILIAS by
1.8.13 (using
Doxyfile
)