 <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1 class="m-0 text-dark">All Students</h1>
          </div><!-- /.col -->
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="<?php echo base_url() ?>admin/admin/dashboard">Dashboard</a></li>
              <li class="breadcrumb-item"><a href="#">Examination</a></li>
              <li class="breadcrumb-item active">All Students</li>

            </ol>
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    <!-- /.content-header -->
    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
        <div class="card card-default">
          <div class="card-header">
            <h3 class="card-title">View All Students</h3>
          </div>
            <!-- /.card-header -->
            <div class="card-body">
              <table id="example1" class="table table-bordered table-striped">
                <thead>
                <tr>
                  <th>Reg No</th>
                  <th>Student Name</th>
                  <th>Course</th>
                  <th>Exam Date & Time</th>
                  <th>Practical Mark</th>
                  <th>Viva Mark</th>
                  <th></th>
                </tr>
                </thead>
                <tbody>
                <?php $i=1; foreach ($all_student as $student):?>
                <tr>
                  <td><?php echo $student->user_reg_id ?></td>
                  <td><?php echo $student->user_name; ?></td>
                  <td><?php echo $student->title; ?></td>
                  <td><?php echo date('d-m-Y', strtotime($student->st_student_exam_date)); ?> <br/><?php echo date('h:i A', strtotime($student->st_student_exam_time)); ?>
                  </td>
                  <td>
                    <?php echo form_open(base_url().'admin/examination/add_viva_prc_marks/'.$student->st_course_id);?>
                    <b> Total Marks : <?php echo $student->practical_exam_marks; ?></b><br/>
                    <input type="number" <?php if($student->st_course_is_exam_approve == 2){echo 'readonly';}?> required placeholder="Number" class="form-control" name="prc_obtained_marks" value="<?php echo $student->prc_obtained_marks; ?>" />
                  </td>

                  <td>
                    <b> Total Marks : <?php echo $student->viva_exam_marks; ?></b><br/>
                    <input type="number" <?php if($student->st_course_is_exam_approve == 2){echo 'readonly';}?> required placeholder="Number" class="form-control" name="viva_obtained_marks" value="<?php echo $student->viva_obtained_marks; ?>"/>
                  </td>
                  <td>
                    <?php if($student->st_course_is_exam_approve != 2): ?>
                      <button type="submit" class="btn btn-success btn-xs mt-3">Save</button>
                    <?php endif; ?>
                    <?php echo form_close();?>
                  </td>
                </tr>
                <?php $i++; ?>
                <?php endforeach; ?>
                </tbody>
              </table>
            </div>
          </div>
      </div>
    </section>
  </div>
