ILIAS  trunk Revision v11.0_alpha-1862-g4e205cb56d4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Test\Logging\TestQuestionAdministrationInteraction Class Reference
+ Inheritance diagram for ILIAS\Test\Logging\TestQuestionAdministrationInteraction:
+ Collaboration diagram for ILIAS\Test\Logging\TestQuestionAdministrationInteraction:

Public Member Functions

 __construct (private int $test_ref_id, private int $question_id, private int $admin_id, private TestQuestionAdministrationInteractionTypes $interaction_type, private int $modification_timestamp, private array $additional_data)
 
 getUniqueIdentifier ()
 
 withId (int $id)
 
 getLogEntryAsDataTableRow (\ilLanguage $lng, TitleColumnsBuilder $title_builder, DataRowBuilder $row_builder, array $environment)
 
 getLogEntryAsExportRow (\ilLanguage $lng, TitleColumnsBuilder $title_builder, AdditionalInformationGenerator $additional_info, array $environment)
 
 getParsedAdditionalInformation (AdditionalInformationGenerator $additional_info, UIFactory $ui_factory, array $environment)
 
 toStorage ()
 

Data Fields

const IDENTIFIER = 'qai'
 
- Data Fields inherited from ILIAS\Test\Logging\TestUserInteraction
const LANG_VAR_PREFIX = 'logs_'
 

Private Attributes

int $id
 

Detailed Description

Definition at line 31 of file TestQuestionAdministrationInteraction.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Test\Logging\TestQuestionAdministrationInteraction::__construct ( private int  $test_ref_id,
private int  $question_id,
private int  $admin_id,
private TestQuestionAdministrationInteractionTypes  $interaction_type,
private int  $modification_timestamp,
private array  $additional_data 
)
Parameters
array<stringlabel_lang_var => mixed value> $additional_data

Definition at line 40 of file TestQuestionAdministrationInteraction.php.

47  {
48 
49  }

Member Function Documentation

◆ getLogEntryAsDataTableRow()

ILIAS\Test\Logging\TestQuestionAdministrationInteraction::getLogEntryAsDataTableRow ( \ilLanguage  $lng,
TitleColumnsBuilder  $title_builder,
DataRowBuilder  $row_builder,
array  $environment 
)

Implements ILIAS\Test\Logging\TestUserInteraction.

Definition at line 63 of file TestQuestionAdministrationInteraction.php.

References ILIAS\Test\Logging\LogTable\ACTION_ID_SHOW_ADDITIONAL_INFO, ILIAS\UI\Component\Table\DataRowBuilder\buildDataRow(), ILIAS\Test\Utilities\TitleColumnsBuilder\buildQuestionTitleAsLink(), ILIAS\Test\Utilities\TitleColumnsBuilder\buildTestTitleAsLink(), ilUserUtil\getNamePresentation(), ILIAS\Test\Logging\TestQuestionAdministrationInteraction\getUniqueIdentifier(), null, and ilLanguage\txt().

68  : DataRow {
69  $values = [
70  'date_and_time' => \DateTimeImmutable::createFromFormat('U', (string) $this->modification_timestamp)
71  ->setTimezone($environment['timezone']),
72  'corresponding_test' => $title_builder->buildTestTitleAsLink(
73  $this->test_ref_id
74  ),
76  $this->admin_id,
77  false,
78  false,
79  '',
80  true
81  ),
82  'log_entry_type' => $lng->txt(self::LANG_VAR_PREFIX . self::IDENTIFIER),
83  'interaction_type' => $lng->txt(self::LANG_VAR_PREFIX . $this->interaction_type->value)
84  ];
85 
86  if ($this->question_id !== null) {
87  $values['question'] = $title_builder->buildQuestionTitleAsLink(
88  $this->question_id,
89  $this->test_ref_id
90  );
91  }
92  return $row_builder->buildDataRow(
93  $this->getUniqueIdentifier(),
94  $values
95  )->withDisabledAction(
97  $this->additional_data === []
98  );
99  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is:
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ getLogEntryAsExportRow()

ILIAS\Test\Logging\TestQuestionAdministrationInteraction::getLogEntryAsExportRow ( \ilLanguage  $lng,
TitleColumnsBuilder  $title_builder,
AdditionalInformationGenerator  $additional_info,
array  $environment 
)

Implements ILIAS\Test\Logging\TestUserInteraction.

Definition at line 101 of file TestQuestionAdministrationInteraction.php.

References ILIAS\Test\Utilities\TitleColumnsBuilder\buildQuestionTitleAsText(), ILIAS\Test\Utilities\TitleColumnsBuilder\buildTestTitleAsText(), ilUserUtil\getNamePresentation(), ILIAS\Test\Logging\AdditionalInformationGenerator\parseForExport(), and ilLanguage\txt().

106  : array {
107  return [
108  \DateTimeImmutable::createFromFormat('U', (string) $this->modification_timestamp)
109  ->setTimezone($environment['timezone'])
110  ->format($environment['date_format']),
111  $title_builder->buildTestTitleAsText($this->test_ref_id),
113  $this->admin_id,
114  false,
115  false,
116  '',
117  true
118  ),
119  '',
120  '',
121  $title_builder->buildQuestionTitleAsText($this->question_id),
122  $lng->txt(self::LANG_VAR_PREFIX . self::IDENTIFIER),
123  $lng->txt(self::LANG_VAR_PREFIX . $this->interaction_type->value),
124  $additional_info->parseForExport($this->additional_data, $environment)
125  ];
126  }
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is:
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ getParsedAdditionalInformation()

ILIAS\Test\Logging\TestQuestionAdministrationInteraction::getParsedAdditionalInformation ( AdditionalInformationGenerator  $additional_info,
UIFactory  $ui_factory,
array  $environment 
)

Implements ILIAS\Test\Logging\TestUserInteraction.

Definition at line 128 of file TestQuestionAdministrationInteraction.php.

References ILIAS\Test\Logging\AdditionalInformationGenerator\parseForTable().

133  return $additional_info->parseForTable($this->additional_data, $environment);
134  }
+ Here is the call graph for this function:

◆ getUniqueIdentifier()

ILIAS\Test\Logging\TestQuestionAdministrationInteraction::getUniqueIdentifier ( )

◆ toStorage()

ILIAS\Test\Logging\TestQuestionAdministrationInteraction::toStorage ( )

Implements ILIAS\Test\Logging\TestUserInteraction.

Definition at line 136 of file TestQuestionAdministrationInteraction.php.

References ilDBConstants\T_CLOB, ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

Referenced by ILIAS\Test\Logging\TestLoggingDatabaseRepository\storeQuestionAdministrationInteraction().

136  : array
137  {
138  return [
139  'ref_id' => [\ilDBConstants::T_INTEGER , $this->test_ref_id],
140  'qst_id' => [\ilDBConstants::T_INTEGER , $this->question_id],
141  'admin_id' => [\ilDBConstants::T_INTEGER , $this->admin_id],
142  'interaction_type' => [\ilDBConstants::T_TEXT , $this->interaction_type->value],
143  'modification_ts' => [\ilDBConstants::T_INTEGER , $this->modification_timestamp],
144  'additional_data' => [\ilDBConstants::T_CLOB , json_encode($this->additional_data)]
145  ];
146  }
+ Here is the caller graph for this function:

◆ withId()

ILIAS\Test\Logging\TestQuestionAdministrationInteraction::withId ( int  $id)

Implements ILIAS\Test\Logging\TestUserInteraction.

Definition at line 56 of file TestQuestionAdministrationInteraction.php.

References ILIAS\Test\Logging\TestQuestionAdministrationInteraction\$id.

56  : self
57  {
58  $clone = clone $this;
59  $clone->id = $id;
60  return $clone;
61  }

Field Documentation

◆ $id

int ILIAS\Test\Logging\TestQuestionAdministrationInteraction::$id
private

◆ IDENTIFIER


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