ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilAssLacExpressionNotSupportedByQuestion Class Reference
+ Inheritance diagram for ilAssLacExpressionNotSupportedByQuestion:
+ Collaboration diagram for ilAssLacExpressionNotSupportedByQuestion:

Public Member Functions

 __construct ($expression, $question_index)
 
 getQuestionIndex ()
 
 getExpression ()
 
 getFormAlert (ilLanguage $lng)
 
- Public Member Functions inherited from ilException
 __construct ($a_message, $a_code=0, Throwable $previous=null)
 A code isn't optional as in build in class Exception. More...
 

Protected Attributes

 $expression
 
 $question_index
 

Detailed Description

Definition at line 28 of file ilAssLacExpressionNotSupportedByQuestion.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 44 of file ilAssLacExpressionNotSupportedByQuestion.php.

References $expression, $question_index, ILIAS\GlobalScreen\Provider\__construct(), getExpression(), and getQuestionIndex().

45  {
46  $this->expression = $expression;
47  $this->question_index = $question_index;
48 
49  if ($this->getQuestionIndex() === null) {
50  $msg = sprintf(
51  'The expression "%s" is not supported by the current question',
52  $this->getExpression()
53  );
54  } else {
55  $msg = sprintf(
56  'The expression "%s" is not supported by the question with index "Q%s"',
57  $this->getExpression(),
58  $this->getQuestionIndex()
59  );
60  }
61 
62  parent::__construct($msg);
63  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getExpression()

ilAssLacExpressionNotSupportedByQuestion::getExpression ( )
Returns
string

Definition at line 76 of file ilAssLacExpressionNotSupportedByQuestion.php.

References $expression.

Referenced by __construct(), and getFormAlert().

+ Here is the caller graph for this function:

◆ getFormAlert()

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

Implements ilAssLacFormAlertProvider.

Definition at line 85 of file ilAssLacExpressionNotSupportedByQuestion.php.

References getExpression(), getQuestionIndex(), and ilLanguage\txt().

85  : string
86  {
87  if ($this->getQuestionIndex() === null) {
88  return sprintf(
89  $lng->txt("ass_lac_expression_not_supported_by_cur_question"),
90  $this->getExpression()
91  );
92  }
93 
94  return sprintf(
95  $lng->txt("ass_lac_expression_not_supported_by_question"),
96  $this->getQuestionIndex(),
97  $this->getExpression()
98  );
99  }
txt(string $a_topic, string $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...
+ Here is the call graph for this function:

◆ getQuestionIndex()

ilAssLacExpressionNotSupportedByQuestion::getQuestionIndex ( )
Returns
int

Definition at line 68 of file ilAssLacExpressionNotSupportedByQuestion.php.

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

Referenced by __construct(), and getExpression().

◆ $question_index

ilAssLacExpressionNotSupportedByQuestion::$question_index
protected

Definition at line 38 of file ilAssLacExpressionNotSupportedByQuestion.php.

Referenced by __construct(), and getQuestionIndex().


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