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

<?= $this->section("content"); ?>
<?php $page_session = \Config\Services::session(); ?>
<form action = "<?= base_url('hod/save_allocation') ?>" id="" class="sky-form" method="post" enctype="multipart/form-data">
<!-- 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 Courses</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">Exam Results</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>Allocate Courses</strong></h3>

            <div class="card-tools">
              <button type="button" class="btn btn-tool" data-card-widget="collapse">
                <i class="fas fa-minus"></i>
              </button>
              <button type="button" class="btn btn-tool" data-card-widget="remove">
                <i class="fas fa-times"></i>
              </button>
            </div>
          </div>
          <!-- /.card-header -->
          <div class="card-body">
              <div class="row">
              <div class="col-md-6">
                <div class="form-group">
                  <label>Select Course:<font style="color:#F00">*</font></label>
                  <select class="form-control select2" style="width: 100%;" name="course" id="courseField" onchange="spawn_lecturers()">
                  <option selected disabled>- Select Course -</option>
                  <?php foreach($course as $co): ?>
                    <option value = "<?= $co->id ?>"><?= $co->id ?> <?= $co->title ?></option>
                  <?php endforeach; ?>
                  </select>
                </div>

              </div>
            <div class="col-md-6">
              <div id = "availableLecturerField">          
              </div>          
            </div>
              
              <!-- /.card-body -->
                  
          <!-- /.card-body -->
              

        </div>
		
		<div class="row">
              <div class="col-md-12">
                <div id="buttonField">
                  
                </div>

              </div>

              
              
              <!-- /.card-body -->
                  
          <!-- /.card-body -->
              

        </div>
              <!-- /.card-body -->
            </div>
                
								
              </div>
              
              <!-- /.col -->
            </div>
            <!-- /.row -->

            
            <!-- /.row -->
          </div>
		  
		  
		  
          
        </div>
        <!-- /.card -->


      </div>
      <!-- /.container-fluid -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->


</form>



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