ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilAssLacExpressionNotSupportedByQuestion.php
Go to the documentation of this file.
1<?php
2
29{
33 protected $expression;
34
38 protected $question_index;
39
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
63 }
64
68 public function getQuestionIndex(): ?int
69 {
71 }
72
76 public function getExpression(): string
77 {
78 return $this->expression;
79 }
80
85 public function getFormAlert(ilLanguage $lng): 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 }
100}
language handling
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $lng
Definition: privfeed.php:31