<?php
$exam_id=$this->uri->segment('3');
$exam_table='all_exams';
$get_exam_info=$this->NewExamModel->get_item_data($exam_id,$exam_table);
$courses_table='courses';
$all_courses=$this->NewExamModel->get_data($courses_table);
?>

<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>
                <?php
                if($get_exam_info){
                    foreach($get_exam_info as $exam_info){
                ?>
                <li class="breadcrumb-item"><?php echo $exam_info['exam_title']; ?></li>
                <?php
                    }
                }
                ?>
            </ul>
            
            <div class="table-responsive">
                <table class="table table-bordered table-striped">
                    <thead>
                        <tr>
                            <th>Course</th>
                            <th>Exam Heads</th>
                            <th>Exam Schedule</th>
                            <th>Exam Attendance</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        if($all_courses){
                            foreach($all_courses as $courses){
                        ?>
                        <tr>
                            <td><?php echo $courses['course']; echo " "; echo $courses['subject_stream'];?></td>
                            <td><a href="<?php echo base_url();?>Examination/exam_heads/<?php echo $courses['id']; echo "/"; echo $exam_id; ?>">View</a></td>
                            <td><a href="<?php echo base_url(); ?>Examination/course_exam_schedule/<?php echo $exam_id; echo "/"; echo $courses['id']; ?>">View</a></td>
                            <td></td>
                        </tr>
                        <?php
                            }
                        }
                        ?>
                    </tbody>
                </table>
            </div>
            
        </div>
    </div>
</div>