<style>
.add-subject-section{}
.add-subject-section{}
</style>

<div class="container mt-3 mb-3 bg-white pt-3 pb-3">
    <div class="row">
        <div class="col-sm-12 add-subject-section">
            <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();?>Exam/all_exams">Exam</a></li>
                <li class="breadcrumb-item"><a href="<?php echo base_url();?>Exam/exam_subjects">Exam Subjects</a></li>
                <li class="breadcrumb-item">Add New Exam Subject</li>
            </ul>

            <div class="">
            <?php
            if($success){
            // echo '<div class="alert alert-success" role="alert">'.$success.'</div>';


                echo '<div class="alert alert-success alert-dismissible fade show" role="alert">
                        <strong>'.$success.'</strong>
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>';
            }

            if($error){
                // echo '<div class="alert alert-success" role="alert">'.$success.'</div>';
                echo '<div class="alert alert-danger alert-dismissible fade show" role="alert">
                        <strong>'.$error.'</strong>
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>';
            }

            ?>    
    
            <form method="post" action="#">
                <h3>Add New Exam Subject</h3>
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="Add New Subject" name="exam_subject" required>
</div>


<div class="form-group">
<select class="form-control" name="exam_class" required>
<?php 
$exam_subjects=$this->ExamModel->get_active_courses();
if($exam_subjects){
foreach($exam_subjects as $subjects){
?>
<option value="<?php echo $subjects['course'];?>"><?php echo $subjects['course'];?></option>
<?php
}
}
?>

</select>
</div>

<div class="form-group">
<input type="text" class="form-control" placeholder="Subject Order" name="subject_order" required>
</div>

<div class="form-group">
<input type="text" class="form-control" placeholder="MM" name="mm" >
</div>

<div class="form-group">
<select class="form-control" name="exam_type" required>
<option value="">Select Exam Type</option>
<option value="marks">Marks</option>
<option value="grade">Grade</option>
</select>
</div>

<div class="form-group">
<input type="submit" class="btn btn-success btn-sm" value="Add Subject" name="add_subject">
</div>

</form>
    
</div>


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