19 declare(strict_types=1);
    29         private readonly 
int $question_id,
    30         private ?
int $original_id = null,
    31         private ?
string $external_id = null,
    32         private int $parent_object_id = 0,
    33         private ?
int $origin_object_id = null,
    34         private readonly 
int $type_id = 0,
    35         private readonly 
string $class_name = 
'',
    36         private int $owner = 0,
    37         private string $title = 
'',
    38         private string $description = 
'',
    39         private string $question_text = 
'',
    40         private float $available_points = 0.0,
    41         private int $number_of_tries = 0,
    43         private ?
string $author = null,
    44         private int $updated_timestamp = 0,
    45         private int $created_timestamp = 0,
    46         private bool $complete = 
true,
    47         private readonly ?
string $additional_content_editing_mode = null
    53         return $this->question_id;
    58         return $this->original_id;
    64         $clone->original_id = $original_id;
    70         return $this->external_id;
    76         $clone->external_id = $external_id;
    82         return $this->parent_object_id;
    88         $clone->parent_object_id = $parent_id;
    94         return $this->origin_object_id;
   100         $clone->origin_object_id = $origin_object_id;
   106         return $this->type_id;
   111         return $this->class_name;
   116         return $this->class_name . 
'GUI';
   121         if ($this->class_name === 
'') {
   125         if (file_exists(ILIAS_ABSOLUTE_PATH . 
'/components/ILIAS/TestQuestionPool/classes/class.' . $this->class_name . 
'.php')) {
   126             return $lng->
txt($this->class_name);
   129         foreach ($this->component_factory->getActivePluginsInSlot(
'qst') as $pl) {
   130             if ($pl->getQuestionType() === $this->class_name) {
   131                 return $pl->getQuestionTypeTranslation();
   144         $clone = clone $this;
   145         $clone->owner = $owner;
   156         $clone = clone $this;
   157         $clone->title = $title;
   163         return $this->description;
   168         $clone = clone $this;
   169         $clone->description = $description;
   175         return $this->question_text;
   180         $clone = clone $this;
   181         $clone->question_text = $question_text;
   187         return $this->available_points;
   192         $clone = clone $this;
   193         $clone->reachable_points = $reachable_points;
   199         return $this->number_of_tries;
   204         $clone = clone $this;
   205         $clone->number_of_tries = $number_of_tries;
   216         $clone = clone $this;
   223         return $this->author;
   228         $clone = clone $this;
   229         $clone->author = $author;
   235         return $this->updated_timestamp;
   240         $clone = clone $this;
   241         $clone->updated_timestamp = $updated_timestamp;
   247         return $this->created_timestamp;
   252         $clone = clone $this;
   253         $clone->created_timestamp = $created_timestamp;
   259         return $this->complete;
   264         $clone = clone $this;
   265         $clone->complete = $complete;
   271         return $this->additional_content_editing_mode;
   279         return $this->original_id !== null;
 getAdditionalContentEditingMode()
 
withExternalId(string $external_id)
 
isClone()
Checks whether the question is a clone of another question or not. 
 
withCreatedTimestamp(int $created_timestamp)
 
withUpdatedTimestamp(int $updated_timestamp)
 
withQuestionText(string $question_text)
 
withDescription(string $description)
 
withNumberOfTries(int $number_of_tries)
 
withParentObjectId(int $parent_id)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
 
withMaximumPoints(float $reachable_points)
 
isRequiredInformationComplete()
 
withOriginObjectId(int $origin_object_id)
 
withOriginalId(int $original_id)
 
getTypeName(Language $lng)
 
withCompletionStatus(bool $complete)
 
__construct(private readonly \ilComponentFactory $component_factory, private readonly int $question_id, private ?int $original_id=null, private ?string $external_id=null, private int $parent_object_id=0, private ?int $origin_object_id=null, private readonly int $type_id=0, private readonly string $class_name='', private int $owner=0, private string $title='', private string $description='', private string $question_text='', private float $available_points=0.0, private int $number_of_tries=0, private string $lifecycle='draft', private ?string $author=null, private int $updated_timestamp=0, private int $created_timestamp=0, private bool $complete=true, private readonly ?string $additional_content_editing_mode=null)
 
withAuthor(string $author)
 
withLifecycle(string $lifecycle)