Web Project
Web Project
Submitted By:
YONARD ALIGGOY
ALDRIN TAPAYA
Project Adviser:
MS. GAZELLE NAZARO
MR. WILLIAM SABUG JR.
MS. DIVINE GRACE OLAÑO
*Requirements Elicitation
This questionnaire will help us understand your needs for our Quiz Management System. Please select the option
that best represents your preferences.
For Administrator
For Teachers
For Students
2. What security features would you require in an Compliance with educational data protection standards.
online assessment system?
Responses
Teacher Variety of question Detailed analytics on Schedule quizzes with Track which students
1 types (multiple- question performance. specific open/close have accessed materials.
choice, true/false, times.
essay, etc.).
Teacher Variety of question Detailed analytics on Schedule quizzes with Upload various document
2 types (multiple- question performance. specific open/close types and provide web
QUIRINO STATE UNIVERSITY
COLEGE OF INFORMATION TECHNOLOGY & COMPUTING SCIENCES
Diffun Campus
Teacher Variety of question Options for time limits Provide immediate Upload various document
3 types (multiple- and attempt automated feedback types and provide web
choice, true/false, restrictions. for objective questions. resource links.
essay, etc.).
Teacher Variety of question Automated grading for Generate performance Organize materials by
5 types (multiple- objective questions. analytics to identify topic and relate them to
choice, true/false, learning gaps. specific quizzes.
essay, etc.).
Teacher Variety of question Detailed analytics on Schedule quizzes with Upload various document
6 types (multiple- question performance. specific open/close types and provide web
choice, true/false, times. resource links.
essay, etc.).
Teacher Variety of question Options for time limits Schedule quizzes with Schedule material
7 types (multiple- and attempt specific open/close availability based on
choice, true/false, restrictions. times. course progression.
essay, etc.).
Responses
Student 1 Visible timer with Immediate feedback Mobile-friendly Dashboard showing
automatic submission showing formats for studying all enrolled subjects
when time expires. correct/incorrect on any device. with upcoming
answers. deadlines.
Student 2 Visible timer with Immediate feedback Ability to mark Simple enrollment
automatic submission showing materials as using teacher-
when time expires. correct/incorrect “completed” to track provided class codes.
answers. progress.
Student 3 Clear navigation with Detailed explanations Ability to mark Easy access to teacher
ability to flag questions for incorrect answers. materials as contact information
for review. “completed” to track for questions.
progress.
QUIRINO STATE UNIVERSITY
COLEGE OF INFORMATION TECHNOLOGY & COMPUTING SCIENCES
Diffun Campus
Student 6 Visible timer with Immediate feedback Ability to mark Dashboard showing
automatic submission showing materials as all enrolled subjects
when time expires. correct/incorrect “completed” to track with upcoming
answers. progress. deadlines.
Student 7 Mobile-friendly Immediate feedback All materials Simple enrollment
interface for taking showing organized by topic using teacher-
quizzes on any device. correct/incorrect with clear relevance provided class codes.
answers. to quizzes.
-Summary of Findings
The interview data reveals clear priorities for each stakeholder group in a quiz management system:
For Administrators
For Teachers
For Students
These findings highlight the importance of developing a system that balances administrative control, teaching
flexibility, and student-centered features.
QUIRINO STATE UNIVERSITY
COLEGE OF INFORMATION TECHNOLOGY & COMPUTING SCIENCES
Diffun Campus
Student
Teacher
Admin
QUIRINO STATE UNIVERSITY
COLEGE OF INFORMATION TECHNOLOGY & COMPUTING SCIENCES
Diffun Campus
*Purpose
The Diffun National High School Quiz Management System is a specialized web-based platform designed to
modernize and streamline the assessment process within the school. This system serves as a digital solution for
managing quizzes, distributing educational materials, and tracking student performance, specifically tailored to
meet the academic needs of Diffun National High School.
Problems/Challenges
Manual Quiz Administration
Teachers spend significant time preparing, distributing, and checking quizzes, which leads to inefficiencies
and increases the risk of errors.Inefficient and time-consuming assessment processes: Teachers rely on
manual methods for creating quizzes, distributing materials, and grading assessments.
Limited Performance Tracking
There is no centralized or real-time system for monitoring and analyzing student performance, making it
hard to identify learning gaps and trends.
Scalability of Quiz Management
Managing quizzes across multiple classes, subjects, and student groups becomes increasingly complex and
disorganized without a digital solution.
Lack of Immediate Feedback for Students
In manual setups, students often wait a long time to receive their quiz results, delaying opportunities to
reflect and improve on their mistakes.
*Objectives:
General Objective: develop a digital quiz management system that provides a centralized platform for
efficient assessment processes, improved access to learning resources, and effective student progress
tracking.
Specific Objectives:
1. Streamline the assessment process by enabling teachers to create, manage, and distribute quizzes
electronically.
2. Provide a platform for teachers to upload and share learning materials with students, enhancing their
access to resources.
3. Develop a system that allows teachers to track student performance on quizzes and generate
comprehensive reports for monitoring progress.
*Features
-Scope:
The Quiz Management System is a web-based application designed to facilitate the creation, administration, and
taking of quizzes in an educational setting. The system supports three user roles: Admin, Teacher, and Student.
Admins can manage users and system settings, Teachers can create and manage quizzes with various question types
(Multiple Choice, True/False, Identification, Enumeration, and Essay), upload learning materials, and view student
performance analytics. Students can take quizzes, view their results, and access learning materials. The system
includes features for class enrollment, quiz scheduling, automatic grading for objective questions, manual grading
for essays, and comprehensive analytics for tracking student performance.
-Deliverable:
The project deliverables include a fully functional web application built with PHP and MySQL, designed to run on a
local XAMPP server environment. The system will include complete documentation covering local installation steps,
user guides for each role, and technical documentation. The source code will be delivered with proper comments
and structure, along with the database schema and sample data. The project will also include test cases and results
to ensure system reliability and security. A comprehensive deployment package will be included, containing all
necessary files and configuration settings for seamless installation on a local XAMPP server environment.
The system currently does not implement functionality to detect or prevent students from switching windows/tabs
(using Alt+Tab) or leaving the quiz to search for answers in other browser windows during an assessment. This
monitoring and prevention capability will be considered for future implementation. In the current version, the
system cannot track if a student navigates away from the quiz page or opens additional tabs/windows to search for
answers. Teachers administering quizzes should be aware of this limitation and may need to implement traditional
proctoring methods for high-stakes assessments.
Ibrahim et al. (2022) conducted a study that demonstrated how implementing an online management system
significantly streamlined the process of assessing student outcomes. Their research highlighted that such systems
not only enhanced efficiency but also provided administrators with valuable reports and visual data, facilitating
more informed decision-making. This suggests that technology integration in educational assessments can optimize
administrative tasks and improve overall assessment quality.
Barahona et al. (2024) explored the impact of early alert systems embedded within quiz-based activities. Their
findings revealed that these systems contributed to improvements in student academic performance by providing
timely notifications and feedback. Teachers also responded positively to this innovation, indicating that early
intervention tools integrated with assessments can play a crucial role in supporting student success.
In the context of modular distance learning, Taza et al. (2024) emphasized the importance of improved tracking
tools. Their study found that enhanced monitoring mechanisms allowed educators to provide more effective
feedback and closely follow students’ academic development despite remote learning challenges. This points to the
growing need for reliable tracking solutions in distance education environments to ensure sustained student
engagement and progress.
The LiquiZ Study (2023) investigated the implementation of adaptive quizzes featuring real-time feedback. This
adaptive quizzing approach enabled educators to detect learning issues early, allowing for immediate instructional
adjustments and student support. The study concluded that such dynamic assessment methods foster timely
intervention, which can lead to more effective learning outcomes.
Santos et al. (2023) focused on game-based digital quizzes, such as those offered by platforms like Quizizz. Their
research demonstrated that these interactive tools significantly increased student participation and engagement
during assessments. Additionally, game-based quizzes proved effective for subject-specific evaluations, suggesting
that incorporating gamification in assessments can motivate students and enhance learning experiences.
QUIRINO STATE UNIVERSITY
COLEGE OF INFORMATION TECHNOLOGY & COMPUTING SCIENCES
Diffun Campus
Mauricio et al. (2017) examined the role of centralized learning platforms in simplifying the distribution of
educational content and assessments. Their findings indicated that centralization improved the efficiency of lesson
management, reducing administrative burdens for educators and creating a more organized learning environment.
Al-Anqoudi et al. (2023) surveyed teacher perceptions regarding digital assessment tools, particularly during periods
of remote instruction. The results showed that teachers found these tools beneficial not only for engaging students
but also for supporting learning continuity in challenging circumstances, such as during the COVID-19 pandemic.
Lastly, the Springer Study (2024) provided an overview of Learning Management System (LMS) implementations.
While LMSs have proven useful for organizing assessments and course content, the study noted that their full
potential is sometimes underutilized. This suggests that further development and training may be needed to
maximize the effectiveness of these systems in educational institutions.
*Timeline
*Key Milestones:
User
Frontend Backend
( HTML 5, CSS, (PHP, MYSQL, and
JavaScript, Font Awesome 6.4 and APACHE(XAMPP))
Bootstrap 5.3 )
QUIRINO STATE UNIVERSITY
COLEGE OF INFORMATION TECHNOLOGY & COMPUTING SCIENCES
Diffun Campus
Architecture Overview
The Quiz Management System follows a three-tier client-server architecture with distinct presentation, application,
and data layers. The system is designed with role-based access control supporting three user types: students,
teachers, and administrators.
-ER diagram
*php codes
-index.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Diffun National High School - Quiz Management System</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<!-- Hero Section -->
<div class="hero-section">
<div class="container text-center">
<h1 class="display-4 fw-bold mb-3">Welcome to Diffun National High School Quiz Management System</h1>
<p class="lead mb-4">Manage and participate in quizzes with ease. Start your learning journey now!</p>
</div>
</div>
<div class="col-md-4">
<div class="card h-100 shadow">
<div class="card-body text-center">
<i class="fas fa-chalkboard-teacher text-success mb-3 icon-large"></i>
<h3 class="card-title mb-4">Teacher Portal</h3>
<p class="card-text mb-4">Manage your classes, quizzes, and interact with students.</p>
<a href="teacher_login.php" class="btn btn-success btn-lg w-100">Teacher Login</a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card h-100 shadow">
<div class="card-body text-center">
<i class="fas fa-user-shield text-dark mb-3 icon-large"></i>
<h3 class="card-title mb-4">Admin Portal</h3>
<p class="card-text mb-4">Manage teacher accounts and students.</p>
<br>
<a href="admin_login.php" class="btn btn-dark btn-lg w-100">Admin Login</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
-login.php
<?php
session_start();
include 'config.php';
$stmt->bind_param("s", $username);
$stmt->execute();
$result = $stmt->get_result();
if ($result->num_rows === 1) {
$user = $result->fetch_assoc();
// Debug: Check what's being fetched
error_log("User data: " . print_r($user, true));
// Verify password
if (password_verify($password, $user['password'])) {
$_SESSION['user_id'] = $user['id'];
$_SESSION['role'] = $role;
$_SESSION['username'] = $user['username'];
$_SESSION['first_name'] = $user['first_name'];
-config.php
<?php
$servername = "localhost";
$username = "root"; // Default username for XAMPP
$password = ""; // Default password for XAMPP
$dbname = "quiz_management_system";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$stmt = $conn->prepare("INSERT INTO users (username, email, password, role) VALUES (?, ?, ?, ?)
ON DUPLICATE KEY UPDATE username=?, email=?, password=?, role=?");
$stmt->bind_param("ssssssss", $admin_username, $admin_email, $admin_password, $admin_role,
$admin_username, $admin_email, $admin_password, $admin_role);
if (!$stmt->execute()) {
error_log("Error creating admin account: " . $stmt->error);
die("Error creating admin account: " . $stmt->error);
}
$stmt->close();
-admin_dashboard.php
<?php
session_start();
if (!isset($_SESSION['user_id']) || $_SESSION['role'] !== 'admin') {
header("Location: index.php");
exit();
}
include 'config.php';
preventBackButton();
QUIRINO STATE UNIVERSITY
COLEGE OF INFORMATION TECHNOLOGY & COMPUTING SCIENCES
Diffun Campus
// Fetch teachers
$stmt = $conn->prepare("
SELECT t.id, t.last_name, t.first_name, t.middle_name, t.username,
CONCAT(LEFT(t.email, 1), REPEAT('*', LENGTH(SUBSTRING_INDEX(t.email, '@', 1)) - 2),
RIGHT(SUBSTRING_INDEX(t.email, '@', 1), 1), '@', LEFT(SUBSTRING_INDEX(t.email, '@', -1), 1), REPEAT('*',
LENGTH(SUBSTRING_INDEX(SUBSTRING_INDEX(t.email, '@', -1), '.', 1)) - 1), '.com') as email,
GROUP_CONCAT(DISTINCT ts.subject) as subjects,
GROUP_CONCAT(DISTINCT ts.class_code) as class_codes,
t.created_at
FROM teachers t
LEFT JOIN teacher_subjects ts ON t.id = ts.teacher_id
GROUP BY t.id
ORDER BY t.last_name ASC, t.first_name ASC
");
$stmt->execute();
$teachers_result = $stmt->get_result();
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Dashboard - Diffun National High School</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.navbar {
background-color: #343a40;
}
.navbar-brand {
color: white !important;
}
.nav-link {
color: rgba(255,255,255,.75) !important;
}
.nav-link:hover {
color: white !important;
}
QUIRINO STATE UNIVERSITY
COLEGE OF INFORMATION TECHNOLOGY & COMPUTING SCIENCES
Diffun Campus
.password-toggle {
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
color: #6c757d;
z-index: 999;
background: transparent;
border: none;
outline: none;
padding: 0 15px;
height: 100%;
display: flex;
align-items: center;
}
.password-container {
position: relative;
width: 100%;
}
.password-container .input-group {
position: relative;
width: 100%;
}
.password-container input {
padding-right: 45px;
width: 100%;
}
.password-container input.is-invalid {
padding-right: 45px;
background-image: none;
background-position: unset;
}
.input-group-text {
z-index: 1;
}
.alert {
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%);
min-width: 300px;
max-width: 500px;
z-index: 9999;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
border-left: 4px solid;
animation: slideIn 0.3s ease-out;
text-align: center;
}
.alert-success {
background-color: #d4edda;
color: #155724;
border-left-color: #28a745;
}
.alert-danger {
background-color: #f8d7da;
color: #721c24;
border-left-color: #dc3545;
}
@keyframes slideIn {
from {
transform: translate(-50%, -100%);
opacity: 0;
}
to {
QUIRINO STATE UNIVERSITY
COLEGE OF INFORMATION TECHNOLOGY & COMPUTING SCIENCES
Diffun Campus
// Email validation
const emailInput = document.getElementById('email');
const emailError = document.getElementById('emailError');
emailInput.addEventListener('input', function() {
const email = this.value;
if (email) {
// Check if email exists
fetch('create_teacher_process.php', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: 'check_email=true&email=' + encodeURIComponent(email)
})
.then(response => response.json())
.then(data => {
if (data.exists) {
emailInput.classList.add('is-invalid');
emailError.style.display = 'block';
emailError.style.opacity = '1';
} else {
emailInput.classList.remove('is-invalid');
emailError.style.display = 'none';
emailError.style.opacity = '0';
}
})
.catch(error => {
console.error('Error:', error);
});
} else {
emailInput.classList.remove('is-invalid');
emailError.style.display = 'none';
emailError.style.opacity = '0';
}
});
passwordInput.addEventListener('input', function() {
if (this.value.length < 8) {
this.classList.add('is-invalid');
passwordLengthError.classList.add('show');
} else {
this.classList.remove('is-invalid');
passwordLengthError.classList.remove('show');
QUIRINO STATE UNIVERSITY
COLEGE OF INFORMATION TECHNOLOGY & COMPUTING SCIENCES
Diffun Campus
}
});
confirmPassword.addEventListener('input', function() {
if (this.value !== passwordInput.value) {
this.classList.add('is-invalid');
passwordMatchError.classList.add('show');
} else {
this.classList.remove('is-invalid');
passwordMatchError.classList.remove('show');
}
});
if (password.value.length < 8) {
e.preventDefault();
password.classList.add('is-invalid');
passwordLengthError.classList.add('show');
password.focus();
return false;
}
<th>Username</th>
<th>Email</th>
<th>Subject</th>
<th>Class Code</th>
<th>Created At</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php while ($teacher = $teachers_result->fetch_assoc()): ?>
<tr class="text-center">
<td><?php echo htmlspecialchars($teacher['id']); ?></td>
<td><?php echo htmlspecialchars($teacher['last_name'] . ", " . $teacher['first_name'] . " " .
($teacher['middle_name'] ? substr($teacher['middle_name'], 0, 1) . "." : "")); ?></td>
<td><?php echo htmlspecialchars($teacher['username']); ?></td>
<td><?php echo htmlspecialchars($teacher['email']); ?></td>
<td><?php echo htmlspecialchars($teacher['subjects']); ?></td>
<td><?php echo htmlspecialchars($teacher['class_codes']); ?></td>
<td><?php echo htmlspecialchars($teacher['created_at']); ?></td>
<td>
<div class="btn-group" role="group">
<a href="admin_view_teacher_subjects.php?id=<?php echo $teacher['id']; ?>" class="btn
btn-info btn-sm me-1">
<i class="fas fa-eye"></i>
</a>
<a href="admin_edit_teacher.php?id=<?php echo $teacher['id']; ?>" class="btn btn-
primary btn-sm me-1">
<i class="fas fa-edit"></i>
</a>
<a href="admin_delete_teacher.php?id=<?php echo $teacher['id']; ?>" class="btn btn-
danger btn-sm" onclick="return confirm('Are you sure you want to delete this teacher?');">
<i class="fas fa-trash"></i>
</a>
</div>
</td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
-teacher_dashboard.php
<?php
session_start();
if (!isset($_SESSION['user_id']) || $_SESSION['role'] !== 'teacher') {
header("Location: index.php");
exit();
}
include 'config.php';
preventBackButton();
$result = $stmt->get_result();
$teacher = $result->fetch_assoc();
// If no subject is selected and teacher has subjects, select the first one
if (empty($selected_subject) && !empty($subjects)) {
$selected_subject = $subjects[0];
$_SESSION['selected_subject'] = $selected_subject;
}
FROM materials m
JOIN teacher_subjects ts ON m.class_code = ts.class_code
WHERE m.instructor_id = ? AND ts.subject = ? AND ts.teacher_id = ?
");
$stmt->bind_param("isi", $teacher_id, $selected_subject, $teacher_id);
} else {
$stmt = $conn->prepare("
SELECT m.*, ts.subject, ts.class_code
FROM materials m
JOIN teacher_subjects ts ON m.class_code = ts.class_code
WHERE m.instructor_id = ? AND ts.teacher_id = ?
");
$stmt->bind_param("ii", $teacher_id, $teacher_id);
}
$stmt->execute();
$materials = $stmt->get_result()->fetch_all(MYSQLI_ASSOC);
$stmt->close();
if ($stmt->execute()) {
$_SESSION['success'] = "Material created successfully!";
} else {
$_SESSION['error'] = "Error creating material.";
}
QUIRINO STATE UNIVERSITY
COLEGE OF INFORMATION TECHNOLOGY & COMPUTING SCIENCES
Diffun Campus
$stmt->close();
header("Location: teacher_dashboard.php");
exit();
}
$class_code_for_home = '';
if (!empty($selected_subject)) {
$stmt = $conn->prepare("SELECT class_code FROM teacher_subjects WHERE teacher_id = ? AND subject = ?
LIMIT 1");
$stmt->bind_param("is", $teacher_id, $selected_subject);
$stmt->execute();
$result = $stmt->get_result();
if ($row = $result->fetch_assoc()) {
$class_code_for_home = $row['class_code'];
}
$stmt->close();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Teacher Dashboard - Diffun National High School</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="stylesheet" href="styles.css">
<style>
.section { display: none; } /* Hide all sections by default */
.section.active { display: block; } /* Show only the active section */
.alert-dismissible { display: block; }
.centered-alert {
position: fixed;
top: 10px;
left: 50%;
transform: translateX(-50%);
z-index: 9999;
width: 50%;
}
.quiz-card {
margin-bottom: 2rem;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.quiz-header {
background-color: #f8f9fa;
padding: 1rem;
border-bottom: 1px solid #dee2e6;
}
.quiz-body {
padding: 1.5rem;
}
.stats-card {
transition: transform 0.2s;
}
.stats-card:hover {
transform: translateY(-5px);
}
.chart-container {
height: 300px;
margin-top: 1rem;
}
QUIRINO STATE UNIVERSITY
COLEGE OF INFORMATION TECHNOLOGY & COMPUTING SCIENCES
Diffun Campus
</style>
<script>
let charts = {};
document.addEventListener('DOMContentLoaded', function () {
// Get section from URL parameter
const urlParams = new URLSearchParams(window.location.search);
const section = urlParams.get('section');
// Show the correct section on page load and load analytics if needed
if (section) {
showSection(section);
} else if (document.getElementById('analytics-section').classList.contains('active')) {
// If analytics section is active by default, load All Quizzes
loadQuizAnalytics('all');
document.getElementById('quizSelect').value = 'all';
}
document.querySelectorAll('.delete-btn').forEach(button => {
button.addEventListener('click', function () {
const id = this.getAttribute('data-id');
const type = this.getAttribute('data-type');
const rowId = type === 'quiz' ? `quiz-${id}` : `material-${id}`;
fetch(`delete.php?${type}_id=${id}`, {
method: 'GET'
})
.then(response => response.json())
.then(data => {
QUIRINO STATE UNIVERSITY
COLEGE OF INFORMATION TECHNOLOGY & COMPUTING SCIENCES
Diffun Campus
if (data.success) {
document.getElementById(rowId).remove();
showCenteredAlert(data.message, 'success');
} else {
showCenteredAlert(data.message, 'danger');
}
})
.catch(error => console.error('Error:', error));
});
});
});
function loadQuizAnalytics(quizId) {
// Show loading state
document.getElementById('statsCards').style.display = 'none';
document.getElementById('chartContainer').style.display = 'none';
document.getElementById('actionButtons').style.display = 'none';
document.getElementById('quizTitle').style.display = 'none';
if (!classCode) {
// Clear loading indicator and show no quizzes message
chartsContainer.innerHTML = `
<div class="text-center my-5">
<div class="alert alert-info">
<i class="fas fa-info-circle me-2"></i>
No quizzes have been created for this subject yet.
<br>
<small class="text-muted">Create a quiz to see analytics here.</small>
</div>
</div>
`;
return;
}
QUIRINO STATE UNIVERSITY
COLEGE OF INFORMATION TECHNOLOGY & COMPUTING SCIENCES
Diffun Campus
fetch(url)
.then(response => {
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return response.json();
})
.then(data => {
if (data.error) {
throw new Error(data.details || data.error);
}
// Chart container
const chartContainer = document.createElement('div');
chartContainer.className = 'chart-container';
chartContainer.style.height = '300px';
chartContainer.style.marginTop = '20px';
quizGrid.appendChild(quizCol);
const chartData = {
labels: quiz_data.student_scores.map(score => score.name),
datasets: [{
label: 'Score',
data: quiz_data.student_scores.map(score => score.score),
backgroundColor: 'rgba(54, 162, 235, 0.5)',
borderColor: 'rgba(54, 162, 235, 1)',
borderWidth: 1
}]
};
charts[quiz_id] = chart;
}
});
} else {
// Single quiz view
const quizCard = document.createElement('div');
quizCard.className = 'card quiz-card';
quizCard.appendChild(quizHeader);
quizBody.appendChild(statsRow);
quizBody.appendChild(chartContainer);
quizCard.appendChild(quizBody);
chartsContainer.appendChild(quizCard);
const chartData = {
labels: data.student_scores.map(score => score.name),
datasets: [{
label: 'Score',
data: data.student_scores.map(score => score.score),
backgroundColor: 'rgba(54, 162, 235, 0.5)',
borderColor: 'rgba(54, 162, 235, 1)',
borderWidth: 1
}]
};
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true,
title: {
display: true,
text: 'Score'
}
},
x: {
title: {
display: true,
text: 'Students'
}
}
}
}
});
charts.single = chart;
}
}
document.getElementById('chartContainer').style.display = 'block';
document.getElementById('actionButtons').style.display = 'flex';
document.getElementById('downloadCSV').href = quizId === 'all' ? 'download_all_scores.php' :
`download_scores.php?quiz_id=${quizId}`;
})
.catch(error => {
console.error('Error:', error);
chartsContainer.innerHTML = `
<div class="text-center my-5">
<div class="alert alert-danger">
<i class="fas fa-exclamation-circle me-2"></i>
Error loading quiz analytics: ${error.message}
</div>
</div>
`;
});
}
function exportToPDF() {
const { jsPDF } = window.jspdf;
const doc = new jsPDF();
const element = document.getElementById('analytics-section');
html2canvas(element).then(canvas => {
const imgData = canvas.toDataURL('image/png');
const imgWidth = 210; // A4 width in mm
const pageHeight = 297; // A4 height in mm
const imgHeight = canvas.height * imgWidth / canvas.width;
let heightLeft = imgHeight;
let position = 0;
doc.save('quiz_analytics.pdf');
QUIRINO STATE UNIVERSITY
COLEGE OF INFORMATION TECHNOLOGY & COMPUTING SCIENCES
Diffun Campus
});
}
function downloadCSV() {
const quizSelect = document.getElementById('quizSelect');
const selectedQuiz = quizSelect ? quizSelect.value : 'all';
if (!classCode) {
// Show no quizzes message
const chartsContainer = document.getElementById('chartContainer');
chartsContainer.innerHTML = `
<div class="text-center my-5">
<div class="alert alert-info">
<i class="fas fa-info-circle me-2"></i>
No quizzes have been created for this subject yet.
<br>
<small class="text-muted">Create a quiz to see analytics here.</small>
</div>
</div>
`;
chartsContainer.style.display = 'block';
return;
}
document.getElementById('csv-download-iframe').src =
`download_all_scores.php?class_code=${classCode}`;
} else {
// Download only the selected quiz
document.getElementById('csv-download-iframe').src = `download_scores.php?quiz_id=${selectedQuiz}`;
}
}
if (confirm('Are you sure you want to remove this student from the class?')) {
fetch('teacher_remove_student.php', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: `student_id=${studentId}&class_code=${classCode}`
})
.then(response => response.json())
.then(data => {
if (data.success) {
// Remove the row from the table
const row = document.getElementById(`student-${studentId}`);
if (row) {
row.remove();
}
// Show success message
showCenteredAlert(data.message, 'success');
} else {
showCenteredAlert(data.message, 'danger');
QUIRINO STATE UNIVERSITY
COLEGE OF INFORMATION TECHNOLOGY & COMPUTING SCIENCES
Diffun Campus
}
})
.catch(error => {
console.error('Error:', error);
showCenteredAlert('An error occurred while removing the student', 'danger');
});
}
});
});
});
</ul>
</div>
</div>
</nav>
</div>
</div>
</section>
if (count($types) === 1) {
$quiz_type = $types[0];
} else {
$quiz_type = 'mixed';
}
<button class="btn btn-danger btn-sm delete-btn" data-id="<?php echo $quiz['id']; ?>" data-
type="quiz">Delete</button>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</section>
</td>";
echo "</tr>";
endforeach;
?>
</tbody>
</table>
</div>
</section>
</div>
<div class="card-body">
<canvas id="scoreChart"></canvas>
</div>
</div>
-student_dashboard.php
<?php
session_start();
// Add cache control headers to prevent back button access after logout
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
include 'config.php';
$student_id = $_SESSION['user_id'];
$enrolled_subjects = [];
while ($row = $result->fetch_assoc()) {
// Debug information
error_log("Enrolled subject data: " . print_r($row, true));
$enrolled_subjects[] = $row;
QUIRINO STATE UNIVERSITY
COLEGE OF INFORMATION TECHNOLOGY & COMPUTING SCIENCES
Diffun Campus
$stmt->close();
$conn->close();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Student Dashboard - Diffun National High School</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="stylesheet" href="styles.css">
<style>
.navbar {
background-color: #0d6efd;
}
.navbar-brand {
color: white !important;
}
.nav-link {
color: rgba(255,255,255,.75) !important;
}
.nav-link:hover {
color: white !important;
}
.card-header {
background-color: #0d6efd;
color: white;
}
.btn-primary {
background-color: #0d6efd;
border-color: #0d6efd;
}
.btn-success {
background-color: #198754;
border-color: #198754;
}
.table-dark {
background-color: #0d6efd;
color: white;
}
</style>
</head>
<body class="bg-light">
<!-- Navigation Bar -->
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<div class="container-fluid">
<a class="navbar-brand" href="#">Student Dashboard</a>
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link btn btn-danger text-white" href="logout.php">
<i class="fas fa-sign-out-alt me-2"></i>Logout
</a>
</li>
</ul>
</div>
</nav>
<td>
<a href="subject_details.php?instructor_id=<?php echo
urlencode($subject['teacher_id']); ?>&class_code=<?php echo urlencode($subject['class_code']); ?>" class="btn
btn-primary btn-sm">
View
</a>
</td>
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr>
<td colspan="5" class="text-center">No subjects enrolled yet.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</section>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script>
// Automatically dismiss alert after 2.5 seconds
document.addEventListener('DOMContentLoaded', function() {
const alert = document.querySelector('.alert');
if (alert) {
setTimeout(function() {
const bsAlert = new bootstrap.Alert(alert);
bsAlert.close();
}, 2500); // 2500 milliseconds = 2.5 seconds
}
});
</script>
</body>
</html>
-logout.php
<?php
session_start();
*Conclusion: The implementation of a Digital Quiz Management System at Diffun National High School will
significantly improve the efficiency of the assessment process, enhance student performance, and provide valuable
insights into individual learning progress.
References:
Ibrahim, M., Al-Harthy, I., Alhassan, A., Alnajar, R., & Al-Mutairi, H. (2022). Online student assessment and
evaluation system for higher education. International Journal of Emerging Technologies in Learning, 17(7), 95–106.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9073482/
Cabezas, F., Burgos, L., Darrigol, J., & Zúñiga, M. (2024). Implementation of an early alert system in quizzes of a high
complexity subject in higher education: Improvement of student performance and teacher perception. Education
and Information Technologies. https://doi.org/10.1007/s10639-024-12610-5
de Taza, E., de Jesus, H., & Zaragoza, Y. (2024). Project GOALS: Enhancing student learning using improved
monitoring tool in modular distance learning. American Journal of Management Science and Engineering, 9(5), 104–
109. https://doi.org/10.11648/j.ajmse.20240905.12
Santos, R., & Braga, A. (2015). Feedback mechanisms in digital quizzes: A study on Quizizz and student engagement.
Future Internet, 7(4), 484–495. https://www.mdpi.com/1999-5903/7/4/484
Rahmah, N., Lestari, A., Musa, L. A. D., & Sugilar, H. (2019). Quizizz online digital system assessment tools.
ResearchGate.
https://www.researchgate.net/publication/339019100_Quizizz_Online_Digital_System_Assessment_Tools
Sandoval, I. (2017). Centralized learning and assessment tool for Department of Education. Academia.edu.
https://www.academia.edu/35236895/_Centralized_Learning_and_Assessment_Tool_for_Department_of_Educati
on
Simon, P. D., Jiang, J., Fryer, L. K., King, R. B., & Frondozo, C. E. (2024). An assessment of learning management
system use in higher education: Perspectives from a comprehensive sample of teachers and students. Technology,
Knowledge and Learning. Advance online publication. https://doi.org/10.1007/s10758-024-09734-5
QUIRINO STATE UNIVERSITY
COLEGE OF INFORMATION TECHNOLOGY & COMPUTING SCIENCES
Diffun Campus