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