<!DOCTYPE html>
<html lang="en">


<!-- Mirrored from akademi.dexignlab.com/codeigniter/demo/student by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 06 Mar 2024 10:51:33 GMT -->
<!-- Added by HTTrack -->
<meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack -->

<head>
    <!-- Title -->
    <title>Question</title>
    <!-- Meta -->

    <style>
        .custom-card {
            margin-top: 120px;
        }
    </style>

</head>

<body>

    <div class="row p-5 custom-card">
        <div class="col-lg-12">
            <div class="card ">
                <div class="card-body">
                    <h2 class="card-title">Add Question</h2><bR>
                    <form action="<?php echo base_url(); ?>ApplicationController/questionAdd" method="post" enctype="multipart/form-data" id="registration_form">

                        <div class="row">
                            <div class="form-group col-md-4">
                                <label class="tx-medium">Academic Year<span class="text-danger">*</span> </label>   
                                <select name="academic" id="academic" class="form-control select2 modal-select">
                                    <option value="">--Select--</option>
                                    <?php foreach ($academic_year as $row) { ?>
                                        <option value="<?php echo $row->id ?>"> <?php echo $row->year ?></option>

                                    <?php } ?>
                                </select>

                            </div>
                            <div class="form-group col-md-4">
                                <label class="tx-medium">Exam Type<span class="text-danger">*</span> </label>

                                <select name="exam_type" id="exam_type" class="form-control select2 modal-select">
                                    <option value="">--Select--</option>
                                    <?php foreach ($exam_type as $row) { ?>
                                        <option value="<?php echo $row->id ?>"> <?php echo $row->exam_type_name ?></option>

                                    <?php } ?>
                                </select>

                            </div>

                            <div class="form-group col-md-4">
                                <label class="tx-medium">Category<span class="text-danger">*</span> </label>

                                <select name="category" id="category" class="form-control select2 modal-select">
                                    <option value="">--Select--</option>
                                    <?php foreach ($category as $row) { ?>
                                        <option value="<?php echo $row->id ?>"> <?php echo $row->category ?></option>

                                    <?php } ?>
                                </select>

                            </div>


                            <div class="form-group col-md-12 mt-3">
                                <label>Question</label>
                                <!-- <textarea name="email_content" id="email_content" rows="5" autocomplete="off" class="form-control" placeholder=""></textarea> -->
                                <textarea  name="question" id="summernote" autocomplete="off" class="form-control" placeholder="Question"> <?= (isset($_POST['question']))?$_POST['question']:$default['question']; ?></textarea>

                                <?php if (form_error('question')) { ?>
                                    <div class="text-danger alert-dismissible fade show mt-1" role="alert">
                                        <?php echo form_error('question'); ?>
                                    </div>
                                <?php } ?>



                            </div>

                            <div class="form-group col-md-3 mt-3">
                                <label>Option A</label>
                                <!-- <input name="subject" id="subject" type="text" class="form-control" placeholder="Subject" value="<?php echo $email_subject; ?>"> -->
                                <input name="option_a" id="option_a" type="text" class="form-control" placeholder="Option A" value="<?= (isset($_POST['option_a']))?$_POST['option_a']:$default['option_a']; ?>">

                                <?php if (form_error('option_a')) { ?>
                                    <div class="text-danger alert-dismissible fade show mt-1" role="alert">
                                        <?php echo form_error('option_a'); ?>
                                    </div>
                                <?php } ?>
                            </div>
                            <div class="form-group col-md-3 mt-3">
                                <label>Option B</label>
                                <input name="option_b" id="option_b" type="text" class="form-control" placeholder="Option B" value="<?= (isset($_POST['option_b']))?$_POST['option_b']:$default['option_b']; ?>">

                                <?php if (form_error('option_b')) { ?>
                                    <div class="text-danger alert-dismissible fade show mt-1" role="alert">
                                        <?php echo form_error('option_b'); ?>
                                    </div>
                                <?php } ?>
                            </div>
                            <div class="form-group col-md-3 mt-3">
                                <label>Option C</label>
                                <input name="option_c" id="option_c" type="text" class="form-control" placeholder="Option C" value="<?= (isset($_POST['option_c']))?$_POST['option_c']:$default['option_c']; ?>">

                                <?php if (form_error('option_c')) { ?>
                                    <div class="text-danger alert-dismissible fade show mt-1" role="alert">
                                        <?php echo form_error('option_c'); ?>
                                    </div>
                                <?php } ?>
                            </div>
                            <div class="form-group col-md-3 mt-3">
                                <label>Option D</label>
                                <input name="option_d" id="option_d" type="text" class="form-control" placeholder="Option D" value="<?= (isset($_POST['option_d']))?$_POST['option_d']:$default['option_d']; ?>">
                                <?php if (form_error('option_d')) { ?>
                                    <div class="text-danger alert-dismissible fade show mt-1" role="alert">
                                        <?php echo form_error('option_d'); ?>
                                    </div>
                                <?php } ?>
                            </div>

                            <div class="form-group col-md-3 mt-3">
                                <label class="tx-medium">Answer<span class="text-danger">*</span> </label>

                                <select name="answer" id="answer" class="form-control select2 modal-select">
                                    <option value="">--Select Answer--</option>
                                    <option value="a">A</option>
                                    <option value="b">B</option>
                                    <option value="c">C</option>
                                    <option value="d">D</option>

                                </select>

                            </div>



                        </div>

                        <div class="form-group mt-3 col-md-4">
                            <div class="">
                                <button name="submit" type="submit" class="btn btn-primary waves-effect waves-light mr-1">
                                    Submit
                                </button>
                                <a href="<?php echo base_url('ApplicationController/viewQuestion'); ?>" class="btn btn-secondary waves-effect">Cancel </a>
                            </div>
                        </div>
                </div>

                </form>
            </div>
        </div>
    </div>
    </div>







</body>

</html>

<script>
    function edit(id, name) {
        $('#tution_name_err').text(' ')

        $('#id').val(id)
        $('#tution_name').val(name)
        $('#formTitle').text('Edit Tution')

        $("#tutionModal").modal('show');

    }

    function deletetution(id, status) {

        $('#tutionId').val(id)
        $('#tutionStatus').val(status)
        $("#statusModal").show();
    }

    $('#open-modal').on('click', function() {

        $("#tutionModal").modal('show');
    });

    $('.closemodel').on('click', function() {

        $("#statusModal").hide();
    });
</script>