19declare(strict_types=1);
32 private const array SETTINGS_COLUMNS = [
34 'sequence_settings' => [
T_BOOLEAN,
'SequenceSettings'],
35 'score_reporting' => [
T_TINYINT,
'ScoreReporting'],
36 'instant_verification' => [
T_BOOLEAN,
'InstantFeedbackSolution'],
37 'answer_feedback' => [
T_BOOLEAN,
'AnswerFeedback'],
38 'answer_feedback_points' => [
T_BOOLEAN,
'AnswerFeedbackPoints'],
39 'fixed_participants' => [
T_BOOLEAN,
'fixed_participants'],
40 'suspend_test_allowed' => [
T_BOOLEAN,
'ShowCancel'],
42 'nr_of_tries' => [
T_TINYINT,
'NrOfTries'],
43 'use_previous_answers' => [
T_BOOLEAN,
'use_previous_answers'],
44 'title_output' => [
T_TINYINT,
'TitleOutput'],
45 'processing_time' => [[
'type' =>
\ilDBConstants::T_TEXT,
'length' => 8,
'default' =>
null],
'ProcessingTime'],
46 'enable_processing_time' => [
T_BOOLEAN,
'EnableProcessingTime'],
47 'reset_processing_time' => [
T_BOOLEAN,
'ResetProcessingTime'],
48 'reporting_date' => [
T_BIGINT,
'ReportingDate'],
49 'shuffle_questions' => [
T_BOOLEAN,
'Shuffle'],
50 'count_system' => [
T_TINYINT,
'CountSystem'],
51 'score_cutting' => [
T_TINYINT,
'ScoreCutting'],
52 'pass_scoring' => [
T_TINYINT,
'PassScoring'],
55 'usr_pass_overview_mode' => [
T_INT,
'ListOfQuestionsSettings'],
56 'show_marker' => [
T_BOOLEAN,
'ShowMarker'],
57 'kiosk' => [
T_INT,
'Kiosk'],
59 'showfinalstatement' => [
T_BOOLEAN,
'ShowFinalStatement'],
60 'exportsettings' => [
T_INT,
null],
61 'print_bs_with_res' => [[
'type' =>
\ilDBConstants::T_INTEGER,
'length' => 1,
'default' => 0],
'show_solution_list_comparison'],
62 'highscore_enabled' => [
T_BOOLEAN,
'highscore_enabled'],
63 'highscore_anon' => [
T_BOOLEAN,
'highscore_anon'],
64 'highscore_achieved_ts' => [
T_BOOLEAN,
'highscore_achieved_ts'],
65 'highscore_score' => [
T_BOOLEAN,
'highscore_score'],
66 'highscore_percentage' => [
T_BOOLEAN,
'highscore_percentage'],
67 'highscore_wtime' => [
T_BOOLEAN,
'highscore_wtime'],
68 'highscore_own_table' => [
T_BOOLEAN,
'highscore_own_table'],
69 'highscore_top_table' => [
T_BOOLEAN,
'highscore_top_table'],
70 'highscore_top_num' => [
T_INT,
'highscore_top_num'],
71 'specific_feedback' => [
T_BOOLEAN,
'SpecificAnswerFeedback'],
73 'autosave_ival' => [
T_INT,
'autosave_ival'],
74 'pass_deletion_allowed' => [
T_BOOLEAN,
'pass_deletion_allowed'],
75 'redirection_mode' => [
T_TINYINT,
'redirection_mode'],
76 'redirection_url' => [[
'type' =>
\ilDBConstants::T_TEXT,
'length' => 4000,
'default' =>
null],
'redirection_url'],
77 'examid_in_test_pass' => [
T_BOOLEAN,
'examid_in_test_pass'],
78 'examid_in_test_res' => [
T_BOOLEAN,
'examid_in_test_res'],
79 'enable_examview' => [
T_BOOLEAN,
'enable_examview'],
80 'question_set_type' => [[
'type' =>
\ilDBConstants::T_TEXT,
'length' => 32,
'default' =>
'FIXED_QUEST_SET'],
'questionSetType'],
81 'skill_service' => [
T_BOOLEAN,
'skill_service'],
82 'show_grading_status' => [
T_BOOLEAN,
'show_grading_status'],
83 'show_grading_mark' => [
T_BOOLEAN,
'show_grading_mark'],
84 'inst_fb_answer_fixation' => [
T_BOOLEAN,
'inst_fb_answer_fixation'],
85 'intro_enabled' => [
T_BOOLEAN,
'IntroEnabled'],
86 'starting_time_enabled' => [
T_BOOLEAN,
'StartingTimeEnabled'],
87 'ending_time_enabled' => [
T_BOOLEAN,
'EndingTimeEnabled'],
88 'password_enabled' => [
T_BOOLEAN,
'password_enabled'],
89 'force_inst_fb' => [
T_BOOLEAN,
'force_inst_fb'],
90 'starting_time' => [
T_BIGINT,
'StartingTime'],
91 'ending_time' => [
T_BIGINT,
'EndingTime'],
93 'follow_qst_answer_fixation' => [
T_BOOLEAN,
'follow_qst_answer_fixation'],
94 'block_after_passed' => [
T_BOOLEAN,
'BlockAfterPassed'],
98 'hide_info_tab' => [
T_BOOLEAN,
'HideInfoTab'],
99 'conditions_checkbox_enabled' => [
T_BOOLEAN,
'ExamConditionsCheckboxEnabled'],
106 return array_key_exists(
'default', $column_def) && $column_def[
'default'] ===
null;
111 if ($date instanceof \DateTimeImmutable) {
112 return $date->getTimestamp();
115 if ($date ===
'' || $date ===
null) {
119 return \DateTimeImmutable::createFromFormat(
122 new \DateTimeZone(
'UTC')
const LEGACY_STORAGE_DATE_FORMAT
columnIsNullable(array $column_def)
convertLegacyDate(string|\DateTimeImmutable|null $date)