ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ILIAS\TA\Questions\assQuestionSuggestedSolution Class Reference

a suggested solution More...

+ Inheritance diagram for ILIAS\TA\Questions\assQuestionSuggestedSolution:
+ Collaboration diagram for ILIAS\TA\Questions\assQuestionSuggestedSolution:

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\TA\Questions\assQuestionSuggestedSolution::__construct ( int  $id,
int  $question_id,
int  $subquestion_index,
string  $import_id,
\DateTimeImmutable  $last_update 
)

Member Function Documentation

◆ getId()

ILIAS\TA\Questions\assQuestionSuggestedSolution::getId ( )

◆ getImportId()

ILIAS\TA\Questions\assQuestionSuggestedSolution::getImportId ( )

◆ getLastUpdate()

ILIAS\TA\Questions\assQuestionSuggestedSolution::getLastUpdate ( )

Definition at line 110 of file assQuestionSuggestedSolution.php.

References ILIAS\TA\Questions\assQuestionSuggestedSolution\$last_update.

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

◆ getQuestionId()

ILIAS\TA\Questions\assQuestionSuggestedSolution::getQuestionId ( )

◆ getStorableValue()

ILIAS\TA\Questions\assQuestionSuggestedSolution::getStorableValue ( )
abstract

Referenced by ILIAS\TA\Questions\assQuestionSuggestedSolution\__construct().

+ Here is the caller graph for this function:

◆ getSubquestionIndex()

ILIAS\TA\Questions\assQuestionSuggestedSolution::getSubquestionIndex ( )

◆ getType()

ILIAS\TA\Questions\assQuestionSuggestedSolution::getType ( )
abstract

◆ isOfTypeFile()

ILIAS\TA\Questions\assQuestionSuggestedSolution::isOfTypeFile ( )

Definition at line 115 of file assQuestionSuggestedSolution.php.

References ILIAS\TA\Questions\assQuestionSuggestedSolution\getType().

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

◆ isOfTypeLink()

ILIAS\TA\Questions\assQuestionSuggestedSolution::isOfTypeLink ( )

Definition at line 120 of file assQuestionSuggestedSolution.php.

References ILIAS\TA\Questions\assQuestionSuggestedSolution\getType().

Referenced by ILIAS\TA\Questions\assQuestionSuggestedSolutionsDatabaseRepository\additionalOnStore().

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

◆ withId()

ILIAS\TA\Questions\assQuestionSuggestedSolution::withId ( int  $id)

Definition at line 70 of file assQuestionSuggestedSolution.php.

References ILIAS\TA\Questions\assQuestionSuggestedSolution\$id.

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

◆ withImportId()

ILIAS\TA\Questions\assQuestionSuggestedSolution::withImportId ( string  $import_id)

Definition at line 92 of file assQuestionSuggestedSolution.php.

References ILIAS\TA\Questions\assQuestionSuggestedSolution\$import_id.

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

◆ withQuestionId()

ILIAS\TA\Questions\assQuestionSuggestedSolution::withQuestionId ( int  $question_id)

Definition at line 81 of file assQuestionSuggestedSolution.php.

References ILIAS\TA\Questions\assQuestionSuggestedSolution\$question_id.

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

◆ withSubquestionIndex()

ILIAS\TA\Questions\assQuestionSuggestedSolution::withSubquestionIndex ( int  $subquestion_index)

Definition at line 103 of file assQuestionSuggestedSolution.php.

References ILIAS\TA\Questions\assQuestionSuggestedSolution\$subquestion_index.

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

Field Documentation

◆ $id

◆ $import_id

◆ $last_update

DateTimeImmutable ILIAS\TA\Questions\assQuestionSuggestedSolution::$last_update
protected

◆ $question_id

◆ $subquestion_index

◆ TYPE_FILE

const ILIAS\TA\Questions\assQuestionSuggestedSolution::TYPE_FILE = 'file'

◆ TYPE_GLOSARY_TERM

const ILIAS\TA\Questions\assQuestionSuggestedSolution::TYPE_GLOSARY_TERM = 'git'

◆ TYPE_LM

const ILIAS\TA\Questions\assQuestionSuggestedSolution::TYPE_LM = 'lm'

◆ TYPE_LM_CHAPTER

const ILIAS\TA\Questions\assQuestionSuggestedSolution::TYPE_LM_CHAPTER = 'st'

◆ TYPE_LM_PAGE

const ILIAS\TA\Questions\assQuestionSuggestedSolution::TYPE_LM_PAGE = 'pg'

◆ TYPES

const ILIAS\TA\Questions\assQuestionSuggestedSolution::TYPES
Initial value:
= [
self::TYPE_LM => 'obj_lm'

Definition at line 35 of file assQuestionSuggestedSolution.php.


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