43 : MainSettings
44 {
45 return new MainSettings(
46 $row['id'],
47 new SettingsGeneral(
48 $row['question_set_type'],
49 (bool) $row['anonymity']
50 ),
51 new SettingsIntroduction(
52 (bool) $row['intro_enabled'],
53 $row['introduction_page_id'],
54 (bool) $row['conditions_checkbox_enabled'],
55 ),
56 new SettingsAccess(
57 (bool) $row['starting_time_enabled'],
58 $row['starting_time'] !== 0
59 ? \DateTimeImmutable::createFromFormat('U', (string) $row['starting_time'])
60 : null,
61 (bool) $row['ending_time_enabled'],
62 $row['ending_time'] !== 0
63 ? \DateTimeImmutable::createFromFormat('U', (string) $row['ending_time'])
64 : null,
65 (bool) $row['password_enabled'],
66 $row['password'],
67 $row['ip_range_from'],
68 $row['ip_range_to'],
69 (bool) $row['fixed_participants'],
70 ),
71 new SettingsTestBehaviour(
72 $row['nr_of_tries'],
73 (bool) $row['block_after_passed'],
74 $row['pass_waiting'],
75 (bool) $row['enable_processing_time'],
76 $row['processing_time'],
77 (bool) $row['reset_processing_time'],
78 $row['kiosk'],
79 (bool) $row['examid_in_test_pass']
80 ),
81 new SettingsQuestionBehaviour(
82 (int) $row['title_output'],
83 (bool) $row['autosave'],
84 $row['autosave_ival'],
85 (bool) $row['shuffle_questions'],
86 (bool) $row['answer_feedback_points'],
87 (bool) $row['answer_feedback'],
88 (bool) $row['specific_feedback'],
89 (bool) $row['instant_verification'],
90 (bool) $row['force_inst_fb'],
91 (bool) $row['inst_fb_answer_fixation'],
92 (bool) $row['follow_qst_answer_fixation']
93 ),
94 new SettingsParticipantFunctionality(
95 (bool) $row['use_previous_answers'],
96 (bool) $row['suspend_test_allowed'],
97 (bool) $row['sequence_settings'],
98 $row['usr_pass_overview_mode'],
99 (bool) $row['show_marker'],
100 (bool) $row['show_questionlist']
101 ),
102 new SettingsFinishing(
103 (bool) $row['enable_examview'],
104 (bool) $row['showfinalstatement'],
105 $row['concluding_remarks_page_id'],
106 RedirectionModes::tryFrom($row['redirection_mode']) ?? RedirectionModes::NONE,
107 $row['redirection_url']
108 ),
109 new SettingsAdditional(
110 (bool) $row['skill_service'],
111 (bool) $row['hide_info_tab']
112 )
113 );
114 }