0% found this document useful (0 votes)
15 views75 pages

Soams (Report) 01

The Student Online Attendance Management System is a web-based application that automates attendance tracking in educational institutions, replacing manual methods with a more efficient and accurate digital solution. Built using PHP and MySQL, it allows real-time monitoring, role-based access, and automated report generation, enhancing transparency and reducing errors. The system is designed to improve record management, security, and accessibility for administrators, teachers, and students.

Uploaded by

nagapooshnam2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views75 pages

Soams (Report) 01

The Student Online Attendance Management System is a web-based application that automates attendance tracking in educational institutions, replacing manual methods with a more efficient and accurate digital solution. Built using PHP and MySQL, it allows real-time monitoring, role-based access, and automated report generation, enhancing transparency and reducing errors. The system is designed to improve record management, security, and accessibility for administrators, teachers, and students.

Uploaded by

nagapooshnam2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 75

ONLINE ATTENDANCE MANAGEMENT SYSTEM

ABSTRACT

The Student Online Attendance Management System is a web-based application designed to streamline the
attendance tracking process in educational institutions. Traditionally, attendance is recorded manually, which
is time-consuming, inefficient, and prone to errors such as misplacement of records, manipulation, and
inaccuracies in data entry. This system, developed using PHP and MySQL, automates attendance management,
reducing administrative workload and ensuring high accuracy in record-keeping.

The system allows administrators and teachers to efficiently manage student attendance records, eliminating
the need for paper-based registers. The platform is accessible online, ensuring real-time attendance tracking
and report generation. Students can also view their attendance records, helping them stay updated on their
academic progress and allowing them to take necessary actions to improve attendance where needed.

This system provides multiple functionalities, including role-based access, where administrators can manage
users, students, and attendance data, teachers can mark and review attendance, and students can check their
records. The use of MySQL for database management ensures secure and scalable storage of data, while PHP-
based server-side scripting enables smooth backend processing and communication with the database.
Additionally, the system supports data backup and recovery mechanisms, ensuring that attendance records are
not lost in case of system failure.

With features such as real-time data updates, automated report generation, and secure access, this system
enhances efficiency and accuracy in attendance management. Additionally, it reduces paperwork, minimizes
errors, and offers valuable insights through analytics and reporting tools. The system also allows institutions
to analyze attendance patterns, identify trends, and generate performance reports for individual students or
classes. These reports can be used by teachers and administrators to take necessary actions, such as sending
notifications to students with low attendance.

The system is designed with a user-friendly interface to ensure ease of use for all stakeholders, including
teachers, students, and administrators. It incorporates security measures such as encrypted data storage,
authentication protocols, and access control mechanisms to prevent unauthorized access and protect sensitive
student records.

Overall, the Student Online Attendance Management System is an essential tool for modern educational
institutions, improving attendance monitoring, enhancing transparency, and fostering better engagement
between students and faculty. By leveraging the capabilities of web technology, it brings a seamless, effective,
and reliable solution to one of the most critical aspects of academic administration.
INDEX
CHAPTER CONTENT PAGE NO
NO
ABSTRACT

CHAPTER 1 INTODUCTION 1-3


1.1 DEFINITION
1.2 PURPOSE
1.3 SCOPE
1.4 OVERVIEW
1.5 REFERENCES

CHAPTER 2 THE OVERALL DESCRIPTION 4-5


2.1 PRODUCT PERPECTIVE
2.2 PRODUCT FUNCTIONS
2.3 USER CHARACTERISTICS
2.4 CONSTRAINTS
2.5 ASSUMPTIONS AND DEPENDENCIES

CHAPTER 3 SYSTEM ANALYSIS 6-8


3.1 INTRODUCTON
3.2 EXISTING SYSTEM
3.3 PROPOSED SYSTEM
3.4 FEASIBILITY STUDY

CHAPTER 4 REQUIREMENT SPECIFICATIONS 9


4.1 HARDWARE REQUIREMENTS
4.2 SOFTWARE REQUIREMENTS
4.3 FUNCTIONAL REQUIREMENTS
4.4 NON-FUNCTIONAL REQUIREMENTS
CHAPTER 5 SOFTWARE DESCRIPTION 10 - 11
5.1 PHP
5.2 MYSQL

CHAPTER 6 SYSTEM DESIGN 12 - 18


6.1 DATA FLOW DIAGRAM

6.2 USE CASE DIAGRAM

6.3 ENTITY-RELATIONSHIP DIAGRAM

6.4 INPUT DESIGN

6.5 OUTPUT DESIGN

CHAPTER 7 DATABASE TABLE 19 - 21


7.1 LOGIN TABLE
7.2 TEACHER TABLE
7.3 STUDENT TABLE
7.4 ATTENDANCE TABLE
7.5 COURSE TABLE

CHAPTER 8 PROJECT DESCRIPTION 22 - 24


8.1 PROBLEM DEFINITIONS
8.2 PROJECT OVERVIEW
8.3 MODULE DESCRIPTION

CHAPTER 9 SYSTEM TESTING 25 -26


9.1 INTRODUCTION
9.2 TESTING METHODOLOGIES

CHAPTER 10 SYSTEM MAINTENANCE 27 - 28


10.1 IMPORTANCE OF MAINTENANCE
10.2 TYPES OF MAINTENANCE
10.3 MAINTENANCE PROCEDURES
CHAPTER 11 CODING 29 -61
11.1 CLASS
11.2 INDEX
11.3 LOGOUT
11.4 PROFILE
11.5 SESSION
11.6 STUDENT
11.7 TAKE
11.8 TEACHER
CHAPTER 12 OUTPUT SCREEN OF THE PROJECT 62 - 68
12.1 FACULTY LOGIN PAGE
12.2 DASHBOARD
12.3 WELCOME PAGE
12.4 INSTRUCTIONS PAGE
12.5 ATTENDANCE PAGE
12.6 RECORD SAVED PAGE
12.7 PROFILE PAGE
12.8 PERCENTAGE PAGE
12.9 STATISTICS PAGE
CHAPTER 13 CONCLUSION 69

BIBLIOGRAPHY 70
CHAPTER 1

INTRODUCTION

1.1 Definition

The Student Online Attendance Management System is a web-based software application that automates
the process of recording and managing student attendance in educational institutions. It replaces traditional
paper-based registers with a digital solution, enhancing efficiency, accuracy, and accessibility.

This system allows teachers and administrators to mark attendance, generate reports, and monitor student
attendance trends in real time. Students can also log in to check their attendance records, ensuring
transparency and accountability. The platform is built using PHP for server-side scripting and MySQL for
database management, ensuring secure storage and retrieval of attendance data.

The system is designed to provide role-based access control, ensuring that only authorized users can manage
or view attendance records. By leveraging web technologies, the system allows institutions to reduce
paperwork, minimize errors, and provide real-time insights into student attendance trends. It supports features
such as automated report generation, real-time data updates, and data backup mechanisms, making it a reliable,
scalable, and user-friendly solution for educational institutions of all sizes.

1.2 Purpose

The purpose of the Student Online Attendance Management System is to provide an efficient, accurate, and
user-friendly platform for tracking student attendance in educational institutions. The manual method of
recording attendance is prone to errors, time-consuming, and inefficient, leading to difficulties in maintaining
records and generating reports. This system is designed to address these challenges by automating the
attendance process and ensuring real-time accessibility of records.

Key objectives of this system include

1. Automation of Attendance Tracking – Eliminates the need for paper registers, reducing human errors
and ensuring accurate record-keeping.
2. Real-Time Data Access – Enables teachers, administrators, and students to access attendance records
from anywhere through a web-based platform.
3. Role-Based Access Control – Ensures that only authorized personnel (administrators and teachers) can
mark and manage attendance records, while students can only view their records.
4. Improved Record Management – Centralized database storage using MySQL allows for secure and
efficient management of attendance data with easy retrieval and backup features.

1
5. Report Generation – Facilitates automatic report generation for students, classes, and overall
institution attendance trends, aiding decision-making for academic improvement.
6. Enhancing Transparency and Accountability – Provides students with direct access to their attendance
records, allowing them to monitor their performance and ensure compliance with institutional policies.
7. Scalability and Security – Developed using PHP and MySQL, ensuring that the system can handle
large amounts of data while implementing security measures like authentication, encryption, and data
backup.
8. Paperless and Eco-Friendly Solution – Reduces reliance on paper-based attendance registers,
promoting an environmentally friendly approach to record-keeping.

By fulfilling these objectives, the Student Online Attendance Management System contributes to improved
efficiency, accuracy, and accessibility in managing attendance records, ultimately enhancing the overall
educational experience for both students and faculty members.

1.3 Scope

The Student Online Attendance Management System is a web-based application designed for educational
institutions to automate attendance tracking. It eliminates the need for manual record-keeping, reduces errors,
and provides real-time access to attendance data.

Key Features & Scope

 Web-Based Accessibility: Can be accessed from any device with a web browser.
 Role-Based Access:
o Administrators: Manage users, attendance data, and reports.
o Teachers: Mark and review attendance.
o Students: View their attendance records.
 Database Management: MySQL stores attendance records securely.
 Real-Time Tracking & Reporting: Generates automated reports for analysis.
 Data Security: Implements authentication and encryption for data protection.
 Scalability: Can be used in schools, colleges, and universities.

This system streamlines attendance management, improves transparency, and enhances efficiency in
educational institutions.

1.4 Overview

The Student Online Attendance Management System is a web-based application developed using PHP and
MySQL to automate student attendance tracking in educational institutions. This document provides a detailed
analysis of the system, covering its features, functionalities, and implementation.

2
The report is structured as follows

 Introduction: Defines the system, its purpose, and scope.


 System Description: Explains the system's functionality, user roles, and dependencies.
 System Analysis: Compares the existing manual system with the proposed automated system and
highlights its advantages.
 Feasibility Study: Evaluates economic, technical, and operational feasibility.
 Requirement Specifications: Lists hardware, software, and functional requirements.

This document serves as a comprehensive guide for understanding the design, development, and
implementation of the Online Attendance Management System.

1.5 References

All sources related to PHP, MySQL, and web development frameworks are included in the reference
section.

3
CHAPTER 2

THE OVERALL DISCRIPTION

This chapter provides a comprehensive understanding of the Student Online Attendance Management System,
including its product perspective, functionalities, user roles, constraints, and dependencies.

2.1 Product Perspective

The Student Online Attendance Management System is a web-based application designed to improve the
efficiency of attendance tracking in educational institutions. Traditionally, attendance is recorded manually
using paper-based registers or spreadsheets, which is time-consuming, prone to errors, and difficult to manage.
This system provides an automated solution to simplify the process and ensure accurate record-keeping.

Key Features

 Online and Real-Time Access: The system is accessible from any device with a web browser.
 Secure Data Storage: Attendance records are stored in a MySQL database, ensuring data integrity and
security.
 Automated Report Generation: The system can generate daily, weekly, and monthly attendance reports.
 Role-Based Access: Different users have specific privileges (Admin, Teacher, Student).
 Scalability: Can be implemented in schools, colleges, universities, and training institutes.

The system integrates PHP for backend development, MySQL for database management, and HTML, CSS,
and JavaScript for the frontend interface. It provides a user-friendly experience, making it easy for students,
teachers, and administrators to use.

2.2 Product Functions

The system supports two primary types of users:

1. Administrator
o Manages student and teacher records.
o Controls user access and system configurations.
o Generates detailed attendance reports.
o Oversees data backup and security.
2. Teacher
o Marks student attendance in real time.
o Views and updates attendance records.
o Generates attendance reports for specific students or classes.
3. Student
o Views their own attendance records.

4
o Receives notifications if attendance falls below the required threshold.

Each user role has specific permissions to ensure data security and efficient management of attendance
records.

2.3 User Characteristics

This system is designed for three main user groups:

1. Administrators
o Require basic knowledge of database management and system settings.
o Manage users, student data, and system security.
2. Teachers
o Need minimal training to mark attendance and generate reports.
o Access records for classes assigned to them.
3. Students
o Can log in to check their attendance percentage.
o No technical knowledge is required.

The system ensures ease of use by providing a simple, intuitive web-based dashboard.

2.4 Constraints

Despite its benefits, the system has some limitations:

 Internet Dependency: Users must have an active internet connection to access the system.
 User Authentication: Only registered users can access the system using valid login credentials.
 Device Compatibility: The system is optimized for desktop and mobile browsers, but performance
may vary on different devices.
 Server Capacity: The speed and performance of the system depend on the server infrastructure hosting
the database and web application.

2.5 Assumptions and Dependencies

For the successful implementation of the system, the following assumptions and dependencies must be
considered:

 Users have basic knowledge of computers and the internet.


 The hosting server has PHP and MySQL installed.
 Regular backups are performed to prevent data loss.
 The system is used in educational institutions with defined attendance policies.

5
CHAPTER 3

SYSTEM ANALYSIS

3.1 Introduction

System analysis is a critical phase in software development that helps in understanding the system
requirements, identifying problems with the existing system, and designing a more efficient solution. The
Student Online Attendance Management System (SOAMS) is designed to automate the process of tracking
student attendance in educational institutions using PHP and MySQL.

The primary goal of this system is to replace traditional manual attendance methods (such as paper-based
registers or Excel sheets) with a secure, efficient, and automated web-based system. The proposed system
offers real-time attendance tracking, data security, and an easy-to-use interface for both teachers and students.

3.2 Existing System


Problems in the Current Manual System

Most schools, colleges, and universities rely on manual attendance tracking, which has several disadvantages:

1. Time-Consuming Process
o Teachers need to manually mark attendance, which takes up valuable class time.
o At the end of each session, attendance must be compiled, increasing workload.
2. High Risk of Human Errors
o Teachers or administrators may accidentally mark the wrong student as present or absent.
o Handwritten records can be difficult to read, leading to misinterpretation.
3. Lack of Security & Data Integrity
o Attendance records can be altered, lost, or manipulated.
o Students may forge signatures or proxies might be given in manual systems.
4. Difficult Data Retrieval & Reporting
o Finding old attendance records requires manually searching through paper files.
o Generating reports for student attendance analysis takes extra effort and time.
5. No Real-Time Monitoring
o School administrators cannot track attendance immediately.
o Parents do not receive real-time updates about their child's attendance.

The existing system is outdated, inefficient, and prone to errors, making it necessary to develop a digital
attendance management system.

6
3.3 Proposed System

To overcome the limitations of the manual system, the Student Online Attendance Management System is
designed as a web-based application that allows teachers to mark attendance digitally and store data securely
in a MySQL database.

Key Features of the Proposed System:

1. Automated Attendance Tracking


o Teachers can mark attendance online using a web application.
o Students can be marked as Present, Absent, or Late in real-time.
2. Real-Time Monitoring
o Attendance data is updated in real-time and can be accessed instantly by teachers,
administrators, and parents.
3. Secure Database Storage
o All attendance records are securely stored in a MySQL database to prevent unauthorized access.
4. User Authentication & Access Control
o Different user roles (Administrator, Teacher, Student) ensure that only authorized users can
access specific data.
5. Reports & Analytics
o Generates attendance reports (daily, weekly, monthly) for students.
o Provides graphical insights into student attendance patterns.
6. Data Backup & Recovery
o Regular database backups ensure data is not lost due to system failures.
7. User-Friendly Interface
o The system has a simple and intuitive web-based dashboard for easy access and navigation.

Advantages of the Proposed System:

 Saves Time – Automates attendance marking, reducing time spent on manual work.
 Minimizes Errors – Eliminates human errors in marking attendance.
 Improves Security – Data is stored securely with authentication mechanisms.
 Enhances Accessibility – Students and teachers can access attendance data from anywhere.
 Reduces Paperwork – Digital records eliminate the need for paper-based registers.

The proposed system modernizes attendance management, making it more efficient, secure, and accessible.

3.4 Feasibility Study

A feasibility study assesses whether the proposed system can be successfully implemented in terms of cost,
technology, and operations.

7
3.4.1 Economic Feasibility

 The system is cost-effective as it eliminates the need for physical attendance registers.
 Uses open-source technologies like PHP and MySQL, reducing development costs.
 Reduces administrative costs by automating attendance tracking.
 Generates automatic reports, eliminating the need for extra staff for attendance management.

3.4.2 Technical Feasibility

 The system is built using widely used web technologies (PHP, MySQL, HTML, CSS, JavaScript).
 It can be hosted on any web server, making it easy to deploy.
 The system supports multiple devices (computers, tablets, and smartphones).
 Integration with existing Learning Management Systems (LMS) is possible.

3.4.3 Operational Feasibility

 The system is easy to use, requiring minimal training for teachers and students.
 The interface is designed for efficiency, ensuring quick attendance marking.
 Provides instant access to attendance records for students, teachers, and administrators.
 Parents can be notified via email or SMS about their child’s attendance.

8
CHAPTER 4

REQUIREMENT SPECIFICATIONS

 Any Version of browser after Mozilla Firefox 4.0, Internet Explorer 6.0,chrome

4.1 Hardware requirements


 Any processor after Pentium 4.

 Any version of Windows XP or later.


 Processor speed: 2.0 GHz
 RAM : 1GB
 Hard disk: 40GB to 80 GB

4.2 Software requirements


 Database : MySQL
 Server : Apache
 Frontend : HTML
 Scripting Language : JavaScript
 IDE : Sublime
 Technology : PHP

4.3 Functional Requirements

 User Authentication
 Attendance Recording
 Report Generation
 Dashboard for Admins and Students

4.4 Non-Functional Requirements

 Data Security – Encrypted database storage.


 System Performance – Fast processing of attendance records.

9
CHAPTER 5

SOFTWARE DESCRIPTION

The Student Online Attendance Management System is developed using PHP and MySQL, which work
together to provide a dynamic, efficient, and secure web-based platform for managing student attendance
records. This chapter provides a detailed overview of these technologies and their role in the system.

5.1 PHP (Hypertext Preprocessor)

PHP is a widely used server-side scripting language that enables dynamic web development and seamless
database interactions. It is an open-source, fast, and flexible language suitable for handling the system's
backend.

Key Features of PHP

1. Open-source & Free – Easily accessible, with strong community support.


2. Server-Side Execution – Runs on the server, reducing client-side processing load.
3. Database Connectivity – Integrates with MySQL, PostgreSQL, and SQLite.
4. Cross-Platform Support – Works on Windows, Linux, and macOS.
5. Security Features – Supports data encryption, preventing unauthorized access.
6. Error Handling – Provides debugging tools to manage runtime errors efficiently.
7. Framework Compatibility – Works with Laravel, CodeIgniter, and other frameworks.
8. Fast Performance – Executes scripts quickly, ensuring a responsive user experience.

PHP in the Attendance Management System

 User Authentication – Handles login/logout functionalities securely.


 Attendance Management – Allows students to mark attendance and teachers to update records.
 Data Processing – Manages attendance reports, student details, and real-time updates.
 Role-Based Access Control – Provides different access levels for Admin, Teachers, and Students.

5.2 MySQL

MySQL is an open-source database management system that efficiently stores and retrieves attendance data. It
is scalable, reliable, and fast, making it ideal for educational systems.

Key Features of MySQL:

1. Relational Database Model – Uses tables to organize student attendance data efficiently.
2. High Performance – Optimized for fast queries and data retrieval.
3. Security & Data Integrity – Implements encryption, authentication, and access control.

10
4. Scalability – Can handle large volumes of student data without performance loss.
5. Backup & Recovery – Supports automatic data backup to prevent data loss.
6. Multi-User Support – Allows multiple users (Admins, Teachers, Students) to access data
simultaneously.
7. ACID Compliance – Ensures accuracy, consistency, and reliability of data.
8. Compatibility – Works seamlessly with PHP, Python, Java, and other languages.

MySQL in the Attendance Management System:

 Stores Student & Faculty Data – Maintains structured records of all users.
 Manages Attendance Logs – Saves, updates, and retrieves attendance details efficiently.
 Generates Reports – Produces monthly and yearly attendance reports dynamically.
 Ensures Data Security – Prevents unauthorized modifications using access control mechanisms.

11
CHAPTER 6
SYSTEM DESIGN

System design is the blueprint for developing the Student Online Attendance Management System. It involves
data flow representation, input/output design, and database structure to ensure efficient system performance.

6.1 Data Flow Diagram (DFD)


A data flow diagram is graphical tool used to describe and analyze movement of data through a system.
These are the central tool and the basis from which the other components are developed. The
transformation of data from input to output, through processed, may be described logically and
independently of physical components associated with the system.

These are known as the logical data flow diagrams. The physical data flow diagrams show the actual
implements and movement of data between people, departments and workstations.

A full description of a system actually consists of a set of data flow diagrams. Using two familiar
notations Yourdon, Gane and Sarson notation develops the data flow diagrams. Each component in a
DFD is labeled with a descriptive name. Process is further identified with a number that will be used
for identification purpose.

The development of DFD’S is done in several levels. Each process in lower level diagrams can be
broken down into a more detailed DFD in the next level. The lop-level diagram is often called context
diagram.

It consists single process bit, which plays vital role in studying the current system. The process in the
context level diagram is exploded into other process at the first level DFD.

The idea behind the explosion of a process into more process is that understanding at one level of detail
is exploded into greater detail at the next level. This is done until further explosion is necessary and an
adequate amount of detail is described for analyst to understand the process

12
Figure 6.1 - Data Flow Diagram

13
6.1.1 0-Level DFD (Context Diagram)

The 0-Level DFD represents the entire system as a single process interacting with external entities (Admin,
Teacher, Student).

0-Level DFD Diagram

Description:

 Users (Admin, Teacher, Student) interact with the system.


 The system processes input requests (mark attendance, view reports).
 Data is stored in the MySQL database and retrieved when needed.

ATTANDANCE
MANAGEMENT REPORT
USER
SYSTEM

DATABASE

Figure 6.1.1 - DataFlowDiagram Level1

6.1.2 1-Level DFD

The 1-Level DFD expands on the 0-Level DFD, breaking the system into multiple sub-processes.

1-Level DFD Diagram

Description:

 The system consists of User Authentication, Attendance Marking, Report Generation, and Database
Management.
 Admin can manage users and generate reports.
 Teachers can update attendance.
 Students can mark their attendance.

14
PERSON

ENTRY

LOGIN

INVALID
UID / PWD

USER
AUTHENDICAT CHECK
DATABASE
ION

ADMIN
STAFF
ACCESS
ACCESS

Figure 6.1.2 DataFlowDiagram Level1

15
6.2 Use Case Diagram

Figure 6.2 - Use case Diagram

16
6.3 ENTITY-RELATIONSHIP Diagrams

E-R (Entity-Relationship) Diagram is used to represents the relationship between entities in


the table.

Figure 6.3 - Entity Relationship Diagram

17
6.4 Input Design

Input design ensures data is entered correctly and securely into the system.

Key Inputs in the System:

1. Login Page: Users enter username and password.


2. Attendance Marking Page: Teachers/students mark attendance using dropdowns or checkboxes.
3. Admin Dashboard: Admin adds/edit users, subjects, and attendance records.

Features to Improve Input Accuracy:

1. Form Validation – Prevents invalid login credentials.


2. Dropdown Selection – Reduces manual errors.
3. Mandatory Fields – Ensures critical data is entered before submission.

6.5 Output Design

Output design determines how information is presented to users.

Key Outputs in the System:

1. Attendance Reports – Shows daily, weekly, and monthly records.


2. Student Attendance Status – Displays "Present" or "Absent".
3. Exportable Data – Allows reports to be downloaded in PDF/Excel format.
4. Notifications & Alerts – Sends reminders for low attendance.

Example of an Output Design (Attendance Report Table)

Roll Number Date Status

1/CS/25 2025-03-17 Present

5/CS/25 2025-03-17 Absent

9/CS/25 2025-03-17 Present

18
CHAPTER 7
DATABASE TABLE
The Student Online Attendance Management System relies on a well-structured MySQL database to store and
manage data efficiently. This chapter explains the key database tables and their relationships.

Database Tables Overview

The system includes multiple tables to handle different entities such as users, students, teachers, attendance
records, and courses.

Main Tables in the Database:

1. Login Table – Stores user authentication details.


2. Teacher Table – Stores teacher details.
3. Student Table – Stores student records.
4. Attendance Table – Stores attendance status of students.
5. Course Table – Stores subject/course information.

7.1 Login Table

This table stores the login credentials of users, ensuring secure authentication.

Column Name Data Type Description

user_id INT (Primary Key) Unique identifier for each user.

username VARCHAR(50) Username of the user.

password VARCHAR(255) Encrypted password.

role ENUM ('Admin', 'Teacher', 'Student') Defines user role.

19
7.2 Teacher Table

Stores information about teachers who manage student attendance.

Column Name Data Type Description

teacher_id INT (Primary Key) Unique identifier for each teacher.

name VARCHAR(100) Full name of the teacher.

email VARCHAR(100) Contact email.

phone VARCHAR(15) Phone number.

department VARCHAR(50) Department assigned.

7.3 Student Table

Stores student details such as name, enrollment number, course, and year.

Column Name Data Type Description

student_id INT (Primary Key) Unique identifier for each student.

name VARCHAR(100) Full name of the student.

roll_no VARCHAR(20) Roll number or registration number.

course_id INT (Foreign Key) Links to the Course Table.

year INT Academic year of the student.

20
7.4 Attendance Table

This table records attendance status for each student in different subjects.

Column Name Data Type Description

attendance_id INT (Primary Key) Unique identifier for attendance records.

student_id INT (Foreign Key) Links to the Student Table.

course_id INT (Foreign Key) Links to the Course Table.

date DATE The date of attendance.

status ENUM ('Present', 'Absent', 'Late') Attendance status.

7.5 Course Table

This table stores course details to map students and subjects.

Column Name Data Type Description

course_id INT (Primary Key) Unique identifier for each course.

course_name VARCHAR(100) Name of the course.

teacher_id INT (Foreign Key) Links to the Teacher Table.

Relationships Between Tables

 The Student Table is linked to the Course Table via course_id.


 The Attendance Table is linked to both Student and Course Tables using student_id and course_id.
 The Course Table is linked to the Teacher Table using teacher_id.
 The Login Table differentiates between Admin, Teacher, and Student roles.

21
CHAPTER 8

PROJECT DESCRIPTION

8.1 Problem Definition

Managing student attendance manually in educational institutions is time-consuming, error-prone, and


inefficient. Teachers have to record, manage, and retrieve attendance data manually, which can lead to:

1. Errors – Manual entry mistakes.


2. Time Consumption – Paper-based records are slow.
3. Data Loss – Physical records can be lost or damaged.
4. Lack of Insights – No automated reports for attendance analysis.

Solution

To overcome these challenges, we develop a Student Online Attendance Management System using PHP
and MySQL. This system automates attendance tracking, stores data securely, and generates reports, making
the process faster, more reliable, and efficient.

8.2 Project Overview

The Student Online Attendance Management System is a web-based application that allows:

1. Teachers – To mark attendance and generate reports.


2. Students – To check their attendance records.
3. Admin – To manage users, courses, and system settings.

Features:

1. User Authentication – Secure login for Admin, Teachers, and Students.


2. Attendance Marking – Teachers can mark student attendance daily.
3. Database Management – Stores student records in MySQL.
4. Report Generation – Generates weekly, monthly, and yearly attendance reports.
5. Data Export – Attendance reports can be downloaded as PDF/Excel.

22
8.3 Module Description

The Student Online Attendance Management System consists of three key modules:

1. Admin Module – Manages users, courses, and attendance reports.


2. Teacher Module – Handles attendance marking and report generation.
3. Student Module – Allows students to view attendance records.

Each module plays a crucial role in ensuring an efficient and structured attendance management system.

Admin Module

The Admin Module is responsible for managing the entire system. It allows administrators to:

Key Features:

1.User Management – Add, edit, or remove students and teachers.


2.Course Management – Assign courses to students and teachers.
3.Attendance Reports – Generate reports for students' attendance.
4.System Monitoring – Check attendance trends and statistics.

Admin Dashboard Overview:

 Displays total students, total teachers, and attendance summary.


 Allows bulk student/course imports via CSV files.
 Provides export options (PDF, Excel) for reports.

Teacher Module

The Teacher Module is designed for instructors to mark and manage student attendance.

Key Features:

1. Mark Attendance – Teachers can mark attendance daily or for specific dates.
2. Update Attendance – Modify attendance records if necessary.
3. Generate Reports – View attendance summaries and generate reports.
4. Send Alerts – Notify students about low attendance.

Teacher Dashboard Overview:

 Displays assigned courses and student lists.


 Provides a calendar-based attendance marking system.
 Includes search filters to find specific students or reports.

23
Student Module

The Student Module allows students to track their attendance records in real-time.

Key Features:

1.View Attendance – Check attendance percentage for each subject.


2. Receive Notifications – Get alerts for low attendance warnings.
3. Download Reports – Export attendance data for personal records.

Student Dashboard Overview:

 Displays attendance percentage per subject.


 Shows alerts if attendance is below the required percentage.
 Allows feedback submission if attendance is incorrectly marked.

24
CHAPTER 9

SYSTEM TESTING

9.1 Introduction

System testing is the process of evaluating the complete system to ensure that it meets specified requirements.
It validates both functional and non-functional aspects of the application.

9.2 Testing Methodologies


9.2.1 System Testing

System testing ensures that the entire Student Online Attendance Management System functions correctly as a
whole. It includes:

 Functional Testing: Ensures that features like user authentication, attendance marking, and report
generation work as expected.
 Integration Testing: Checks that various modules (e.g., database, user interface, and backend)
communicate correctly.
 Regression Testing: Ensures that new changes do not break existing functionality.
 Security Testing: Validates that unauthorized access is prevented and user data is secure.

9.2.2 Performance Testing

Performance testing evaluates how the system behaves under different conditions:

 Load Testing: Measures system performance under normal and peak user loads.
 Stress Testing: Determines the system's stability under extreme conditions.
 Scalability Testing: Checks how well the system can handle an increasing number of users.
 Response Time Testing: Measures the time taken to process user requests and generate reports.

25
9.3 Test Cases Example

A test case is a structured set of inputs, execution steps, and expected results to verify system behavior.
Below is an example of key test cases:

Test Case
Test Scenario Test Steps Expected Output Actual Output Status
ID

User logs in
CS001 User Login Enter correct credentials User logged in Passed
successfully

Display error Error message


CS002 Invalid Login Enter wrong password Passed
message shown

Attendance Teacher marks student as Attendance


CS003 Status is updated Passed
Marking "Present" recorded

9.4 Bug Tracking & Fixing

During testing, issues are recorded and fixed based on priority:

Bug ID Issue Priority Status Fix Implemented

B001 Slow attendance report generation High Fixed Optimized database queries

B002 Incorrect password login not showing error Medium Fixed Added error message for failed login

B003 Student able to edit attendance High Fixed Restricted student permissions

26
CHAPTER 10
SYSTEM MAINTENANCE

10.1 Importance of Maintenance

System maintenance ensures the long-term reliability, security, and efficiency of the Student Online
Attendance Management System. It helps in fixing bugs, improving performance, and adapting to changing
requirements.

10.2 Types of Maintenance

10.2.1 Corrective Maintenance

 Fixing bugs and errors found in the system after deployment.


 Addressing issues reported by users.

10.2.2 Preventive Maintenance

 Regularly updating software to prevent potential future problems.


 Optimizing the database for better performance.

10.2.3 Adaptive Maintenance

 Modifying the system to accommodate new requirements or changes in technology.


 Integrating additional features based on user feedback.

10.2.4 Perfective Maintenance

 Enhancing system performance and usability.


 Improving the user interface and adding new functionalities.

27
10.3 Maintenance Procedures

 Regular System Updates: Keeping the software up to date with security patches and performance
improvements.
 User Feedback Implementation: Addressing concerns and suggestions from users to improve the
system.
 Backup and Recovery: Ensuring data integrity through regular backups and a proper disaster recovery
plan.
 Security Enhancements: Implementing new security measures to protect against cyber threats.

28
CHAPTER 11
CODING

11.1 Class

<?php

session_start();

$isIndex = 0;

if(!(array_key_exists('teacher_id',$_SESSION) && isset($_SESSION['teacher_id']))) {

session_destroy();

if(!$isIndex) header('Location: index.php');

?>

<?php include 'php/node_class.php'; ?>

<html>

<head>

<link rel="stylesheet" href="css/style.css"/>

<title>Edit Class</title>

<link rel="stylesheet" href="css/bootstrap.min.css">

<link rel="stylesheet" href="css/bootstrap-theme.min.css">

<script src="js/jquery.min.js"></script>

<script src="js/bootstrap.min.js"></script>

<script src="js/class.js"></script>

29
<style>.form-control{display:inline-block !important; width: 185px !important;
margin:5px !important;}.details{padding:5px 10px;margin-bottom:30px;border: 1px solid lightgrey;border-
top: none;}}</style>

</head>

<body>

<div id="header" class="clearfix">

<h1>Netaji Subhas Institute of Technology</h1>

<h3>Edit Class</h3>

</div>

<nav class="navbar navbar-default" id="sub-menu">

<div class="navbar-header">

<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-


navbar-collapse-1">

<span class="sr-only">Toggle navigation</span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

</button>

</div>

<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

<ul class="nav navbar-nav navbar-left">

<li><a href="teacher.php">Home</a></li>

<li><a href="profile.php">Profile</a></li>

<li class="active"><a href="class.php">Classes</a></li>

<li><a href="statistics.php">Statistics</a></li>

<li><a href="logout.php">Logout</a></li>

30
</ul>

</div>

</nav>

<div class="container">

<h2> You can edit details of your classes here. </h2>

<?php

$classes = $_SESSION['classes'];

$teacher_id = $_SESSION['teacher_id'];

if(!$classes) echo '<h4> You haven\'t taken any classes yet. </h4>';

else {

foreach($classes as $class_id) {

$n = new Node;

$node = $n->retrieveObjecti($class_id,$teacher_id) or die("No such record");

$code = $node->getCode();

$section = $node->getSection();

$year = $node->getYear();

$semester = $node->getSemester();

echo '<ul class="nav nav-tabs">

<li class="active"><a href="#"><strong>'.$code . ' ( '.$section.' ) ,


'.$year.'</strong></a></li>

</ul>';

echo '<div class="details" id="'.$class_id.'">';

echo 'Code : <input class="form-control" name="code" value="'.$code.'" placeholder="Enter


code , eg COE-123">';

31
echo 'Year : <input class="form-control" name="year" value="'.$year.'" placeholder="Enter
Year">';

echo 'Section : <input class="form-control" name="section" value="'.$section.'"


placeholder="Enter Section">';

echo 'Semester : <input class="form-control" name="semester" value="'.$semester.'"


placeholder="Enter Semester">';

echo '<button class="btn btn-success update">Update</button>';

echo '</div>';

?>

</div>

</body>

</html>

11.2 Index

<?php

session_start();

$isIndex = 1;

if(array_key_exists('teacher_id',$_SESSION) && isset($_SESSION['teacher_id'])) {

header('Location: teacher.php');

} else {

if(!$isIndex) header('Location: index.php');

?>

32
<!DOCTYPE html>

<html>

<head>

<link rel="stylesheet" href="css/style.css"/>

<title>Student Attendance</title>

<link rel="stylesheet" href="css/bootstrap.min.css">

<link rel="stylesheet" href="css/bootstrap-theme.min.css">

<script src="js/jquery.min.js"></script>

<script src="js/bootstrap.min.js"></script>

<script src="js/login.js"></script>

<!-- Custom styles for this template -->

<link href="navbar-fixed-top.css" rel="stylesheet">

</head>

<body>

<!-- Fixed navbar -->

<nav class="navbar navbar-inverse navbar-fixed-top">

<div class="container">

<div class="navbar-header">

<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-


target="#navbar" aria-expanded="false" aria-controls="navbar">

<span class="sr-only">Toggle navigation</span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

33
</button>

<a class="navbar-brand" href="index.php">Online Attendance</a>

</div>

<div id="navbar" class="navbar-collapse collapse">

<ul class="nav navbar-nav navbar-right">

<li class="active"><a href="#">Home</a></li>

<li><a href="#about">About</a></li>

<li><a href="#contact">Contact</a></li>

</ul>

</div><!--/.nav-collapse -->

</div>

</nav>

<div class="container">

<h2>For Students</h2>

<h4>Click here for <a href="student.php">Student Dashboard</a></h4>

<hr>

<h2>For Faculty</h2>

<div class="alert alert-warning hidden">

<span></span>

<button type="button" class="close" onclick="$('.alert').addClass('hidden');">&times;</button>

</div>

<table class="table table-bordered table-striped">

<thead>

<tr>

34
<th>Login</th>

<th>Sign Up</th>

</tr>

</thead>

<tbody>

<tr>

<td>

<form id="login">

<div class="form-group">

<label>Email ID</label>

<input class="form-control" placeholder="Email" type="email" name="email">

</div>

<div class="form-group">

<label>Password</label>

<input class="form-control" placeholder="Password" type="password"


name="password">

</div>

<button class="btn btn-primary pull-right">Login</button>

</form>

</td>

<td>

<form id="signup">

<div class="form-group">

<label>Name</label>

<input class="form-control" placeholder="Name" type="text" name="name">

35
</div>

<div class="form-group">

<label>Phone Number</label>

<input class="form-control" placeholder="Phone" type="text" name="phone">

</div>

<div class="form-group">

<label>Email ID</label>

<input class="form-control" placeholder="Email" type="email" name="email">

</div>

<div class="form-group">

<label>Password</label>

<input class="form-control" placeholder="Password" type="password"


name="password">

<span class="help-block">Password should be 6 characters long.</span>

</div>

<div class="form-group">

<label>Re-type Password</label>

<input class="form-control" placeholder="Re-type Password" type="password"


name="password2">

</div>

<button class="btn btn-primary pull-right">Sign Up</button>

</form>

</td>

</tr>

</tbody>

</table>

36
</div>

<!-- FOOTER -->

<footer style="background:; height:120%;">

<p class="pull-right"><a href="#">Back to top</a></p>

<p>&copy; 2017 ProjectWorlds, Inc. &middot; developed by <a


href="https://facebook.com/yugesh.verma.35">Yugesh Verma </a><a
href="http://projectworlds.in">Privacy</a> &middot; <a href="http://projectworlds.in">Terms</a></p>

</footer>

</div><!-- /.container -->

</body>

</html>

11.3 Logout

<?php

session_start();

session_destroy();

header('Location: index.php');

?>

37
11.4 Profile

<?php

session_start();

$isIndex = 0;

if(!(array_key_exists('teacher_id',$_SESSION) && isset($_SESSION['teacher_id']))) {

session_destroy();

if(!$isIndex) header('Location: index.php');

?>

<?php include 'php/node_class.php'; ?>

<html>

<head>

<link rel="stylesheet" href="css/style.css"/>

<title>Profile</title>

<link rel="stylesheet" href="css/bootstrap.min.css">

<link rel="stylesheet" href="css/bootstrap-theme.min.css">

<script src="js/jquery.min.js"></script>

<script src="js/bootstrap.min.js"></script>

<script src="js/profile.js"></script>

<!-- Custom styles for this template -->

<link href="navbar-fixed-top.css" rel="stylesheet">

</head>

<body>

<!-- Fixed navbar -->

38
<nav class="navbar navbar-inverse navbar-fixed-top">

<div class="container">

<div class="navbar-header">

<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-


target="#navbar" aria-expanded="false" aria-controls="navbar">

<span class="sr-only">Toggle navigation</span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

</button>

<a class="navbar-brand" href="index.php">Online Attendance</a>

</div>

<div id="navbar" class="navbar-collapse collapse">

<ul class="nav navbar-nav navbar-right">

<li><a href="teacher.php">Dashboard</a></li>

<li class="active"><a href="profile.php">Profile</a></li>

<li><a href="statistics.php">Statistics</a></li>

<li><a href="#about">About</a></li>

<li><a href="#contact">Contact</a></li>

<li><a href="logout.php">Logout</a></li>

</ul>

</div><!--/.nav-collapse -->

</div>

39
</nav></br></br></br></br>

<div class="container">

<?php

$name = $_SESSION['name'];

$phone = $_SESSION['phone'];

$email = $_SESSION['email'];

$classes = $_SESSION['classes'];

$teacher_id = $_SESSION['teacher_id'];

echo '<h2>Welcome , '.$name.'. Edit your profile here.</h2><br>';

?>

<div class="wrapper">

<dl class="dl-horizontal">

<dt>Name : </dt>

<dd>

<div class="input-group">

<span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>

<input class="form-control" name="name" placeholder="Enter your name" value="<?php echo


$name; ?>">

</div>

</dd>

<dt>Phone : </dt>

<dd>

<div class="input-group">

<span class="input-group-addon"><span class="glyphicon glyphicon-phone"></span></span>

40
<input class="form-control" name="phone" placeholder="Enter your phone" value="<?php echo
$phone; ?>">

</div>

</dd>

<dt>Email : </dt>

<dd>

<div class="input-group">

<span class="input-group-addon">@</span>

<input class="form-control" name="email" placeholder="Enter your email" value="<?php echo


$email; ?>">

</div>

</dd>

<dt>Classes : </dt>

<dd><?php echo $classes == 0? 0 : count($classes); ?></dd>

</dl>

<button class="btn btn-success update-profile">Save</button>

</div>

</div>

</body>

</html>

41
11.5 Session

<?php

session_start();

$isIndex = 0;

if(!(array_key_exists('teacher_id',$_SESSION) && isset($_SESSION['teacher_id']))) {

session_destroy();

if(!$isIndex) header('Location: index.php');

?>

<?php include 'php/node_class.php'; ?>

<html>

<head>

<link rel="stylesheet" href="css/style.css"/>

<title>Statistics</title>

<link rel="stylesheet" href="css/bootstrap.min.css">

<link rel="stylesheet" href="css/bootstrap-theme.min.css">

<script src="js/jquery.min.js"></script>

<script src="js/bootstrap.min.js"></script>

<script src="js/highcharts.js"></script>

<script src="js/highcharts-exporting.js"></script>

<script src="js/statistics.js"></script>

<!-- Custom styles for this template -->

<link href="navbar-fixed-top.css" rel="stylesheet">

</head>

42
<body>

<!-- Fixed navbar -->

<nav class="navbar navbar-inverse navbar-fixed-top">

<div class="container">

<div class="navbar-header">

<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-


target="#navbar" aria-expanded="false" aria-controls="navbar">

<span class="sr-only">Toggle navigation</span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

</button>

<a class="navbar-brand" href="index.php">Online Attendance</a>

</div>

<div id="navbar" class="navbar-collapse collapse">

<ul class="nav navbar-nav navbar-right">

<li><a href="teacher.php">Dashboard</a></li>

<li><a href="profile.php">Profile</a></li>

<li class="active"><a href="statistics.php">Statistics</a></li>

<li><a href="#about">About</a></li>

<li><a href="#contact">Contact</a></li>

<li><a href="logout.php">Logout</a></li>

</ul>

43
</div><!--/.nav-collapse -->

</div>

</nav></br></br></br></br>

<div class="container">

<div class="wrapper">

<?php

$classes = $_SESSION['classes'];

$teacher_id = $_SESSION['teacher_id'];

$n = new Node;

if($classes != 0) {

$data = array();

foreach($classes as $c) {

$node = $n->retrieveObjecti($c,$teacher_id) or die("No such record");

$key = $node->getCode().' ( '.$node->getSection().' ) ,'.$node->getYear();

$total_days = $node->getDays();

$data[$key] = array("total"=>$total_days,"average"=>0,"detained"=>0);

if($total_days) {

$detained = array();

$sum = 0;

$count = 0;

foreach($node->getRecords() as $roll => $rec) {

44
$sum += $rec['present'];

$count++;

if($rec['present']/$total_days < 0.5) $detained[$roll] =


(100*($rec['present']/$total_days));

$data[$key]['average'] = ($sum/($count));

$data[$key]['detained'] = $detained;

echo '<script> var data = '.json_encode($data).'; </script>';

echo '<ul class="nav nav-tabs">

<li class="active"><a href="#graph">Average Attendance</a></li>

<li><a href="#detained">Short Attendance</a></li>

</ul>

<div class="content">

<div id="graph">

</div>

<div id="detained">';

foreach($data as $class => $d) {

echo '<div class="classes">'.$class.' <span


class="badge">'.($d['detained']==0?0:count($d['detained'])).'</span> <div class="list">';

if($d['detained'] !=0)

foreach($d['detained'] as $roll => $percent) {

echo '<p>'.$roll.' ( '.$percent.' % )</p>';

echo '</div></div>';

45
}

echo '

</div>

</div>

';

else {

echo "<h3> You have no classes added yet </h3>";

?>

</div>

</div>

</body>

</html>

11.6 Student

<html>

<head>

<link rel="stylesheet" href="css/style.css"/>

<title>Student Attendance</title>

<link rel="stylesheet" href="css/bootstrap.min.css">

<link rel="stylesheet" href="css/bootstrap-theme.min.css">

<link rel="stylesheet" href="css/c3.css">

<script src="js/jquery.min.js"></script>

46
<script src="js/bootstrap.min.js"></script>

<script src="js/highcharts.js"></script>

<script src="js/highcharts-exporting.js"></script>

<script src="js/jquery.knob.js"></script>

<script src="js/student.js"></script>

<!-- Custom styles for this template -->

<link href="navbar-fixed-top.css" rel="stylesheet">

</head>

<body>

<!-- Fixed navbar -->

<nav class="navbar navbar-inverse navbar-fixed-top">

<div class="container">

<div class="navbar-header">

<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-


target="#navbar" aria-expanded="false" aria-controls="navbar">

<span class="sr-only">Toggle navigation</span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

</button>

<a class="navbar-brand" href="index.php">Online Attendance</a>

</div>

<div id="navbar" class="navbar-collapse collapse">

<ul class="nav navbar-nav navbar-right">

<li class="active"><a href="#">Home</a></li>

47
<li><a href="#about">About</a></li>

<li><a href="#contact">Contact</a></li>

</ul>

</div><!--/.nav-collapse -->

</div>

</nav></br></br></br></br></br></br></br></br></br>

<div class="container">

<div id="output"></div>

<form id="getAttendance">

<div class="form-group">

<label>Year of course</label>

<select name="year" class="form-control">

<?php foreach(range(date('Y',time()),1983) as $r) echo '<option>'.$r.'</option>'; ?>

</select>

</div>

<div class="form-group">

<label>Section</label>

<select name="section" class="form-control">

<option>1</option><option>2</option><option>3</option>

</select>

</div>

<div class="form-group">

<label>Subject Code of Course</label>

<input type="text" class="form-control" name="code" placeholder="Eg - COE-216">

48
<span class="help-block">DDD-NNN where D : Department , N : Number</span>

</div>

<div class="form-group">

<label>Roll Number</label>

<input type="text" class="form-control" name="roll" placeholder="Eg - 262/CO/12">

<span class="help-block">NNN/DD/YY where N : Number, D : Department , Y : Year</span>

</div>

<button class="btn btn-primary">Get Results</button>

</form>

</div>

</div><!-- /.container -->

<!-- FOOTER -->

<footer style="background:; height:;">

<p class="pull-right"><a href="#">Back to top</a></p>

<p>&copy; 2017 ProjectWorlds, Inc. &middot; developed by <a


href="https://facebook.com/yugesh.verma.35">Yugesh Verma </a><a
href="http://projectworlds.in">Privacy</a> &middot; <a href="http://projectworlds.in">Terms</a></p>

</footer>

</body>

</html>

49
11.7 Take

<?php

$isIndex = 0;

session_start();

if(!(array_key_exists('teacher_id',$_SESSION) && isset($_SESSION['teacher_id']))) {

session_destroy();

if(!$isIndex) header('Location: index.php');

?>

<?php include 'php/node_class.php'; ?>

<?php

/*

login -> session mai save hoga kuch , which will identify the teacher

addClass -> we will get a link , which will have cN as an identifier of the class

we use these to find the 'object' of this particular class

then we show the list of students , with their attendance and stuff

then we have javascript which will function on the buttons next to each student

then we have a save button

*/

$teacher_id = $_SESSION['teacher_id'];

$classes = $_SESSION['classes'];

$name = $_SESSION['name'];

if(!isset( $_GET['cN'] ) || empty( $_GET['cN'] )) {

50
die('<h1>Invalid Request</h1>');

$class_id = $_GET['cN'];

if(!in_array($class_id,$classes)) die( "No such record." );

// Assuming that we have validated and thrown errors if any , we proceed

// By finding the particular object we are talking about

// Connecting to the database

$classNode = new Node;

$node = $classNode->retrieveObjecti($class_id,$teacher_id) or die("No such record");

// Intimating the teacher about Number of Classes , and student list

// A foreach loop which will go on till all students are covered

$records = $node->getRecords();

?>

<html>

<head>

<link rel="stylesheet" href="css/style.css"/>

<title><?php echo $name. ' - '.$node->getCode(). ' ('.$node->getSection().') '.$node->getYear(); ?></title>

<link rel="stylesheet" href="css/bootstrap.min.css">

<link rel="stylesheet" href="css/bootstrap-theme.min.css">

<script src="js/jquery.min.js"></script>

<script src="js/bootstrap.min.js"></script>

<!-- Custom styles for this template -->

51
<link href="navbar-fixed-top.css" rel="stylesheet">

<script>

var numberOfDays = <?php echo $node->getDays(); ?>;

var class_id = <?php echo $class_id;?>;

var teacher_id = <?php echo $teacher_id; ?>;

</script>

<script src="js/take.js"></script>

</head>

<body>

<!-- Fixed navbar -->

<nav class="navbar navbar-inverse navbar-fixed-top">

<div class="container">

<div class="navbar-header">

<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-


target="#navbar" aria-expanded="false" aria-controls="navbar">

<span class="sr-only">Toggle navigation</span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

</button>

<a class="navbar-brand" href="index.php">Online Attendance</a>

</div>

<div id="navbar" class="navbar-collapse collapse">

<ul class="nav navbar-nav navbar-right">

<li><a href="teacher.php">Dashboard</a></li>

52
<li><a href="profile.php">Profile</a></li>

<li><a href="statistics.php">Statistics</a></li>

<li><a href="#about">About</a></li>

<li><a href="#contact">Contact</a></li>

<li><a href="logout.php">Logout</a></li>

</ul>

</div><!--/.nav-collapse -->

</div>

</nav></br></br></br></br>

<div class="container">

<?php

echo '<h1>Welcome , '.$name.'</h1>';

echo '<h3>Class : '.$node->getCode(). ' ('.$node->getSection().') '.$node->getYear().'</h3>';

echo '<h3>Number of Classes conducted : '.$node->getDays().'</h3>';

echo '<button class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-


sm">Help me!</button> <button id="submit" class="btn btn-success">Send</button>';

?>

<div id="studentRecords">

<?php

foreach($records as $roll => $data) {

echo '<div class="student-record">

53
<span class="roll"><a href="student.php?roll='.str_replace("/","-",$roll).'&code='.$node-
>getCode().'&year='.$node->getYear().'&section='.$node->getSection().'">'.$roll.'</a></span>:

<span class="present">'.$data['present'].'</span>'.

' <button class="marker btn">A</button> <button class="btn btn-danger delete-roll" data-


toggle="modal" data-target=".delete-warning">&times;</button>

</div>';

?>

</div>

<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-


labelledby="mySmallModalLabel" aria-hidden="true">

<div class="modal-dialog modal-sm">

<div class="modal-content">

<h2 class="text-center"> Instructions </h2>

<hr>

<ol class="text-left">

<li>Click on any student's roll number to see his/her records, attendance percentage etc.</li>

<li>The number next to any student shows the number of days he/she has attended your
class</li>

<li>Click the <button class="btn">A</button> button next to that roll number to mark that
student as present</li>

<li>Click the <button class="btn btn-success">P</button> button if you have accidentally


marked that student as present</li>

<li>Click the <button class="btn btn-danger">&times;</button> button to delete that roll


number (can't undo this action)</li>

<li>Click the <button class="btn btn-success">Send</button> button at top to save your


attendance details</li>

</ol>

54
</div>

</div>

</div>

<div class="modal fade delete-warning" tabindex="-1" role="dialog" aria-labelledby="delete-warning"


aria-hidden="true">

<div class="modal-dialog modal-sm">

<div class="modal-content">

<h2 class="text-center"> Do you really want to delete <span class="warning-


roll"></span> ?</h2>

<hr>

<div class="text-center">

<p>

Are you sure you want to delete <span class="warning-roll"></span> ? <br>

You can't undo this action.

</p>

<button class="btn btn-danger delete-rollnumber">Delete</button> <button class="btn btn-


primary" onclick="$('.delete-warning').modal('hide');">Cancel</button>

</div>

</div>

</div>

</div>

</div>

</body>

</html>

55
11.8 Teacher
<?php

session_start();

$isIndex = 0;

if(!(array_key_exists('teacher_id',$_SESSION) && isset($_SESSION['teacher_id']))) {

session_destroy();

if(!$isIndex) header('Location: index.php');

?>

<?php include 'php/node_class.php'; ?>

<html>

<head>

<link rel="stylesheet" href="css/style.css"/>

<title>Teacher Dashboard</title>

<link rel="stylesheet" href="css/bootstrap.min.css">

<link rel="stylesheet" href="css/bootstrap-theme.min.css">

<script src="js/jquery.min.js"></script>

<script src="js/bootstrap.min.js"></script>

<script src="js/teacher.js"></script>

<!-- Custom styles for this template -->

<link href="navbar-fixed-top.css" rel="stylesheet">

</head>

<body>

<!-- Fixed navbar -->

<nav class="navbar navbar-inverse navbar-fixed-top">

56
<div class="container">

<div class="navbar-header">

<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-


target="#navbar" aria-expanded="false" aria-controls="navbar">

<span class="sr-only">Toggle navigation</span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

</button>

<a class="navbar-brand" href="index.php">Online Attendance</a>

</div>

<div id="navbar" class="navbar-collapse collapse">

<ul class="nav navbar-nav navbar-right">

<li class="active"><a href="teacher.php">Dashboard</a></li>

<li><a href="profile.php">Profile</a></li>

<li><a href="statistics.php">Statistics</a></li>

<li><a href="#about">About</a></li>

<li><a href="#contact">Contact</a></li>

<li><a href="logout.php">Logout</a></li>

</ul>

</div><!--/.nav-collapse -->

</div>

</nav></br></br></br></br>

57
<div class="container">

<?php

$name = $_SESSION['name'];

$classes = $_SESSION['classes'];

$teacher_id = $_SESSION['teacher_id'];

echo '<h2>Welcome , '.$name.'.</h2>';

echo '<div class="wrapper">';

// FOR EACH CLASS , GET IT'S INFO AND PREPARE A LINK

$n = new Node;

if(!$classes) {

echo '<h3 class="no-classes">You haven\'t taken any class yet!</h3>';

} else {

echo '<h3 class="no-classes">Click on a class to take attendance.</h3>';

foreach($classes as $class_id) {

$node = $n->retrieveObjecti($class_id,$teacher_id) or die("No such record");

$code = $node->getCode();

$section = $node->getSection();

$year = $node->getYear();

$numClasses = $node->getDays();

$link = 'take.php?cN='.$class_id;

echo '<div class="class">

<button class="btn btn-danger delete-class-warning" data-toggle="modal" data-target=".delete-


warning">&times;</button>

58
<a class="no-decoration" href="'.$link.'">

<div><strong>Code</strong> : <span class="code">'.$code.'</span></div>

<div><strong>Section</strong> : <span class="section">'.$section.'</span></div>

<div><strong>Year</strong> : <span class="year">'.$year.'</span></div>

<div><strong>Classes</strong> : '.$numClasses.'</div>

</div></a>';

echo '<div class="class" data-toggle="modal" data-target=".bs-example-modal-lg" id="addClass">

<span class="glyphicon glyphicon-plus"></span>

</div>

</div>';

?>

</div>

<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="addClass"


aria-hidden="true">

<div class="modal-dialog modal-lg">

<div class="modal-content">

<h2 class="text-center"> Add Class </h2>

<hr>

<div id="add_class_form">

<select class="form-control" name="year">

<?php foreach(range(date('Y',time()),1983) as $r) echo '<option>'.$r.'</option>'; ?>

</select>

59
<input class="form-control" name="code" placeholder="Code , Eg : COE-322">

<select class="form-control" name="section">

<option value="-1">Choose Section</option>

<?php foreach(range(1,3) as $r) echo '<option>'.$r.'</option>'; ?>

</select>

<select class="form-control" name="semester">

<option value="-1">Choose Semester</option>

<?php foreach(range(1,8) as $r) echo '<option>'.$r.'</option>'; ?>

</select>

<input class="form-control" name="start" placeholder="Starting Roll Number (Eg.


201/CO/12)">

<input class="form-control" name="end" placeholder="Ending Roll Number (Eg.


265/CO/12)">

<button class="btn btn-primary" id="add">Add Class</button>

<button class="btn" id="cancel">Cancel</button>

</div>

</div>

</div>

</div>

<div class="modal fade delete-warning" tabindex="-1" role="dialog" aria-labelledby="delete-warning"


aria-hidden="true">

<div class="modal-dialog modal-sm">

<div class="modal-content">

<h2 class="text-center"> Do you really want to delete <br> <span class="warning-


class"></span> ?</h2>

<hr>

<div class="text-center">

60
<p>

Are you sure you want to delete <span class="warning-class"></span> ? <br>

You can't undo this action.

</p>

<button class="btn btn-danger delete-class-code">Delete</button> <button class="btn btn-


primary" onclick="$('.delete-warning').modal('hide');">Cancel</button>

</div>

</div>

</div>

</div>

</body>

</html>

61
CHAPTER 12

OUTPUT SCREEN OF THE PROJECT

12.1 Faculty login page

62
12.2 Dashboard

63
12.3 welcome page

12.4 Instructions Page

64
12.5 Attendance page

12.6 Record Saved Page

65
12.7 Profile page

12.7 Student page

66
12.8 Percentage page

67
12.9 Statistics Page

68
CHAPTER 13
CONCLUSION

The Student Online Attendance Management System has been designed to improve the traditional attendance
process by automating data entry, tracking, and reporting. The system ensures accuracy, efficiency, and
security, addressing the challenges of manual record-keeping.

Throughout the project, different modules were developed to cater to the needs of administrators, teachers,
and students. The Admin Module manages user accounts, courses, and reports. The Teacher Module enables
attendance marking and report generation, while the Student Module allows students to check their attendance
records. By integrating PHP and MySQL, the system ensures fast data processing and secure storage.

One of the key advantages of this system is its user-friendly interface and automation features, which reduce
errors and save time. The inclusion of role-based authentication enhances data security by restricting access to
sensitive information. Additionally, the report generation feature allows administrators to analyze attendance
trends and take necessary actions for improvement.

Despite its success, certain challenges were encountered, such as database optimization for large-scale
attendance records and securing user authentication. These challenges were addressed by implementing
optimized queries, encrypted passwords, and access control measures.

In the future, the system can be further enhanced by integrating mobile applications, AI-based face
recognition for attendance marking, and automated notifications via SMS or email. These improvements will
make the system even more flexible, scalable, and efficient for educational institutions.

Overall, this project has successfully streamlined attendance management, reducing administrative workload
and improving transparency in educational environments. With continuous upgrades, it can evolve into a
comprehensive attendance monitoring solution that benefits both educators and students.

69
BIBLIOGRAPHY

For PHP

 https://www.w3schools.com/php/default.asp
 https://www.sitepoint.com/php/
 https://www.php.net/

For MySQL

 https://www.mysql.com/
 http://www.mysqltutorial.org

For XAMPP

 https://www.apachefriends.org/download.html

70

You might also like