ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilAssLacAnswerIndexNotExist.php
Go to the documentation of this file.
1<?php
2
29{
33 protected $question_index;
34
38 protected $answer_index;
39
45 {
46 $this->question_index = $question_index;
47 $this->answer_index = $answer_index;
48
49 if ($this->getQuestionIndex() === null) {
50 $msg = sprintf(
51 'The Current Question does not have an answer with the index "%s"',
52 $this->getAnswerIndex()
53 );
54 } else {
55 $msg = sprintf(
56 'The Question with index "Q%s" does not have an answer with the index "%s" ',
57 $this->getQuestionIndex(),
58 $this->getAnswerIndex()
59 );
60 }
61
63 }
64
68 public function getQuestionIndex(): int
69 {
71 }
72
76 public function getAnswerIndex(): int
77 {
79 }
80
85 public function getFormAlert(ilLanguage $lng): string
86 {
87 if ($this->getQuestionIndex() === null) {
88 return sprintf(
89 $lng->txt("ass_lac_answer_index_not_exist_cur_qst"),
90 $this->getAnswerIndex()
91 );
92 }
93
94 return sprintf(
95 $lng->txt("ass_lac_answer_index_not_exist"),
96 $this->getQuestionIndex(),
97 $this->getAnswerIndex()
98 );
99 }
100}
__construct($question_index, $answer_index)
language handling
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $lng
Definition: privfeed.php:31