<?= $this->extend("templates/levelcoordinator_base"); ?>

<?= $this->section("content"); ?>

<?php $page_session = \Config\Services::session(); ?>
<!-- Content Wrapper. Contains page content -->

<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1>My Students</h1>
          </div>
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="#">Home</a></li>
              <li class="breadcrumb-item active">My Students</li>
            </ol>
          </div>
        </div>
      </div><!-- /.container-fluid -->
    </section>

    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
        <!-- SELECT2 EXAMPLE -->
        <div class="card card-default">
          <div class="card-header">
            <h3 class="card-title"><strong>Students</strong></h3>
          </div>
          <!-- /.card-header -->
          <div class="card-body">
            <div class="row">
              <div class="col-md-6">
                <div class="form-group">
                  <label>Select Session:<font style="color:#F00">*</font></label>
                  <select class="form-control select2" style="width: 100%;" name="session" id="sessionField" onchange="spawn_students()">
                    <option selected="selected" value="">Select Session</option>                   
                        <?php foreach($session_collections as $key => $value): ?>
					              <option <?php if($page_session->get('current_session')== $session_collections[$key]) echo 'selected'; ?> value = '<?= $session_value_collections[$key] ?>'><?= $session_collections[$key] ?></option>
                        <?php endforeach; ?> 
                    </select>
                </div>

              </div>
            </div>
            <hr/>
                
            <div class="row">
                <div class="col-md-12">
                <div id="txtHintDeptStudents"><b>List of Students Here...</b></div>
                </div>
            </div>
             
          
        </div>
        <!-- /.card -->


      </div>
      <!-- /.container-fluid -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
 
  <div class="modal fade" id="studentModal">
    <div class="modal-dialog modal-lg">
      <div class="modal-content">
        <div class="overlay" id="overlay">
            <i class="fas fa-2x fa-sync fa-spin"></i>
        </div>
        <div class="modal-header">
            <h6 class="modal-title" id="modal_title"></h6>
            <ul class="nav nav-pills modal-title">
              <li class="nav-item"><a class="nav-link active" href="#biodata" data-toggle="tab">Bio Data</a></li>
              <li class="nav-item"><a class="nav-link" href="#contact" data-toggle="tab">Contact</a></li>
              <li class="nav-item"><a class="nav-link" href="#nok" data-toggle="tab">Next Of Kin</a></li>
              <li class="nav-item"><a class="nav-link" href="#sponsor" data-toggle="tab">Sponsorship</a></li>
            </ul>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div id="data"></div>
        </div>
        <div class="modal-footer justify-content-between">
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        </div>
      </div>
      <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
  </div>

<?= $this->endSection(); ?>