<style>
    body{background:#EAEDED;}
</style>
<div class="container mt-3 mb-3 pt-3 pb-3 bg-white">
<div class="row">
<div class="col-sm-12">
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="<?php echo base_url();?>Welcome">Home</a></li>
<li class="breadcrumb-item">Exam</li>
<li class="breadcrumb-item">All Classes</li>
</ul>

<a href="<?php echo base_url(); ?>Exam/add_exam_subject/" class="btn btn-success"><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-plus" viewBox="0 0 16 16">
  <path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>
</svg>&nbsp;Add Exam Subjects</a>
<a href="<?php echo base_url(); ?>Exam/add_exam_head/" class="btn btn-success"><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-plus" viewBox="0 0 16 16">
  <path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>
</svg>&nbsp;Add Exam Head</a>
    
<div class="all-classes-section pt-3">
<div class="table-responsive table-bordered" style="background: #fff;">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Class/Section</th>
<th>Teacher</th>
<th>Marks</th>
<th>Result</th>
<th>Subjects</th>
</tr>
</thead>
<tbody>
<?php 
$acedemic_session=$this->session->userdata('acedemic_session');
$count1=0;
$get_staff_by_acedemic_session=$this->WelcomeModel->get_class_teachers_by_session($acedemic_session);
if($get_staff_by_acedemic_session){
foreach($get_staff_by_acedemic_session as $get_staff){
$table='school_staff';
$staff_id=$get_staff['class_teacher'];
$get_staff_info=$this->WelcomeModel->get_item_data($staff_id,$table);
if($get_staff_info){
foreach($get_staff_info as $staff){
?>
<tr>
<td><?php echo $staff['class_teacher']; ?> - <?php echo $staff['class_teacher_section']; ?></td>
<td><?php echo $staff['name']; ?></td>
<td><a href="<?php echo base_url(); ?>Exam/marks_for_class/<?php echo $staff['class_teacher']; ?>/<?php echo $staff['class_teacher_section']; echo "/"; echo $acedemic_session; ?>" class="btn btn-sm btn-success">View</a></td>
<td><a href="<?php echo base_url();?>Exam/result_for_class/<?php echo $staff['class_teacher']; echo "/"; echo $staff['class_teacher_section']; ?>" class="btn btn-sm btn-primary text-white">Result</a></td>
<th><a href="<?php echo base_url();?>Exam/exam_subjects/<?php echo $staff['class_teacher'];?>" class="btn btn-sm btn-warning text-white">View</a></th>
</tr>

<?php
}
}
}
}
?>

</tbody>

</table>
</div>
</div>
</div>
</div>
</div>