<?php
if ($not_eligible_student) {
    foreach ($not_eligible_student as $student_value) {
        ?>
        <div>
            <div class="col-sm-12 text-left " style="padding: 10px;background-color:#F2F9EA;border: 1px solid #ededed" >
                <div class="col-sm-3">
                    <a href="<?php echo base_url() . $student_value->url . '/profile'; ?>" target="_blank">
                        <?php echo $student_value->person_first_name . ' ' . $student_value->person_last_name; ?>                                       
                    </a>
                </div>
                <div class="col-sm-2"><?php echo $student_value->person_contact_number; ?></div>
                <div class="col-sm-3"><?php echo $student_value->person_email; ?></div>
                <div class="col-sm-2 text-center">
                    <?php
                    if ($course_info->course_type == 1) {
                        echo 'Paid';
                    }
                    if ($course_info->course_type == 2) {
                        echo 'Free';
                    }
                    ?>
                </div>
                <!----------- action start here ------------>
                <div class="col-sm-2">                                 
                    <span id="remove<?php echo $student_value->student_id; ?>" style="display: block">
                        <a href="javascript:void(0);" data-toggle="modal" data-target="#eligible<?php echo $student_value->student_id; ?>"> 
                            <i class="fa fa-remove" title="Remove Student"></i> 
                        </a> 
                    </span>       
                    <input type="hidden" id="not_eligible_pagination" value="<?php echo base_url('user/not-eligible-pagination'); ?>">
                    <input type="hidden" value="<?php echo $course_url; ?>" id="course_url" name="course_url">      
                </div>
                <!----------- action start here ----------->
                <div class="col-sm-12"><br></div>
            </div>
            <div class="col-sm-12 form-group" id=""></div>
        </div>
        <!--------------------Select Batch Area---------------------------->
        <div class="col-sm-12 form-group" style="" id='batch<?php echo $student_value->student_id; ?>'> </div>
        <!--------------------end Select Batch Area---------------------------->         

        <div class="modal" style="" id="eligible<?php echo $student_value->student_id; ?>" tabindex="-1" role="dialog" aria-labelledby="changeRole" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content" style="top: 180px;border: 5px solid #80c12c;border-top: 20px solid #80c12c !important;margin: 0 auto;width: 450px">           
                    <div class="modal-body">
                        <h4 class="text-center" style="text-align: center">Want to make this student eligible?</h4>
                    </div>
                    <div class="modal-footer">
                        <div  class="col-sm-12">               
                            <button onclick="makeEligible('<?php echo base_url(); ?>eligible', '<?php echo $student_value->student_id; ?>', '<?php echo $course_info->course_id; ?>')" style="margin-left: 90px" type="button" class="btn btn-success  col-sm-2" data-dismiss="modal">Yes</button>
                            <button type="button" style="margin-left: 20px" class="btn btn-danger col-sm-2 col-sm-offset-4" data-dismiss="modal">No</button>
                        </div>
                    </div>            
                </div>
            </div>
        </div>
        <?php
    }
    echo $not_eligible_student_paginzation_link;
} else {
    echo get_message('course_not_eligible_msg');
}
echo '</div>';
