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