ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution Class Reference

a suggested solution More...

+ Inheritance diagram for ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution:
+ Collaboration diagram for ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution:

Public Member Functions

 __construct (int $id, int $question_id, int $subquestion_index, string $import_id, \DateTimeImmutable $last_update)
 
 getType ()
 
 getStorableValue ()
 
 getId ()
 
 withId (int $id)
 
 getQuestionId ()
 
 withQuestionId (int $question_id)
 
 getImportId ()
 
 withImportId (string $import_id)
 
 getSubquestionIndex ()
 
 withSubquestionIndex (int $subquestion_index)
 
 getLastUpdate ()
 
 isOfTypeFile ()
 
 isOfTypeLink ()
 

Data Fields

const TYPE_LM = 'lm'
 
const TYPE_LM_CHAPTER = 'st'
 
const TYPE_LM_PAGE = 'pg'
 
const TYPE_GLOSARY_TERM = 'git'
 
const TYPE_FILE = 'file'
 
const TYPES
 

Protected Attributes

int $id
 
int $question_id
 
int $subquestion_index
 
string $import_id
 
DateTimeImmutable $last_update
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::__construct ( int  $id,
int  $question_id,
int  $subquestion_index,
string  $import_id,
\DateTimeImmutable  $last_update 
)

Definition at line 50 of file SuggestedSolution.php.

References ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution\$id, ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution\$import_id, ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution\$last_update, ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution\$question_id, ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution\$subquestion_index, ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution\getStorableValue(), and ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution\getType().

+ Here is the call graph for this function:

Member Function Documentation

◆ getId()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::getId ( )

◆ getImportId()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::getImportId ( )

◆ getLastUpdate()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::getLastUpdate ( )

◆ getQuestionId()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::getQuestionId ( )

◆ getStorableValue()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::getStorableValue ( )
abstract

Referenced by ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution\__construct().

+ Here is the caller graph for this function:

◆ getSubquestionIndex()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::getSubquestionIndex ( )

◆ getType()

◆ isOfTypeFile()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::isOfTypeFile ( )

Definition at line 116 of file SuggestedSolution.php.

References ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution\getType().

116  : bool
117  {
118  return $this->getType() === self::TYPE_FILE;
119  }
+ Here is the call graph for this function:

◆ isOfTypeLink()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::isOfTypeLink ( )

Definition at line 121 of file SuggestedSolution.php.

References ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution\getType().

Referenced by ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionsDatabaseRepository\additionalOnStore().

121  : bool
122  {
123  return in_array(
124  $this->getType(),
125  [
126  self::TYPE_LM,
127  self::TYPE_LM_CHAPTER,
128  self::TYPE_LM_PAGE,
129  self::TYPE_GLOSARY_TERM,
130  ]
131  );
132  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withId()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::withId ( int  $id)

Definition at line 71 of file SuggestedSolution.php.

References ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution\$id.

71  : static
72  {
73  $clone = clone $this;
74  $clone->id = $id;
75  return $clone;
76  }

◆ withImportId()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::withImportId ( string  $import_id)

Definition at line 93 of file SuggestedSolution.php.

References ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution\$import_id.

93  : static
94  {
95  $clone = clone $this;
96  $clone->import_id = $import_id;
97  return $clone;
98  }

◆ withQuestionId()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::withQuestionId ( int  $question_id)

Definition at line 82 of file SuggestedSolution.php.

References ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution\$question_id.

82  : static
83  {
84  $clone = clone $this;
85  $clone->question_id = $question_id;
86  return $clone;
87  }

◆ withSubquestionIndex()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::withSubquestionIndex ( int  $subquestion_index)

Definition at line 104 of file SuggestedSolution.php.

References ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution\$subquestion_index.

104  : static
105  {
106  $clone = clone $this;
107  $clone->subquestion_index = $subquestion_index;
108  return $clone;
109  }

Field Documentation

◆ $id

◆ $import_id

◆ $last_update

DateTimeImmutable ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::$last_update
protected

◆ $question_id

◆ $subquestion_index

◆ TYPE_FILE

const ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::TYPE_FILE = 'file'

◆ TYPE_GLOSARY_TERM

const ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::TYPE_GLOSARY_TERM = 'git'

◆ TYPE_LM

const ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::TYPE_LM = 'lm'

◆ TYPE_LM_CHAPTER

const ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::TYPE_LM_CHAPTER = 'st'

◆ TYPE_LM_PAGE

const ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::TYPE_LM_PAGE = 'pg'

◆ TYPES

const ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution::TYPES
Initial value:
= [
self::TYPE_LM => 'obj_lm'

Definition at line 36 of file SuggestedSolution.php.


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