ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 message isn't optional as in build in class Exception. More...
 
 getFormAlert (ilLanguage $lng)
 

Protected Attributes

 $question_index
 
 $answer_index
 

Detailed Description

Definition at line 15 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 31 of file ilAssLacAnswerIndexNotExist.php.

32 {
33 $this->question_index = $question_index;
34 $this->answer_index = $answer_index;
35
36 if ($this->getQuestionIndex() === null) {
37 $msg = sprintf(
38 'The Current Question does not have an answer with the index "%s"',
39 $this->getAnswerIndex()
40 );
41 } else {
42 $msg = sprintf(
43 'The Question with index "Q%s" does not have an answer with the index "%s" ',
44 $this->getQuestionIndex(),
45 $this->getAnswerIndex()
46 );
47 }
48
50 }
__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 63 of file ilAssLacAnswerIndexNotExist.php.

64 {
66 }

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 72 of file ilAssLacAnswerIndexNotExist.php.

73 {
74 if ($this->getQuestionIndex() === null) {
75 return sprintf(
76 $lng->txt("ass_lac_answer_index_not_exist_cur_qst"),
77 $this->getAnswerIndex()
78 );
79 }
80
81 return sprintf(
82 $lng->txt("ass_lac_answer_index_not_exist"),
83 $this->getQuestionIndex(),
84 $this->getAnswerIndex()
85 );
86 }
$lng

References $lng, and getQuestionIndex().

+ Here is the call graph for this function:

◆ getQuestionIndex()

ilAssLacAnswerIndexNotExist::getQuestionIndex ( )
Returns
int

Definition at line 55 of file ilAssLacAnswerIndexNotExist.php.

56 {
58 }

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 25 of file ilAssLacAnswerIndexNotExist.php.

Referenced by __construct(), and getAnswerIndex().

◆ $question_index

ilAssLacAnswerIndexNotExist::$question_index
protected

Definition at line 20 of file ilAssLacAnswerIndexNotExist.php.

Referenced by __construct(), and getQuestionIndex().


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