<?php 
    $running_year = $this->crud->getInfo('running_year');
    $subjectData = $this->db->get_where('rating' , array('subject_id' => $param2, 'year' => $running_year))->result_array(); 
?>    
    <div class="modal-body">
        <div class="modal-header mdl-header">
            <h6 class="title text-white"><?php echo getEduAppGTLang('subject_reviews');?></h6>
        </div>
        <div class="ui-block-content">
            <div class="row">
                <div class="table-responsive">
                    <table id="dataTable1" width="100%" class="table table-striped table-lightfont">
                        <thead>
                            <tr class="bg-primary text-white">
                                <td><?php echo getEduAppGTLang('stars');?></td>
                                <td><?php echo getEduAppGTLang('student');?></td>
                                <td><?php echo getEduAppGTLang('date');?></td>
                                <td><?php echo getEduAppGTLang('comment');?></td>
                            </tr>
                        </thead>
                        <tbody>
                        <?php 
                            foreach($subjectData as $row):
                        ?>
                            <?php $class_id = $this->db->get_where('enroll', array('student_id' => $row['student_id']))->row()->class_id;?>
                            <tr>
                                <td class="text-bold"><svg class="align-sub" xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 32 32"><path fill="#fcd53f" d="m18.7 4.627l2.247 4.31a2.27 2.27 0 0 0 1.686 1.189l4.746.65c2.538.35 3.522 3.479 1.645 5.219l-3.25 2.999a2.225 2.225 0 0 0-.683 2.04l.793 4.398c.441 2.45-2.108 4.36-4.345 3.24l-4.536-2.25a2.282 2.282 0 0 0-2.006 0l-4.536 2.25c-2.238 1.11-4.786-.79-4.345-3.24l.793-4.399c.14-.75-.12-1.52-.682-2.04l-3.251-2.998c-1.877-1.73-.893-4.87 1.645-5.22l4.746-.65a2.23 2.23 0 0 0 1.686-1.189l2.248-4.309c1.144-2.17 4.264-2.17 5.398 0"></path></svg> <?php echo $row['star'];?></td>
                                <td><?php echo $this->crud->get_name('student', $row['student_id']);?></td>
                                <td><?php echo $row['date'];?></td>
                                <td><?php echo $row['comment'];?></td>
                            </tr>
                        <?php endforeach;?>
                        </tbody>
                    </table>    
                </div>
            </div>
        </div>
    </div>