ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilAssLacAnswerIndexNotExist Class Reference
+ Inheritance diagram for ilAssLacAnswerIndexNotExist:
+ Collaboration diagram for ilAssLacAnswerIndexNotExist:

Public Member Functions

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

Protected Attributes

 $question_index
 
 $answer_index
 

Detailed Description

Definition at line 28 of file ilAssLacAnswerIndexNotExist.php.

Constructor & Destructor Documentation

◆ __construct()

ilAssLacAnswerIndexNotExist::__construct (   $question_index,
  $answer_index 
)
Parameters
int$question_index
int$answer_index

Reimplemented from ilException.

Definition at line 44 of file ilAssLacAnswerIndexNotExist.php.

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 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $answer_index, $question_index, ILIAS\GlobalScreen\Provider\__construct(), getAnswerIndex(), and getQuestionIndex().

+ Here is the call graph for this function:

Member Function Documentation

◆ getAnswerIndex()

ilAssLacAnswerIndexNotExist::getAnswerIndex ( )
Returns
int

Definition at line 76 of file ilAssLacAnswerIndexNotExist.php.

76 : int
77 {
79 }

References $answer_index.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ getFormAlert()

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

Implements ilAssLacFormAlertProvider.

Definition at line 85 of file ilAssLacAnswerIndexNotExist.php.

85 : 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 }
global $lng
Definition: privfeed.php:31

References $lng, and getQuestionIndex().

+ Here is the call graph for this function:

◆ getQuestionIndex()

ilAssLacAnswerIndexNotExist::getQuestionIndex ( )
Returns
int

Definition at line 68 of file ilAssLacAnswerIndexNotExist.php.

68 : int
69 {
71 }

References $question_index.

Referenced by __construct(), and getFormAlert().

+ Here is the caller graph for this function:

Field Documentation

◆ $answer_index

ilAssLacAnswerIndexNotExist::$answer_index
protected

Definition at line 38 of file ilAssLacAnswerIndexNotExist.php.

Referenced by __construct(), and getAnswerIndex().

◆ $question_index

ilAssLacAnswerIndexNotExist::$question_index
protected

Definition at line 33 of file ilAssLacAnswerIndexNotExist.php.

Referenced by __construct(), and getQuestionIndex().


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