SLMT Technology  ·  LMS Platform Portal Demo

Live Dashboard

The moment an HOD logs in, this is the first page they see. It is the nerve centre of the entire department — a single scrollable page that shows leave queues, charts, assignment health, test scores, marks status, and an AI-generated analysis. Zero manual look-ups required.

Dashboard Layout — Top to Bottom
① KPI Strip (4 counters)
② AI Dashboard Analyst
③ Pending Leave Table
④ Student Distribution Chart
⑤ Leave Status Doughnut
⑥ Assignment Insights
⑦ Marks Distribution Panel
⑧ PO Attainment Summary
⑨ Online Test Insights
⑩ Achievements Overview

① KPI Strip — 4 Live Counters

A horizontal row of 4 compact metric cards appears at the very top. These are scoped to the current HOD's department only — another department's data is never included.

Counter What it Shows Why It Matters
⏰ Pending Approvals Leave applications forwarded by teachers to HOD but not yet actioned The HOD's daily to-do — non-zero means students are waiting
✅ Approved Today Count of leaves the HOD has approved since midnight today Tracks admin workload completed — useful for self-assessment
👥 Total Students All active enrolled students across all classes in the department Gives instant headcount for reporting to management
🎓 Total Teachers Active faculty count in the department Useful for load-balancing decisions at a glance
  • Hover Effect: Each card lifts slightly with an enhanced shadow on hover — providing interactive feedback without navigation.
  • Color-coded Borders: Each card has a distinct left border colour (navy, green, teal, blue) matching the metric's contextual severity — pending is navy (action needed), approved is green (positive).

② AI Dashboard Analyst (BETA)

A prominent dark navy panel immediately below the KPI strip. This is the most advanced feature on the dashboard — a Google Gemini AI integration that reads all dashboard data and generates a plain-English executive summary on demand.

  • "Generate Report" Button:
    Click once → the system collects all department stats (leaves, assignments, marks, tests, achievements, student distribution) and sends them to the Gemini AI API. While waiting, an animated loading skeleton (3 shimmering bars) and a typing dots indicator appear with text "Synthesizing departmental data..."
  • What the AI Receives (Data Context):
    • Total students, teachers, pending leaves, approved today
    • Leave status breakdown (approved/pending/rejected counts + percentages)
    • Assignment stats: total, active, total submissions, pending reviews
    • Marks distribution: draft/shared/closed sheet counts, PO attainment levels
    • Online test stats: total attempts, average department score
    • Achievement count (HOD-approved)
  • AI Output Card:
    The result appears in a white card with a gold left border. The response is markdown-rendered with bullet points and bold highlights. Key terms are wrapped in a gold-tinted highlight style.
  • Timestamp + Regenerate:
    Below the result, a timestamp shows when the analysis was generated. A "Regenerate Analysis" button re-fetches a fresh analysis with one click.
  • BETA Badge:
    A gold "BETA" badge on the panel title reminds users that AI output is advisory and should be verified before being cited in official reports.
    Core Benefit: Replaces the need for a weekly HOD report-compilation session. The AI flags anomalies (e.g., "Assignment pending review rate is unusually high for TY-B") that a manual data scan would take 20–30 minutes to identify.

③ Pending Leave Approvals — Quick-Action Table

A compact ERP-style table showing up to 5 leave applications currently in the HOD's queue (status = approved_teacher). These are leaves where the student's class teacher has already reviewed and forwarded, awaiting the HOD's final decision.

  • 6 Columns per Row:
    • Student — Avatar (profile photo or initials initials), full name, and roll number
    • Class — Class name, year, and division badge
    • Type — Leave category badge (Medical, Personal, Exam, etc.) in amber
    • Duration — Start date → End date + total days count
    • Teacher — Name of the teacher who forwarded the leave
    • Actions — Three icon buttons: View (blue), Approve (green), Reject (red)
  • View Button (🔵):
    Opens a modal overlay showing the full leave application: reason text, exact dates, teacher comment, and student contact info — without leaving the dashboard.
  • Approve Button (🟢):
    Opens a small confirmation dialog pre-filled with the student's name. HOD can optionally add a comment before confirming. On approval:
    • Leave status updated to approved_hod
    • HOD's ID, comment, and timestamp recorded
    • Student's attendance is automatically protected for those dates in the attendance system
  • Reject Button (🔴):
    Opens a rejection dialog that requires the HOD to type a rejection reason. Cannot be left blank — the student must always receive a written reason.
    Core Benefit: Eliminates the need to open the Leave Management module. The HOD can process 5–10 leaves per day directly from the homepage in under 2 minutes — no page switches required.
  • "View All" Link:
    A link in the panel header navigates to the full Leave Approvals page which shows the entire pending queue (not just the top 5).
  • Empty State:
    When no leaves are pending, the table is replaced by a clean empty-state icon with "No Pending Approvals — All leave applications have been processed."

④ Student Distribution Chart (Bar) + ⑤ Leave Status Chart (Doughnut)

A two-column analytics row rendered using Chart.js. Both charts update automatically when the page loads.

Student Distribution (Bar Chart)
  • One bar per active class in the department
  • Bar height = number of enrolled active students
  • X-axis: "ClassName Year Division" (e.g., "BCOM TY A")
  • Hover tooltip shows exact count
  • Helps spot overcrowded vs. under-strength classes
Leave Status (Doughnut Chart)
  • Centre of doughnut shows total leave count
  • Three segments: Approved (green), Pending (amber), Rejected (red)
  • Below chart: 3 chip rows showing count + percentage for each status
  • "Live" badge in the header — data updates on each page load
  • Instant view of the HOD's approval/rejection rate trend

⑥ Assignment Insights Panel

A dedicated analytics section for all assignments in the department. Draws from teacher-created assignments linked to HOD-department classes.

  • 4 Mini Stat Cards:
    • Total Assignments — All assignments ever created in this department
    • Active — Assignments currently in "active" status (open for submission)
    • Total Submissions — All files submitted across all assignments
    • Pending Review — Submissions in "pending" status — teacher hasn't graded them yet
  • Submission Quality Breakdown:
    Below the stat cards, a secondary row shows Approved / Pending / Rejected submission counts — a detailed quality view beyond just totals.
  • Active Assignments by Class (Bar Chart):
    A horizontal bar chart showing which classes have the most active assignments. Helps the HOD identify which teacher is most/least active in giving assignments.
    Core Benefit: The "Pending Review" number is the most critical metric here — if it's high, teachers are assigning work but not evaluating it. The HOD can call out specific teachers without digging through individual assignment pages.

⑦ Marks Distribution Panel + ⑧ PO Attainment Summary

A comprehensive overview of the Internal Marks module status for the current academic year.

  • 3 Sheet Status Counters:
    • Draft — Marks distribution sheets created but not yet shared with students
    • Shared — Sheets shared with students for viewing
    • Closed — Finalized sheets, no further edits
  • Total Marks Entered:
    A cumulative count of all individual marks entries across all sheets — gives a sense of how much data has been recorded.
  • Class Marks Ranking Table:
    A sortable table showing each class's performance summary — average marks, best performer, worst performer — ranked for quick comparison.
  • PO Attainment Summary (Programme Outcome):
    Automatically computed from all marks distribution sheet data:
    • Level 3 — ≥80% average attainment (Excellent)
    • Level 2 — 60–79% attainment (Satisfactory)
    • Level 1 — 40–59% attainment (Needs Improvement)
    • Below L1 — <40% attainment (Critical)
    These PO levels directly feed into NAAC accreditation Criterion 2 (Teaching Learning) documentation.
    Core Benefit: The HOD knows in real time how many marks sheets are still in Draft (= teachers haven't finalized results yet) without emailing or calling anyone. The PO attainment dashboard replaces a full semester's manual calculation exercise.

⑨ Online Test Insights Panel

A real-time monitoring panel for all MCQ/online tests published by teachers in the department.

  • 5 Stat Counters:
    • Total Tests — All non-draft tests in the department
    • Active (Published) — Tests currently live and available to students
    • Total Attempts — All recorded test starts (graded + submitted + auto-submitted)
    • Ungraded — Tests submitted but not yet reviewed by teacher
    • Avg Score — Department-wide average percentage across all test attempts
  • Test Attempt Breakdown (3 states):
    • Completed — All attempts with graded/submitted/auto-submitted status
    • In Progress — Students currently inside an active test session (timer not yet expired)
    • Timed Out — Started tests where the time limit has passed without submission (likely technical issues)
  • Tests by Class Bar Chart:
    Shows which classes have the most tests assigned — helps the HOD verify that digital assessments are distributed fairly across the department.
    Core Benefit: The "Timed Out" and "Ungraded" counters immediately alert the HOD to testing problems — students who couldn't submit due to connectivity issues, and teachers who haven't reviewed results yet.

⑩ Student Achievements Overview

  • HOD-Approved Count:
    Total number of student achievements that have been fully approved (by teacher, then by HOD) for the department. This number directly feeds into NAAC Criterion 5 (Student Support & Progression) reports.
  • Link to Full Module:
    A "View All" button navigates to the Achievement Reports page for full filtering and export capabilities.

Security & Multi-Tenancy Architecture

All 10 sections of the dashboard query data through the same security layer:

  • HOD Isolation: Every SQL query uses WHERE hod_id = ? or WHERE s.hod_id = ? (scoped to the logged-in HOD's ID). An HOD in Commerce cannot see Science department data — not even accidentally.
  • Academic Year Scoping: The current academic year is calculated automatically (June onwards = new year). All data shown defaults to the current year — no manual year selection required on the dashboard.
  • CSRF Protection: All POST actions (approve/reject leave) verify a CSRF token before processing. Forged cross-site requests are rejected with an error message.
  • Post/Redirect/Get (PRG): After any approve/reject action, the page immediately redirects to itself (Location: dashboard.php). This prevents duplicate submissions if the HOD refreshes after approving a leave.
  • Role Check on Every Load: The very first line of the dashboard is checkRole(ROLE_HOD) — if the logged-in user is not an HOD, they are redirected to the login page immediately, even if they somehow access the URL directly.

Data Flow Sequence

sequenceDiagram
    participant DB as Database
    participant PHP as Dashboard Engine
    participant HOD as HOD Browser

    PHP->>DB: 10 parallel queries (all scoped to hod_id)
    DB-->>PHP: Leaves, Students, Assignments, Marks, Tests, Achievements
    PHP->>PHP: Aggregate + compute percentages & PO levels
    PHP-->>HOD: Render KPI strip + charts + tables
    HOD->>PHP: Click "Generate Report" (AI Analyst)
    PHP->>PHP: Package all stats into Gemini API prompt
    PHP-->>HOD: Stream AI executive summary
    HOD->>PHP: Click "Approve Leave" → POST with CSRF token
    PHP->>DB: UPDATE leave_applications SET status='approved_hod'
    PHP-->>HOD: Redirect (PRG pattern) → fresh dashboard
    

Overall Benefit: The HOD Dashboard eliminates 1–2 hours of daily manual status-checking. Every key metric — leaves, marks, tests, assignments, achievements — is visible in a single scroll. The AI Analyst replaces the need for a weekly department data review meeting. All actions (approve/reject leave) can be completed without leaving the page. The department's academic pulse is visible in under 30 seconds.