BBnepal-Accounts/application/views/student/attendance.php

75 lines
3.0 KiB
PHP
Raw Normal View History

2024-07-10 12:43:19 +00:00
<main class="common_margin" id="main">
<div class="main-wrap">
<div class="breadcrumb-section">
<!-- <ol class="breadcrumb breadcrumb-back">
<li class="breadcrumb-item"> <a href="<?= base_url(); ?>student/dashboard"> Back </a></li>
</ol> -->
</div>
<?php if($this->session->flashdata('failed')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('failed') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<div class="syllabus-wrap">
<div class="syllabus-head">
<h3 class="common-heading">Attendance</h3>
</div>
<div class="syllabus-main">
<?php
if(!empty($subject_names)) {
foreach ($subject_names as $key => $value) {
if($count[$key]['student_id'] == $value['student_id']) {
?>
<form action="<?php echo base_url() ?>student/view-attendance" method="post">
<div class="syllabus-tab">
<div class="syllabus-image"><img src="<?= base_url(); ?>assets_admin/images/icons/<?php echo $value['icon'] ?>"></div>
<h5><?php echo $value['subject_name'] ?></h5>
<?php if(isset($count[$key])) { ?>
<span><?php echo $count[$key]['present_count'] . '/' . $count[$key]['total_count'] ?></span>
<?php } else {
echo '<span>0/0</span>';
} ?>
<input type="hidden" name="subject_name" value="<?php echo $value['subject_name'] ?>">
<input type="hidden" name="subject_id" value="<?php echo $value['subject_id'] ?>">
<input type="hidden" name="classroom_id" value="<?php echo $value['classroom_id'] ?>">
<input type="hidden" name="icon" value="<?php echo $value['icon'] ?>">
<input type="hidden" name="total_count" value="<?php echo $count[$key]['total_count'] ?>">
<input type="hidden" name="present_count" value="<?php echo $count[$key]['present_count'] ?>">
<button type="submit" class="join-class-btn text-white">View Details</button>
</div>
</form>
<?php }
}
} else { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p>Student has no subjects</p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php }
?>
</div>
</div>
</div>
</main>