Professional Documents
Culture Documents
ABHI FINAL DOC
ABHI FINAL DOC
ABHI FINAL DOC
PROJECT REPORT
ON
"COLLEGE MANAGEMENT SYSTEM"
Submitted in partial fulfillment of the
Requirements for the Award of the Under Graduate
BACHELORS OF COMPUTER APPLICATIONS
In
INFORMATICS
BY
DAMARAPELLY ABHISHEK REDDY
[HALL TICKET NO.112121861-011]
Under the guidance of
MRS. V.SWAPNA
Faculty in Informatics
Department of Informatics
(2021 -2024)
DHRUVA DEGREE COLLEGE
(Affiliated to OSMANIA UNIVERSITY)
I.S SADAN, VINAY NAGAR COLONY, SANTOSH NAGAR
HYDERABAD-500059
DECLARATION
DATE: 04/05/2024
PLACE: DHRUVA DEGREE COLLEGE
Finally, I thank all my faculty members, classmates and who have helped me in making
this project.
1. Abstract 1-2
2. Synopsis 3-10
2.1Proposed system
2.2Software requirement
2.3Hardware requirement
3. Feasibilityreport 11-14
3.1Technical feasibility
3.2Functional feasibility
3.3Operational feasibility
3.4Economical feasibility
3.5 Feasibility study
3.6 Technical feasibility
3.7 financial feasibility
4. Analysisreport 15-20
4.1 SRS document
4.2 document conventions
4.3 Data base design
4.4 Role of sql lite 3 in database
4.4 Introduction to sql lite 3
4.5 Serverless
4.6 Introduction to SQLite in Python
5. Client server requirements 21-25
5.1 Client server
5.2 Front end or user interface design
6. Django &html technologies 26-40
6.1django framework
6.2 Javascript
6.3 Hyper text markup language
6.4Database tables
7. Design document 41-55
7.1 Design document
7.2 Data flow diagrams
7.3 ER-diagrams
7.4 Unified modeling language
7.5 Uml diagrams
8. Coding 56-66
8.1 program design language
9. Testing and debugging technologies 67-72
9.1Testing
9.2 Types of testing
9.3 unit testing
9.4.link testing
10. Conclusions and recommendations 73-74
11.Bibliography 75
AB ST R AC T
1
Abstract
2
PROJECT SYNOPSIS
3
Synopsis
4
Teachers can manage marks for their classes, enter marks for different
assessments, and view detailed mark reports.
Marks Editing:
Teachers can edit marks for assessments and confirm the changes.
Admin Dashboard:
Admin users have access to additional functionalities, such as managing
users, classes, and assignments.
Admins can view and edit attendance, marks, and other relevant data.
User Interaction:
Users can navigate through the system using interactive interfaces, including
forms and tables.
The system provides feedback to users upon successful actions and handles
errors gracefully.
Overall, the Django project serves as a comprehensive platform for
managing student and teacher-related tasks within an educational institution.
It streamlines processes such as attendance tracking, marks management,
and timetable scheduling, enhancing efficiency and orga
5
Proposed system
6
Integrate data analytics tools to generate comprehensive reports on
attendance, marks, student performance, and class participation.
Provide visualizations such as charts and graphs to visualize trends and
patterns in academic data.
Personalized Learning Experience:
Implement features for personalized learning paths and recommendations
based on individual student performance and preferences.
Introduce adaptive learning modules that adjust difficulty levels based on
student progress and proficiency.
Integrated Learning Resources:
Integrate digital learning resources such as e-books, videos, quizzes, and
interactive simulations directly into the platform.
Provide a centralized repository for course materials, lecture notes, and
assignments accessible to students and teachers.
Seamless Integration with External Systems:
Enable seamless integration with external systems such as learning
management systems (LMS), student information systems (SIS), and third-
party educational tools.
Ensure compatibility and interoperability with industry-standard protocols
and APIs for data exchange.
Scalability and Performance Optimization:
Design the system architecture for scalability and high performance to
accommodate growing user bases and increasing data volumes.
Implement caching mechanisms, load balancing, and database optimization
techniques to ensure optimal system performance.
User Feedback and Continuous Improvement:
Incorporate mechanisms for collecting user feedback and suggestions for
system improvements.
7
Regularly update the system based on user feedback, technology
advancements, and changing educational requirements to ensure ongoing
relevance and effectiveness.The proposed system aims to enhance the
existing educational management platform by introducing several new
features and improvements to streamline processes and improve user
experience. Here are some proposed enhancements:
8
Integrate data analytics tools to generate comprehensive reports on
attendance, marks, student performance, and class participation.
Provide visualizations such as charts and graphs to visualize trends and
patterns in academic data.
Personalized Learning Experience:
Implement features for personalized learning paths and recommendations
based on individual student performance and preferences.
Introduce adaptive learning modules that adjust difficulty levels based on
student progress and proficiency.
Integrated Learning Resources:
Integrate digital learning resources such as e-books, videos, quizzes, and
interactive simulations directly into the platform.
Provide a centralized repository for course materials, lecture notes, and
assignments accessible to students and teachers.
Seamless Integration with External Systems:
Enable seamless integration with external systems such as learning
management systems (LMS), student information systems (SIS), and third-
party educational tools.
Ensure compatibility and interoperability with industry-standard protocols
and APIs for data exchange.
Scalability and Performance Optimization:
Design the system architecture for scalability and high performance to
accommodate growing user bases and increasing data volumes.
Implement caching mechanisms, load balancing, and database optimization
techniques to ensure optimal system performance.
User Feedback and Continuous Improvement:
Incorporate mechanisms for collecting user feedback and suggestions for
system improvements.Regularly update the system based on user feedback,
9
technology advancements, and changing educational requirements to ensure
ongoing relevance and effectiveness.
SYSTEM REQUIREMENTS
SOFTWARE REQUIREMENTS
HARDWARE REQUIREMENTS
10
FEASIBILITY REPORT
11
Feasibility Report
1. Technical Feasibility:
Technology Stack: The code utilizes Django, a mature and widely adopted
Python web framework known for its robustness and scalability.
2. Functional Feasibility:
User Registration: Users can register with the system, specifying their user
type (client or tutor), and their details are stored securely in the database.
12
3. Operational Feasibility:
Ease of Use: The system's intuitive interface simplifies the login and
registration processes for users, requiring minimal technical expertise.
4. Economic Feasibility:
13
Feasibility Study
Technical feasibility:
The system is self-explanatory and does not need any extra sophisticated
training. As the system has been built by concentrating on the Graphical
User Interface Concepts, the application can also be handled very easily
with a novice User. The overall time that is required to train the users upon
the system is less than half an hour.
Financial Feasibility
ii) Cost Based: No special investment need to manage the tool. No specific
training is required for employees to use the tool. Investment requires only
once at the time of installation. The software used in this project is freeware
so the cost of developing the tool is minimal and hence the overall cost.
14
ANALYSIS
REPORT
15
SRS Document
Document Conventions:
The ov er all docum ents fo r this p roje ct use the r ecogn ized
mod eling st andards at th e softw are indus tri es leve l.
16
• Th e Ph ys ical d isp ens e , whi ch sta te th e ove rall data
s earc h for th e r ela tional k e y wh er eas a t ransa ctio n is
i mp le me nt ed o n t h e wear e n titi es.
Database design
Database Tables: The total number of database tables that were identified
to build the system is 5. The major part of the
Database is categorized as
17
Role of SQLite3 in Database
Introduction To SQLite3
Serverless
18
server use TCP/IP protocol to send and receive requests. This is called
client/server architecture.
1. Serverless
2. Self-Contained
3. Zero-Configuration
4. Transactional
5. Single-Database
19
Understanding of SQLite Module Working in Python
20
CLIENT SERVER
TECHNOLOGIES
21
Client Server
Over view:
With the varied topic in existence in the fields of computers, Client Server is
one, which has generated more heat than light, and also more hype than
reality. This technology has acquired a certain critical mass attention with its
dedication conferences and magazines. Major computer vendors such as
IBM and DEC, have declared that Client Servers is their main future market.
A survey of DBMS magazine reveled that 76% of its readers were actively
looking at the client server solution. The growth in the client server
development tools from $200 million in 1992 to more than $1.2 billion in
1996.
The key client server idea is that client as user is essentially insulated from
the physical location and formats of the data needs for their application.
With the proper middleware, a client input from or report can transparently
access and manipulate both local database on the client machine and remote
22
databases on one or more servers. An added bonus is the client server opens
the door to multi-vendor database access indulging heterogeneous table
joins.
Two prominent systems in existence are client server and file server
systems. It is essential to distinguish between client servers and file server
systems. Both provide shared network access to data but the comparison
dens there! The file server simply provides a remote disk drive that can be
accessed by LAN applications on a file by file basis. The client server offers
full relational database services such as SQL-Access, Record modifying,
Insert, Delete with full relational integrity backup/ restore performance for
high volume of transactions, etc. the client server middleware provides a
flexible interface between client and server, who does what, when and to
whom.
Client server has evolved to solve a problem that has been around since the
earliest days of computing: how best to distribute your computing, data
generation and data storage resources in order to obtain efficient, cost
effective departmental an enterprise wide data processing. During
mainframe era choices were quite limited. A central machine housed both
the CPU and DATA (cards, tapes, drums and later disks). Access to these
resources was initially confined to batched runs that produced departmental
reports at the appropriate intervals. A strong central information service
department ruled the corporation. The role of the rest of the corporation
limited to requesting new or more frequent reports and to provide hand
written forms from which the central data banks were created and updated.
23
The earliest client server solutions therefore could best be characterized as
“SLAVE-MASTER”.
Time-sharing changed the picture. Remote terminal could view and even
change the central data, subject to access permissions. And, as the central
data banks evolved in to sophisticated relational database with non-
programmer query languages, online users could formulate adhoc queries
and produce local reports with out adding to the MIS applications software
backlog. However remote access was through dumb terminals, and the client
server remained subordinate to the Slave\Master.
About Python
back-end services, that is, the logic and processes behind the website’s front-
end pages. Python modules send data back and forth between the database
and the application’s webpages. Python code validates the data entered by
the users and transforms it for storage. It also managing the security of the
application to ensure that only authorized users access and update data.
25
DJNAGO
&
HTML TECHNOLOGIES
26
Django Framework
Introduction
27
• Knowledge about HTML, CSS, JavaScript are very important. As they
are the building block of Web development.
• Knowledge about Data Structures like Tuple and List are important.
JAVASCRIPT
JavaScript is a script-based programming language that was developed by
Netscape Communication Corporation. JavaScript was originally called Live
Script and renamed as JavaScript to indicate its relationship with Java.
JavaScript supports the development of both client and server components
of Web-based applications. On the client side, it can be used to write
programs that are executed by a Web browser within the context of a Web
page. On the server side, it can be used to write Web server programs that
can process information submitted by a Web browser and then updates the
browser’s display accordingly
Even though JavaScript supports both client and server Web programming,
we prefer JavaScript at Client side programming since most of the browsers
supports it. JavaScript is almost as easy to learn as HTML, and JavaScript
statements can be included in HTML documents by enclosing the statements
between a pair of scripting tags
<SCRIPTS>..</SCRIPT>.
JavaScript statements
</SCRIPT>
Here are a few things we can do with JavaScript :
28
➢ Validate the contents of a form and make calculations.
➢ Add scrolling or changing messages to the Browser’s status line.
➢ Animate images or rotate images that change when we move the mouse
over them.
➢ Detect the browser in use and display different content for different
browsers.
➢ Detect installed plug-ins and notify the user if a plug-in is required.
We can do much more with JavaScript, including creating entire application.
30
<TD>…</TD> Indicates table data in a
table
<TR>…</TR> Designates a table row
<TH>…</TH> Creates a heading in a table
ADVANTAGES
➢ A HTML document is small and hence easy to send over the net. It is
Purpose
The generated application is the first version upon the system. The overall
system is planned to be in the formal of distributed architecture with
homogeneous database platform. The major objective of the overall system
is to keep the following components intact.
Database Tables:
create_attendance: This table holds the information of create_attendance.
Course: This table holds the information of Course.
Class: THis table holds the information of Class.
31
from django.db import models
import math
from django.core.validators import MinValueValidator, MaxValueValidator
from django.contrib.auth.models import AbstractUser
from django.db.models.signals import post_save, post_delete
from datetime import timedelta
time_slots = (
('7:30 - 8:30', '7:30 - 8:30'),
('8:30 - 9:30', '8:30 - 9:30'),
('9:30 - 10:30', '9:30 - 10:30'),
('11:00 - 11:50', '11:00 - 11:50'),
('11:50 - 12:40', '11:50 - 12:40'),
('12:40 - 1:30', '12:40 - 1:30'),
('2:30 - 3:30', '2:30 - 3:30'),
('3:30 - 4:30', '3:30 - 4:30'),
('4:30 - 5:30', '4:30 - 5:30'),
)
DAYS_OF_WEEK = (
('Monday', 'Monday'),
('Tuesday', 'Tuesday'),
('Wednesday', 'Wednesday'),
('Thursday', 'Thursday'),
('Friday', 'Friday'),
('Saturday', 'Saturday'),
)
test_name = (
('Prelim Exam', 'Prelim Exam'),
('Midterm Exam', 'Midterm Exam'),
('EndTerm Exam', 'EndTerm Exam'),
('Short Quiz', 'Short Quiz'),
('Long Quiz', 'Long Quiz'),
('Weekly Test', 'Weekly Test'),
)
32
class User(AbstractUser):
@property
def is_student(self):
if hasattr(self, 'student'):
return True
return False
@property
def is_teacher(self):
if hasattr(self, 'teacher'):
return True
return False
class Dept(models.Model):
id = models.CharField(primary_key='True', max_length=100)
name = models.CharField(max_length=200)
def __str__(self):
return self.name
class Course(models.Model):
dept = models.ForeignKey(Dept, on_delete=models.CASCADE)
id = models.CharField(primary_key='True', max_length=50)
name = models.CharField(max_length=50)
shortname = models.CharField(max_length=50, default='X')
def __str__(self):
return self.name
class Class(models.Model):
# courses = models.ManyToManyField(Course, default=1)
id = models.CharField(primary_key='True', max_length=100)
dept = models.ForeignKey(Dept, on_delete=models.CASCADE)
section = models.CharField(max_length=100)
sem = models.IntegerField()
class Meta:
verbose_name_plural = 'classes'
def __str__(self):
d = Dept.objects.get(name=self.dept)
33
return '%s : %d %s' % (d.name, self.sem, self.section)
class Student(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE,
null=True)
class_id = models.ForeignKey(Class, on_delete=models.CASCADE,
default=1)
USN = models.CharField(primary_key='True', max_length=100)
name = models.CharField(max_length=200)
sex = models.CharField(max_length=50, choices=sex_choice,
default='Male')
DOB = models.DateField(default='1998-01-01')
def __str__(self):
return self.name
class Teacher(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE,
null=True)
id = models.CharField(primary_key=True, max_length=100)
dept = models.ForeignKey(Dept, on_delete=models.CASCADE,
default=1)
name = models.CharField(max_length=100)
sex = models.CharField(max_length=50, choices=sex_choice,
default='Male')
DOB = models.DateField(default='1980-01-01')
def __str__(self):
return self.name
class Assign(models.Model):
class_id = models.ForeignKey(Class, on_delete=models.CASCADE)
course = models.ForeignKey(Course, on_delete=models.CASCADE)
teacher = models.ForeignKey(Teacher, on_delete=models.CASCADE)
class Meta:
unique_together = (('course', 'class_id', 'teacher'),)
def __str__(self):
cl = Class.objects.get(id=self.class_id_id)
cr = Course.objects.get(id=self.course_id)
34
te = Teacher.objects.get(id=self.teacher_id)
return '%s : %s : %s' % (te.name, cr.shortname, cl)
class AssignTime(models.Model):
assign = models.ForeignKey(Assign, on_delete=models.CASCADE)
period = models.CharField(max_length=50, choices=time_slots,
default='11:00 - 11:50')
day = models.CharField(max_length=15, choices=DAYS_OF_WEEK)
class AttendanceClass(models.Model):
assign = models.ForeignKey(Assign, on_delete=models.CASCADE)
date = models.DateField()
status = models.IntegerField(default=0)
class Meta:
verbose_name = 'Attendance'
verbose_name_plural = 'Attendance'
class Attendance(models.Model):
course = models.ForeignKey(Course, on_delete=models.CASCADE)
student = models.ForeignKey(Student, on_delete=models.CASCADE)
attendanceclass = models.ForeignKey(AttendanceClass,
on_delete=models.CASCADE, default=1)
date = models.DateField(default='2018-10-23')
status = models.BooleanField(default='True')
def __str__(self):
sname = Student.objects.get(name=self.student)
cname = Course.objects.get(name=self.course)
return '%s : %s' % (sname.name, cname.shortname)
class AttendanceTotal(models.Model):
course = models.ForeignKey(Course, on_delete=models.CASCADE)
student = models.ForeignKey(Student, on_delete=models.CASCADE)
class Meta:
unique_together = (('student', 'course'),)
@property
def att_class(self):
35
stud = Student.objects.get(name=self.student)
cr = Course.objects.get(name=self.course)
att_class = Attendance.objects.filter(course=cr, student=stud,
status='True').count()
return att_class
@property
def total_class(self):
stud = Student.objects.get(name=self.student)
cr = Course.objects.get(name=self.course)
total_class = Attendance.objects.filter(course=cr, student=stud).count()
return total_class
@property
def attendance(self):
stud = Student.objects.get(name=self.student)
cr = Course.objects.get(name=self.course)
total_class = Attendance.objects.filter(course=cr, student=stud).count()
att_class = Attendance.objects.filter(course=cr, student=stud,
status='True').count()
if total_class == 0:
attendance = 0
else:
attendance = round(att_class / total_class * 100, 2)
return attendance
@property
def classes_to_attend(self):
stud = Student.objects.get(name=self.student)
cr = Course.objects.get(name=self.course)
total_class = Attendance.objects.filter(course=cr, student=stud).count()
att_class = Attendance.objects.filter(course=cr, student=stud,
status='True').count()
cta = math.ceil((0.75 * total_class - att_class) / 0.25)
if cta < 0:
return 0
return cta
class StudentCourse(models.Model):
student = models.ForeignKey(Student, on_delete=models.CASCADE)
course = models.ForeignKey(Course, on_delete=models.CASCADE)
class Meta:
36
unique_together = (('student', 'course'),)
verbose_name_plural = 'Marks'
def __str__(self):
sname = Student.objects.get(name=self.student)
cname = Course.objects.get(name=self.course)
return '%s : %s' % (sname.name, cname.shortname)
def get_cie(self):
marks_list = self.marks_set.all()
m = []
for mk in marks_list:
m.append(mk.marks1)
cie = math.ceil(sum(m[:5]) / 2)
return cie
def get_attendance(self):
a = AttendanceTotal.objects.get(student=self.student,
course=self.course)
return a.attendance
class Marks(models.Model):
studentcourse = models.ForeignKey(StudentCourse,
on_delete=models.CASCADE)
name = models.CharField(max_length=50, choices=test_name,
default='Internal test 1')
marks1 = models.IntegerField(default=0,
validators=[MinValueValidator(0), MaxValueValidator(100)])
class Meta:
unique_together = (('studentcourse', 'name'),)
@property
def total_marks(self):
if self.name == 'Semester End Exam':
return 100
return 20
class MarksClass(models.Model):
assign = models.ForeignKey(Assign, on_delete=models.CASCADE)
name = models.CharField(max_length=50, choices=test_name,
default='Internal test 1')
37
status = models.BooleanField(default='False')
class Meta:
unique_together = (('assign', 'name'),)
@property
def total_marks(self):
if self.name == 'Semester End Exam':
return 100
return 20
class AttendanceRange(models.Model):
start_date = models.DateField()
end_date = models.DateField()
# Triggers
days = {
'Monday': 1,
'Tuesday': 2,
'Wednesday': 3,
'Thursday': 4,
'Friday': 5,
'Saturday': 6,
}
post_save.connect(create_marks, sender=Student)
post_save.connect(create_marks, sender=Assign)
post_save.connect(create_marks_class, sender=Assign)
post_save.connect(create_attendance, sender=AssignTime)
post_delete.connect(delete_marks, sender=Assign)
40
DESIGN
DOCUMENT
41
Design Document
• The entire system is projected with a physical diagram which specifics the
actual storage parameters that are physically necessary for any database to
be stored on to the disk. The overall systems existential idea is derived from
this diagram.
• The relation upon the system is structure through a conceptual ER-
Diagram, which not only specifics the existential entities but also the
standard relations through which the system exists and the cardinalities that
are necessary for the system state to continue.
• The content level DFD is provided to have an idea of the functional inputs
and outputs that are achieved through the system. The system depicts the
input and out put standards at the high level of the systems existence.
Disputes the functions and sub functions that transforms the dataflow.
ER-Diagrams
42
modeling activity the attributes of each data object noted is the ERD can be
described resign a data object descriptions.
• The set of primary components that are identified by the ERD are
• The primary purpose of the ERD is to represent data objects and their
relationships.
• A UML system is represented using five different views that describe the
system from distinctly different perspective. Each view is defined by a set of
diagram, which is as follows.
ii. The analysis representation describes a usage scenario from the end-users
perspective.
Structural model view
◆ In this model the data and functionality are arrived from inside the
system.
43
Behavioral Model View
In this the structural and behavioral aspects of the environment in which the
system is to be implemented are represented.
44
UML Diagrams
View My
User Case: Profile
Update My student
Profile
Post courses
Post subjects
View student
feedback
Post feedback
Search Jobs
notifications
staff
Login
Register
45
Sequence Diagram
Admin Add Save View
Home login View courses subject Soursses Student
details s and feedback
subjects
Select()
get()
Post()
save()
View()
Search()
46
staff Notifica Feedback View
tion
T
Home Search Send My from Update Data
students profile studensts Profile and
student courses
Search()
apply()
view()
View()
update ()
update ()
get()
47
Student Registr
Login Validate Students Register tRegistr ation Uploads Manage
ation Action
Home
redirect()
select()
select()
Save()
Select()
Set()
48
Activity Diagram:
Login View
Profile
Update
Validate profile
ViewCourses
Admin
View
Subjects
Post
courses
Uploads Staff
Registration
Student
feedbacks
Search
students
My
Applications
Change
Pass Wd
49
Activity Diagram:
View
Login Courses
Students Search
Validate Subjects
Staff Register
50
Class Diagrams
Uploads
Staff
Registration
Action
51
Down Loads Home Register
Search Report
52
ScreenShots
53
54
55
C OD I N G
56
Program Design Language
➢ A fixed system of keywords that provide for all structured constructs date
declaration and modularity characteristics.
➢ Date declaration facilities that should include both simple and complex data
structures.
57
Views.py :
@login_required
def index(request):
if request.user.is_teacher:
return render(request, 'info/t_homepage.html')
if request.user.is_student:
return render(request, 'info/homepage.html')
return render(request, 'info/logout.html')
@login_required()
def attendance(request, stud_id):
stud = Student.objects.get(USN=stud_id)
ass_list = Assign.objects.filter(class_id_id=stud.class_id)
att_list = []
for ass in ass_list:
try:
a = AttendanceTotal.objects.get(student=stud, course=ass.course)
except AttendanceTotal.DoesNotExist:
a = AttendanceTotal(student=stud, course=ass.course)
a.save()
att_list.append(a)
return render(request, 'info/attendance.html', {'att_list': att_list})
58
@login_required()
def attendance_detail(request, stud_id, course_id):
stud = get_object_or_404(Student, USN=stud_id)
cr = get_object_or_404(Course, id=course_id)
att_list = Attendance.objects.filter(course=cr, student=stud).order_by('date')
return render(request, 'info/att_detail.html', {'att_list': att_list, 'cr': cr})
# Teacher Views
@login_required
def t_clas(request, teacher_id, choice):
teacher1 = get_object_or_404(Teacher, id=teacher_id)
return render(request, 'info/t_clas.html', {'teacher1': teacher1, 'choice':
choice})
@login_required()
def t_student(request, assign_id):
ass = Assign.objects.get(id=assign_id)
att_list = []
for stud in ass.class_id.student_set.all():
try:
a = AttendanceTotal.objects.get(student=stud, course=ass.course)
except AttendanceTotal.DoesNotExist:
a = AttendanceTotal(student=stud, course=ass.course)
a.save()
att_list.append(a)
return render(request, 'info/t_students.html', {'att_list': att_list})
@login_required()
def t_class_date(request, assign_id):
now = timezone.now()
ass = get_object_or_404(Assign, id=assign_id)
att_list = ass.attendanceclass_set.filter(date__lte=now).order_by('-date')
return render(request, 'info/t_class_date.html', {'att_list': att_list})
59
@login_required()
def cancel_class(request, ass_c_id):
assc = get_object_or_404(AttendanceClass, id=ass_c_id)
assc.status = 2
assc.save()
return HttpResponseRedirect(reverse('t_class_date', args=(assc.assign_id,)))
@login_required()
def t_attendance(request, ass_c_id):
assc = get_object_or_404(AttendanceClass, id=ass_c_id)
ass = assc.assign
c = ass.class_id
context = {
'ass': ass,
'c': c,
'assc': assc,
}
return render(request, 'info/t_attendance.html', context)
@login_required()
def edit_att(request, ass_c_id):
assc = get_object_or_404(AttendanceClass, id=ass_c_id)
cr = assc.assign.course
att_list = Attendance.objects.filter(attendanceclass=assc, course=cr)
context = {
'assc': assc,
'att_list': att_list,
}
return render(request, 'info/t_edit_att.html', context)
@login_required()
def confirm(request, ass_c_id):
assc = get_object_or_404(AttendanceClass, id=ass_c_id)
ass = assc.assign
cr = ass.course
cl = ass.class_id
for i, s in enumerate(cl.student_set.all()):
60
status = request.POST[s.USN]
if status == 'present':
status = 'True'
else:
status = 'False'
if assc.status == 1:
try:
a = Attendance.objects.get(course=cr, student=s, date=assc.date,
attendanceclass=assc)
a.status = status
a.save()
except Attendance.DoesNotExist:
a = Attendance(course=cr, student=s, status=status, date=assc.date,
attendanceclass=assc)
a.save()
else:
a = Attendance(course=cr, student=s, status=status, date=assc.date,
attendanceclass=assc)
a.save()
assc.status = 1
assc.save()
@login_required()
def t_attendance_detail(request, stud_id, course_id):
stud = get_object_or_404(Student, USN=stud_id)
cr = get_object_or_404(Course, id=course_id)
att_list = Attendance.objects.filter(course=cr, student=stud).order_by('date')
return render(request, 'info/t_att_detail.html', {'att_list': att_list, 'cr': cr})
@login_required()
def change_att(request, att_id):
a = get_object_or_404(Attendance, id=att_id)
a.status = not a.status
a.save()
return HttpResponseRedirect(reverse('t_attendance_detail',
args=(a.student.USN, a.course_id)))
61
@login_required()
def t_extra_class(request, assign_id):
ass = get_object_or_404(Assign, id=assign_id)
c = ass.class_id
context = {
'ass': ass,
'c': c,
}
return render(request, 'info/t_extra_class.html', context)
@login_required()
def e_confirm(request, assign_id):
ass = get_object_or_404(Assign, id=assign_id)
cr = ass.course
cl = ass.class_id
assc = ass.attendanceclass_set.create(status=1, date=request.POST['date'])
assc.save()
for i, s in enumerate(cl.student_set.all()):
status = request.POST[s.USN]
if status == 'present':
status = 'True'
else:
status = 'False'
date = request.POST['date']
a = Attendance(course=cr, student=s, status=status, date=date,
attendanceclass=assc)
a.save()
@login_required()
def t_report(request, assign_id):
ass = get_object_or_404(Assign, id=assign_id)
sc_list = []
for stud in ass.class_id.student_set.all():
62
a = StudentCourse.objects.get(student=stud, course=ass.course)
sc_list.append(a)
return render(request, 'info/t_report.html', {'sc_list': sc_list})
@login_required()
def timetable(request, class_id):
asst = AssignTime.objects.filter(assign__class_id=class_id)
matrix = [['' for i in range(12)] for j in range(6)]
for i, d in enumerate(DAYS_OF_WEEK):
t=0
for j in range(12):
if j == 0:
matrix[i][0] = d[0]
continue
if j == 4 or j == 8:
continue
try:
a = asst.get(period=time_slots[t][0], day=d[0])
matrix[i][j] = a.assign.course_id
except AssignTime.DoesNotExist:
pass
t += 1
@login_required()
def t_timetable(request, teacher_id):
asst = AssignTime.objects.filter(assign__teacher_id=teacher_id)
class_matrix = [[True for i in range(12)] for j in range(6)]
for i, d in enumerate(DAYS_OF_WEEK):
t=0
for j in range(12):
if j == 0:
class_matrix[i][0] = d[0]
continue
if j == 4 or j == 8:
63
continue
try:
a = asst.get(period=time_slots[t][0], day=d[0])
class_matrix[i][j] = a
except AssignTime.DoesNotExist:
pass
t += 1
context = {
'class_matrix': class_matrix,
}
return render(request, 'info/t_timetable.html', context)
@login_required()
def free_teachers(request, asst_id):
asst = get_object_or_404(AssignTime, id=asst_id)
ft_list = []
t_list = Teacher.objects.filter(assign__class_id__id=asst.assign.class_id_id)
for t in t_list:
at_list = AssignTime.objects.filter(assign__teacher=t)
if not any([True if at.period == asst.period and at.day == asst.day else False
for at in at_list]):
ft_list.append(t)
# student marks
@login_required()
def marks_list(request, stud_id):
stud = Student.objects.get(USN=stud_id, )
ass_list = Assign.objects.filter(class_id_id=stud.class_id)
sc_list = []
for ass in ass_list:
try:
sc = StudentCourse.objects.get(student=stud, course=ass.course)
except StudentCourse.DoesNotExist:
64
sc = StudentCourse(student=stud, course=ass.course)
sc.save()
sc.marks_set.create(type='I', name='Internal test 1')
sc.marks_set.create(type='I', name='Internal test 2')
sc.marks_set.create(type='I', name='Internal test 3')
sc.marks_set.create(type='E', name='Event 1')
sc.marks_set.create(type='E', name='Event 2')
sc.marks_set.create(type='S', name='Semester End Exam')
sc_list.append(sc)
# teacher marks
@login_required()
def t_marks_list(request, assign_id):
ass = get_object_or_404(Assign, id=assign_id)
m_list = MarksClass.objects.filter(assign=ass)
return render(request, 'info/t_marks_list.html', {'m_list': m_list})
@login_required()
def t_marks_entry(request, marks_c_id):
mc = get_object_or_404(MarksClass, id=marks_c_id)
ass = mc.assign
c = ass.class_id
context = {
'ass': ass,
'c': c,
'mc': mc,
}
return render(request, 'info/t_marks_entry.html', context)
@login_required()
def marks_confirm(request, marks_c_id):
mc = get_object_or_404(MarksClass, id=marks_c_id)
ass = mc.assign
65
cr = ass.course
cl = ass.class_id
for s in cl.student_set.all():
mark = request.POST[s.USN]
sc = StudentCourse.objects.get(course=cr, student=s)
m = sc.marks_set.get(name=mc.name)
m.marks1 = mark
m.save()
mc.status = True
mc.save()
@login_required()
def edit_marks(request, marks_c_id):
mc = get_object_or_404(MarksClass, id=marks_c_id)
cr = mc.assign.course
stud_list = mc.assign.class_id.student_set.all()
m_list = []
for stud in stud_list:
sc = StudentCourse.objects.get(course=cr, student=stud)
m = sc.marks_set.get(name=mc.name)
m_list.append(m)
context = {
'mc': mc,
'm_list': m_list,
}
return render(request, 'info/edit_marks.html', context)
@login_required()
def student_marks(request, assign_id):
ass = Assign.objects.get(id=assign_id)
sc_list =
StudentCourse.objects.filter(student__in=ass.class_id.student_set.all(),
course=ass.course)
return render(request, 'info/t_student_marks.html', {'sc_list': sc_list})
66
TES T IN G
&
DE BU G GI N G S TR AT EGI ES
67
Testing
Testing is the process of detecting errors. Testing performs a very critical role
for quality assurance and for ensuring the reliability of software. The results of
testing are used later on during maintenance also.
Psychology of Testing
The aim of testing is often to demonstrate that a program works by showing that
it has no errors. The basic purpose of testing phase is to detect the errors that
may be present in the program. Hence one should not start testing with the intent
of showing that a program works, but the intent should be to show that a
program doesn’t work. Testing is the process of executing a program with the
intent of finding errors.
Testing Objectives
Levels of Testing
In order to uncover the errors present in different phases we have the concept of
levels of testing. The basic levels of testing are as shown below…
68
Acceptance
Client Needs Testing
System Testing
Requirements
Integration Testing
Design
Unit Testing
Code
System Testing
The philosophy behind testing is to find errors. Test cases are devised with this
in mind. A strategy employed for system testing is code testing.
Code Testing:
This strategy examines the logic of the program. To follow this method we
developed some test data that resulted in executing every instruction in the
program and module i.e. every path is tested. Systems are not designed as entire
nor are they tested as single systems. To ensure that the coding is perfect two
types of testing is performed or for that matter is performed or that matter is
performed or for that matter is performed on all systems.
Types Of Testing
➢ Unit Testing
➢ Link Testing
69
Unit Testing
Unit testing focuses verification effort on the smallest unit of software i.e. the
module. Using the detailed design and the process specifications testing is done
to uncover errors within the boundary of the module. All modules must be
successful in the unit test before the start of the integration testing begins.
In this project each service can be thought of a module. There are so many
modules like Login, HWAdmin, MasterAdmin, Normal User, and PManager.
Giving different sets of inputs has tested each module. When developing the
module as well as finishing the development so that each module works without
any error. The inputs are validated when accepting from the user.
Link Testing
Link testing does not test software but rather the integration of each module in
system. The primary concern is the compatibility of each module. The
Programmer tests where modules are designed with different parameters, length,
type etc.
Integration Testing
After the unit testing we have to perform integration testing. The goal here is to
see if modules can be integrated proprerly, the emphasis being on testing
70
interfaces between modules. This testing activity can be considered as testing
the design and hence the emphasis on testing module interactions.
In this project integrating all the modules forms the main system. When
integrating all the modules I have checked whether the integration effects
working of any of the services by giving different combinations of inputs with
which the two services run perfectly before Integration.
System Testing
Here the entire software system is tested. The reference document for this
process is the requirements document, and the goal os to see if software meets
its requirements.
Here entire ‘ATM’ has been tested against requirements of project and it is
checked whether all requirements of project have been satisfied or not.
Acceptance Testing
Acceptance Test is performed with realistic data of the client to demonstrate that
the software is working satisfactorily. Testing here is focused on external
behavior of the system; the internal logic of program is not emphasized.
71
White Box Testing
This is a unit testing method where a unit will be taken at a time and tested
thoroughly at a statement level to find the maximum possible errors. I tested step
wise every piece of code, taking care that every statement in the code is
executed at least once. The white box testing is also called Glass Box Testing.
I have generated a list of test cases, sample data. which is used to check all
possible combinations of execution paths through the code at every module
level.
This testing method considers a module as a single unit and checks the unit at
interface and communication with other modules rather getting into details at
statement level. Here the module will be treated as a block box that will take
some input and generate output. Output for a given set of input combinations are
forwarded to other modules.
1) Test cases that reduced by a count that is greater than one, the number of
additional test cases that much be designed to achieve reasonable testing.
2) Test cases that tell us something about the presence or absence of classes of
errors, rather than an error associated only with the specific test at hand.
72
C O N C L U S I O N S &
R E C O M M E N D A T I O S
73
CONCLUSION:
We can conclude that the project NepJobs(online job portal) will be a project
with a highsuccess rate which will be able to deliver all the needs and
requirements of employee(job seekers) as well as the employer (recruiter). Job
seekers can easily find jobscompletely related to their field and put an
application online and confirm if they arefeasible for the job and they are hired
by the employers or not.It was clearly known during the development of project
that it is a completely dynamic project which has never ending possibilities for
improvement irrespective with the platform used for its creation.
FUTURE ENHANCEMENT:
74
B IB LIOGRAP HY
SQLITE 3
sqldocs.org/sqlite/introduction
SQLite Tutorial – A Step-by-step SQLite Tutorial
Django Books
Online Tutorials
HTML
75