Addbafba
Addbafba
Y 2022-23
Employability Skills Development
Project Report
(STUDENT ATTENDANCE
MANAGEMENT SYSTEM)
40_CSE_Shreyas
41_CSE_Sharez shaikh
42_CSE_Sumit sharma
43_CSE_Harshvardhan shinge
INDEX
1. Abstract 3
2. Introduction 4
3. Background 5-7
5. Conclusion 11
6. Future Scope 11
7. References 12
8. Annexure 13-18
Abstract
Student attendance management is a critical aspect of educational institutions, as it directly
affects student academic performance and engagement. In recent years, there has been a
growing need for efficient and automated attendance management systems to streamline
attendance tracking and reduce manual errors. In response to this, student attendance
management systems have emerged as a valuable solution for tracking and managing
attendance. Student attendance management systems use various technologies, including
RFID, biometric scanners, and mobile devices, to record attendance data. The system provides
real-time attendance data to teachers and administrators, allowing them to monitor and
analyze student attendance patterns. The software can generate detailed reports on attendance,
absenteeism, and tardiness, providing valuable insights into student behavior and attendance
patterns. This information can be used to identify patterns and trends in attendance, and to
take appropriate measures to improve attendance rates. The benefits of student attendance
management systems are numerous. They can help to reduce absenteeism and tardiness by
providing students with regular reminders to attend classes. They can also improve student
engagement by providing regular feedback on attendance and performance. Additionally, they
can help to improve academic performance by providing teachers with real-time data on
student attendance and behavior. Furthermore, student attendance management systems can be
customized to suit the needs of different educational institutions, including schools, colleges,
and universities. For example, some systems can be integrated with existing student
information systems to provide a comprehensive view of student attendance and academic
performance. Others may offer additional features such as automated messaging and
notifications, which can help to keep parents and guardians informed about their child's
attendance. Despite the numerous benefits of student attendance management systems, some
concerns have been raised about their effectiveness. Critics argue that these systems may be
too intrusive, and that they may not accurately reflect student attendance and behavior.
However, these concerns can be addressed through careful implementation and monitoring of
the system.
Introduction:
After clicking on the submit button, the record will be added to the
database. The user will also have 4 more options. Delete record, View Record,
Delete the record from the database and the Reset Field button. The reset field will
be able to update our table. So any of the 4 functionalities will be performed, the
user will get notified for the specific task performed.
Background:
1. Python
Python is a high-level, general-purpose programming language. Its
design philosophy emphasizes code readability with the use of significant
indentation via the off-side rule. Python is dynamically typed and garbage-
collected. It supports multiple programming paradigms, including structured
(particularly procedural), object-oriented and functional programming. It is
often described as a "batteries included" language due to its comprehensive
standard library. Guido van Rossum began working on Python in the late
1980s as a successor to the ABC programming language and first released it
in
1991 as Python 0.9.0. Python 2.0 was released in 2000. Python 3.0, released
in 2008, was a major revision not completely backward- compatible with earlier
versions. Python 2.7.18, released in 2020, was the last
release of Python Python consistently ranks as one of the most
popular programming languages. Few strong features of Python
are:
• It supports functional and structured programming methods as well as OOP.
• It can be used as a scripting language or can be compiled to byte-code for
building large applications.
• It provides very high-level dynamic data types and supports dynamic type
checking.
• It supports automatic garbage collection.
• It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java.
2. Flask
Flask is a popular web framework for Python developers who want to quickly
build web applications with minimal overhead. Flask is known for its
simplicity, flexibility, and ease of use. With Flask, developers can easily map
URLs to specific functions in their application, create dynamic HTML pages
using the Jinja2 templating engine, and integrate a wide variety of extensions
to add functionality such as user authentication, database integration, and
more.
One of the key advantages of Flask is its lightweight design. Unlike some other
web frameworks, Flask is designed to be minimalistic and easy to use, which
makes it a popular choice for building small to medium-sized web applications,
RESTful APIs, and microservices. Flask is particularly well-suited for
prototyping and building proof-of-concept applications quickly, allowing
developers to focus on building their application logic without getting bogged
down in boilerplate code.
Overall, Flask is a powerful and flexible web framework that is well-suited for
building a wide variety of web applications.
3. SQL
SQL is a database computer language designed for the retrieval and
management of data in a relational databases like MySQL, MS Access, SQL
Server, MS Access, Oracle, Sybase, Informix, Postgres etc. SQL stands for
Structured Query Language. SQL was developed in the 1970s by IBM
Computer Scientists. SQL is not a database management system, but it is a
query language which is used to store and retrieve the data from a database or
in simple words SQL is a language that communicates with databases. SQL is
the most common language used almost in every application software
including banking, finance, education, security etc. to store and manipulate
data. SQL is fairly easy to learn, so if you are starting to learn any
programming language then it is very much advised that you should also learn
SQL and other Database related concepts to become a complete Software
Programmer.
SQL is one of the most widely used Query Language over the databases. SQL prov
System Description:
Results and Discussions:
The code sets up a simple web application that allows users to manage a list of
students and their attendance records. The user interface includes a table of all
students that is initially populated with sample data, as well as a form for
creating or editing individual students.
Conclusion:
The project is a well-designed and functional students attendance
management system that effectively manages students records. With its intuitive user
interface and database connectivity, it streamlines administrative tasks and makes it
easier to track students attendance. Overall, the project provides a robust and efficient
solution for managing student attendance and should prove to be a valuable tool for
institutions. Students attendance management systems make institution jobs more
accessible by giving them an easy place to find and sort information.
Future Scope:
In our system of Student Attendance Management, we have added basic
functionalities like taking Student details such as name, student id, email, phone
number, gender. After submitting these records, one can view it, delete it, reset the
fields or delete the database. In the future we can add several things in our system
such as students grade, attendance, schedules, etc as per requirements. Also, we
could add the students details, their timetables and many more. Improved
communication between students and staff, and also feedback or suggestions or
grievances if any.
References:
• https://www.softwaresuggest.com/attendance-management
• https://clockify.me/time-attendance-management-system
• https://www-monitask-com.webpkgcache.com/doc//s/www.monitask.com/en/home/
track-employee-attendance
Annexure (code)
MY SQL CODE:-
CREATE TABLE Students (
student_id VARCHAR(10) PRIMARY KEY,
name VARCHAR(50),
email VARCHAR(50),
phone_number VARCHAR(20),
gender VARCHAR(10)
);
CREATE TABLE Attendance (
attendance_id VARCHAR(10) PRIMARY KEY,
student_id VARCHAR(10),
date DATE,
status VARCHAR(10),
note VARCHAR(255),
FOREIGN KEY (student_id) REFERENCES Students(student_id)
);
INSERT INTO Students (student_id, name, email, phone_number, gender)
VALUES
('ST001', 'Umed Alshi', '[email protected]', '555-1234', 'Male'),
('ST002', 'Rahul Chauhan', '[email protected]', '555-5678', 'Male'),
('ST003', 'Nidhi Davane', '[email protected]', '555-9012', 'Female');
-- Insert data into Attendance table
INSERT INTO Attendance (attendance_id, student_id, date, status, note)
VALUES
('ATT001', 'ST001', '2023-03-01', 'Present', NULL),
('ATT002', 'ST002', '2023-03-01', 'Absent', 'Sick'),
('ATT003', 'ST003', '2023-03-01', 'Present', NULL),
('ATT004', 'ST001', '2023-03-02', 'Present', NULL),
('ATT005', 'ST002', '2023-03-02', 'Present', NULL),
('ATT006', 'ST003', '2023-03-02', 'Late', 'Traffic');
-- Display student attendance data
SELECT
Students.student_id,
Students.name,
Attendance.date,
Attendance.status,
Attendance.note
FROM
Students
JOIN Attendance ON Students.student_id = Attendance.student_id
ORDER BY
Attendance.date ASC,
Students.name ASC;
OUTPUT:
Python:-
from flask import Flask,request,jsonify,make_response
from flask_restful import Resource,Api
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///student.db'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
# sqlalchemy instace
db = SQLAlchemy(app)
# API instance
api = Api(app)
app.app_context().push()
class Student(db.Model):
id = db.Column(db.Integer,primary_key=True)
name = db.Column(db.String(80),nullable=False)
email = db.Column(db.String(90),nullable=False)
phone_no= db.Column(db.String(90),nullable=False)
gender = db.Column(db.String(80),nullable=False)
def _repr_(self):
return f"{self.name}-{self.email}-{self.phone_no}-
{self.gender}"
# For POST
class AddData(Resource):
def post(self):
if request.is_json:
stu = Student(name=request.json['name'],
email=request.json['email'],
phone_no=request.json['phone_no'],
gender=request.json['gender'])
db.session.add(stu)
db.session.commit()
# return a json response
return make_response(jsonify({'id': stu.id, 'name':
stu.name, 'email': stu.email,
'phone_no': stu.phone_no,
'gender': stu.gender}), 201)
else:
return {'error': 'Request must be JSON'}, 400
class UpdateData(Resource):
def put(self,id):
if request.is_json:
stu = Student.query.get(id)
if stu is None:
return {'error':'not found '},404
else:
stu.name=request.json['Name']
stu.email = request.json['Email']
stu.phone_no = request.json['PhoneNo']
stu.gender = request.json['Gender']
db.session.commit()
return "Updated",200
else:
return {'error':"Request must be JSON"},400
class DeleteData(Resource):
def delete(selfself,id):
stu = Student.query.get(id)
if stu is None:
return {"error":'not found'},404
db.session.delete(stu)
db.session.commit()
return f'{id} is deleted '
api.add_resource(Getdata,'/')
api.add_resource(AddData,'/add')
api.add_resource(UpdateData,'/update/<int:id>')
api.add_resource(DeleteData,'/delete/<int:id>')
app.run(debug=True)
OUTPUT:
Testing the API with Postman and performing CURD operation
• Now that we have our Flask app, let's test it with Postman. Open up Postman and
create a new request with the following details:
Method: GET
URL: http://127.0.0.1:5000/students
JSON response with all the students.
• Now let's try getting a single student. Create a new request with the following details:
Method: GET
URL: http://127.0.0.1:5000/students/1
JSON response with the student that has an ID of 1.
• Next, let's try creating a new student. Create a new request with the following details:
Method: POST
URL: http://127.0.0.1:5000/students
Body: raw JSON (application/json)
{"name": "Zofar Azmi", "attendance": 0}
JSON response with the new student that was created.
• To update a student, create a new request with the following details:
Method: PUT
URL:
Body: raw JSON (application/json)
{"name": "Umed Alshi", "attendance": 1}
In this example, we're updating the student with an ID of 1 and
changing their name to "Umed Alshi" and setting their attendance to 1.
JSON response with the updated student.
• To delete a student, create a new request with the following details:
Method: DELETE
URL: http://127.0.0.1:5000/students/4
In this example, we're deleting the student with an ID of 4.
JSON response with the deleted student. If you try to get this student
again by their ID, you should get an error response indicating that the student
was not found.
JAVASCRIPT:
function getAllStudents() {
fetch('http://example.com/api/students')
.then(response => response.json())
.then(data => {
//display data in a table
let table = document.getElementById('studentsTable');
table.innerHTML = '';
let headerRow = table.insertRow();
let idHeader = headerRow.insertCell(0);
let nameHeader = headerRow.insertCell(1);
let attendanceHeader = headerRow.insertCell(2);
idHeader.innerHTML = 'ID';
nameHeader.innerHTML = 'Name';
attendanceHeader.innerHTML = 'Attendance';
data.forEach(student => {
let row = table.insertRow();
let idCell = row.insertCell(0);
let nameCell = row.insertCell(1);
let attendanceCell = row.insertCell(2);
idCell.innerHTML = student.id;
nameCell.innerHTML = student.name;
attendanceCell.HTML = student.attendance;
});
})
.catch(error => console.error(error));
}
HTML:
<html>
<body>
<h1>Student Attendance Management System</h1>
<h2>All Students</h2>
<table id="studentsTable">
<thread>
<tr>
<th>ID</th>
<th>Name</th>
<th>Attendance</th>
<th>Action</th>
</tr>
</thread>
<tbody>
<tr data-id="1">
<td>1</td>
<td>John Doe</td>
<td>Present</td>
<td>
<button onclick="getStudent(1)">Edit</button>
<button onclick="deleteStudent(1)">Delete</button>
</td>
</tr>
<tr data-id="2">
<td>2</td>
<td>Jane Smith</td>
<td>Absent</td>
<td>
<button onclick="getStudent(2)">Edit</button>
<button onclick="deleteStudent(2)">Delete</button>
</td>
</tr>
</tbody>
</table>
<h2>Edit Student</h2>
<form id="studentForm" onsubmit="return false;">
<input type="hidden" name="id">
<label for="name">Name:</label>
<input type="text" name="name" required>
<label for="attendance">Attendance:</label>
<select name="attendance" required>
<option value="Present">Present</option>
<option value="Absent">Absent</option>
<option value="Late">Late</option>
</select>
<button onclick="createStudent(form.elements.name.value,
form.elements.attendance.value)">Create</button>
<button onclick="updateStudent(form.elements.id.value,
form.elements.name.value,
form.elements.attendance.value)">Update</button>
<button onclick="getAllStudents()">Cancel</button>
</form>
<script src="p1.js"></script>
</body>
</html>
This code includes buttons for creating, updating, and deleting students that call the
corresponding JavaScript functions using onclick event listeners. It also includes a
form for editing individual students that is populated by the getStudent() function and
can be used to create or update a student using the createStudent() or updateStudent()
functions. Finally, it includes a table of all students that is populated by the
getAllStudents() function.