0% found this document useful (0 votes)
21 views87 pages

Sports Club Management System Report

This document describes a project report for developing a Sports Club Management system. It includes an introduction that provides background on learning management systems and discusses the objectives of the project such as providing an engaging learning experience and reducing infrastructure costs. It also describes the purpose, scope and applicability of the system, which is to provide a centralized platform for sharing sports club resources and make learning inclusive. The report includes sections on requirements analysis, system design, implementation, testing and results. The conclusion discusses limitations and opportunities for future work.

Uploaded by

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

Sports Club Management System Report

This document describes a project report for developing a Sports Club Management system. It includes an introduction that provides background on learning management systems and discusses the objectives of the project such as providing an engaging learning experience and reducing infrastructure costs. It also describes the purpose, scope and applicability of the system, which is to provide a centralized platform for sharing sports club resources and make learning inclusive. The report includes sections on requirements analysis, system design, implementation, testing and results. The conclusion discusses limitations and opportunities for future work.

Uploaded by

Pravin Jagushte
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

SPORTS CLUB MANAGEMENT

SPORTS CLUB MANAEGEMENT


SPORTS CLUB MANAEGEMENT
A Project Report
Submitted in partial fulfilment of the
requirements for the award of the degree of

BACHELOR OF SCIENCE (INFORMATION TECHNOLOGY)

By

Jayshree Pravin Jagushte

Under the esteemed guidance of

Mrs. Meenakshi Dhande


&
Mrs. Sheetal Vekhande

DEPARTMENT OF INFORMATION TECHNOLOGY


MODEL COLLEGE OF SCIENCE AND COMMERCE
University of Mumbai
KALYAN (E) – 421306
MAHARASHTRA
2020-2021
PROFORMA FOR THE APPROVAL OF PROJECT PROPOSAL

(Note: All entries of the proforma of approval should be filled up with


appropriate and complete information. Incomplete proforma of approval in
any aspect will be summarily rejected.)

PNR No.: ...................................... Roll No.: ......................................

1. Name of the Student: Jayshree Pravin Jagushte


2. Title of the Project: Sports Club Management
3. Name of the Guide(s): Mrs. Meenakshi Dhande & Mrs. Sheetal Vekhande
4. Is this your first submission? Yes No

Signature of the Student Signature of the Guide


Date: ………………… Date: ………………

Signature of the coordinator


Date: …………………
MODEL COLLEGE OF SCIENCE & COMMERCE
(Affiliated to University of Mumbai)
DEPARTMENT OF INFORMATION TECHNOLOGY

CERTIFICATE

This is to certify that the project entitled, " SPORTS CLUB MANAEGEMENT
", is a bonafide work of fgfv bearing Seat No: ( ) submitted in partial fulfillment of the
requirements for the award of degree of BACHELOR OF SCIENCE in INFORMATION TECHNOLOGY
from University of Mumbai.

Internal Guide Coordinator

External Examiner

Date: College Seal


ACKNOWLEDGEMENT

I WISH TO EXPRESS MY SINCERE GRATITUDE TO MR. K.S. BRAMHAWALE PRINCIPAL OF


MODEL COLLEGE OF SCIENCE & COMMERCE FOR PROVIDING ME THE OPPURTUNITY TO
DO MY WEB PROJECT WORK ON SPORTS CLUB MANAGEMENT. I WANT TO SINCERELY
THANK MY PROJECT GUIDES MRS MINAKSHI DHANDE AND MRS SHEETAL VEKHANDE
FOR GUIDANCE AND ENCOURAGEMENT IN CARRYING OUT THIS PROJECT WORK.

SPECIAL THANKS TO ALL THE LAB SYSTEMS FOR SEEMINGLY SMALL BUT VALUABLE
HELPS IN TERMS OF TIMELY INTERNET AND LAB ACCESS.
DECLARATION
I JAYSHREE PRAVIN JAGUSHTE , STUDENT OF MODEL COLLEGE OF SCIENCE & COMMERCE,
RAJBHAR NAGAR, CHINCHPADA ROAD, KATEMANIVALI NAKA, KALYAN (EAST) 421306.
STUDYING IN 3RD YEAR [Link] IN INFORMATION TECHNOLOGY HEREBY DECLARE THAT I
HAVE COMPLETED THIS PROJECT ON SPORTS CLUB MANAGEMENT SYSTEM DURING THE
ACADEMIC YEAR 2020-21.

THE INFORMATION SUBMITTED IS TRUE AND ORIGINAL TO THE BEST OF MY KNOWLEDGE.

DATE:

PLACE:

Jayshree Pravin Jagushte


TABLE OF CONTENTS
Sr. No. INDEX Pg. Sign
No.
CHAPTER 1: INTRODUCTION
1.1 Background
1.2 Objectives
1.3 Purpose, Scope & Applicability
1.3.1 Purpose
1.3.2 Scope
1.3.3 Applicability
1.4 Organization of Report
CHAPTER 2: SURVEY OF TECHNOLOGIES
CHAPTER 3: REQUIREMENTS AND ANALYSIS
3.1 Problem Definition
3.2 Requirements Specification
3.3 Planning and Scheduling
3.4 Software and Hardware Requirements
3.5 Conceptual Models
CHAPTER 4: SYSTEM DESIGN
4.1 Basic Modules
4.2 Data Design
4.2.1 Schema Design
4.2.2 Data Integrity and Constraints
4.3 Procedural Design
4.3.1 Logic Diagrams
4.3.2 Algorithm Design
4.4 User Interface Design
4.5 Security Issues
CHAPTER 5: IMPLEMENTATION AND TESTING
5.1 Implementation Approaches
5.2 Coding Details
5.3 Testing Approach
5.3.1 Unit Testing
5.3.2 Integration Testing
5.4 Modifications And Improvements
5.5 Test Cases
CHAPTER 6: RESULTS AND DISCUSSION
6.1 Screenshots And Functionality
CHAPTER 7: CONCLUSION AND FUTURE WORK
7.1 Conclusion
7.2 Limitations
7.3 Future Scope
CHAPTER 8: REFERENCES
ABSTRACT
CHAPTER 1: INTRODUCTION
1.1 BACKGROUND

There are several historical phases of distance education that preceded the development of LMS:

Correspondence teaching: The first document of correspondence teaching dates back to 1723, through the
advertisement of Boston Gazette of Caleb Phillips, professor of Shorthand, offering teaching materials and
tutorials.

Multimedia teaching: The concept of e-Learning began developing in the early 20 th century, marketed by
the appearance of audio-video communication systems used for remote teaching. In 1909, E.M. Forster
published his story ‘The Machine Stops’ and explained the benefits of using audio communication to deliver
lectures to remote audiences. The earliest networked learning system was the Plato Learning Management
system developed in the 1970s by Control Data Corporation.

The history of application of computers to education is filled with broadly descriptive terms such as
computer-managed instruction (CMI) and integrated learning systems (ILS), computer-based instruction
(CBI), computer-assisted instruction (CAI), and computer-assisted learning (CAL). These terms describe
drill-and-practice programs, more sophisticated tutorials, and more individualized instruction, respectively.

The first fully-featured Learning Management System (LMS) was called EKKO, developed and released by
Norway’s NKI Distance Education Network in 1991. Three years later, New Brunswick’s NB Learning
Network presented a similar system designed for DOS-based teaching, and devoted exclusive to business
learners.

Most modern LMSs are web-based applications like Google’s Classroom. In these systems learners can see
real-time progress of their learning and get learning materials and content directly to their device’s feed and
email inbox.
1.2 OBJECTIVES

The objectives of this system are as follows:-

 To provide education opportunity for every student even if they are not able to physically attend the
educational institution.
 To streamline the learning process and make productive use of both learner’s and instructor’s time.
 To make the learning process more engaging and less robotic. Learners can share their feedback
about any specific topic posted by instructors.
 To reduce infrastructure costs for the institutions providing the educational courses.
 To increase efficiency of both instructors and students.
 To leverage technology and make learning future ready.
 To provide a centralized learning platform for multiple users.
 To provide anywhere, anytime learning. Centralized nature of e-LMS makes this possible.
1.3.1 PURPOSE
This is a web-based e-Learning Management System built with the purpose of delivering and managing all
types of content, including video, documents, articles, etc. In the education and higher education markets, an
LMS will include a variety of functions that is similar to corporate but will have features such as rubrics
(scoring system), teacher and instructor facilitated learning, a discussion board, and often use of a syllabus.

SYB e-LMS has the following purposes:-

A. To provide an easy to use mobile learning experience


B. To make learning inclusive and engaging
C. To provide a centralized platform for sharing learning resources
D. To reduce infrastructure cost

After learning about most of the popular existing systems and understanding the need for developing a
system different people involved in related activities have been consulted. The data required for this study
has been collected from company records and reputed internet sources.
1.3.2 SCOPE
A learning management system (LMS) is a software application for the administration, documentation,
tracking, reporting and delivery of educational courses or training programs.

LMS tools were created for making knowledge-sharing easier. The whole system was created to work across
different web-based platforms. The technology has found its way in both education and the business world.

With LMS tools, businesses receive a lot of benefits, as their employees can acquire knowledge without
burning a hole in the pocket.

On the education side of things, educational institutes are now in a position to work with students who are
thousands of miles away. Plus, the functionality of these platforms makes the learning process easier than
ever before.
1.3.3 APPLICABILITY

SYB e-learning management platform makes learning efficient and easier for people who are not able to
physically attend the institutions providing the educational/training courses. The mobile first approach of
design focuses on the broad user base especially in a country like India where majority of the Internet users
are mobile users.

Year 2020 has been a very difficult time for everyone due to the global covid-19 pandemic, but it has been
especially true for the education system. As colleges and schools remain shut many students are facing
difficulty in their education. And with the low availability of a local e-LMS many colleges depend on big
alternatives like Google Classroom. While Google’s Classroom is a good option there are certain serious
privacy concerns from student’s data privacy point of view.

The SYB e-LMS provides a safe platform with zero privacy concerns as we do not use our customer data
outside of the scope of this product, nor do we share any private information (not even email).
1.4 ORGANISATION OF REPORT

 SURVEY OF TECHNOLOGIES: In this chapter we will discuss the student’s awareness and
understanding of available technologies related to the topic.
 REQUIREMENTS AND ANALYSIS: In this chapter we will discuss the requirements specification
of the system i.e. hardware and software, problem definition, planning and scheduling.
 SYSTEM DESIGN: In this chapter we will discuss the features and operation of this system in detail,
including screen layout, business rule, process diagram, pseudo code and other documentation.
 The chapter 5 to 7 include the IMPLEMENTATION AND TESTING, RESULTS AND
DISCUSSION ,CONCLUSIONS, REFERENCES and will be submitted in the next semester i.e.
semester VI
 IMPLEMENTATION AND TESTING: Inside this chapter we will discuss coding details and code
efficiency, types of testing, testing approaches, modifications and improvements of this project.
 RESULTS AND DISCUSSION: We will discuss the test reports and user documentation in this
chapter.
 CONCLUSIONS: The conclusions will be summarized in a fairly short chapter (2 or 3 pages). This
chapter brings together many of the points that would have made in other chapters.
 REFERENCES: In this chapter we will discuss the bibliography and website used to create the
project.
CHAPTER 2: SURVEY OF TECHNOLOGIES
1) HTML: It is the HYPER TEXT MARKUP LANGUAGE which is widely used on develop the web
pages. HTML refers to the way in which pages are linked together link available on web page is called a
hypertext. HTML 4.01 was a major version of HTML but we are currently having a version of HTML is
HTML-5. HTML is a mark-up a text document with lags that tells a web browser hoe to structure it to
display. HTML is being widely used to format web pages with the help of different tags available in HTML.
it was developed with the intent of defining the structure of document like heading, paragraphs, lists.

2) CSS: It is CASCADING STYLE SHEET is a style sheet language. it is used for describing the
presentation of a document written in a mark-up language CSS language can be applied to any XML
(Extensible mark-up language) [Link] is cornerstone technology used by most websites to create
visually engaging webpages, user interface for many mobile [Link] has a simple syntax and uses a
number of English keyword to specify the names of various style properties.

3) Bootstrap: It is a free and open source, front end web framework for designing websites and web
applications. it contains HTML and CSS based design templates for typography, forms, buttons, navigation
and other interface components as well as JavaScript extensions. bootstrap is modular and consist of series
of less stylesheets that implement the various components of the toolkit bootstrap 4, SAAS is used instend of
less for the stylesheet each bootstrap components consists of an HTML structure, CSS declarations and
bootstrap provide a number of configuration variables that control things such as colour and padding of
various components.

4) My SQL: It is an a open source RDBMS that relies on SQL for processing the data in database
MYSQL provides APIS for the language like C, C++, Eiffel, java, ,php and [Link] is most commonly
used for web and embedded applications it can run on Unix windows and mac OS it is based on structure
query language. it is runs on virtually all platforms. it is one of the best RDBMS language. MYSQL is
essential part of almost every open source php applications In this language php as the object oriented
scripting php as the object oriented scripting language (python is also used Insted of php)

5) PHP: It is a HYPERTEX pre-processor is a programming language it allows web developers to


create dynamic content that interacts with database. It is a server-side scripting language that is embedded in
html. It is syntax is like a C. php support a large number of major protocols such as pop3, 1MAP & LDAP,
PHP4 added support for java and distributed object architectures. It is basically use for the developing web-
based software applications. PHP is a forgiving language it tries to be as forgiving as possible.
6) JAVASCRIPT: It is a light weight, interpreted programming language. It is designed for
creating network centric applications. JavaScript is very easy to implement because it is integrated with
HTML it is open and cross platform JavaScript is a high-level, dynamic interpreted language, The syntax of
JavaScript is actually derived from C. it has an API for working with text , arrays ,dates and regular
expressions but does not include ant I/O. JavaScript is a prototype based it is supporting the object oriented,
imperative and functional programming styles . it is also used in environments that are not web based such
as pdf documents JavaScript has been traditionally implemented as an Interpret language.

FOR ANDROIED APPLICATION:

7) ANDROID STUDIO:
Android studio is the official integrated development environment (IDE) for google android
operating system android studio was announced on May 16,2013 at the google I/ O conference. The first
stable build was released in December 2014, starting from 1.0 version. 7may 2019 Kotlin I google preferred
language for android app development and other language are supported latest version 3.4 April 2019.

8) PHONEGAP (apache cordova):


Engineered by the team behind apache cordova this open source tool is comprised of a compiler
debugger and testing tool with popular web technology (html, css3, JavaScript) phone gap is a suitable for
building only simple app and that phone gap app makes little use of device capabilities.

Pros:-
•Web technologies (html5, css3 and javascript) are at the core of phone gap hence developer can make use
of their existing skill.
•It supports a plugin table architecture that helps developer create featured app with the utilization devices
capabilities through APIS. It also supports in app purchase across the app store for IOS the google play store
for android and more.

9) NATIVESPACE:
Native script is an open sources framework to develop app on the apple IOS and android
platform. Native script app are built using a JavaScript developer can access native API’s via
JavaScript.
 It is extend support to angular js2 and type script

 App make use off native components and a have direct access to to native API along
with full access to the development libraries.
 It possesses a cross platform declarative UI support and implement it access different

10) APPACELETOR: It is suitable for rapid app development. developers can build a prototype of
the app in a quick and easy way to evaluate the user interaction with the UI.
It is equipped with pre-built connectors available for MS, MY SQL, various others
APPCELERATOR is known to be a bit buggy and lag through the new version is more stable.

11) XAMARIN: C# codebase can be universally applied to multiple platforms however unlike
other frameworks it’s lets developer work with native IDE language and API’s Almost ¾ of the code
can be shared across major platform. Xamarin supports functionality testing and quality monitoring
across a wide range of devices.
CHAPTER 3: REQUIREMENTS AND ANALYSIS

3.1 PROBLEM DEFINITION

There are several problems that are identified in the current learning systems. The proposed
enhancement system can prevent and overcome the existing problems. First of all, current
distance learning systems are a mess when it comes to efficiency and productivity. There are
a very few good systems existing today which focus exclusively on college and universities.
Current system has structural problems such as ungrouped listing of content, no subject
categories to separate study materials, weak multimedia support especially when it comes to
video. The most popular system used today is Google’s classroom for which they force you
to use Google’s own email system i.e. Gmail for signing up or logging in. This forces users to
open and use Gmail account even if they already have another email provider. Moreover this
existing system promotes other products of Google alongside classroom, so it becomes sort of
a promotional platform rather than an educational platform.

Another major issue in existing systems is privacy. Most current systems use the personal
data of its users for promotional activities and also share these details with the SAAS
provider’s partners. Recently in 2020 itself the attorney general of New Mexico state in the
US has revealed that Google and other major LMS providers track children across the
internet, across devices, in their homes, and well outside the educational sphere, all without
obtaining parental consent. These tracking activities are performed using cookies and other
such technologies. Our system will not share any personal data of its users with anyone nor
will it track the user’s internet activity outside the sphere of our application’s usage (by the
user).

Account management and the overall administration of the current existing system are
complicated. There are several other issues with the current system all of which are listed
below:

1. Difficult account management


2. Complex administration
3. No automated feed updates
4. Difficult learner sharing

[Link] Page 19
5. Content management problems
6. Unstable file handling
7. Privacy concerns
8. Shady marketing gimmicks

This is why the current system is proposed as a replacement for the existing system.

3.2 REQUIREMENTS SPECIFICATION

The project has been planned to have a distributed architecture, with centralized storage of
the database. The database application to be used for storage has been planned to be MySQL
server or MariaDB server. Both are same with MariaDB being more popular and stable.
Django web framework will be used as the main backend which will handle the database
server connectivity as well as the business logic and URL view management. It is an open-
source framework written in Python and is regularly updated with security patches and new
and improved features. Django uses the MVC pattern/architecture for development of the
applications. It is a very high performance framework and is used by big corporations such
as Facebook (for Instagram), Disqus, Spotify, YouTube, etc. Django uses ORM for database
management and CRUD operations i.e. the developer does not have to manually write the
SQL statements, the framework will generate these statements instead. We just have to
provide the data Models as classes and also define the relationships between these models.
This helps in developing a robust and stable application under less time.

[Link] Page 20
3.3 PLANNING AND SCHEDULING

 PLANNING
Project planning defines the project activities that will be performed and describes
how the activities will be accomplished. The purpose of project planning is to define
each major task, estimate the time and resources required, and provide a framework
for management review and control. The project planning activities and goals include
defining:

 The specific work to be performed and goals that define and bind the project.
 Estimates to be documented for planning, tracking, and controlling the project.
 Commitments that are planned, documented, and agreed to by affected groups.
 Project alternatives, assumptions, and constraints.

 SCHEDULING
The project schedule provides a graphical representation of predicted tasks,
milestones, dependencies, resource requirements, task duration, and deadlines. The
project’s master schedule inter-relates all tasks on a common time scale. The project
schedule should be detailed enough to show each WB Stack to be performed, the
name of the person responsible for completing the task, the start and end date of each
task, and the expected duration of the task.

 Define the type of schedule


 Define precise and measurable milestones
 Estimate task duration
 Define priorities
 Define the critical path
 Document assumptions
 Identify risks

[Link] Page 21
 GANTT CHART
A Gantt chart is a horizontal bar chart used in project management as a tool for
graphically representing the schedule of a set of specific activities or tasks. The
horizontal bars indicate the length of time allocated to each activity, so the x-axis of a
Gantt chart is subdivided into equal units of time, e.g., days, weeks, months. The y-
axis of a Gantt chart, on the other hand, simply lists all the activities or tasks being
monitored by the Gantt chart. A simple look at a Gantt chart should enable its user to
determine which tasks take the longest time to complete, which tasks are overlapping
with each other, etc.

July August September

Month
Weeks Weeks Weeks

1 2 3 4 1 2 3 4 1 2 3 4

Planning

Requirement
gathering

Analysis

Design

[Link] Page 22
3.4 HARDWARE AND SOFTWARE REQUIREMENTS

HARDWARE:

Processor : Intel dual core and above

RAM : 2GB and above

Hard Disk : 120 GB

Monitor : LCD/LED

Keyboard : Normal or Multimedia

Mouse : Compatible Mouse

SOFTWARE

Front end : HTML, CSS, Bootstrap, JavaScript (AJAX) and jQuery

Back end : Django (Python), MySQL server (or MariaDB server)

Operating system : Windows 7/8/10 (Linux distro or Mac OS will also work fine)

[Link] Page 23
3.5 CONCEPTUAL MODELS

E-R DIAGRAMS: A graphical model of the data needed by a system, including things about
which information is stored & the relationships among them, produced in structured analysis
& information engineering. ER Diagram represents entities or tables and their relationships
with one another.

Symbols:

Fig 3.1 E-R cardinality symbols

[Link] Page 24
E-R DIAGRAM

Fig 3.2 E-R diagram

[Link] Page 25
DATA FLOW DIAGRAM

 A Data Flow Diagram (DFD) is a graphical representation of the “flow” of data


through an information system.
 DFDs can also be used for the visualization of data processing (structured design).
 It views a system as a function that transforms the input into desired output.

SYMBOLS:

Fig 3.3 DFD symbols

[Link] Page 26
Fig 3.4 DFD Level 0

[Link] Page 27
Fig 3.5 DFD Level 1

[Link] Page 28
OBJECT ORIENTED DIAGRAM

CLASS DIAGRAM

A class diagram is an illustration of the relationships and source code dependencies


among classes in the Unified Modelling Language (UML). In this context, a class defines
the methods and variables in an object which is a specific entity in a program or the unit
of code representing the entity. Class diagrams are useful in all forms of object-oriented
programming.

Fig 3.6 Class Diagram

[Link] Page 29
COMPONENT DIAGRAM

A component diagram, also known as a UML component diagram, describes the


organization and wiring of the physical components in a system. Component diagrams are
often drawn to help model implementation details and double-check that every aspect of
the system's required functions is covered by planned development.

Fig 3.7 Component Diagram

[Link] Page 30
COLLABORATION DIAGRAM

A collaboration diagram, also known as a communication diagram, is an illustration of


the relationships and interactions among software objects in the Unified Modeling
Language (UML). These diagrams can be used to portray the dynamic behavior of a
particular use case and define the role of each object.

Collaboration diagrams are created by first identifying the structural elements required to
carry out the functionality of an interaction. A model is then built using the relationships
between those elements. Several vendors offer software for creating and editing
collaboration diagrams.

Fig 3.8 Collaboration (Communication) Diagram

[Link] Page 31
PACKAGE DIAGRAM

Package diagram is UML structure diagram which shows packages and dependencies
between the packages. Model diagrams allow to show different views of a system, for
example, as multi-layered (aka multi-tiered) application - multi-layered application
model. The following nodes and edges are typically drawn in a package diagram:
package, packageable element, dependency, element import, package import, package
merge.

Fig 3.9 Package Diagram

[Link] Page 32
CHAPTER 4: SYSTEM DESIGN

4.1 BASIC MODULES

BASIC MODULES: -

 SybAdmin module
 College module
 Teacher module
 Student module

SybAdmin module: This module oversees all the College users (customers) who have
subscribed and are currently using the e-LMS service. This module is integrated to the whole
e-LMS system and the ‘sybadmin’ user has control over each and every component of each
and every College (customer) user.

College module: This module takes the responsibility of management of its staff and courses.
This module can manage (add, modify or delete) Teachers, Departments, Classes. This
module also has its own dashboard so that a ‘collegeuser’ can see and manage their
respective college resources. This module is only for College (collegeadmin) users.

Teacher module: This module is only visible to Teacher user and has the responsibility of
managing Student users and Subjects as well as creating, updating or deleting posts which are
viewable to the Student users on their post feed. This module also has a dashboard from
where Teachers can manage their responsibilities.

Student module: This module is visible only to the Student user and has a post feed where
students can check and interact with the content posted by their respective Teachers. It also
has a separate section for class tests and assignments.

[Link] Page 33
4.2 DATA DESIGN

EVENT TABLE

Event Trigger Source Use case Response Destination


Validate
Signup
Signup payment and
User signup College user successful or College user
request sent user-data and
failed
create user
Validate Login
Login
User login User username successful or User
request sent
and password failed
Validate Creation
Add teacher
Add teacher College user form data successful or College user
request
and add user failed
Validate
Update Update
Update from data
teacher College user successful or College user
teacher and update
request failed
teacher
Delete Delete a Deletion
Delete
teacher College user particular successful or College user
teacher
request teacher failed
Validate
Add Creation
Add form data
department College user successful or College user
department and add
request failed
department
Validate
Update Update
Update from data
department College user successful or College user
department and update
request failed
department
Delete Delete a Deletion
Delete
department College user particular successful or College user
department
request department failed
Validate
Add Creation
Add form data
collegeclass College user successful or College user
collegeclass and add
request failed
collegeclass
Validate
Update Update
Update from data
collegeclass College user successful or College user
collegeclass and update
request failed
collegeclass
Delete Delete a Deletion
Delete
collegeclass College user particular successful or College user
collegeclass
request collegeclass failed
Validate
Creation
Add student form data
Add student Teacher user successful or Teacher user
request and add
failed
student

[Link] Page 34
Validate
Update Update
Update from data
student Teacher user successful or Teacher user
student and update
request failed
student
Delete Delete a Deletion
Delete
student Teacher user particular successful or Teacher user
student
request student failed
Validate
Creation
Add subject form data
Add subject Teacher user successful or Teacher user
request and add
failed
subject
Validate
Update Update
Update from data
subject Teacher user successful or Teacher user
subject and update
request failed
subject
Delete Delete a Deletion
Delete
subject Teacher user particular successful or Teacher user
subject
request subject failed
Validate Creation
Add post
Add post Teacher user form data successful or Teacher user
request
and add post failed
Validate
Update
Update post from data
Update post Teacher user successful or Teacher user
request and update
failed
post
Delete a Deletion
Delete post
Delete post Teacher user particular successful or Teacher user
request
post failed
Validate
Creation
Add classtest form data
Add classtest Teacher user successful or Teacher user
request and add
failed
classtest
Delete Delete a Deletion
Delete
classtest Teacher user particular successful or Teacher user
classtest
request classtest failed
Get classtest
Retrieval
Get classtest data for this
Get classtest Student user successful or Student user
data request particular
failed
student
Submit this
Submit Submission
Submit student’s
classtest Student user successful or Student user
classtest finished
request failed
classtest
Validate
Add Creation
Add form data
comment Student user successful or Student user
comment and add
request failed
comment
Edit Edit Validate Update
Student user Student user
comment comment form data successful or

[Link] Page 35
and update
request failed
comment
Delete Delete a Deletion
Delete
comment Student user particular successful or Student user
comment
request comment failed
Update Validate
Update Update
customer SybAdmin form data SybAdmin
college data successful or
(College user and update user
request failed
user) data college data
Delete
Delete Delete a Deletion
customer SybAdmin SybAdmin
college data particular successful or
(College user user
request college data failed
user) data

[Link] Page 36
4.2.1 SCHEMA DESIGN

A database is an organized collection of data, generally stored and accessed electronically


from a computer system. Where databases are more complex they are often developed using
formal design and modeling techniques.

The database schema of a database is its structure described in a formal language supported


by the database management system (DBMS). The term "schema" refers to the organization
of data as a blueprint of how the database is constructed (divided into database tables in the
case of relational databases). The formal definition of a database schema is a set of formulas
(sentences) called integrity constraints imposed on a database. These integrity constraints
ensure compatibility between parts of the schema. All constraints are expressible in the same
language. A database can be considered a structure in realization of the database language.
The states of a created conceptual schema are transformed into an explicit mapping, the
database schema. This describes how real-world entities are modeled in the database.

Normalization

Database Normalization is a technique of organizing the data in the database. Normalization


is a systematic approach of decomposing tables to eliminate data redundancy (repetition) and
undesirable characteristics like Insertion, Update and Deletion Anomalies. It is a multi-step
process that puts data into tabular form, removing duplicated data from the relation tables.

Normalization is used for mainly two purposes,

 Eliminating redundant (useless) data.


 Ensuring data dependencies make sense i.e. data is logically stored.

There are different forms of normal forms:

 First normal form (1NF)


 Second normal form (2NF)
 Third normal form (3NF)
 Boyce code normal form (BCNF)

[Link] Page 37
 Fourth normal form (4NF)
 Fifth normal Form (5NF)

group table

Field Name Data Type Nullable Key


id int Not Null Primary Key
name varchar(150) Not Null

user table

Field Name Data Type Nullable Key


id int Not Null Primary Key
password varchar(128) Not Null
last_login datetime(6) Null
is_superuser tinyint(1) Not Null
username varchar(150) Not Null
first_name varchar(150) Not Null
last_name varchar(150) Not Null
email varchar(254) Not Null
is_staff tinyint(1) Not Null
is_active tinyint(1) Not Null
date_joined datetime(6) Not Null

user_groups table

Field Name Data Type Nullable Key


id int Not Null Primary Key
user_id Int Not Null Foreign Key
group_id Int Not Null Foreign Key

elearn_choice table

[Link] Page 38
Field Name Data Type Nullable Key
id int Not Null Primary Key
choice varchar(256) Null
is_correct tinyint(1) Not Null
question_id int Not Null Foreign Key

elearn_classtestpost table

Field Name Data Type Nullable Key


id int Not Null Primary Key
title varchar(256) Not Null
description varchar(500) Null
college_class_id int Not Null Foreign Key
subject_id int Not Null Foreign Key
teacher_id int Not Null Foreign Key

elearn_classtestpost_students table

Field Name Data Type Nullable Key


id int Not Null Primary Key
classtestpost_id int Not Null Foreign Key
student_id int Not Null Foreign Key

elearn_classworkpost table

Field Name Data Type Nullable Key


id int Not Null Primary Key
title varchar(256) Not Null
is_assignment tinyint(1) Not Null
college_class_id int Not Null Foreign Key
subject_id int Not Null Foreign Key
teacher_id int Not Null Foreign Key

elearn_classworkpost_students table

Field Name Data Type Nullable Key


id int Not Null Primary Key

[Link] Page 39
classworkpost_id int Not Null Foreign Key
student_id int Not Null Foreign Key

elearn_college table

Field Name Data Type Nullable Key


id int Not Null Primary Key
first_name varchar(256) Not Null
last_name varchar(256) Not Null
college_name varchar(500) Not Null
email varchar(256) Not Null
phone_no varchar(13) Not Null
card_info varchar(16) Not Null
signup_date datetime(6) Not Null
plan_subscribed_id int Null Foreign Key
user_id int Not Null Foreign Key

elearn_collegeclass table

Field Name Data Type Nullable Key


id int Not Null Primary Key
name varchar(50) Not Null
college_id int Null Foreign Key
department_id int Null Foreign Key

elearn_department table

Field Name Data Type Nullable Key


id int Not Null Primary Key
name varchar(50) Not Null
college_id int Not Null Foreign Key

elearn_documentpost table

Field Name Data Type Nullable Key


id int Not Null Primary Key
body varchar(500) Null
document_url varchar(100) Not Null
post_id int Not Null Foreign Key

[Link] Page 40
elearn_imagepost table

Field Name Data Type Nullable Key


id int Not Null Primary Key
body varchar(500) Null
image_url varchar(100) Not Null
post_id int Not Null Foreign Key

elearn_linkpost table

Field Name Data Type Nullable Key


id int Not Null Primary Key
link varchar(500) Null
post_id int Not Null Foreign Key

elearn_plan table

Field Name Data Type Nullable Key


id int Not Null Primary Key
name varchar(256) Not Null
price_per_month decimal(6,2) Not Null
price_per_year decimal(6,2) Not Null
upcoming_price_per_mont double Null
h
upcoming_price_per_year double Null

elearn_postcomment table

Field Name Data Type Nullable Key


id int Not Null Primary Key
comment varchar(500) Not Null
post_id int Not Null Foreign Key

elearn_question table

Field Name Data Type Nullable Key


id int Not Null Primary Key
question varchar(500) Null

[Link] Page 41
class_test_post_id int Not Null Foreign Key

elearn_student table

Field Name Data Type Nullable Key


id int Not Null Primary Key
first_name varchar(256) Not Null
last_name varchar(256) Not Null
email varchar(256) Not Null
college_id int Not Null Foreign Key
college_class_id int Null Foreign Key
user_id int Not Null Foreign Key

elearn_subject table

Field Name Data Type Nullable Key


id int Not Null Primary Key
name varchar(256) Not Null
college_class_id int Not Null Foreign Key

elearn_sybadmin table

Field Name Data Type Nullable Key


id int Not Null Primary Key
first_name varchar(256) Not Null
last_name varchar(256) Not Null
email varchar(256) Not Null
user_id int Not Null Foreign Key

elearn_teacher table

Field Name Data Type Nullable Key


id int Not Null Primary Key
first_name varchar(256) Not Null
last_name varchar(256) Not Null
email varchar(256) Not Null
college_id int Not Null Foreign Key
user_id int Not Null Foreign Key

[Link] Page 42
elearn_teacher_college_classes table

Field Name Data Type Nullable Key


id int Not Null Primary Key
teacher_id int Not Null Foreign Key
collegeclass_id int Not Null Foreign Key

elearn_textpost table

Field Name Data Type Nullable Key


id int Not Null Primary Key
body varchar(500) Null
post_id int Not Null Foreign Key

elearn_videopost table

Field Name Data Type Nullable Key


id int Not Null Primary Key
body varchar(500) Null
video_url varchar(100) Not Null
post_id int Not Null Foreign Key

elearn_youtubepost table

Field Name Data Type Nullable Key


id int Not Null Primary Key
youtube_link varchar(256) Null
post_id int Not Null Foreign Key

[Link] Page 43
4.2.2 DATA INTEGRITY AND CONSTRAINTS

The term data integrity refers to the accuracy and consistency of data. When creating
databases, attention needs to be given to integrity of the data and how to maintain it. A good
database will enforce data integrity whenever possible.

For example, a user could accidentally try to enter a phone number into a date field. If the
system enforces data integrity, it will prevent the user from making these mistakes.

Maintaining data integrity means making sure the data remains intact and unchanged
throughout its entire life cycle. This includes the capture of the data, storage, updates,
transfers, backups, etc. Every time data is processed there’s a risk that it could get corrupted
(whether accidentally or maliciously).

Risks to Data Integrity

Some more examples of where data integrity is at risk:

 A user tries to enter a date outside an acceptable range.


 A user tries to enter a phone number in the wrong format.
 A bug in an application attempts to delete the wrong record.
 While transferring data between two databases, the developer accidentally tries to
insert the data into the wrong table.
 While transferring data between two databases, the network went down.
 A user tries to delete a record in a table, but another table is referencing that record as
part of a relationship.

4 Types of Data Integrity

In the database world, data integrity is often placed into the following types:

 Entity integrity
 Referential integrity
 Domain integrity
 User-defined integrity

[Link] Page 44
Entity Integrity

Entity integrity defines each row to be unique within its table. No two rows can be the same.
To achieve this, a primary key can be defined. The primary key field contains a unique
identifier – no two rows can contain the same unique identifier.

Referential Integrity

Referential integrity is concerned with relationships. When two or more tables have a
relationship, we have to ensure that the foreign key value matches the primary key value at
all times. We don’t want to have a situation where a foreign key value has no matching
primary key value in the primary table. This would result in an orphaned record.
So referential integrity will prevent users from:

 Adding records to a related table if there is no associated record in the primary table.
 Changing values in a primary table that result in orphaned records in a related table.
 Deleting records from a primary table if there are matching related records.

Domain Integrity

Domain integrity concerns the validity of entries for a given column. Selecting the
appropriate data type for a column is the first step in maintaining domain integrity. Other
steps could include, setting up appropriate constraints and rules to define the data format
and/or restricting the range of possible values.

User-Defined Integrity

User-defined integrity allows the user to apply business rules to the database that aren’t
covered by any of the other three data integrity types.

Constraints enforce limits to the data or type of data that can be inserted/updated/deleted from
a table. The whole purpose of constraints is to maintain the data integrity during an
update/delete/insert into a table. In this tutorial we will learn several types of constraints that
can be created in RDBMS.

[Link] Page 45
Types of constraints

 NOT NULL
 UNIQUE
 DEFAULT
 CHECK
 Key Constraints – PRIMARY KEY, FOREIGN KEY
 Domain constraints
 Mapping constraints

4.3 PROCEDURAL DESIGN

Fig 4.3.1 Procedural Diagram

[Link] Page 46
4.3.1 LOGIC DIAGRAMS
Logic diagrams are diagrams in the field of logic, used for representation and to carry out
certain types of reasoning.

Nodes

Nodes or elements are used to host graphical objects like paths and controls that can be
arranged and manipulated on a diagram page.

 Many predefined standard shapes are included.


 Custom shapes can also be created and added easily.
 A node’s appearance can be fully customized.
 A node’s UI can also be converted into a template and re-used across multiple nodes.

Connectors

The relationship between two nodes is represented using a connector. Multiple instances of
nodes and connectors form a diagram.

Creating a Diagram

To create a Diagram:

1. Select first an element where a new Diagram to be contained as a child in Explorer.

2. Select Model | Add Diagram | [DiagramType] in Menu Bar or select Add Diagram
| [DiagramType] in Context Menu.

[Link] Page 47
ACTIVITY DIAGRAM
We use Activity Diagrams to illustrate the flow of control in a system and refer to the steps
involved in the execution of a use case. We model sequential and concurrent activities using
activity diagrams. So, we basically depict workflows visually using an activity diagram. An
activity diagram focuses on condition of flow and the sequence in which it happens. We
describe or depict what causes a particular event using an activity diagram.

UML models basically three types of diagrams, namely, structure diagrams, interaction
diagrams, and behavior diagrams. An activity diagram is a behavioral diagram i.e. it depicts
the behavior of a system. An activity diagram is very similar to a flowchart.

[Link] Page 48
Fig 4.3.2 Activity diagram for e-LMS

[Link] Page 49
SEQUENCE DIAGRAM
A sequence diagram shows object interactions arranged in time sequence. It depicts the
objects and classes involved in the scenario and the sequence of messages exchanged
between the objects needed to carry out the functionality of the scenario. Sequence diagrams
are typically associated with use case realizations in the Logical View of the system under
development. Sequence diagrams are sometimes called event diagrams or event scenarios.

Fig 4.3.3 Sequence diagram

[Link] Page 50
4.3.2 ALGORITHM DESIGN
An algorithm is a set of steps of operations to solve a problem performing calculation, data
processing, and automated reasoning tasks. An algorithm is an efficient method that can be
expressed within finite amount of time and space.

An algorithm is the best way to represent the solution of a particular problem in a very simple
and efficient way. If we have an algorithm for a specific problem, then we can implement it
in any programming language, meaning that the algorithm is independent from any
programming languages.

The important aspects of algorithm design include creating an efficient algorithm to solve a
problem in an efficient way using minimum time and space.

To solve a problem, different approaches can be followed. Some of them can be efficient
with respect to time consumption, whereas other approaches may be memory efficient.
However, one has to keep in mind that both time consumption and memory usage cannot be
optimized simultaneously. If we require an algorithm to run in lesser time, we have to invest
in more memory and if we require an algorithm to run with lesser memory, we need to have
more time.

The main characteristics of algorithms are as follows –

 Algorithms must have a unique name


 Algorithms should have explicitly defined set of inputs and outputs
 Algorithms are well-ordered with unambiguous operations
 Algorithms halt in a finite amount of time. Algorithms should not run for infinity, i.e.,
an algorithm must end at some point

[Link] Page 51
4.4 USER INTERFACE DIAGRAM
USE CASE DIAGRAM

The purpose of use case diagram is to capture the dynamic aspect of a system. However, this
definition is too generic to describe the purpose, as other four diagrams (activity, sequence,
collaboration, and Statechart) also have the same purpose. We will look into some specific
purpose, which will distinguish it from other four diagrams.

Use case diagrams are used to gather the requirements of a system including internal and
external influences. These requirements are mostly design requirements. Hence, when a
system is analyzed to gather its functionalities, use cases are prepared and actors are
identified.

Fig 4.3.4 Use case diagram


[Link] Page 52
[Link] Page 53
4.5 SECURITY ISSUE
One of the top concerns organizations have about Learning Management Systems is data
safety. Will their sensitive information be vulnerable? Who will be able to access their
valuable online training resources?

This project is being implemented in Django, a very popular Python library for creating
robust and secure web applications under less time.

Out-of-the-box Django provides various features which the developer can use to build a
secure application. Some of these features include:

 Cross site scripting (XSS) protection


 Cross site request forgery (CSRF) protection
 SQL injection protection
 Clickjacking protection
 SSL/HTTPS redirection
 Host header validation
 Referrer policy
 Session security

All of these played a vital role in building this secure web application.

[Link] Page 54
CHAPTER 5: IMPLEMENTATION AND
TESTING

5.1 IMPLEMENTATION APPROACHES


An implementation method tailored to the project is a prerequisite for successful software
implementation. This involves costing, planning, controlling, and monitoring the necessary
tasks, including resource.

5.2 CODING DETAILS


The basic project structure of any Django application will have at least one project which will
contain at least one application but we can create more. Django applications work on the
basis of Model-View-Controller principle. So basically the application is divided into three
main components and these three components work together to provide our application’s
functionality.

There is a slight difference in naming of these components from traditional MVCs. In


Django, Models (M of MVC) are called Models and are written in [Link] file inside the
app directory. The templates directory contains the .html template files which are considered
as Views (V of MVC). Controllers (C of MVC) consist of the url_patterns written in the
[Link] file as well as the functional or class-based views inside the [Link] file.

The MVC architecture works as follows:

1. User requests something (a page or resource)


2. The request is received by the Controller (url_patterns and views of django).
3. If there is a need for data access or manipulation then the Controllers communicate
with the required Models.
4. Response (View) is sent back to the users in form of html pages (templates) or
JSON/XML.

Code for our home page view:

def home(request):
plans = [Link]()

[Link] Page 55
context_dict = {
'plans': plans,
}
return render(request, template_name='[Link]', context=context_dict)
In the above code, home() function defines the name of our view. It takes a request object as
a parameter. This request object will contain all the form data is any form was submitted in
the request.

The return statement returns the response, which in this case is a view template called
[Link]. Templates in Django contain normal html code along with some place holder
variables which are part of a syntax called as Django template language. Now we must pass
the values to these variables so that the page will be rendered properly with all data in place.
In order to do so we pass in a context dictionary (context=context_dict) in our render()
method. This dictionary contains the plans object which is nothing but a collection of all the
plans we retrieved from the database in the line plans = [Link]()

Now let’s see the portion of the template where the plans will be used.

<table class="table">
<thead class="thead-dark">
<tr>
<th></th>
{% for plan in plans %}
<th>{{ [Link] }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
<tr>
<td class="row-desc">Price per month</td>
{% for plan in plans %}
<td>₹{{ plan.price_per_month|floatformat }} / month<sup>*</sup></td>

[Link] Page 56
{% endfor %}
</tr>
<tr>
<td class="row-desc">Price you will be paying per year</td>
{% for plan in plans %}
<td>₹{{ plan.price_per_year|floatformat }} / year</td>
{% endfor %}
</tr>
<tr>
<td class="row-desc">Storage</td>
{% for plan in plans %}
{% if plan.allotted_storage_space > 999 %}
<td>{{ plan.allotted_storage_space|div:1000|floatformat }} TB</td>
{% else %}
<td>{{ plan.allotted_storage_space|floatformat }} GB</td>
{% endif %}
{% endfor %}
</tr>
<tr>
<td colspan="4">
Payment will be on yearly basis and not monthly.<sup>*</sup>
</td>
</tr>
<tr>
<td></td>
<td><a class="btn btn-warning buy-btns" href="{% url 'signup'
plan_subscribed='Basic' %}">Buy</a>
</td>
<td><a class="btn btn-warning buy-btns" href="{% url 'signup'
plan_subscribed='Standard' %}">Buy</a>

[Link] Page 57
</td>
<td><a class="btn btn-warning buy-btns" href="{% url 'signup' plan_subscribed='Pro'
%}">Buy</a></td>
</tr>
</tbody>
</table>
As we can see from the above code, the plans dictionary that we passed through our view into
this template is being used to fill up the data for our home page plans table. This table
contains all the available plans that we are providing for our customers. The things that start
with a {% or {{ are part of the Django template language syntax and are interpreted and
processed before the page is finally sent to the requesting user’s browser.

In Django template language, Variables look like this: {{ variable }}. When the template
engine encounters a variable, it evaluates that variable and replaces it with the result. The dot
(".") also appears in variable sections, although that has a special meaning, as indicated
below. Importantly, you cannot have spaces or punctuation characters in variable names.

Behind the scenes:

Technically, when the template system encounters a dot, it tries the following lookups, in this
order:

 Dictionary lookup
 Attribute or method lookup
 Numeric index lookup

If the resulting value is callable, it is called with no arguments. The result of the call becomes
the template value.

This lookup order can cause some unexpected behaviour with objects that override dictionary
lookup. For example, consider the following code snippet that attempts to loop over a
[Link]:

{% for k, v in [Link] %}
Do something with k and v here...

[Link] Page 58
{% endfor %}
Because dictionary lookup happens first, that behaviour kicks in and provides a default value
instead of using the intended .items() method. In this case, consider converting to a dictionary
first.

Tags look like this: {% tag %}. Tags are more complex than variables: Some create text in
the output, some control flow by performing loops or logic, and some load external
information into the template to be used by later variables.

Some tags require beginning and ending tags (i.e. {% tag %} ... tag contents ... {% endtag
%}).

Django ships with about two dozen built-in template tags. You can read all about them in the
built-in tag reference. To give you a taste of what’s available, here are some of the more
commonly used tags:

 for
 if, elif, and else
 block and extends

& many more…

The functionality of these are similar to their counterparts in other languages albeit they differ
in the syntax.

Authentication mechanism: In our app every user be it College or Teacher or Student or


Sybadmin, all have a One-To-One relationship with the Django’s built-in User model. This
saves us some development time as this User model comes with its own authentication
mechanism. If we chose to create all of these users custom, without this One-To-One
relationship, we could have done so. But that approach would have caused us to write custom
authentication mechanisms for each users.

@unauthenticated_user
def sign_up(request, plan_subscribed=''):
if [Link] == 'POST':

[Link] Page 59
data = [Link]([Link])
first_name = data['first_name']
last_name = data['last_name']
college_name = data['college_name']
email_id = data['email_id']
password1 = data['password']
phone_no = data['phone_no']
card_no = data['card_no']
card_cvv = data['card_cvv']
plan_subscribed = data['plan_subscribed']

# Dummy payment processing


pay_status_failed = False
if pay_status_failed:
return redirect(payment_failed)

try:
# register the User
new_user = [Link].create_user(
first_name=first_name,
last_name=last_name,
email=email_id,
username=email_id,
)
new_user.set_password(password1)
new_user.save()

# Add this user to collegeadmin group


collegeadmin_group = [Link](name='collegeadmin')

[Link] Page 60
collegeadmin_group.user_set.add(new_user)

# get the plan_subscribed object


plan = [Link](name=plan_subscribed)

# register the User as College


college = [Link](
user=new_user,
plan_subscribed=plan,
first_name=first_name,
last_name=last_name,
college_name=college_name,
email=email_id,
phone_no=phone_no,
card_info=card_no,
)
college.set_initial_subscription_dates()
[Link]()

# NOTE: Here you can add backend payment processing


# process the payment here and generate invoice for it
invoice = [Link](
college=college,
plan_subscribed=plan,
)
[Link]()
[Link]()

# Now log the user in

[Link] Page 61
auth_user = authenticate(request, username=email_id,
password=password1)
if auth_user is not None:
login(request, auth_user)
return JsonResponse({'process': 'success'})
else:
return JsonResponse({'process': 'failed', 'msg': 'User
authentication system failed! Please sign in'})
except IntegrityError:
return JsonResponse({'process': 'failed', 'msg': 'User already
exists'})
except Exception as err:
return JsonResponse({'process': 'failed', 'msg': f'{str(err)}'})

plans = [Link]().values_list('name', flat=True)


if plan_subscribed not in plans:
return redirect(home)
cost_of_selected_plan = [Link](name=plan_subscribed).price_per_year
context_dict={
'plan_selected': plan_subscribed,
'plan_cost': f'₹{int(cost_of_selected_plan)} / year'
}
return render(request, template_name='sign_up.html', context=context_dict)

In the above code a College is signing up for a plan. The [Link]([Link]) loads the
posted form data into python’s dictionary format for further processing. We are using
[Link]() here because the form in this view was posted via browser’s fetchApi (AJAX).
Down the view we create the required objects and store the data in the database using Django
ORM. We also create an invoice for the College.

Note how the User object was created first then it was passed to the College’s user attribute.
This college_object.user defines the One-To-One relationship between the User and the

[Link] Page 62
College. Also make a note of how the User’s password was set. Instead of doing
new_user.password=password1 we called a method on the new_user object:
new_user.set_password(password1). This is the preferred way of storing passwords in
Django. The set_password() method generates a hash for the password provided and stores
the hash in the database. In Django (and in any kind of application in general) we never store
credentials directly/as it is in the database, instead we generate a hash for the password using
hashing algorithms provided by various libraries and then store the hash in the database. Then
at the time of login we hash the password provided at the login form and then compare the
hashes.

@unauthenticated_user
def sign_in(request):
if [Link] == 'POST':
username = [Link]('email') # username and email are one and
the same for the context of this app
password = [Link]('password')
try:
# Log the user in
auth_user = authenticate(request, username=username,
password=password)
if auth_user is not None:
login(request, auth_user)
# Now redirect based on what group user is a part of
login_user = [Link](username=username)
login_user_group = login_user.[Link]()[0].name
redirect_dict = {
'collegeadmin': college_page,
'teacher': college_teacher,
'student': college_student,
'sybadmin': syb_admin_page,
}
[Link] Page 63
return redirect(redirect_dict[login_user_group])
else:
if [Link](username=username).exists():
context_dict = {'msg': 'Email id or password is
wrong'}
return render(request,
template_name='sign_in.html', context=context_dict)

context_dict = {'msg': 'User does not exist please sign


up first'}
print(1)
return render(request, template_name='sign_in.html',
context=context_dict)
except Exception as err:
context_dict = {'msg': f'{err}'}
return render(request, template_name='sign_in.html',
context=context_dict)
context_dict = {}
return render(request, template_name='sign_in.html', context=context_dict)
In the above code we are signing the user in. The signin page is common for all types of users
be it collegeadmins, teachers, students, or even sybadmins. Take a close look at the line
containing the authenticate() method: authenticate(request, username=username,
password=password). This method is used for checking user’s credentials in Django. We
only need to call this method and provide the required credentials i.e. username and
password. In our application we are using email itself as our username thus making it
possible for us to sign in by using our email id. If the credentials are invalid then the
authenticate() method will return None. If the result is not None that means that the provided
credentials are correct and we can login the user via the login() method of Django and
passing the request object as well as the auth_user object returned by the authenticate()
method. This will do all the required stuff required for login, like setting the sessions/cookies,
etc. in the background.

[Link] Page 64
def sign_out(request):
# sign out logic here
logout(request)
context_dict = {'msg': 'Logged out successfully'}
return render(request, template_name='sign_in.html', context=context_dict)

The above code is from the sign_out view. Here in this view we are using the logout()
method provided by Django for logging the user out of the application. Behind the curtains
this method clears all the session and cookie data set during the signup process. After signing
the user out we then render the sign_in template /page.

The @login_required and @unauthenticated_user are python decorators (special functions)


which we use for user authorization or access restriction. The @login_required is provided
by Django itself while @unauthenticated_user is custom user written decorator.

All other views and templates use these same techniques and methodologies for providing the
functionality of our application.

5.3 TESTING APPROACH


Automated testing is an extremely useful bug-killing tool for the modern Web developer.
You can use a collection of tests – a test suite – to solve, or avoid, a number of problems:

 When you’re writing new code, you can use tests to validate your code works as
expected.
 When you’re refactoring or modifying old code, you can use tests to ensure your
changes haven’t affected your application’s behavior unexpectedly.

Testing a Web application is a complex task, because a Web application is made of several
layers of logic – from HTTP-level request handling, to form validation and processing, to
template rendering. With Django’s test-execution framework and assorted utilities, you can
simulate requests, insert test data, inspect your application’s output and generally verify your
code is doing what it should be doing.

[Link] Page 65
5.3.1 UNIT TESTING
Django’s unit tests use a Python standard library module: unittest. This module defines tests
using a class-based approach.

Here is an example which subclasses from [Link], which is a subclass of


[Link] that runs each test inside a transaction to provide isolation:

Once you’ve written tests, run them using the test command of your project’s [Link]
utility:

>python [Link] test

Tests that require a database (namely, model tests) will not use your “real” (production)
database. Separate, blank databases are created for the tests.

Regardless of whether the tests pass or fail, the test databases are destroyed when all the tests
have been executed.

5.3.2. INTEGRATION TESTING


Integration testing implements a module code for a system and test for a work correctly or
not. And error are occurs this time solve problems of an error. Integration testing is a
systematic technique for constructing tests to uncover error associated within the interface. In
the project, all the modules are combined and then the entire programmer is tested as a whole.
In the integration-testing step, all the error uncovered is corrected for the next testing steps.

5.4. MODIFICATIONS AND IMPROVEMENTS


The system modification is depends on their implementation which is done by using software
which we use for project development. In the development of project we finish the testing
and then find the bugs, errors and after that we improve it. But for implementation we have to
focus on problems also decisions necessary to solve the problems. Information needs to make
these decisions.

[Link] Page 66
5.5 TEST CASES
Test Expected Actual
Test Case ID Test Steps Pass/Fail
Scenario Result Result
1 Test signup 1. Enter Invalid data Invalid data Pass
form fields invalid data message message is
with invalid into all form should be displayed.
data fields displayed.
2. Press
Signup
button
2 Test signup 1. Enter User must be User is Pass
form fields invalid data signed up and signed up and
with valid into all form taken to the taken to the
data fields college college
2. Press dashboard dashboard
Signup page page
button
3 Test add 1. Enter Invalid data Invalid data Pass
teacher form invalid data message message is
fields with into all form should be displayed.
invalid data fields displayed.
2. Press add
button
4 Test add 1. Enter valid New teacher New teacher Pass
teacher form data into all must be is added to
fields with form fields added to the the database
valid data 2. Press add database and and the user
button the user must is notified
be notified
5 Test add 1. Enter Invalid data Invalid data Pass
department invalid data message message is
form fields into all form should be displayed.
with invalid fields displayed.
data 2. Press add
button
6 Test add 1. Enter valid New New Pass
department data into all department department is
form fields form fields must be added to the
with valid 2. Press add added to the database and
data button database and the user is
the user must notified
be notified
7 Test add 1. Enter Invalid data Invalid data Pass
class form invalid data message message is
fields with into all form should be displayed.
invalid data fields displayed.

[Link] Page 67
2. Press add
button
8 Test add 1. Enter valid New class New class is Pass
class form data into all must be added to the
fields with form fields added to the database and
valid data 2. Press add database and the user is
button the user must notified
be notified
9 Test edit 1. Press edit Old data Old data is Pass
department button should not be not updated
data with 2. Enter updated and and invalid
invalid data invalid data invalid data data message
3. Press save message is displayed
button should be
displayed
10 Test edit 1. Press edit Old Old Pass
department button department department
data with 2. Enter valid data should data is
valid data data be updated updated with
3. Press save with the new the new one
button one
11 Test edit 1. Press edit Old data Old data is Pass
class data button should not be not updated
with invalid 2. Enter updated and and invalid
data invalid data invalid data data message
3. Press save message is displayed
button should be
displayed
12 Test edit 1. Press edit Old class Old class Pass
class data button data should data is
with valid 2. Enter valid be updated updated with
data data with the new the new one
3. Press save one
button
13 Test edit 1. Press edit Old data Old data is Pass
teacher data button should not be not updated
with invalid 2. Enter updated and and invalid
data invalid data invalid data data message
3. Press save message is displayed
button should be
displayed
14 Test edit 1. Press edit Old teacher Old teacher Pass
teacher data button data should data is
with valid 2. Enter valid be updated updated with
data data with the new the new one
3. Press save one
button
15 Delete 1. Press Teacher data Teacher data Pass
teacher data delete button should be deleted from
for respective deleted from the table

[Link] Page 68
teacher (row) the table
16 Delete 1. Press Department Department Pass
department delete button data should data deleted
data for respective be deleted from the
department from the table
(row) table
17 Delete class 1. Press Class data Class data Pass
data delete button should be deleted from
for respective deleted from the table
class (row) the table
18 Test sign in 1. Enter Invalid Invalid Pass
form with username and username or username or
invalid data password password password
2. Press message message is
signin button should be displayed
displayed
19 Test sign in 1. Enter User must be User is Pass
form with username and signed in and signed in and
valid data password taken to their taken to their
2. Press respective respective
signin button dashboard dashboard
page page
20 Test add 1. Enter Invalid data Invalid data Pass
student form invalid data message message is
fields with into all form should be displayed.
invalid data fields displayed
2. Press add
button
21 Test add 1. Enter valid New student New student Pass
student form data into all must be is added to
fields with form fields added to the the database
valid data 2. Press add database and and the user
button the user must is notified
be notified
22 Test add 1. Enter Invalid data Invalid data Pass
subject form invalid data message message is
fields with into all form should be displayed.
invalid data fields displayed
2. Press add
button
23 Test add 1. Enter valid New subject New subject Pass
subject form data into all must be is added to
fields with form fields added to the the database
valid data 2. Press add database and and the user
button the user must is notified
be notified
24 Test add post 1. Click on If the post If the post Pass
add post meets all meets all
button requirements requirements
2. Select post and is within and is within

[Link] Page 69
type constraints constraints
3. Submit the then it should then it is
post be successfully
successfully submitted
submitted and visible in
and visible in the feed else
the feed else error message
display error is displayed
message
25 Test add 1. Click on If all the data If all the data Pass
classtestpost add classtest is valid then is valid then
button create the the
2. Enter the classtestpost classtestpost
required data else display is created
3. Submit the error message else error
test post message is
displayed
26 Test answer 1. Click on If all If all Pass
and submit test post questions are questions are
classtest 2. Answer all answered answered the
question then the test submit the
3. Press the must be test else
submit button submitted display error
else display message
error message
27 Test add 1. Type the If the If the Pass
comment comment in comment text comment text
the textbox is valid then is valid then
2. Press the comment the comment
submit button must be is submitted
submitted else the error
else display message is
the error displayed
message

[Link] Page 70
CHAPTER 6: RESULTS AND DISCUSSION

6.1. SCREENSHOTS AND FUNCTIONALITY


Home Page

This is the home page of the web application for all users, irrespective of which group they
belong.

[Link] Page 71
Signup Page

Here in this page a college can sign up for their subscription of this e-learning platform. Once
successfully signed up the user will be automatically logged in and forwarded to their custom
homepage (college dashboard).

[Link] Page 72
Signin Page (Common for all users)

This is the common sign in page of the application, all types of users can sign in here.

Django Admin Login Page

This is the Django admin dashboard’s login page, only superusers can login here.

[Link] Page 73
Django Admin Dashboard

This is the Django admin dashboard, here the superuser can perform various administrative
CRUD tasks. This is not related to the sybadmin’s dashboard.

SybAdmin Dashboard

This is the homepage of the sybadmin user. Here he can keep track of other admin users as
well as subscribed colleges.

[Link] Page 74
SybAdmin Other Pages

In the above page a sybadmin user can create other admin users. He can choose whether to
give superuser rights to the newly created admin user.

The following profile page for changing personal info (email, password, etc.) is available for
all users.

[Link] Page 75
College Dashboard

[Link] Page 76
The college dashboard is the homepage of a college user. Here a college can perform the
various administrative tasks required for the college to function properly.

College Other Pages

[Link] Page 77
College Subscription Management

The subscription management is located in the college user’s profile page. From here a
college can cancel their plan as well as keep track of how much storage space have they used
till now and how much is left.

[Link] Page 78
Teacher Dashboard

This is the teacher’s homepage/dashboard, here all the classes to which the logged in teacher
has been assigned will appear. From here the teacher can navigate to the content feed page of
any classroom.

Teacher Classroom Feed

This page contains the teacher’s content feed for a class.

[Link] Page 79
Teacher Other Pages

[Link] Page 80
Teacher Create Post

[Link] Page 81
Teacher Submitted Assignments Page

Teacher Submitted Test & Test Result Page

[Link] Page 82
Student Class Feed

[Link] Page 83
Student Other Pages

[Link] Page 84
CHAPTER 7: CONCLUSION AND FUTURE
WORK
7.1. CONCLUSION
This web application provides a lightweight platform for academic institutions to provide
their services unhindered. The application is based on Django web framework which is a
tried and tested web framework for python. The stability and reliability of Django is carried
over to this application as well. I have used HTML, CSS (with Bootstrap) and JavaScript
(with jQuery) for the user interface, which I’ve kept very clean and simple for ease of use.
The UI is extremely easy to learn and navigate thus making using this app a breeze. Django
itself is high performance and can handle millions of requests simultaneously without any
issue. When you are doing it in Django, it is ensured that developers don’t commit any
mistakes related to security. Some of the common mistakes include SQL injection, cross-site
request forgery, clickjacking and cross-site scripting. To manage effectively usernames and
passwords, the built-in user authentication system is the key. To meet the heaviest traffic
demand, the benefits of Django framework can be seen. Therefore, this app uses this medium
to quickly meet the traffic demands. These features make this e-learning management system
extremely secure, stable, reliable and maintainable.

Colleges can buy any plan best suited for them, for their needs. Colleges can easily manage
various departments, classes and their faculties in this application. Teachers have a powerful
content feed at their fingertips where they can share various academic content (e-books,
articles, videos, etc.) for students to use. They are also able to assign work to students as well
as conduct MCQ based tests, thus making sure that their students are not lagging behind.

Students on the other hand can access all their education materials as well as submit
assignments and tests directly on this platform. They are not forced to have a google or any
specific company’s account for login, thus respecting their privacy. The content feed
refreshes every 60 seconds automatically thus making sure that no post goes unnoticed.

All of these can be maintained by a team of sybadmins who can respond to any college’s
query and assist them with proper solutions.

[Link] Page 85
7.2. LIMITATIONS
Although I made my best efforts to build this application and this application has various
advantages over other similar applications, there are also some limitations. Though the
software presents a broad range of options to its users some intricate options could not be
covered into it; partly because of logistic and partly due to lack of sophistication. Lack of
time also compelled me to ignore some parts such as adding live classroom support like with
video call and screen sharing, etc.

1. Knowledge of full system is required to work.


2. Students cannot be a part of more than one class at any given moment.
3. Students cannot see all of their submitted work at a single space.
4. Tests are not auto timed (async support needed).
5. No WebRTC support

7.3. FUTURE SCOPE


Some of the planned future improvements are:

1. Students can be part of more than one classroom (just like teachers).
2. Students can see all of their submitted and their pending work along with each of
theirs deadline.
3. Add async support using channels for features like live classtests, chatrooms, etc.
4. Add WebRTC support for live classrooms (like Zoom, WebEx, etc.)

[Link] Page 86
CHAPTER 8: REFERENCES

References include:

 Sites:
o Django documentation: [Link]
o LMS history: [Link]
o Google for various queries: [Link]
o Goguardian: [Link]
management-systems-pros-cons/
o Google’s classroom: [Link]

 Books:
o Django for Beginners: Build websites with Python and Django
- William S. Vincent
o Django for Professionals: Production Websites with Python & Django
- William S. Vincent

[Link] Page 87

You might also like