ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilAssLacExpressionNotSupportedByQuestion Class Reference
+ Inheritance diagram for ilAssLacExpressionNotSupportedByQuestion:
+ Collaboration diagram for ilAssLacExpressionNotSupportedByQuestion:

Public Member Functions

 __construct ($expression, $question_index)
 
 getQuestionIndex ()
 
 getExpression ()
 
 getFormAlert (ilLanguage $lng)
 
 __construct ($a_message, $a_code=0)
 A message isn't optional as in build in class Exception. More...
 
 getFormAlert (ilLanguage $lng)
 

Protected Attributes

 $expression
 
 $question_index
 

Detailed Description

Definition at line 15 of file ilAssLacExpressionNotSupportedByQuestion.php.

Constructor & Destructor Documentation

◆ __construct()

ilAssLacExpressionNotSupportedByQuestion::__construct (   $expression,
  $question_index 
)
Parameters
string$expression
int$question_index

Reimplemented from ilException.

Definition at line 31 of file ilAssLacExpressionNotSupportedByQuestion.php.

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 }

References $expression, $question_index, getExpression(), and getQuestionIndex().

+ Here is the call graph for this function:

Member Function Documentation

◆ getExpression()

ilAssLacExpressionNotSupportedByQuestion::getExpression ( )
Returns
string

Definition at line 63 of file ilAssLacExpressionNotSupportedByQuestion.php.

64 {
65 return $this->expression;
66 }

References $expression.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ getFormAlert()

ilAssLacExpressionNotSupportedByQuestion::getFormAlert ( ilLanguage  $lng)
Parameters
ilLanguage$lng
Returns
string

Implements ilAssLacFormAlertProvider.

Definition at line 72 of file ilAssLacExpressionNotSupportedByQuestion.php.

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 }
$lng

References $lng, and getQuestionIndex().

+ Here is the call graph for this function:

◆ getQuestionIndex()

ilAssLacExpressionNotSupportedByQuestion::getQuestionIndex ( )
Returns
int

Definition at line 55 of file ilAssLacExpressionNotSupportedByQuestion.php.

56 {
58 }

References $question_index.

Referenced by __construct(), and getFormAlert().

+ Here is the caller graph for this function:

Field Documentation

◆ $expression

ilAssLacExpressionNotSupportedByQuestion::$expression
protected

Definition at line 20 of file ilAssLacExpressionNotSupportedByQuestion.php.

Referenced by __construct(), and getExpression().

◆ $question_index

ilAssLacExpressionNotSupportedByQuestion::$question_index
protected

Definition at line 25 of file ilAssLacExpressionNotSupportedByQuestion.php.

Referenced by __construct(), and getQuestionIndex().


The documentation for this class was generated from the following file: