<?php
$course_id=$this->uri->segment('3');
$exam_id=$this->uri->segment('4');
$exam_table='all_exams';
$courses_table='courses';
$get_exam_info=$this->NewExamModel->get_item_data($exam_id,$exam_table);
$get_course_info=$this->NewExamModel->get_item_data($course_id,$courses_table);
$exam_title='';
$acedemic_session=$this->session->userdata('acedemic_session');
$exam_head_table="exam_heads_".$acedemic_session."";
?>
<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"><a href="<?php echo base_url();?>Examination">Exam</a></li>
                <li class="breadcrumb-item"><a href="<?php echo base_url();?>Examination/schedule/<?php echo $exam_id;?>">Exam Schedule</a></li>
                <?php
                if($get_exam_info){
                    foreach($get_exam_info as $exam_info){
                        $exam_title=$exam_info['exam_type'];
                ?>
                <li class="breadcrumb-item"><?php echo $exam_info['exam_title']; ?></li>
                <?php
                    }
                }
                if($get_course_info){
                    foreach($get_course_info as $course_info){
                ?>
                <li class="breadcrumb-item"><?php echo $course_info['course']; echo " "; echo $course_info['subject_stream']; ?></li>
                <?php
                    }
                }
                ?>
            </ul>
            
            <div class="table-responsive">
                <table class="table table-bordered table-striped">
                    <thead>
                        <tr>
                            <th>Subject</th>
                            <?php
                            $get_exam_heads=$this->NewExamModel->get_exam_head_for_session_for_exam($exam_title,$course_id,$acedemic_session,$exam_head_table);
                            if($get_exam_heads){
                                foreach($get_exam_heads as $exam_heads){
                            ?>
                            <th><?php echo $exam_heads['exam_head'];?></th>
                            <?php
                                }
                            }
                            ?>
                            
                        </tr>
                    </thead>
                </table>
            </div>
            
        </div>
    </div>
</div>