ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 {
38 $msg = sprintf(
39 'The expression "%s" is not supported by the current question', $this->getExpression()
40 );
41 }
42 else
43 {
44 $msg = sprintf(
45 'The expression "%s" is not supported by the question with index "Q%s"',
46 $this->getExpression(), $this->getQuestionIndex()
47 );
48 }
49
50 parent::__construct($msg);
51 }

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 64 of file ilAssLacExpressionNotSupportedByQuestion.php.

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

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 73 of file ilAssLacExpressionNotSupportedByQuestion.php.

74 {
75 if( $this->getQuestionIndex() === null )
76 {
77 return sprintf(
78 $lng->txt("ass_lac_expression_not_supported_by_cur_question"), $this->getExpression()
79 );
80 }
81
82 return sprintf(
83 $lng->txt("ass_lac_expression_not_supported_by_question"), $this->getQuestionIndex(), $this->getExpression()
84 );
85 }
global $lng
Definition: privfeed.php:40

References $lng, and getQuestionIndex().

+ Here is the call graph for this function:

◆ getQuestionIndex()

ilAssLacExpressionNotSupportedByQuestion::getQuestionIndex ( )
Returns
int

Definition at line 56 of file ilAssLacExpressionNotSupportedByQuestion.php.

57 {
59 }

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: