recreate project
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Dropdown Menu Example</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.7.2/font/bootstrap-icons.min.css">
|
||||
<link rel="stylesheet" href="assets/css/landing_page.css"> <!-- Ensure this path is correct -->
|
||||
<!-- Favicon -->
|
||||
<link href="<?= base_url('assets/images/favicon.ico') ?>" rel="icon">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php include(__DIR__ . '/../partials/header.php'); ?>
|
||||
<nav class="navbar navbar-expand-lg" style="background-color: #2c9b09; padding-left: 1in;">
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white active"
|
||||
href="<?= base_url('/parent_dashboard'); ?>">
|
||||
<i class="bi bi-house-door"></i> Dashboard
|
||||
</a>
|
||||
</li>
|
||||
<br>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="<?= base_url('parent/enroll_classes'); ?>">
|
||||
<i class="bi bi-pencil-square"></i> Classes
|
||||
</a>
|
||||
</li>
|
||||
<br>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="<?= base_url('parent/attendance'); ?>">
|
||||
<i class="bi bi-calendar-check"></i> Attendance
|
||||
</a>
|
||||
</li>
|
||||
<br>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="<?= base_url('parent/messages'); ?>">
|
||||
<i class="bi bi-chat-dots"></i> Messages
|
||||
</a>
|
||||
</li>
|
||||
<br>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="<?= base_url('support'); ?>">
|
||||
<i class="bi bi-life-preserver"></i> Support
|
||||
</a>
|
||||
</li>
|
||||
<br>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="<?= base_url('calendar'); ?>">
|
||||
<i class="bi bi-calendar"></i> Calendar
|
||||
</a>
|
||||
</li>
|
||||
<br>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="<?= base_url('parent/contact_us'); ?>">
|
||||
<i class="bi bi-telephone"></i> Contact Us
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main role="main" class="row no-gutters">
|
||||
<div class="hero-section col-12">
|
||||
<img src="#" alt="Hero Image" class="img-fluid custom-hero-image">
|
||||
<div class="welcome-message">
|
||||
<h1>Welcome to Al Rahma Sunday School</h1>
|
||||
|
||||
<h2>Welcome, Admin !</h2>
|
||||
<p>This is the admin dashboard.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content col-12 row no-gutters">
|
||||
<div class="navigation col-md-8">
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php include(__DIR__ . '/../partials/footer.php'); ?>
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Dropdown Menu Example</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.7.2/font/bootstrap-icons.min.css">
|
||||
<link rel="stylesheet" href="assets/css/landing_page.css"> <!-- Ensure this path is correct -->
|
||||
<!-- Favicon -->
|
||||
<link href="<?= base_url('assets/images/favicon.ico') ?>" rel="icon">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php include(__DIR__ . '/../partials/header.php'); ?>
|
||||
<nav class="navbar navbar-expand-lg" style="background-color: #2c9b09; padding-left: 1in;">
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white active" href="<?= base_url('/parent_dashboard'); ?>">
|
||||
<i class="bi bi-house-door"></i> Dashboard
|
||||
</a>
|
||||
</li>
|
||||
<br>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="<?= base_url('parent/messages'); ?>">
|
||||
<i class="bi bi-chat-dots"></i> Messages
|
||||
</a>
|
||||
</li>
|
||||
<br>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="<?= base_url('support'); ?>">
|
||||
<i class="bi bi-life-preserver"></i> Support
|
||||
</a>
|
||||
</li>
|
||||
<br>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="<?= base_url('calendar'); ?>">
|
||||
<i class="bi bi-calendar"></i> Calendar
|
||||
</a>
|
||||
</li>
|
||||
<br>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="<?= base_url('parent/contact_us'); ?>">
|
||||
<i class="bi bi-telephone"></i> Contact Us
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main role="main" class="row no-gutters">
|
||||
<div class="hero-section col-12">
|
||||
<img src="#" alt="Hero Image" class="img-fluid custom-hero-image">
|
||||
<div class="welcome-message">
|
||||
<h1>Welcome to Al Rahma Sunday School</h1>
|
||||
|
||||
<h2>Welcome, Guest!</h2>
|
||||
<p>This is the guest dashboard.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content col-12 row no-gutters">
|
||||
<div class="navigation col-md-8">
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php include(__DIR__ . '/../partials/footer.php'); ?>
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,161 @@
|
||||
<?= $this->extend('layout/main_layout') ?>
|
||||
<?= $this->section('content') ?>
|
||||
|
||||
<!-- Circle Styles -->
|
||||
|
||||
<link rel="stylesheet" href="<?= base_url('assets/css/parent_dashboard.css?v=1.1') ?>">
|
||||
<!-- Dashboard Circles -->
|
||||
<div class="container py-5">
|
||||
<div class="row g-4 justify-content-center text-center">
|
||||
|
||||
<!-- Parent_Guide -->
|
||||
<div class="col-auto">
|
||||
<a href="<?= base_url('parent_guide.pdf') ?>"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="d-inline-block text-decoration-none">
|
||||
<div class="circle-box bg-info position-relative" role="button" aria-label="Open Parent Guide PDF">
|
||||
<h4 class="fw-bold mb-0">Your Quick Guide</h4>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Notifications -->
|
||||
<div class="col-auto">
|
||||
<div class="circle-box bg-primary position-relative">
|
||||
<h4 class="fw-bold">Notifications</h4>
|
||||
<small><?= count($notifications ?? []) ?> new</small>
|
||||
<div class="hover-popup" style="max-height: 250px; overflow-y: auto;">
|
||||
<?php if (!empty($notifications)): ?>
|
||||
<ul class="mb-0 ps-3">
|
||||
<?php foreach ($notifications as $n): ?>
|
||||
<li class="mb-2">
|
||||
<strong><?= esc($n['title']) ?></strong><br>
|
||||
<small class="text-muted">
|
||||
<?= isset($n['created_at']) && strtotime($n['created_at'])
|
||||
? esc(local_datetime($n['created_at'], 'm-d-Y H:i'))
|
||||
: 'No date' ?>
|
||||
</small>
|
||||
<br>
|
||||
<span class="badge bg-light text-dark"><?= ucfirst($n['notification_type'] ?? 'broadcast') ?></span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
<p class="mb-0">No new notifications.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Student Info -->
|
||||
<div class="col-auto">
|
||||
<div class="circle-box bg-success">
|
||||
<h4 class="fw-bold">Students</h4>
|
||||
<small><?= count($students ?? []) ?> total</small>
|
||||
<div class="hover-popup">
|
||||
<?php if (!empty($students)): ?>
|
||||
<ul class="mb-0 ps-3">
|
||||
<?php foreach ($students as $student): ?>
|
||||
<li><?= esc($student['firstname']) ?> <?= esc($student['lastname']) ?> - <?= esc($student['grade'] ?? 'N/A') ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
<p class="mb-0">No student data.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Attendance -->
|
||||
<div class="col-auto">
|
||||
<div class="circle-box bg-danger">
|
||||
<h4 class="fw-bold">Absences</h4>
|
||||
<?php
|
||||
$absentCount = 0;
|
||||
foreach ($attendance ?? [] as $a) {
|
||||
if (strtolower($a['status']) === 'absent') $absentCount++;
|
||||
}
|
||||
?>
|
||||
<small><?= $absentCount ?> absent</small>
|
||||
<div class="hover-popup">
|
||||
<?php if ($absentCount): ?>
|
||||
<ul class="mb-0 ps-3">
|
||||
<?php foreach ($attendance as $a): ?>
|
||||
<?php if (strtolower($a['status']) === 'absent'): ?>
|
||||
<li><?= esc($a['date'] ? local_date($a['date'], 'm-d-Y') : '') ?> - <?= esc($a['firstname']) ?> <?= esc($a['lastname']) ?></li>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
<p class="mb-0">No absences.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Report Absence -->
|
||||
<div class="col-auto">
|
||||
<a href="<?= base_url('parent/report-attendance') ?>" class="d-inline-block text-decoration-none">
|
||||
<div class="circle-box bg-secondary text-white position-relative" role="button" aria-label="Report absence or late">
|
||||
<h4 class="fw-bold mb-0">Report Absence</h4>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Scores -->
|
||||
<div class="col-auto">
|
||||
<div class="circle-box bg-warning text-dark">
|
||||
<h4 class="fw-bold">Scores</h4>
|
||||
<small><?= count($scores ?? []) ?> entries</small>
|
||||
<div class="hover-popup">
|
||||
<?php if (!empty($scores)): ?>
|
||||
<ul class="mb-0 ps-3">
|
||||
<?php foreach ($scores as $score): ?>
|
||||
<li><?= esc($score['grade'] ?? 'N/A') ?> - <?= esc($score['firstname']) ?> <?= esc($score['lastname']) ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
<p class="mb-0">No scores yet.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Enrollment -->
|
||||
<div class="col-auto">
|
||||
<div class="circle-box bg-info text-white">
|
||||
<h4 class="fw-bold">Enrollment</h4>
|
||||
<small>Info</small>
|
||||
<div class="hover-popup">
|
||||
<div>
|
||||
<strong>Enrollment deadline:</strong>
|
||||
<?= $lastDayOfRegistration ? local_date($lastDayOfRegistration, 'm-d-Y') : 'N/A' ?>
|
||||
</div>
|
||||
<!--div><strong>Withdrawal:</strong> <--?= esc($withdrawalDeadline ?? 'N/A') ?></div-->
|
||||
<hr class="my-2">
|
||||
<?php if (!empty($enrollments)): ?>
|
||||
<ul class="mb-0 ps-3">
|
||||
<?php foreach ($enrollments as $e): ?>
|
||||
<li><?= esc($e['class_name'] ?? 'N/A') ?> on <?= esc(!empty($e['enrollment_date']) ? local_date($e['enrollment_date'], 'm-d-Y') : 'N/A') ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
<p class="mb-0">No enrollment records.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Payment -->
|
||||
<div class="col-auto">
|
||||
<div class="circle-box bg-secondary position-relative">
|
||||
<h4 class="fw-bold">Payment</h4>
|
||||
<small>$<?= number_format($paymentBalance, 2) ?></small>
|
||||
<div class="hover-popup">
|
||||
<p class="mb-0">Latest outstanding balance from the most recent invoice.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@@ -0,0 +1,102 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Dropdown Menu Example</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.7.2/font/bootstrap-icons.min.css">
|
||||
<link rel="stylesheet" href="assets/css/landing_page.css"> <!-- Ensure this path is correct -->
|
||||
<!-- Favicon -->
|
||||
<link href="<?= base_url('assets/images/favicon.ico') ?>" rel="icon">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php include(__DIR__ . '/../partials/header.php'); ?>
|
||||
<nav class="navbar navbar-expand-lg" style="background-color: #2c9b09; padding-left: 1in;">
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white active" href="<?= base_url('/parent_dashboard'); ?>">
|
||||
<i class="bi bi-house-door"></i> Dashboard
|
||||
</a>
|
||||
</li>
|
||||
<br>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="<?= base_url('parent/enroll_classes'); ?>">
|
||||
<i class="bi bi-pencil-square"></i> Classe
|
||||
</a>
|
||||
</li>
|
||||
<br>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="<?= base_url('parent/attendance'); ?>">
|
||||
<i class="bi bi-calendar-check"></i> Attendance
|
||||
</a>
|
||||
</li>
|
||||
<br>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="<?= base_url('parent/scores'); ?>">
|
||||
<i class="bi bi-clipboard-data"></i> Scores
|
||||
</a>
|
||||
</li>
|
||||
<br>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="<?= base_url('parent/messages'); ?>">
|
||||
<i class="bi bi-chat-dots"></i> Assignments
|
||||
</a>
|
||||
</li>
|
||||
<br>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="<?= base_url('parent/messages'); ?>">
|
||||
<i class="bi bi-chat-dots"></i> Messages
|
||||
</a>
|
||||
</li>
|
||||
<br>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="<?= base_url('support'); ?>">
|
||||
<i class="bi bi-life-preserver"></i> Support
|
||||
</a>
|
||||
</li>
|
||||
<br>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="<?= base_url('calendar'); ?>">
|
||||
<i class="bi bi-calendar"></i> Calendar
|
||||
</a>
|
||||
</li>
|
||||
<br>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="<?= base_url('parent/contact_us'); ?>">
|
||||
<i class="bi bi-telephone"></i> Contact Us
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main role="main" class="row no-gutters">
|
||||
<div class="hero-section col-12">
|
||||
<img src="#" alt="Hero Image" class="img-fluid custom-hero-image">
|
||||
<div class="welcome-message">
|
||||
<h1>Welcome to Al Rahma Sunday School</h1>
|
||||
|
||||
<h2>Welcome, Student!</h2>
|
||||
<p>This is the student dashboard.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content col-12 row no-gutters">
|
||||
<div class="navigation col-md-8">
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php include(__DIR__ . '/../partials/footer.php'); ?>
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,213 @@
|
||||
<?= $this->extend('layout/main_layout') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
|
||||
<?php
|
||||
$activeId = (int)($class_section_id ?? 0);
|
||||
$jobCount = (int)($jobCount ?? 0);
|
||||
$scoreSummary = $scoreSummary ?? [
|
||||
'completionPct' => 0,
|
||||
'missing' => 0,
|
||||
'expected' => 0,
|
||||
'filled' => 0,
|
||||
'fieldLabel' => 'Score',
|
||||
'types' => [],
|
||||
];
|
||||
$commentSummary = $commentSummary ?? [
|
||||
'total' => 0,
|
||||
'pendingReview' => 0,
|
||||
'reviewed' => 0,
|
||||
'missing' => 0,
|
||||
'missingDetail' => [],
|
||||
'types' => [],
|
||||
];
|
||||
$attendanceSummary = $attendanceSummary ?? [
|
||||
'recorded' => 0,
|
||||
'students' => 0,
|
||||
'completionPct' => 0,
|
||||
'avgAbsences' => 0,
|
||||
];
|
||||
$deadlineEvents = $deadlineEvents ?? [];
|
||||
$scoreLabel = $scoreSummary['fieldLabel'] ?? 'Score';
|
||||
$normalizedSemester = ucfirst(strtolower(trim((string)($semester ?? ''))));
|
||||
$dashboardNotifications = $dashboardNotifications ?? [];
|
||||
$participationSummary = $participationSummary ?? [
|
||||
'filled' => 0,
|
||||
'missing' => 0,
|
||||
'completionPct' => 0,
|
||||
'expected' => 0,
|
||||
];
|
||||
$attendanceStatus = $attendanceStatus ?? [
|
||||
'date' => '',
|
||||
'missingSections' => [],
|
||||
'missingNames' => [],
|
||||
'submitted' => true,
|
||||
];
|
||||
$today = (new \DateTimeImmutable('now'))->format('Y-m-d');
|
||||
?>
|
||||
|
||||
<div class="container py-3 pt-2">
|
||||
<?php if (!empty($classes)): ?>
|
||||
<div class="alert alert-info">
|
||||
<strong>Current class:</strong>
|
||||
<?= $activeId ? esc($active_class_name ?? 'Not selected') : 'None selected'; ?>
|
||||
<?php if (!empty($school_year)): ?>
|
||||
<span class="ms-2 text-muted">(<?= esc($school_year) ?>, <?= esc($semester ?? '') ?>)</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="alert alert-warning">
|
||||
No classes assigned to you for the current term.
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($dashboardNotifications)): ?>
|
||||
<div class="container py-2">
|
||||
<?php foreach ($dashboardNotifications as $notification): ?>
|
||||
<?php
|
||||
$level = in_array($notification['type'] ?? '', ['warning', 'info', 'success', 'danger'], true)
|
||||
? $notification['type']
|
||||
: 'info';
|
||||
?>
|
||||
<div class="alert alert-<?= esc($level) ?> d-flex justify-content-between align-items-start mb-2">
|
||||
<div>
|
||||
<?= esc($notification['message'] ?? '') ?>
|
||||
</div>
|
||||
<?php if (!empty($notification['link'] ?? '')): ?>
|
||||
<a href="<?= esc($notification['link']) ?>" class="btn btn-sm btn-outline-dark ms-3">
|
||||
<?= esc($notification['linkText'] ?? 'View') ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container py-3">
|
||||
<div class="row g-3">
|
||||
<div class="col-lg-4">
|
||||
<div class="card h-100 shadow-sm border-0">
|
||||
<div class="card-body">
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
<h5 class="card-title mb-0">Score submission</h5>
|
||||
<?php if (!empty($scoreSummary['fieldLabel'])): ?>
|
||||
<span class="badge bg-secondary ms-3"><?= esc('Active: ' . $scoreSummary['fieldLabel']) ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="d-flex align-items-baseline mb-2">
|
||||
<h3 class="mb-0"><?= esc($scoreSummary['completionPct'] ?? 0) ?>%</h3>
|
||||
<span class="text-muted ms-2 small">completed</span>
|
||||
</div>
|
||||
<?php if (!empty($scoreSummary['expected'])): ?>
|
||||
<p class="mb-3 small text-muted">
|
||||
<?= esc($scoreSummary['missing'] ?? 0) ?> missing out of <?= esc($scoreSummary['expected']) ?> <?= esc($scoreSummary['fieldLabel']) ?> entries.
|
||||
</p>
|
||||
<?php else: ?>
|
||||
<p class="mb-3 small text-muted">No score entries expected yet.</p>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($scoreSummary['types'] ?? [] as $typeKey => $typeData): ?>
|
||||
<?php if (empty($typeData['expected']) && empty($typeData['filled'])): ?>
|
||||
<?php continue; ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
$progressClass = $typeKey === 'participation'
|
||||
? 'bg-info'
|
||||
: ($typeData['completionPct'] >= 100 ? 'bg-success' : 'bg-warning');
|
||||
?>
|
||||
<div class="d-flex justify-content-between align-items-baseline">
|
||||
<span class="small text-muted"><?= esc($typeData['label']) ?></span>
|
||||
<span class="small text-muted"><?= esc($typeData['completionPct']) ?>% complete</span>
|
||||
</div>
|
||||
<div class="progress mb-1" style="height: 6px;">
|
||||
<div class="progress-bar <?= esc($progressClass) ?>" role="progressbar"
|
||||
style="width: <?= esc($typeData['completionPct']) ?>%;"
|
||||
aria-valuenow="<?= esc($typeData['completionPct']) ?>"
|
||||
aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
<p class="mb-2 small <?= (int)($typeData['missing'] ?? 0) > 0 ? 'text-danger' : 'text-success' ?>">
|
||||
<?= esc($typeData['missing'] ?? 0) ?> missing of <?= esc($typeData['expected'] ?? 0) ?>.
|
||||
</p>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="card h-100 shadow-sm border-0">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title mb-0">Comments & reviews</h5>
|
||||
<div class="d-flex align-items-baseline mb-2">
|
||||
<h3 class="mb-0"><?= esc($commentSummary['completionPct'] ?? 0) ?>%</h3>
|
||||
<span class="text-muted ms-2 small">completed</span>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between align-items-baseline">
|
||||
<span class="small text-muted">Reviewed</span>
|
||||
<span class="small text-muted"><?= esc($commentSummary['reviewed'] ?? 0) ?> reviewed</span>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between align-items-baseline mb-2">
|
||||
<span class="small text-muted">Pending review</span>
|
||||
<span class="small text-muted"><?= esc($commentSummary['pendingReview'] ?? 0) ?> pending</span>
|
||||
</div>
|
||||
<div class="d-flex flex-column">
|
||||
<?php foreach ($commentSummary['types'] ?? [] as $typeData): ?>
|
||||
<?php if (empty($typeData['expected']) && empty($typeData['filled'])): ?>
|
||||
<?php continue; ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
$progressClass = $typeData['completionPct'] >= 100 ? 'bg-success' : 'bg-warning';
|
||||
?>
|
||||
<div class="mt-3 d-flex justify-content-between align-items-baseline">
|
||||
<span class="small text-muted"><?= esc($typeData['label']) ?></span>
|
||||
<span class="small text-muted"><?= esc($typeData['completionPct']) ?>% complete</span>
|
||||
</div>
|
||||
<div class="progress mb-1" style="height: 6px;">
|
||||
<div class="progress-bar <?= esc($progressClass) ?>" role="progressbar"
|
||||
style="width: <?= esc($typeData['completionPct']) ?>%;"
|
||||
aria-valuenow="<?= esc($typeData['completionPct']) ?>"
|
||||
aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
<p class="mb-2 small <?= (int)($typeData['missing'] ?? 0) > 0 ? 'text-danger' : 'text-success' ?>">
|
||||
<?= esc($typeData['missing'] ?? 0) ?> missing · <?= esc($typeData['pending'] ?? 0) ?> pending review
|
||||
</p>
|
||||
<?php endforeach; ?>
|
||||
<?php if (empty($commentSummary['types'])): ?>
|
||||
<p class="mb-0 small text-muted">No comments recorded yet.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="card h-100 shadow-sm border-0">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title mb-0">Attendance tracking</h5>
|
||||
<div class="d-flex justify-content-between align-items-baseline mt-2 mb-2">
|
||||
<span class="small text-muted">Students recorded</span>
|
||||
<span class="small text-muted"><?= esc($attendanceSummary['completionPct'] ?? 0) ?>% complete</span>
|
||||
</div>
|
||||
<div class="progress" style="height: 6px;">
|
||||
<div class="progress-bar bg-warning" role="progressbar"
|
||||
style="width: <?= esc($attendanceSummary['completionPct'] ?? 0) ?>%;"
|
||||
aria-valuenow="<?= esc($attendanceSummary['completionPct'] ?? 0) ?>"
|
||||
aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
<p class="mb-2 mt-2 small <?= (int)($attendanceSummary['students'] ?? 0) - (int)($attendanceSummary['recorded'] ?? 0) > 0 ? 'text-danger' : 'text-success' ?>">
|
||||
<?= esc($attendanceSummary['recorded'] ?? 0) ?> of <?= esc($attendanceSummary['students'] ?? 0) ?> students recorded
|
||||
</p>
|
||||
<p class="mb-1 small text-muted">
|
||||
Average absences: <?= esc($attendanceSummary['avgAbsences'] ?? 0) ?>
|
||||
</p>
|
||||
<?php if (!empty($attendanceStatus['missingSections'])): ?>
|
||||
<p class="text-danger small mt-2 mb-0">
|
||||
Today's attendance still open for <?= esc(implode(', ', array_filter($attendanceStatus['missingNames'] ?? []))) ?>.
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Jobs section hidden per request -->
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
Reference in New Issue
Block a user