query($sql); $conn->close(); // Function to determine competency and grade based on marks (scaled) function getCompetencyAndGrade($marks) { if ($marks === null || $marks === '') { return ["", ""]; // Return blank for empty marks } $scaled_marks = ($marks / 100) * 3; // Scale marks to out of 3 if ($scaled_marks >= 2.5) { return ["A", "Excellent"]; } elseif ($scaled_marks >= 2.1) { return ["B", "Advanced"]; } elseif ($scaled_marks >= 1.6) { return ["C", "Satisfactory"]; } elseif ($scaled_marks >= 1.0) { return ["D", "Basic"]; } elseif ($scaled_marks > 0) { return ["E", "Inadequate"]; } else { return ["", "Not offered"]; } } // School information $school_name = "HANDS OF LOVE CHRISTIAN HIGH SCHOOL-KABAGA"; $po_box = "P.O. Box 12345"; $phone_numbers = "+1234567890 / +0987654321"; // Example phone numbers ?> Student Report Cards

Student Report Cards

fetch_assoc()): ?>
School Logo

Phone:

Student Name:

Regno:

Subject Marks (out of 3) Grade Competency
0 ? $total_marks / $valid_subjects_count : 0; ?>
Overall Average:
Remarks: = 2.5) ? "Good Performance!" : "Double your efforts"; ?>
Grading System
Grade Marks (out of 3) Competency
A 2.5 - 3.0 Demonstrate extraordinary level (Excellent)
B 2.1 - 2.4 Demonstrate high level (Advanced)
C 1.6 - 2.0 Demonstrate adequate level (Satisfactory)
D 1.0 - 1.5 Demonstrate minimum level (Basic)
E 0.0 - 0.9 Demonstrate below minimum level (Inadequate)
X - Missed Compulsory Subject or less than 8 subjects