<?php
$assigned_student_arr = explode(',', $batch_info->student_id);
$security_salt = '#' . rand(1, 99999);
$v_student = $student_info;
$e_id = $this->encrypt->encode($v_student->student_id);
$s_id = $e_id . $security_salt;
$de_id = $this->encrypt->encode($s_id);
$student_e_id = str_replace("/", "%F2", $de_id);
?>

<div id="sActions<?php echo $v_student->student_id; ?>">
    <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() . $v_student->url . '/profile'; ?>" target="_blank"><?php echo $v_student->person_first_name . ' ' . $v_student->person_last_name; ?></a>
        </div>
        <div class="col-sm-2"><?php echo $v_student->person_contact_number; ?></div>
        <div class="col-sm-3"><?php echo $v_student->person_email; ?></div>
        <div class="col-sm-2">
            <?php
            if ($student_payment_info) {
                $payment_status = array('', 'Paid', 'Partial paid', 'Unpaid', 'Drop', 'cancel', 'pending', 'Free');
                echo $payment_status[$student_payment_info->payment_status];
            } else {
                echo 'Free';
            }
            ?>
        </div>
        <div class="col-sm-2">

            <?php if (!in_array($v_student->student_id, $assigned_student_arr)) { ?>
                <a href="javascript:;" onclick="assignStudent('<?php echo base_url() . 'super-admin/assign-batch-student/' . $student_e_id . '/' . $batch_info->course_batch_id; ?>', '<?php echo $v_student->student_id; ?>')">  
                    <i class="fa fa-check" title="Assign"></i>
                </a>&nbsp;&nbsp;&nbsp; 
            <?php } else { ?>
                <a href="javascript:;" onclick="assignStudent('<?php echo base_url() . 'super-admin/unassign-batch-student/' . $student_e_id . '/' . $batch_info->course_batch_id; ?>', '<?php echo $v_student->student_id; ?>')">  
                    <i class="fa fa-times-circle-o" title="Unassign"></i>
                </a>&nbsp;&nbsp;&nbsp; 
            <?php } ?>

        </div>
    </div>
    <div class="col-sm-12 form-group"></div>
</div>