ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 
)

Member Function Documentation

◆ getId()

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

Definition at line 67 of file SuggestedSolution.php.

67 : int
68 {
69 return $this->id;
70 }

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

◆ getImportId()

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

◆ getLastUpdate()

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

Definition at line 111 of file SuggestedSolution.php.

111 : \DateTimeImmutable
112 {
113 return $this->last_update;
114 }

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

◆ getQuestionId()

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

◆ getStorableValue()

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

◆ getSubquestionIndex()

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

◆ getType()

◆ isOfTypeFile()

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

◆ isOfTypeLink()

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

Definition at line 121 of file SuggestedSolution.php.

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 }

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

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

+ 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.

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

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

◆ withImportId()

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

Definition at line 93 of file SuggestedSolution.php.

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

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

◆ withQuestionId()

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

Definition at line 82 of file SuggestedSolution.php.

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

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

◆ withSubquestionIndex()

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

Definition at line 104 of file SuggestedSolution.php.

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

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

Field Documentation

◆ $id

◆ $import_id

◆ $last_update

◆ $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',
self::TYPE_LM_CHAPTER => 'obj_st',
self::TYPE_LM_PAGE => 'obj_pg',
self::TYPE_GLOSARY_TERM => 'glossary_term',
self::TYPE_FILE => 'fileDownload'
]

Definition at line 36 of file SuggestedSolution.php.


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