    <div class="content-w">
    <?php $running_year = $this->crud->getInfo('running_year');?>
        <?php include 'fancy.php';?>
        <div class="header-spacer"></div>
        <div class="conty">
            <div class="all-wrapper no-padding-content solid-bg-all">
                <div class="layout-w">
                    <div class="content-w">
                        <div class="content-i">
                            <div class="content-box">
                                <div class="app-email-w">
                                    <div class="app-email-i">
                                        <div class="ae-content-w grbg">
                                            <div class="top-header top-header-favorit">
                                                <div class="top-header-thumb">
                                                    <img src="<?php echo base_url();?>public/uploads/<?php echo $this->crud->getInfo('bglogin');?>" class="bgcover">
                                                    <div class="top-header-author">
                                                        <div class="author-thumb">
                                                            <img src="<?php echo base_url();?>public/uploads/<?php echo $this->crud->getInfo('logo');?>" class="authorCv">
                                                        </div>
                                                        <div class="author-content">
                                                            <a href="javascript:void(0);" class="h3 author-name"><?php echo getEduAppGTLang('academic');?></a>
                                                            <div class="country"><?php echo $this->crud->getInfo('system_name');?>  |  <?php echo $this->crud->getInfo('system_title');?></div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="profile-section">
                                                    <div class="container-fluid">
                                                        <div class="row">
                                                            <div class="col col-xl-8 m-auto col-lg-8 col-md-12">
                                                                <div class="os-tabs-w">
                                                                    <div class="os-tabs-controls">
                                                                        <ul class="navs navs-tabs upper">
                                                                        <?php 
                        			  	                                    $n = 1;
                    			  	                                        $children_of_parent = $this->db->get_where('student' , array('parent_id' => $this->session->userdata('parent_id')))->result_array();
                                                                            foreach ($children_of_parent as $row):?>
                                                                            <li class="navs-item">
                                                                        	<?php $active = $n++;?>
                    				  		                                    <a class="navs-links <?php if($active == 1) echo 'active';?>" data-toggle="tab" href="#<?php echo $row['username'];?>"><img alt="" src="<?php echo $this->crud->get_image_url('student', $row['student_id']);?>" width="25px" class="tbl-st"> <?php echo $this->crud->get_name('student', $row['student_id']);?></a>
                    					                                    </li>
                                                                        <?php endforeach; ?>
                                                                        </ul>
                                                                    </div> 
                                                                </div>                                        
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="aec-full-message-w">
                                                <div class="aec-full-message">
                                                    <div class="container-fluid grbg">
                                                        <div class="tab-content">
                                                        <?php 
                                			                $n = 1;
			                                                $children_of_parent = $this->db->get_where('student' , array('parent_id' => $this->session->userdata('parent_id')))->result_array();
                                                            foreach ($children_of_parent as $row3):
                                                            $class_id = $this->db->get_where('enroll' , array('student_id' => $row3['student_id'] , 'year' => $running_year))->row()->class_id;
                                                            $section_id = $this->db->get_where('enroll' , array('student_id' => $row3['student_id'] , 'year' => $running_year))->row()->section_id;
                                                        ?>
        	                                            <?php $active = $n++;?>
	 		                                                <div class="tab-pane <?php if($active == 1) echo 'active';?>" id="<?php echo $row3['username'];?>">
                                                                <div class="row">
                                                                <?php 
                                                                    $this->db->order_by('subject_id', 'desc');
                                                                    $subjects = $this->db->get_where('subject', array('class_id' => $class_id, 'section_id' => $section_id))->result_array();
                                                                    foreach($subjects as $row2):
                                                                ?>
                                                                    <div class="col col-xl-3 col-lg-6 col-md-6 col-sm-12 col-12">
                                                                        <div class="ui-block" data-mh="friend-groups-item">        
                                                                            <div class="friend-item friend-groups">
                                                                                <div class="friend-item-content rmp">  
                                                                                    <div class="course-image">
                                                                                        <img src="<?php echo $this->crud->getCourseIMG($row2['icon']);?>">
                                                                                    </div>
                                                                                    <div class="friend-avatar">
                                                                                        <div class="author-content course-content">
                                                                                            <a href="<?php echo base_url();?>parents/subject_dashboard/<?php echo base64_encode($row2['class_id']."-".$row2['section_id']."-".$row2['subject_id']);?>/" class="fs16edu h5 author-name"><?php echo $row2['name'];?></a><br><br>
                                                                                            <ul>
                                                                                                <li>
                                                                                                    <b><?php echo getEduAppGTLang('teacher');?>:</b> 
                                                                                                    <img src="<?php echo $this->crud->get_image_url('teacher', $row2['teacher_id']);?>" class="img-teacher"> <span><?php echo $this->crud->get_name('teacher', $row2['teacher_id']);?></span>.</li>
                                                                                                <li>
                                                                                                    <b><?php echo getEduAppGTLang('students');?>:</b> 
                                                                                                    <?php echo $this->crud->countStudentsByClass($row2['class_id'],$row2['section_id']);?>.
                                                                                                </li>
                                                                                                <li>
                                                                                                    <b><?php echo getEduAppGTLang('reviews');?>:</b>
                                                                                                    <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"/></svg>
                                                                                                    <?php echo $this->crud->calculateSubjectAverage($row2['subject_id']);?>/5.0
                                                                                                </li>
                                                                                            </ul>
                                                                                            <a class="btn btn-warning course-btn" href="<?php echo base_url();?>parents/subject_dashboard/<?php echo base64_encode($row2['class_id']."-".$row2['section_id']."-".$row2['subject_id'].'-'.$row3['student_id']);?>/"><?php echo getEduAppGTLang('dashboard');?></a>
                                                                                        </div>                          
                                                                                    </div>                      
                                                                                </div>
                                                                            </div>        
                                                                        </div>
                                                                    </div>
                                                                    <?php endforeach;?>
                                                                </div>
                                                            </div>
                                                        <?php endforeach;?>
                                                        </div>  
                                                    </div>
                                                </div>
                                            </div>    
                                        </div>  
                                    </div>
                                </div>  
                            </div>
                        </div>
                    </div>
                </div>
                <div class="display-type"></div>
            </div>
        </div>
    </div>   