Sports Club Management System Report
Sports Club Management System Report
By
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.
External Examiner
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.
DATE:
PLACE:
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
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.
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)
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.
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
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:
[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.
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.
[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.
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:
Monitor : LCD/LED
SOFTWARE
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:
[Link] Page 24
E-R DIAGRAM
[Link] Page 25
DATA FLOW DIAGRAM
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
[Link] Page 29
COMPONENT DIAGRAM
[Link] Page 30
COLLABORATION DIAGRAM
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.
[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.
[Link] Page 32
CHAPTER 4: SYSTEM DESIGN
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
[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
Normalization
[Link] Page 37
Fourth normal form (4NF)
Fifth normal Form (5NF)
group table
user table
user_groups table
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
elearn_classtestpost_students table
elearn_classworkpost table
elearn_classworkpost_students table
[Link] Page 39
classworkpost_id int Not Null Foreign Key
student_id int Not Null Foreign Key
elearn_college table
elearn_collegeclass table
elearn_department table
elearn_documentpost table
[Link] Page 40
elearn_imagepost table
elearn_linkpost table
elearn_plan table
elearn_postcomment table
elearn_question table
[Link] Page 41
class_test_post_id int Not Null Foreign Key
elearn_student table
elearn_subject table
elearn_sybadmin table
elearn_teacher table
[Link] Page 42
elearn_teacher_college_classes table
elearn_textpost table
elearn_videopost table
elearn_youtubepost table
[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).
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
[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.
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:
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.
[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.
[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.
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:
All of these played a vital role in building this secure web application.
[Link] Page 54
CHAPTER 5: IMPLEMENTATION AND
TESTING
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.
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
The functionality of these are similar to their counterparts in other languages albeit they differ
in the syntax.
@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']
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()
[Link] Page 60
collegeadmin_group.user_set.add(new_user)
[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)}'})
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)
[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.
All other views and templates use these same techniques and methodologies for providing the
functionality of our application.
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.
Once you’ve written tests, run them using the test command of your project’s [Link]
utility:
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.
[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
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.
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.
[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.
[Link] Page 79
Teacher Other Pages
[Link] Page 80
Teacher Create Post
[Link] Page 81
Teacher Submitted Assignments 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. 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