Attendance System

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 51

Attendance Management System

1. INTRODUCTION

1.1 Project Context

The Student Attendance Management System is designed to streamline the


process of recording, managing, and tracking student attendance in
educational institutions. The traditional method of manually taking attendance
is often time-consuming, prone to errors, and inefficient. With the advent of
digital technologies, there's a need for a reliable, user-friendly, and automated
system that simplifies attendance management for administrators and teachers,
ensuring accurate records and improved administrative efficiency.

1.2 Purpose and Description

The purpose of this project is to develop a web-based application that


facilitates the management of student attendance. This system aims to:

Automate the process of taking attendance.

Provide real-time access to attendance records for administrators and teachers.

Generate reports and analytics to help in monitoring student attendance


patterns.

Enhance data security and integrity by leveraging modern web technologies.

The Student Attendance Management System will allow administrators to set


up classes, manage teachers and students, and monitor overall attendance.
Teachers will be able to take attendance, view student attendance records, and
generate reports. The system will also include features for user authentication
and role-based access control.

1.3 General Objective

The general objective of the Student Attendance Management System is to


develop a comprehensive, efficient, and secure web-based platform that
automates the process of recording and managing student attendance, thereby
reducing administrative workload and improving the accuracy and
accessibility of attendance data.

1
Attendance Management System

1.4 Specific Objectives

 To Design and Implement the User Interface: Create an intuitive and user-
friendly interface for administrators, teachers, and students to interact with the
system.
 To Develop the Attendance Recording Module: Implement a module that
allows teachers to easily record student attendance and mark absences.
 To Create an Administrative Dashboard: Provide administrators with a
dashboard to manage users, classes, and attendance records.
 To Implement User Authentication and Authorization: Ensure secure access to
the system through role-based authentication and authorization mechanisms.
 To Develop Reporting and Analytics Features: Generate various attendance
reports and analytics to help administrators and teachers monitor attendance
patterns and identify issues.
 To Ensure Data Security and Integrity: Implement measures to protect the data
from unauthorized access and ensure the accuracy and reliability of the
attendance records.

2. SCOPE AND LIMITATION OF THE STUDY

Scope:

The scope of the project is the system on which the software is installed, i.e. the
project is developed as a desktop application, and it will work for a particular
institute. But later on the project can be modified to operate it online.

 User Roles: The system will support multiple user roles, including
administrators and class teachers, each with specific permissions and access
levels.
 Attendance Management: Teachers will be able to mark daily attendance,
view historical attendance records, and generate reports for individual students
or entire classes.

2
Attendance Management System

 Class and Student Management: Administrators will manage the setup of


classes, assign teachers, and enroll students into their respective classes.
 Session and Term Management: The system will allow for the creation and
management of academic sessions and terms.
 Reporting: Generate detailed attendance reports, including daily, weekly,
monthly, and termly reports, which can be exported for further analysis.
 Authentication and Security: Implement secure login and authentication
mechanisms to ensure that only authorized users can access the system.

Limitations

 Initial Data Entry: The initial setup, including entering student and class
information, can be time-consuming and may require administrative effort.
 Hardware Requirements: Users will need access to computers or mobile
devices with internet access, which might be a limitation for some users.
 Scalability: The system is designed for small to medium-sized educational
institutions and might require significant modifications to support very large
institutions with thousands of students and multiple campuses.
 Customization: The system is designed with a general structure in mind and
may require customization to fit the specific needs of different educational
institutions.

3. SIGNIFICANCE OF THE STUDY

3.1 Administrator

 Efficiency: Automating the attendance process reduces administrative


workload, allowing administrators to focus on other critical tasks.
 Data Accuracy: Eliminates the errors associated with manual attendance
recording, ensuring that attendance data is accurate and up-to-date.
 Real-Time Monitoring: Provides administrators with real-time access to
attendance records, allowing for timely interventions and decisions.
 Comprehensive Reporting: Generates detailed reports and analytics that help
administrators monitor attendance trends, identify patterns, and make data-
driven decisions.

3
Attendance Management System

 Enhanced Security: Ensures that attendance data is securely stored and only
accessible by authorized personnel, protecting student privacy and data
integrity.
 Resource Management: Helps in better management of resources by
providing insights into student attendance, which can influence decisions on
resource allocation.

3.2 Class Teacher

 Simplified Attendance Recording: Teachers can quickly and easily record


attendance using a user-friendly interface, saving time and effort.
 Accurate Records: Ensures that attendance records are accurate and reduces
the risk of errors associated with manual entry.
 Access to Historical Data: Provides teachers with access to historical
attendance data, enabling them to track student attendance over time and
identify trends.
 Student Engagement: Helps teachers identify students with poor attendance
and engage with them to understand and address underlying issues.
 Reporting and Communication: Enables teachers to generate attendance
reports for parent-teacher meetings, communicate attendance issues to parents,
and keep them informed about their child's attendance.
 Focus on Teaching: Reduces the administrative burden on teachers, allowing
them to focus more on teaching and student engagement.

4. DEFINITION OF TERMS

4.1 Architectural Diagram

An architectural diagram is a visual representation that outlines the structure of a


system, illustrating the relationships and interactions between different components.
In the context of a Student Attendance Management System, the architectural diagram
typically includes the client interface, server components, database structure, and the
communication flow between them. It helps in understanding the system’s framework
and design.

4
Attendance Management System

4.2 Feasibility

Feasibility refers to the assessment of how practical and viable a proposed project or
system is. It includes evaluating technical, economic, operational, and legal factors to
determine whether the project can be successfully implemented. For the Student
Attendance Management System, feasibility studies would consider factors like cost,
available technology, user requirements, and potential benefits.

4.3 Hardware

Hardware refers to the physical components of a computer system that are required to
run the software. For the Student Attendance Management System, the necessary
hardware might include servers to host the application, computers, tablets, or
smartphones for users (administrators, teachers, and students) to access the system,
and networking equipment to ensure reliable internet connectivity.

4.4 MySQL

MySQL is an open-source relational database management system (RDBMS) that


uses Structured Query Language (SQL) for managing and manipulating databases. In
the context of the Student Attendance Management System, MySQL is used to store
and manage data related to students, classes, attendance records, user accounts, and
other relevant information.

4.5 Report

In the context of a Student Attendance Management System, a report is a document or


visual representation that presents data in a structured format. Reports can include
various attendance statistics, summaries, and detailed records for individual students
or classes. They are used by administrators and teachers to monitor attendance
patterns, identify issues, and make informed decisions.

Types of Reports:

 Daily Attendance Reports: Summary of attendance for each day.

5
Attendance Management System

 Student Attendance Records: Detailed attendance history for individual


students.
 Class Attendance Summary: Overall attendance statistics for a specific class or
term.
 Format: Can be generated in various formats such as PDFs, spreadsheets, or
on-screen views.

4.6 Software

Software refers to the programs and other operating information used by a computer.
In this context, it includes the Student Attendance Management System application
itself, which consists of the front-end interface (user interface) and back-end
components (server-side scripts, database management). The software is responsible
for handling all the operations of the attendance system, from recording attendance to
generating reports.

5. REVIEW OF RELATED LITERATURE

The review of related literature highlights the evolution and advancements in


attendance management systems, emphasizing the importance of automation, real-
time data access, and security. By leveraging AI and other modern technologies, the
proposed Student Attendance Management System aims to enhance the efficiency,
accuracy, and security of attendance tracking, providing significant benefits to
educational institutions.

5.1 Background of the Study

The concept of managing attendance has been a critical aspect of educational


institutions for centuries. Traditionally, attendance was recorded manually using
paper registers. This method, while simple, was prone to errors, time-consuming, and
inefficient for large institutions. With the advent of technology, digital solutions have
emerged to address these challenges. The evolution from manual to automated
systems marks a significant advancement in the efficiency and accuracy of attendance
tracking. This study investigates the development and implementation of a web-based

6
Attendance Management System

Student Attendance Management System that leverages current technologies to


improve the process.

5.2 Related Systems

Several existing systems have been developed to manage attendance, each with
unique features and functionalities:

 Manual Attendance Registers: Traditional method using paper and pen, prone to
errors and inefficiencies.
 Biometric Attendance Systems: Utilize fingerprint or facial recognition
technology to mark attendance, offering high accuracy but requiring specialized
hardware.
 RFID-based Systems: Use Radio Frequency Identification tags to automatically
record attendance when students pass by RFID readers. Effective but involves
additional costs for tags and readers.
 Mobile and Web-based Applications: Offer flexible and convenient ways to
manage attendance. Examples include Google Classroom and other educational
management platforms that incorporate attendance tracking as part of their feature
set.

5.3 Attendance Management System

An Attendance Management System (AMS) is designed to automate and streamline


the process of recording and managing attendance. Key features of modern AMS
include:

 Automated Attendance Recording: Using web or mobile interfaces, biometric


devices, or RFID technology.
 Real-time Data Access: Allows administrators and teachers to access and monitor
attendance data in real-time.
 Reporting and Analytics: Generates detailed reports and analytics to help in
identifying attendance patterns and trends.
 User Management: Manages different user roles such as administrators, teachers,
and students, with specific permissions and access levels.

7
Attendance Management System

 Notifications and Alerts: Sends alerts for absenteeism, and generates


notifications for important events related to attendance.

5.4 Security and Privacy

Security and privacy are crucial aspects of any system that handles personal and
sensitive data:

 Data Encryption: Ensures that data transmitted between clients and servers is
encrypted, protecting it from unauthorized access.
 Authentication and Authorization: Implements robust mechanisms to verify
user identities and control access to various parts of the system based on user
roles.
 Data Protection Regulations: Compliance with regulations such as GDPR
(General Data Protection Regulation) to protect personal data and ensure privacy.
 Audit Trails: Maintains logs of all activities within the system to detect and
investigate any unauthorized access or suspicious activities.
 Backup and Recovery: Regular data backups and a recovery plan to ensure data
integrity in case of system failures or breaches.

5.5 Artificial Intelligence (AI) in Attendance Management

The integration of Artificial Intelligence (AI) into attendance management systems


introduces several innovative capabilities:

 Facial Recognition: AI-powered facial recognition technology can automate the


process of taking attendance, improving accuracy and convenience.
 Predictive Analytics: AI algorithms can analyze attendance data to predict trends
and identify students at risk of chronic absenteeism, allowing for early
interventions.
 Automated Notifications: AI can automate the process of sending notifications to
parents or guardians about their child's attendance, based on predefined rules and
patterns.
 Enhanced Security: AI-driven security measures can detect unusual patterns in
data access and usage, providing an additional layer of security against breaches.

8
Attendance Management System

 Voice Recognition: AI can use voice recognition to mark attendance, which can
be particularly useful in remote or hybrid learning environments.

6. METHODOLOGY

The methodology, planning, analysis, and design phases are critical to the successful
development and implementation of the Student Attendance Management System.
Each phase involves detailed activities and deliverables that contribute to building a
reliable, efficient, and user-friendly system. By following a structured approach, the
project aims to meet the requirements of stakeholders and provide a robust solution
for managing student attendance

6.1 Research and Requirement Analysis

Conduct interviews with administrators, teachers, and IT staff to gather detailed


requirements and understand current challenges. Review existing literature and
related systems to identify best practices and potential features. Document the
functional and non-functional requirements of the system.

6.2 System Design

Develop the system's architecture, including client-server structure, database


design, and user interface layout. Design the database schema using Entity-
Relationship Diagrams (ERDs) to define the data structure. Create wireframes and
prototypes for the user interface, focusing on usability and user experience.

6.3 Development

Implement the user interface using HTML, CSS, JavaScript, and front-end
frameworks. Develop server-side logic using PHP or another back-end language,
and set up the MySQL database. Integrate front-end and back-end components,
ensuring seamless interaction between the client and server.

9
Attendance Management System

6.4 Testing

 Unit Testing: Test individual components to ensure they function correctly.


 Integration Testing: Test the interaction between different components to
identify and fix issues.
 User Acceptance Testing (UAT): Conduct testing with actual users to gather
feedback and ensure the system meets their needs.

6.5 Deployment

 Server Setup: Set up the server environment and deploy the application.
 Data Migration: Transfer existing attendance data to the new system, if
applicable.
 User Training: Provide training sessions for administrators and teachers to
familiarize them with the system.

6.6 Maintenance

 Monitoring: Continuously monitor the system for performance and security


issues.
 Updates and Enhancements: Regularly update the system with new features
and improvements based on user feedback.

7. PLANNING

Planning is a critical phase in the development of the Student Attendance


Management System. This section outlines the project timeline, resource allocation,
risk management, and communication plan to ensure the project is executed smoothly
and successfully. Develop a detailed project timeline with milestones and deadlines
for each phase of the project. Use project management tools like Gantt charts to
visualize the timeline. Identify and allocate resources, including team members,
hardware, software, and budget. Identify potential risks and develop mitigation
strategies to address them. Establish a communication plan to ensure effective
coordination among team members and stakeholders.

10
Attendance Management System

8. Analysis

Analysis can be defined as breaking up of any whole so as to find out their nature,
function etc. It defines design as to make preliminary sketches of; to sketch a pattern
or outline for plan. To plan and carry out especially by artistic arrangement or in a
skilful wall. System analysis and design can be characterized as a set of techniques
and processes, a community of interests, a culture and an intellectual orientation. The
various tasks in the system analysis include the following. Understanding application.
Planning. Scheduling. Developing candidate solution. Performing trade studies.
Performing cost benefit analysis. Recommending alternative solutions. Supervising,
installing and maintaining the system. This system manages to the analysis of the
report creation and develops manual entry of the student attendance. First design the
students entry form , staff allocation and time table allocation forms. This project will
helps the attendance system for the department calculate percentage and reports for
eligibility criteria of examination .The application attendance entry system will
provide flexible report for all students.

8.1 Requirement Analysis

 Functional Requirements: Detailed list of functionalities the system must


provide (e.g., recording attendance, generating reports).
 Non-Functional Requirements: Performance, security, usability, and other
criteria the system must meet.
 Use Case Analysis: Develop use case diagrams and scenarios to understand user
interactions with the system.

8.2 Data Analysis

 Data Collection: Gather data related to attendance records, student information,


and class schedules.
 Data Modeling: Create data models to represent the relationships between
different entities in the system.

11
Attendance Management System

Fig : Use-Case diagram for Attendance Management System

12
Attendance Management System

9. DESIGNING

The design phase involves creating detailed architectural diagrams, database schemas,
user interface designs, and security plans for the Student Attendance Management
System. The design phase ensures a comprehensive and detailed blueprint for the
Student Attendance Management System. By focusing on system architecture,
database design, user interface design, security design, and integration design, the
project is well-prepared for development and implementation, ensuring a robust,
secure, and user-friendly solution.

Fig: 0-level DFD

Fig : 1-level DFD

13
Attendance Management System

Fig: 2-level DFD

Fig: 3-level DFD

14
Attendance Management System

11. Architectural Diagram Interface of Hardware

The architectural diagram interface of hardware for the Student Attendance Management
System illustrates the interaction between different hardware components.

12. System Testing and Implementation

12.1 Testing

Once source code has been generated, software must be tested to uncover (and
correct) as many errors as possible before delivery to customer. Our goal is to design a
series of test cases that have a high likelihood of finding errors. To uncover the errors
software techniques are used. These techniques provide systematic guidance for
designing test that Exercise the internal logic of software components, and Exercise
the input and output domains of the program to uncover errors In program function,
behavior and performance.

Internal program logic is exercised using ―White box test case design Techniques.
Software requirements are exercised using ―block box test case Design techniques.

In both cases, the intent is to find the maximum number of errors with the Minimum
amount of effort and time. Following testing techniques are well known and the same
strategy is adopted during this project testing.

Unit testing Unit testing focuses verification effort on the smallest unit of software
design- the software component or module. The unit test is white-box oriented. The
unit testing implemented in every module of student attendance management System.
by giving correct manual input to the system ,the data are stored in database and
retrieved. If you want required module to access input or gets the output from the End
user. Any error will accrued the time will provide handler to show what type of error
will accrued.

System testing is actually a series of different tests whose primary purpose is to fully
exercise the computer-based system. It is to check all modules worked on input
basis .if you want change any values or inputs will change all information. so
specified input is must.

15
Attendance Management System

Performance testing is designed to test the run-time performance of software within


the context of an integrated system. Performance testing occurs throughout all steps in
the testing process. Even at the unit level, the performance of an individual module
may be assessed as white-box tests are conducted. This project reduce attendance
table, codes. it will generate report fast.no have extra time or waiting of
results .entered correct data will show result few millisecond. just used only low
memory of our system. Automatically do not getting access at another software. Get
user permission and access to other applications

Integration Testing: Ensure modules interact correctly. Test interactions between the
front-end and back-end, database, and application server.

12.2 Implementation

 Deployment Planning: Prepare a deployment plan, including steps for server setup,
data migration, and user training.
 Server Setup: Configure the server environment, including the application server and
database server.
 Data Migration: Transfer existing attendance records and user data to the new system.
 User Training: Provide training sessions and materials for administrators and teachers.
 Go-Live: Launch the system and monitor for any issues.
 Post-Implementation Support: Offer ongoing support and maintenance.

13. ATTENDANCE MANAGEMENT SYSTEM FEATURES

13.1.1 Recommended Hardware Specification (Server/Workstations)

Server:

 Processor: Intel Xeon E5 or equivalent

 RAM: 16 GB or higher

 Storage: 500 GB SSD or higher

 Network: Gigabit Ethernet

16
Attendance Management System

Workstations:

 Processor: Intel i5 or equivalent

 RAM: 8 GB or higher

 Storage: 256 GB SSD or higher

 Network: 100 Mbps Ethernet or Wi-Fi

13.1.2 Recommended Software Specification (Server/Workstations)

Server:

 Operating System: Ubuntu Server, CentOS, or Windows Server

 Web Server: Apache or Nginx

 Database: MySQL or MariaDB

 Programming Language: PHP 7.4 or higher

Workstations:

 Operating System: Windows 10, macOS, or Linux

 Browser: Latest version of Chrome, Firefox, Safari, or Edge

 Additional Software: PDF Reader, Office Suite

14. EXISTING SYSTEM

 Manual Attendance: Existing system is a manual entry for the students. Here the
attendance will be carried out in the hand written registers. It will be a tedious job to
maintain the record for the user. The human effort is more here. The retrieval of the
information is not as easy as the records are maintained in the hand written registers.

 Basic Digital Systems: Simple electronic systems with limited features, often
requiring manual data entry. This application requires correct feed on input into the

17
Attendance Management System

respective field. Suppose the wrong inputs are entered, the application resist to work.
so the user find it difficult to use.

15. ER MODEL OF ATTENDANCE MANAGEMENT

18
Attendance Management System

16. PROPOSED SYSTEM

To overcome the drawbacks of the existing system, the proposed system has been
evolved. This project aims to reduce the paper work and saving time to generate
accurate results from the student’s attendance. The system provides with the best user
interface. The efficient reports can be generated by using this proposed system.

Advantages of Proposed System It is trouble-free to use. It is a relatively fast


approach to enter attendance is highly reliable, approximate result from user Best user
Interface and efficient reports

17. CODE FOR ATTENDANCE MANAGEMENT


Createclass.php
<?php
error_reporting(0);
include '../Includes/dbcon.php';
include '../Includes/session.php';
if(isset($_POST['save'])){
$className=$_POST['className'];
$query=mysqli_query($conn,"select * from tblclass where className
='$className'");
$ret=mysqli_fetch_array($query);
if($ret > 0){
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>This Class Already Exists!</div>";
} else{
$query=mysqli_query($conn,"insert into tblclass(className)
value('$className')");
if ($query) {
$statusMsg = "<div class='alert alert-success' style='margin-
right:700px;'>Created Successfully!</div>";

19
Attendance Management System

} else {
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>An error Occurred!</div>";
} }}
if (isset($_GET['Id']) && isset($_GET['action']) && $_GET['action'] ==
"edit")
{ $Id= $_GET['Id'];
$query=mysqli_query($conn,"select * from tblclass where Id ='$Id'");
$row=mysqli_fetch_array($query);
if(isset($_POST['update'])){
$className=$_POST['className'];
$query=mysqli_query($conn,"update tblclass set
className='$className' where Id='$Id'");
if ($query) { echo "<script type = \"text/javascript\">
window.location = (\"createClass.php\")
</script>";
} else {
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>An error Occurred!</div>";
} } }
if (isset($_GET['Id']) && isset($_GET['action']) && $_GET['action'] ==
"delete")
{ $Id= $_GET['Id'];
$query = mysqli_query($conn,"DELETE FROM tblclass WHERE
Id='$Id'");
if ($query == TRUE) {
echo "<script type = \"text/javascript\">
window.location = (\"createClass.php\")
</script>";
} else{
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>An error Occurred!</div>";

20
Attendance Management System

} }?>
<!DOCTYPE html>
<html lang="en">
<body id="page-top">
<div id="wrapper"> <h1 class="h3 mb-0 text-gray-800">Create Class</h1>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="./">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Create
Class</li>
</ol>
</div>
<div class="row">
<div class="col-lg-12">
<!-- Form Basic -->
<div class="card mb-4">
<div class="card-header py-3 d-flex flex-row align-items-center justify-
content-between">
<h6 class="m-0 font-weight-bold text-primary">Create Class</h6>
<?php echo $statusMsg; ?>
</div>
<div class="card-body">
<form method="post">
<div class="form-group row mb-3">
<div class="col-xl-6">
<label class="form-control-label">Class Name<span
class="text-danger ml-2">*</span></label>
<input type="text" class="form-control" name="className"
value="<?php echo $row['className'];?>" id="exampleInputFirstName"
placeholder="Class Name">
</div> </div>
<?php

21
Attendance Management System

if (isset($Id)) { ?>
<button type="submit" name="update" class="btn btn-
warning">Update</button>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;
<?php
} else {
?>
<button type="submit" name="save" class="btn btn-
primary">Save</button>
<?php
} ?>
</form> </div> </div>
<!-- Input Group -->
<div class="row">
<div class="col-lg-12">
<div class="card mb-4">
<div class="card-header py-3 d-flex flex-row align-items-center justify-
content-between">
<h6 class="m-0 font-weight-bold text-primary">All Classes</h6>
</div>
<div class="table-responsive p-3">
<table class="table align-items-center table-flush table-hover"
id="dataTableHover">
<thead class="thead-light">
<tr>
<th>#</th>
<th>Class Name</th>
<th>Edit</th>
<th>Delete</th>
</tr> </thead> <tbody>

22
Attendance Management System

<?php
$query = "SELECT * FROM tblclass";
$rs = $conn->query($query);
$num = $rs->num_rows;
$sn=0;
if($num > 0)
{
while ($rows = $rs->fetch_assoc())
{
$sn = $sn + 1;
echo"
<tr>
<td>".$sn."</td>
<td>".$rows['className']."</td>
<td><a href='?action=edit&Id=".$rows['Id']."'><i class='fas
fa-fw fa-edit'></i>Edit</a></td>
<td><a href='?action=delete&Id=".$rows['Id']."'><i
class='fas fa-fw fa-trash'></i>Delete</a></td>
</tr>";
} }
else { echo "<div class='alert alert-danger' role='alert'>No Record
Found!
</div>";
} ?>
</tbody> </table>
</div> </div> < /div> </div> </div>
</body></html>

Createclassarms.php
<?php
error_reporting(0);

23
Attendance Management System

include '../Includes/dbcon.php';
include '../Includes/session.php';
if(isset($_POST['save'])){
$classId=$_POST['classId'];
$classArmName=$_POST['classArmName'];
$query=mysqli_query($conn,"select * from tblclassarms where
classArmName ='$classArmName' and classId = '$classId'");
$ret=mysqli_fetch_array($query);
if($ret > 0){
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>This Class Arm Already Exists!</div>";
} else{
$query=mysqli_query($conn,"insert into
tblclassarms(classId,classArmName,isAssigned)
value('$classId','$classArmName','0')");
if ($query) {
$statusMsg = "<div class='alert alert-success' style='margin-
right:700px;'>Created Successfully!</div>";
} else {
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>An error Occurred!</div>";
} }}
if (isset($_GET['Id']) && isset($_GET['action']) && $_GET['action'] ==
"edit")
{ $Id= $_GET['Id'];
$query=mysqli_query($conn,"select * from tblclassarms where Id ='$Id'");
$row=mysqli_fetch_array($query);
if(isset($_POST['update'])){
$classId=$_POST['classId'];
$classArmName=$_POST['classArmName'];
$query=mysqli_query($conn,"update tblclassarms set classId = '$classId',
classArmName='$classArmName' where Id='$Id'");

24
Attendance Management System

if ($query) {
echo "<script type = \"text/javascript\">
window.location = (\"createClassArms.php\")
</script>";
} else {
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>An error Occurred!</div>";
} } }
if (isset($_GET['Id']) && isset($_GET['action']) && $_GET['action'] ==
"delete")
{
$Id= $_GET['Id'];
$query = mysqli_query($conn,"DELETE FROM tblclassarms WHERE
Id='$Id'");
if ($query == TRUE) {
echo "<script type = \"text/javascript\">
window.location = (\"createClassArms.php\")
</script>";
} else{
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>An error Occurred!</div>";
} }?>
<!DOCTYPE html>
<html lang="en">
<body id="page-top">
<div id="wrapper">
<!-- Sidebar -->
<?php include "Includes/sidebar.php";?>
<!-- Sidebar -->
<div id="content-wrapper" class="d-flex flex-column">
<div id="content">

25
Attendance Management System

<!-- TopBar -->


<?php include "Includes/topbar.php";?>
<!-- Topbar -->
<!-- Container Fluid-->
<div class="container-fluid" id="container-wrapper">
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Create Class Arms</h1>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="./">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Create Class
Arms</li>
</ol> </div>
<div class="row">
<div class="col-lg-12">
<!-- Form Basic -->
<div class="card mb-4">
<div class="card-header py-3 d-flex flex-row align-items-center justify-
content-between">
<h6 class="m-0 font-weight-bold text-primary">Create Class
Arms</h6>
<?php echo $statusMsg; ?>
</div>
<div class="card-body">
<form method="post">
<div class="form-group row mb-3">
<div class="col-xl-6">
<label class="form-control-label">Select Class<span class="text-
danger ml-2">*</span></label>
<?php
$qry= "SELECT * FROM tblclass ORDER BY className ASC";
$result = $conn->query($qry);

26
Attendance Management System

$num = $result->num_rows;
if ($num > 0){
echo ' <select required name="classId" class="form-control mb-
3">';
echo'<option value="">--Select Class--</option>';
while ($rows = $result->fetch_assoc()){
echo'<option value="'.$rows['Id'].'"
>'.$rows['className'].'</option>';
}
echo '</select>';
} ?>
</div>
<div class="col-xl-6">
<label class="form-control-label">Class Arm Name<span
class="text-danger ml-2">*</span></label>
<input type="text" class="form-control" name="classArmName"
value="<?php echo $row['classArmName'];?>" id="exampleInputFirstName"
placeholder="Class Arm Name">
</div>
</div>
<?php
if (isset($Id))
{
?>
<button type="submit" name="update" class="btn btn-
warning">Update</button>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;
<?php
} else {
?>

27
Attendance Management System

<button type="submit" name="save" class="btn btn-


primary">Save</button>
<?php } ?>
</form> </div> </div>
<!-- Input Group -->
<div class="row">
<div class="col-lg-12">
<div class="card mb-4">
<div class="card-header py-3 d-flex flex-row align-items-center justify-
content-between">
<h6 class="m-0 font-weight-bold text-primary">All Class Arm</h6>
</div>
<div class="table-responsive p-3">
<table class="table align-items-center table-flush table-hover"
id="dataTableHover">
<thead class="thead-light">
<tr>
<th>#</th>
<th>Class Name</th>
<th>Class Arm Name</th>
<th>Status</th>
<th>Edit</th>
<th>Delete</th>
</tr>
</thead>

<tbody>
<?php
$query = "SELECT
tblclassarms.Id,tblclassarms.isAssigned,tblclass.className,tblclassarms.classAr
mName

28
Attendance Management System

FROM tblclassarms
INNER JOIN tblclass ON tblclass.Id = tblclassarms.classId";
$rs = $conn->query($query);
$num = $rs->num_rows;
$sn=0;
$status="";
if($num > 0)
{
while ($rows = $rs->fetch_assoc())
{
if($rows['isAssigned'] == '1'){$status =
"Assigned";}else{$status = "UnAssigned";}
$sn = $sn + 1;
echo"
<tr>
<td>".$sn."</td>
<td>".$rows['className']."</td>
<td>".$rows['classArmName']."</td>
<td>".$status."</td>
<td><a href='?action=edit&Id=".$rows['Id']."'><i class='fas
fa-fw fa-edit'></i>Edit</a></td>
<td><a href='?action=delete&Id=".$rows['Id']."'><i
class='fas fa-fw fa-trash'></i>Delete</a></td>
</tr>"; }
} else {
echo
"<div class='alert alert-danger' role='alert'>
No Record Found!
</div>";
} ?>
</tbody> </table>

29
Attendance Management System

</div> </div> </div> </div> </div>


</body>
</html>

Createclassteacher.php
<?php
error_reporting(0);
include '../Includes/dbcon.php';
include '../Includes/session.php';
if(isset($_POST['save'])){
$firstName=$_POST['firstName'];
$lastName=$_POST['lastName'];
$emailAddress=$_POST['emailAddress'];
$phoneNo=$_POST['phoneNo'];
$classId=$_POST['classId'];
$classArmId=$_POST['classArmId'];
$dateCreated = date("Y-m-d");
$query=mysqli_query($conn,"select * from tblclassteacher where
emailAddress ='$emailAddress'");
$ret=mysqli_fetch_array($query);
$sampPass = "pass123";
$sampPass_2 = md5($sampPass);
if($ret > 0){
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>This Email Address Already Exists!</div>";
} else{
$query=mysqli_query($conn,"INSERT into
tblclassteacher(firstName,lastName,emailAddress,password,phoneNo,classId,cla
ssArmId,dateCreated)
value('$firstName','$lastName','$emailAddress','$sampPass_2','$phoneNo','$cla
ssId','$classArmId','$dateCreated')");
if ($query) {

30
Attendance Management System

$qu=mysqli_query($conn,"update tblclassarms set isAssigned='1'


where Id ='$classArmId'");
if ($qu) {
$statusMsg = "<div class='alert alert-success' style='margin-
right:700px;'>Created Successfully!</div>";
} else {
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>An error Occurred!</div>";
} }
else {
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>An error Occurred!</div>";
} }}
if (isset($_GET['Id']) && isset($_GET['action']) && $_GET['action'] == "edit")
{
$Id= $_GET['Id'];
$query=mysqli_query($conn,"select * from tblclassteacher where Id
='$Id'");
$row=mysqli_fetch_array($query);
if(isset($_POST['update'])){
$firstName=$_POST['firstName'];
$lastName=$_POST['lastName'];
$emailAddress=$_POST['emailAddress'];
$phoneNo=$_POST['phoneNo'];
$classId=$_POST['classId'];
$classArmId=$_POST['classArmId'];
$dateCreated = date("Y-m-d");
$query=mysqli_query($conn,"update tblclassteacher set
firstName='$firstName', lastName='$lastName',
emailAddress='$emailAddress', password='$password',phoneNo='$phoneNo',
classId='$classId',classArmId='$classArmId'
where Id='$Id'");

31
Attendance Management System

if ($query) {
echo "<script type = \"text/javascript\">
window.location = (\"createClassTeacher.php\")
</script>";
} else {
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>An error Occurred!</div>";
} } }
if (isset($_GET['Id']) && isset($_GET['classArmId']) &&
isset($_GET['action']) && $_GET['action'] == "delete")
{
$Id= $_GET['Id'];
$classArmId= $_GET['classArmId'];
$query = mysqli_query($conn,"DELETE FROM tblclassteacher WHERE
Id='$Id'");
if ($query == TRUE) {
$qu=mysqli_query($conn,"update tblclassarms set isAssigned='0' where
Id ='$classArmId'");
if ($qu) {
echo "<script type = \"text/javascript\">
window.location = (\"createClassTeacher.php\")
</script>";
} else {
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>An error Occurred!</div>";
}
} else{
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>An error Occurred!</div>";
} } ?>
Createstudent.php
<?php

32
Attendance Management System

error_reporting(0);
include '../Includes/dbcon.php';
include '../Includes/session.php';
if(isset($_POST['save'])){
$firstName=$_POST['firstName'];
$lastName=$_POST['lastName'];
$otherName=$_POST['otherName'];
$admissionNumber=$_POST['admissionNumber'];
$classId=$_POST['classId'];
$classArmId=$_POST['classArmId'];
$dateCreated = date("Y-m-d");
$query=mysqli_query($conn,"select * from tblstudents where
admissionNumber ='$admissionNumber'");
$ret=mysqli_fetch_array($query);
if($ret > 0){
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>This Email Address Already Exists!</div>";
} else{
$query=mysqli_query($conn,"insert into
tblstudents(firstName,lastName,otherName,admissionNumber,password,classId,
classArmId,dateCreated)
value('$firstName','$lastName','$otherName','$admissionNumber','12345','$clas
sId','$classArmId','$dateCreated')");
if ($query) {
$statusMsg = "<div class='alert alert-success' style='margin-
right:700px;'>Created Successfully!</div>";
} else {
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>An error Occurred!</div>";
} }}
if (isset($_GET['Id']) && isset($_GET['action']) && $_GET['action'] == "edit")
{

33
Attendance Management System

$Id= $_GET['Id'];
$query=mysqli_query($conn,"select * from tblstudents where Id ='$Id'");
$row=mysqli_fetch_array($query);
if(isset($_POST['update'])){
$firstName=$_POST['firstName'];
$lastName=$_POST['lastName'];
$otherName=$_POST['otherName'];
$admissionNumber=$_POST['admissionNumber'];
$classId=$_POST['classId'];
$classArmId=$_POST['classArmId'];
$dateCreated = date("Y-m-d");
$query=mysqli_query($conn,"update tblstudents set firstName='$firstName',
lastName='$lastName',
otherName='$otherName',
admissionNumber='$admissionNumber',password='12345',
classId='$classId',classArmId='$classArmId'
where Id='$Id'");
if ($query) {
echo "<script type = \"text/javascript\">
window.location = (\"createStudents.php\")
</script>";
} else {
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>An error Occurred!</div>";
} } }
if (isset($_GET['Id']) && isset($_GET['action']) && $_GET['action'] ==
"delete")
{
$Id= $_GET['Id'];
$classArmId= $_GET['classArmId'];
$query = mysqli_query($conn,"DELETE FROM tblstudents WHERE
Id='$Id'");

34
Attendance Management System

if ($query == TRUE) {
echo "<script type = \"text/javascript\">
window.location = (\"createStudents.php\")
</script>";
} else{
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>An error Occurred!</div>";
} }?>

Takeattendance.php

<?php
error_reporting(0);
include '../Includes/dbcon.php';
include '../Includes/session.php';
$query = "SELECT tblclass.className,tblclassarms.classArmName
FROM tblclassteacher
INNER JOIN tblclass ON tblclass.Id = tblclassteacher.classId
INNER JOIN tblclassarms ON tblclassarms.Id = tblclassteacher.classArmId
Where tblclassteacher.Id = '$_SESSION[userId]'";
$rs = $conn->query($query);
$num = $rs->num_rows;
$rrw = $rs->fetch_assoc();

//session and Term


$querey=mysqli_query($conn,"select * from tblsessionterm where isActive
='1'");
$rwws=mysqli_fetch_array($querey);

35
Attendance Management System

$sessionTermId = $rwws['Id'];
$dateTaken = date("Y-m-d");
$qurty=mysqli_query($conn,"select * from tblattendance where classId =
'$_SESSION[classId]' and classArmId = '$_SESSION[classArmId]' and
dateTimeTaken='$dateTaken'");
$count = mysqli_num_rows($qurty);
if($count == 0){
$qus=mysqli_query($conn,"select * from tblstudents where classId =
'$_SESSION[classId]' and classArmId = '$_SESSION[classArmId]'");
while ($ros = $qus->fetch_assoc())
{
$qquery=mysqli_query($conn,"insert into
tblattendance(admissionNo,classId,classArmId,sessionTermId,status,dateTimeTa
ken)
value('$ros[admissionNumber]','$_SESSION[classId]','$_SESSION[classArmId]
','$sessionTermId','0','$dateTaken')");
}}
if(isset($_POST['save'])){
$admissionNo=$_POST['admissionNo'];
$check=$_POST['check'];
$N = count($admissionNo);
$status = "";
$qurty=mysqli_query($conn,"select * from tblattendance where classId =
'$_SESSION[classId]' and classArmId = '$_SESSION[classArmId]' and
dateTimeTaken='$dateTaken' and status = '1'");
$count = mysqli_num_rows($qurty);
if($count > 0){
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>Attendance has been taken for today!</div>";
}
else //update the status to 1 for the checkboxes checked
{
for($i = 0; $i < $N; $i++)

36
Attendance Management System

{
$admissionNo[$i]; //admission Number

if(isset($check[$i])) //the checked checkboxes


{
$qquery=mysqli_query($conn,"update tblattendance set status='1'
where admissionNo = '$check[$i]'");
if ($qquery) {
$statusMsg = "<div class='alert alert-success' style='margin-
right:700px;'>Attendance Taken Successfully!</div>";
}
else
{
$statusMsg = "<div class='alert alert-danger' style='margin-
right:700px;'>An error Occurred!</div>";
} } } } ?>

Viewattendancde.php

<?php

error_reporting(0);

include '../Includes/dbcon.php';

include '../Includes/session.php';

?>

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

37
Attendance Management System

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-


to-fit=no">

<meta name="description" content="">

<meta name="author" content="">

<link href="img/logo/attnlg.jpg" rel="icon">

<title>Dashboard</title>

</head>

<body id="page-top">

<div id="wrapper">

<!-- Sidebar -->

<?php include "Includes/sidebar.php";?>

<!-- Sidebar -->

<div id="content-wrapper" class="d-flex flex-column">

<div id="content">

<!-- TopBar -->

<?php include "Includes/topbar.php";?>

<!-- Topbar -->

<!-- Container Fluid-->

<div class="container-fluid" id="container-wrapper">

<div class="d-sm-flex align-items-center justify-content-between mb-4">

<h1 class="h3 mb-0 text-gray-800">View Class Attendance</h1>

<ol class="breadcrumb">

<li class="breadcrumb-item"><a href="./">Home</a></li>

38
Attendance Management System

<li class="breadcrumb-item active" aria-current="page">View Class


Attendance</li>

</ol>

</div>

<div class="row">

<div class="col-lg-12">

<div class="card mb-4">

<div class="card-header py-3 d-flex flex-row align-items-center justify-


content-between">

<h6 class="m-0 font-weight-bold text-primary">View Class


Attendance</h6>

<?php echo $statusMsg; ?> </div>

<div class="card-body">

<form method="post">

<div class="form-group row mb-3">

<div class="col-xl-6">

<label class="form-control-label">Select Date<span class="text-


danger ml-2">*</span></label>

<input type="date" class="form-control" name="dateTaken"


id="exampleInputFirstName" placeholder="Class Arm Name">

</div>

<!-- <div class="col-xl-6">

<label class="form-control-label">Class Arm Name<span


class="text-danger ml-2">*</span></label>

39
Attendance Management System

<input type="text" class="form-control" name="classArmName"


value="<?php echo $row['classArmName'];?>" id="exampleInputFirstName"
placeholder="Class Arm Name">

</div> -->

</div>

<button type="submit" name="view" class="btn btn-


primary">View Attendance</button>

</form>

</div>

</div>

<!-- Input Group -->

<div class="row">

<div class="col-lg-12">

<div class="card mb-4">

<div class="card-header py-3 d-flex flex-row align-items-center justify-


content-between">

<h6 class="m-0 font-weight-bold text-primary">Class


Attendance</h6> </div>

<div class="table-responsive p-3">

<table class="table align-items-center table-flush table-hover"


id="dataTableHover">

<thead class="thead-light"> <tr>

<th>#</th>

<th>First Name</th>

<th>Last Name</th>

40
Attendance Management System

<th>Other Name</th>

<th>Admission No</th>

<th>Class</th>

<th>Class Arm</th>

<th>Session</th>

<th>Term</th>

<th>Status</th>

<th>Date</th>

</tr> </thead> </tbody> <?php

if(isset($_POST['view'])){

$dateTaken = $_POST['dateTaken'];

$query="SELECTtblattendance.Id,tblattendance.status,tblattendance.dateTime
Taken,tblclass.className,
tblclassarms.classArmName,tblsessionterm.sessionName,tblsessionterm.termId,t
blterm.termName,
tblstudents.firstName,tblstudents.lastName,tblstudents.otherName,tblstudents.a
dmissionNumber

FROM tblattendance

INNER JOIN tblclass ON tblclass.Id = tblattendance.classId

INNER JOIN tblclassarms ON tblclassarms.Id =


tblattendance.classArmId

INNER JOIN tblsessionterm ON tblsessionterm.Id =


tblattendance.sessionTermId

INNER JOIN tblterm ON tblterm.Id = tblsessionterm.termId

INNER JOIN tblstudents ON tblstudents.admissionNumber =


tblattendance.admissionNo

41
Attendance Management System

where tblattendance.dateTimeTaken = '$dateTaken' and


tblattendance.classId = '$_SESSION[classId]' and tblattendance.classArmId =
'$_SESSION[classArmId]'";

$rs = $conn->query($query);

$num = $rs->num_rows;

$sn=0; $status=""; if($num > 0)

{ while ($rows = $rs->fetch_assoc()) {

if($rows['status'] == '1'){$status = "Present";


$colour="#00FF00";}else{$status = "Absent";$colour="#FF0000";}

$sn = $sn + 1;

echo" <tr>

<td>".$sn."</td>

<td>".$rows['firstName']."</td>

<td>".$rows['lastName']."</td>

<td>".$rows['otherName']."</td>

<td>".$rows['admissionNumber']."</td>

<td>".$rows['className']."</td>

<td>".$rows['classArmName']."</td>

<td>".$rows['sessionName']."</td>

<td>".$rows['termName']."</td>

<td style='background-color:".$colour."'>".$status."</td>

<td>".$rows['dateTimeTaken']."</td>

</tr>"; } }

else { echo "<div class='alert alert-danger' role='alert'>No Record


Found!

42
Attendance Management System

</div>";} } ?>

</tbody></table> </div> </div> </div> </div> </div>

</body>

</html>

18. SCREENSHOTS OF THE PROJECT

18.1 Dashboard

18.2 Admin Dashboard

43
Attendance Management System

18.3 Create and Manage a Class

18.4 Create and Manage ClassTeacher

44
Attendance Management System

18.5 Insert and Manage Students

45
Attendance Management System

18.6 Create and Manage Class Arms

18.7 Create and Manage session and terms

46
Attendance Management System

18.8 ClassTeacher Dashboard

18.9 Manage Students

47
Attendance Management System

18.10 Take Attendance

18.11 View Attendance

48
Attendance Management System

18.12 View Student Attendance

19. CONCLUSION AND RECOMMENDATION

Conclusion

49
Attendance Management System

The proposed Student Attendance Management System addresses the limitations of


traditional attendance methods by providing an automated, efficient, and secure solution. The
system enhances data accuracy, reduces administrative workload, and provides real-time
access to attendance records.

Recommendation

 Adoption: Institutions should adopt the system to streamline attendance management.

 Training: Provide comprehensive training for users to maximize the system's


benefits.

 Continuous Improvement: Regularly update the system based on user feedback and
technological advancements.

20. REFERENCE

50
Attendance Management System

 Al-Zoube, M., & Abu-El-Haija, A. (2012). Development of a Student Attendance


Management System using Fingerprint Recognition. International Journal of
Computer Science and Information Security, 10(3).

 Dey, N. (2018). A comprehensive study on various automated student attendance


system. Journal of Computer Science, 7(3), 45-50.

 Parab, S. G., & Sahu, D. P. (2017). Implementation of RFID Technology in


Attendance System. International Journal of Emerging Trends & Technology in
Computer Science, 6(2).

 Rao, D. R., & Kumar, N. (2014). Efficient Method for Automated Attendance
Management. International Journal of Computer Applications, 98(14).

 Singh, H., & Pandey, S. (2019). Enhancing Student Attendance System using Facial
Recognition Technology. Journal of Advanced Research in Dynamical and Control
Systems, 11(3).

51

You might also like