@include('admin.crud.form', [ 'action' => route('admin.exams.store'), 'formId' => 'add-exam-form', 'submitText' => 'Save Exam', 'class' => 'ajax-crud-form', 'redirect' => route('admin.exams.index'), 'fields' => [ [ 'type' => 'select2', 'name' => 'course_id', 'id' => 'course_id', 'label' => 'Course', 'required' => true, 'options' => $courses->pluck('title', 'id')->toArray(), 'col' => 12 ], [ 'type' => 'hidden', 'name' => 'status', 'id' => 'status', 'value' => 'active' ], [ 'type' => 'text', 'name' => 'title', 'id' => 'title', 'label' => 'Exam Title', 'placeholder' => 'Enter exam title', 'required' => true, 'col' => 12 ], [ 'type' => 'textarea', 'name' => 'description', 'id' => 'description', 'label' => 'Description', 'placeholder' => 'Enter exam description', 'rows' => 3, 'col' => 12 ], [ 'type' => 'number', 'name' => 'attempts', 'id' => 'attempts', 'label' => 'Number of Attempts', 'placeholder' => '1', 'required' => true, 'min' => 1, 'max' => 10, 'col' => 4 ], [ 'type' => 'number', 'name' => 'pass_score', 'id' => 'pass_score', 'label' => 'Pass Score (%)', 'placeholder' => '60', 'required' => true, 'min' => 0, 'max' => 100, 'col' => 4 ], [ 'type' => 'number', 'name' => 'max_score', 'id' => 'max_score', 'label' => 'Maximum Score', 'placeholder' => '100', 'required' => true, 'min' => 1, 'col' => 4 ], [ 'type' => 'number', 'name' => 'time_limit', 'id' => 'time_limit', 'label' => 'Time Limit (minutes)', 'placeholder' => '60', 'min' => 1, 'max' => 480, 'col' => 6 ], [ 'type' => 'number', 'name' => 'questions_limit', 'id' => 'questions_limit', 'label' => 'Questions Limit', 'placeholder' => '1', 'required' => true, // 'min' => 1, // 'max' => 480, 'col' => 6 ], [ 'type' => 'number', 'name' => 'mark_correct', 'id' => 'mark_correct', 'label' => 'Marks for Correct Answer', 'placeholder' => '1.00', // 'min' => 0, // 'step' => 0.01, 'col' => 6 ], [ 'type' => 'number', 'name' => 'mark_wrong', 'id' => 'mark_wrong', 'label' => 'Marks for Wrong Answer', 'placeholder' => '0.00', // 'max' => 0, // 'min' => 0, // 'step' => 0.01, 'col' => 6 ], [ 'type' => 'checkbox', 'name' => 'shuffle_questions', 'id' => 'shuffle_questions', 'label' => 'Shuffle Questions', 'col' => 4 ], [ 'type' => 'checkbox', 'name' => 'shuffle_options', 'id' => 'shuffle_options', 'label' => 'Shuffle Options', 'col' => 4 ], [ 'type' => 'checkbox', 'name' => 'publish_results', 'id' => 'publish_results', 'label' => 'Publish Results', 'col' => 4 ], [ 'type' => 'datetime-local', 'name' => 'start_time', 'id' => 'start_time', 'label' => 'Start Time', 'col' => 6 ], [ 'type' => 'datetime-local', 'name' => 'end_time', 'id' => 'end_time', 'label' => 'End Time', 'col' => 6 ], ] ])