ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
ilAssLacExpressionNotSupportedByQuestion.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
ilAssLacExpressionNotSupportedByQuestion
extends
ilAssLacException
implements
ilAssLacFormAlertProvider
16
{
20
protected
$expression
;
21
25
protected
$question_index
;
26
31
public
function
__construct
(
$expression
,
$question_index
)
32
{
33
$this->expression =
$expression
;
34
$this->question_index =
$question_index
;
35
36
if
($this->
getQuestionIndex
() === null) {
37
$msg = sprintf(
38
'The expression "%s" is not supported by the current question'
,
39
$this->
getExpression
()
40
);
41
}
else
{
42
$msg = sprintf(
43
'The expression "%s" is not supported by the question with index "Q%s"'
,
44
$this->
getExpression
(),
45
$this->
getQuestionIndex
()
46
);
47
}
48
49
parent::__construct($msg);
50
}
51
55
public
function
getQuestionIndex
()
56
{
57
return
$this->question_index
;
58
}
59
63
public
function
getExpression
()
64
{
65
return
$this->expression
;
66
}
67
72
public
function
getFormAlert
(
ilLanguage
$lng
)
73
{
74
if
($this->
getQuestionIndex
() === null) {
75
return
sprintf(
76
$lng->
txt
(
"ass_lac_expression_not_supported_by_cur_question"
),
77
$this->
getExpression
()
78
);
79
}
80
81
return
sprintf(
82
$lng->
txt
(
"ass_lac_expression_not_supported_by_question"
),
83
$this->
getQuestionIndex
(),
84
$this->
getExpression
()
85
);
86
}
87
}
ilAssLacExpressionNotSupportedByQuestion\$expression
$expression
Definition:
ilAssLacExpressionNotSupportedByQuestion.php:20
ilAssLacExpressionNotSupportedByQuestion
Definition:
ilAssLacExpressionNotSupportedByQuestion.php:15
ilAssLacExpressionNotSupportedByQuestion\getFormAlert
getFormAlert(ilLanguage $lng)
Definition:
ilAssLacExpressionNotSupportedByQuestion.php:72
ilAssLacExpressionNotSupportedByQuestion\$question_index
$question_index
Definition:
ilAssLacExpressionNotSupportedByQuestion.php:25
ilAssLacFormAlertProvider
Definition:
ilAssLacFormAlertProvider.php:10
ilAssLacExpressionNotSupportedByQuestion\getQuestionIndex
getQuestionIndex()
Definition:
ilAssLacExpressionNotSupportedByQuestion.php:55
ilAssLacExpressionNotSupportedByQuestion\__construct
__construct($expression, $question_index)
Definition:
ilAssLacExpressionNotSupportedByQuestion.php:31
$lng
global $lng
Definition:
privfeed.php:17
ilLanguage
language handling
Definition:
class.ilLanguage.php:26
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:244
ilAssLacException
Definition:
ilAssLacException.php:12
ilAssLacExpressionNotSupportedByQuestion\getExpression
getExpression()
Definition:
ilAssLacExpressionNotSupportedByQuestion.php:63
Modules
TestQuestionPool
classes
questions
LogicalAnswerCompare
Exception
ilAssLacExpressionNotSupportedByQuestion.php
Generated on Sat Jan 18 2025 19:01:24 for ILIAS by
1.8.13 (using
Doxyfile
)