<input type="hidden" id="courseBatchId" value="<?php echo $batch_info->course_batch_id; ?>">
<input type="hidden" id="baseUrl" value="<?php echo base_url(); ?>">

<div class="col-sm-10">
    <div class="row ">
        <div class="col-sm-12 ">
            <div class="col-sm-6 text-left"><h3> Graduate Student List</h3></div>
            <div class="col-sm-6 pull-right">
                <span class=""><h4>Course Name:&nbsp;&nbsp;&nbsp;<strong><?= $course_info->course_name; ?></strong></h4></span>
                <span class=""><h4>Batch Name:&nbsp;&nbsp;&nbsp;<strong><?= $batch_info->course_batch_name; ?></strong></h4></span>
                <span class=""><h4>Total Student: &nbsp;&nbsp;&nbsp;<strong><?= $student_number ?></strong></h4></span>
            </div>
        </div>       
        <div class="col-sm-12"><hr></div>
        <div class="col-sm-12">
            <div class="col-sm-12  text-left  "style="margin-bottom: 5px;font-weight: bold; border-bottom: 2px solid #80c12c">
                <div class="col-sm-2">Student Roll</div>
                <div class="col-sm-2">Name</div>
                <div class="col-sm-2">Mobile</div>
                <div class="col-sm-2">Email</div>                
                <div class="col-sm-2">Action</div>                
            </div>

            <?php foreach ($assigned_student_info as $student_info) { ?>
                <div>
                    <div class="col-sm-12 text-left " style="padding: 10px; background-color:#F2F9EA;border: 1px solid #ededed" >
                        <div class="col-sm-2"> <?= $student_info->student_roll_number; ?></div>
                        <div class="col-sm-2"> <?= $student_info->person_first_name . ' ' . $student_info->person_last_name; ?></div>
                        <div class="col-sm-2"> <?= $student_info->person_contact_number; ?></div>
                        <div class="col-sm-2"> <?= $student_info->person_email; ?> </div>
                        <?php
                        $person_role = $this->session->person_role;
                        if ($batch_info->course_batch_status = 2 && ($person_role == 6 || $person_role == 1)) {
                            ?>
                            <div class="col-sm-2">
                                <div class="checkbox checkbox-success" style="margin-top: -5px">
                                    <input class="styled" id="student_roll<?= $student_info->student_roll_number; ?>" onchange="assignGradCertificate(this)" type="checkbox" <?php if (isset($student_info->student_certificate_id)) echo 'checked' ?>>
                                    <label for="student_id<?= $student_info->student_roll_number; ?>"></label>
                                </div>
                            </div>
                        <?php } ?>
                    </div>                    
                </div>

                <div class="modal fade" style="" id="cancelCertificateModal<?php echo $student_info->student_roll_number; ?>" tabindex="-1" role="dialog" aria-labelledby="changeRole" aria-hidden="true">
                    <?php
                    $id = 'sr' . $student_info->student_roll_number;
                    $message = 'Are you sure to cancel this student\'s Certificate ?';
                    $this->cf->view_modal($id, $message);
                    ?>
                </div>
            <?php } ?>                
        </div>
    </div>
    <div class="modal fade" style="" id="noCertificateData" tabindex="-1" role="dialog" aria-labelledby="changeRole" aria-hidden="true">
        <?php
        $id = 'noCertificateData';
        $message = 'Please Create Certificate for This Course First !!';
        $this->cf->view_single_modal($id, $message);
        ?>
    </div>
</div>
<script src="<?php echo base_url() ?>back_end_resource/quiz/admin_certificate.js" type="text/javascript"></script>