[14-Sep-2026 06:03:42 UTC] CBT manage_test payload: Array
(
    [test_title] => Food
    [description] => Answer all questions.
    [teacher_id] => 4
    [subject_id] => 130
    [class_id] => 4
    [session_id] => 4
    [duration_minutes] => 60
    [contexts] => Array
        (
        )

    [questions] => Array
        (
            [0] => Array
                (
                    [question_text] => <p>dfghj</p>
                    [question_type] => multiple_choice
                    [options] => Array
                        (
                            [0] => Array
                                (
                                    [value] => A
                                    [label] => dsrftgyhj
                                )

                            [1] => Array
                                (
                                    [value] => B
                                    [label] => sdrtfgyh
                                )

                            [2] => Array
                                (
                                    [value] => C
                                    [label] => sdrftghj
                                )

                            [3] => Array
                                (
                                    [value] => D
                                    [label] => sdsfghj
                                )

                        )

                    [correct_answer] => A
                    [marks] => 1
                    [order_index] => 0
                    [question_image] => 
                    [context_client_id] => 
                )

        )

    [class_ids] => Array
        (
            [0] => 4
        )

)

[14-Sep-2026 06:03:42 UTC] CBT manage_test error: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`easyyket_leotrixgreatstrides`.`cbt_questions`, CONSTRAINT `fk_cbt_questions_test` FOREIGN KEY (`test_id`) REFERENCES `cbt_tests` (`id`) ON DELETE CASCADE)
[14-Sep-2026 06:03:42 UTC] CBT manage_test trace: #0 /home/easyyket/greatstrides.leotrixai.online/Backend_school_portal/api/cbt/manage_test.php(334): PDOStatement->execute()
#1 {main}
[14-Sep-2026 06:03:42 UTC] CBT manage_test last payload (on error): Array
(
    [test_title] => Food
    [description] => Answer all questions.
    [teacher_id] => 4
    [subject_id] => 130
    [class_id] => 4
    [session_id] => 4
    [duration_minutes] => 60
    [contexts] => Array
        (
        )

    [questions] => Array
        (
            [0] => Array
                (
                    [question_text] => <p>dfghj</p>
                    [question_type] => multiple_choice
                    [options] => Array
                        (
                            [0] => Array
                                (
                                    [value] => A
                                    [label] => dsrftgyhj
                                )

                            [1] => Array
                                (
                                    [value] => B
                                    [label] => sdrtfgyh
                                )

                            [2] => Array
                                (
                                    [value] => C
                                    [label] => sdrftghj
                                )

                            [3] => Array
                                (
                                    [value] => D
                                    [label] => sdsfghj
                                )

                        )

                    [correct_answer] => A
                    [marks] => 1
                    [order_index] => 0
                    [question_image] => 
                    [context_client_id] => 
                )

        )

    [class_ids] => Array
        (
            [0] => 4
        )

)

[14-Sep-2026 06:06:21 UTC] CBT manage_test payload: Array
(
    [test_title] => Food
    [description] => Answer all questions.
    [teacher_id] => 4
    [subject_id] => 130
    [class_id] => 4
    [session_id] => 4
    [duration_minutes] => 60
    [contexts] => Array
        (
        )

    [questions] => Array
        (
            [0] => Array
                (
                    [question_text] => <p>sdfghj	</p>
                    [question_type] => multiple_choice
                    [options] => Array
                        (
                            [0] => Array
                                (
                                    [value] => A
                                    [label] => serdtfghj
                                )

                            [1] => Array
                                (
                                    [value] => B
                                    [label] => axdfcbhn
                                )

                            [2] => Array
                                (
                                    [value] => C
                                    [label] => asxdcfghj
                                )

                            [3] => Array
                                (
                                    [value] => D
                                    [label] => asxdcfgvh
                                )

                        )

                    [correct_answer] => A
                    [marks] => 1
                    [order_index] => 0
                    [question_image] => 
                    [context_client_id] => 
                )

        )

    [class_ids] => Array
        (
            [0] => 4
        )

)

