Black Book Laxman
Black Book Laxman
Black Book Laxman
SESSION 2022-23
MAJOR PROJECT REPORT
ON
E-LEARNING WEBSITE
Submitted in fulfilment of the requirement for the degree of
Bachelor of Computer Application (BCA)
DECLARATION
We project members:
We hereby declare that this project work entitled “E-Learning Website” was
carried out by us Under the supervision of Prof. Pradnya Nehete, Department of IT
Dr. C.V. Raman University, Khandwa.
This project work is submitted to Department of Information Technology during
the academic year 2022-23
Place:
Date:
Signature
Ⅰ
E-Learning Website | 2022-23
SESSION 2022-23
DEPARTMENT OF INFROMATION TECHNOLOGY
CERTIFICATE
This is to certify that AMIT YADAV student of BCA 3rd Year, Ⅵth semester,
(Department of Information Technology) have completed the Project titled
"E-LEARNING WEBSITE" during the academic session 2022-23 under our
Guidance & Supervision.
We approve the project for submission as required for partial fulfilment for
Completion of Bachelor of Computer Application Degree in "Department of
Information Technology"
Ⅱ
E-Learning Website | 2022-23
Table Of Contents
Ⅲ
E-Learning Website | 2022-23
Ⅲ
E-Learning Website | 2022-23
List Of Figures
Ⅳ
E-Learning Website | 2022-23
Chapter -1 Introduction
E-learning, or electronic studying, is the use of digital media and virtual gadgets to
provide academic content and facilitate learning reports. This approach has gained
significant popularity and has become an integral part of present day instructional
structures worldwide. E-mastering structures usually include a Learning Management
System (LMS), Content Development Tools, Communication and Collaboration Tools,
and e-learning tools.
These tools enable educators to create interactive and attractive studying materials,
such as multimedia shows, motion pictures, quizzes, and simulations. They also provide
diverse equipment to facilitate communication and collaboration among teachers and
students, in addition to amongst students themselves.
E-learning has become increasingly popular in academic institutions and corporate
training programs due to its flexibility, accessibility, cost-effectiveness, personalized
learning, scalability, enhanced engagement, and continuous learning and skill
development. These benefits have contributed to the growing reputation of e-learning
systems in academic institutions and corporate training programs. Flexibility and
Accessibility:
E-learning allows rookies to access academic content whenever and everywhere, as long
as they have an internet connection. Cost-Effectiveness: E-learning eliminates the need
for physical classrooms, lowering infrastructure and tour prices. Personalized Learning:
E-learning systems can be tailored to meet the specific wishes and choices of character
novices.
Scalability: E-learning structures can accommodate a huge number of college students
simultaneously, increasing learner motivation and knowledge retention. Continuous
Learning and Skill Development: E-learning helps lifelong gaining knowledge by
providing access to a variety of courses and assets.
1|Page
E-Learning Website | 2022-23
2.1 Definition: -
In Existing system lecture room studying is the conventional shape of schooling that
takes vicinity in bodily school rooms. It includes face-to-face interplay between college
students and teachers, with a dependent curriculum and academic methods.
This gadget is based on textbooks, lectures, discussions, and checks carried out in a
physical setting.
There are limitations in age and getting admission in this educational institutes for
learning.
2|Page
E-Learning Website | 2022-23
In this E-Learning Website we are going to introduce the online solution to traditional
teaching and learning which is begin followed from decades by many schools, colleges &
teachers in our education system
Our aim is to design and create various videos on various courses to make it easy
understand by anyone who is visiting our website anytime and anywhere . This enables
the students to easily access their learning without paying much in a school, institutes to
learn a new skill and with this it becomes easy and exciting to learn
Thus, this will be very easy for both the invigilators/ the teachers and the students to
learn their new skill set.
Technical Feasibility: This issue evaluates whether the proposed task may be applied
from a technical standpoint. It entails assessing the supply of essential generation,
information, and assets to perform the project. It considers elements along with
3|Page
E-Learning Website | 2022-23
Evaluation of Existing Technology: It entails reading the era infrastructure, gear, and
systems currently in place within the employer or to be had inside the marketplace. This
evaluation enables decide if the required era is already available or if additional
investments or improvements are important.
Resource Availability: Technical feasibility considers whether the essential sources,
consisting of hardware, software program, and professional employees, are to be had or
4|Page
E-Learning Website | 2022-23
can be received within the project's constraints. It examines whether or not the
employer has the technical expertise to increase, put in force, and hold the proposed
answer.
Compatibility and Integration: This thing assesses whether the proposed project is
compatible with current systems, software program, and statistics formats. It examines
if the answer can seamlessly integrate with the corporation's technology infrastructure
with out vast disruptions or conflicts.
Technical Requirements and Constraints: Technical feasibility examines the precise
requirements and constraints of the challenge, including overall performance
expectancies, scalability wishes, security concerns, and records garage requirements. It
guarantees that the proposed solution can meet those requirements successfully.
Risk Assessment: Technical feasibility also entails identifying and evaluating capability
technical dangers and challenges which can arise throughout the implementation of the
project. This consists of assessing factors along with complexity, reliability, availability
of technical aid, and any ability dependencies on external structures or components.
Operational feasibility is the ability to utilize, support and perform the necessary tasks
of a system or program. It includes everyone who creates, operates or uses the system.
To be operationally feasible, the system must fulfill a need required by the business. The
system is operational feasible as the system can be operate by normal users with basic
computer skills without any additional trainings. We have developed this system with
the willingness and ability to create, manage and operate the system which is easy for
the end users to operate it.
This document describes the requirement of the system. It is meant for use by the
developers, and will also be the basis for validating the final delivered system.
Any changes made to the requirements in the future will have to go through a
formal change approval process.
5|Page
E-Learning Website | 2022-23
The developer is responsible for asking the clarification, where necessary, and will not
make any alterations without the permission of the client. The developer is responsible
for:
Minimum Requirements:
Processor – Intel Pentium based system.
Hard Disk – 2 GB
Memory – 2 GB RAM
Windows – 64 bits
Recommended:
Processor – Intel i3/ AMD Ryzen 3
Hard Disk – 4 GB
Memory – 4 GB RAM
Windows – 64 bits
Processor speed– 250 MHz to 833MHz
Ram Speed: 4 GB
6|Page
E-Learning Website | 2022-23
7|Page
E-Learning Website | 2022-23
Python turned into created by way of Guido van Rossum and primary launched in 1991.
It become designed to emphasise code clarity and productivity, with a focal point on
simplicity and simplicity of use. Python's philosophy, often known as "The Zen of
Python," promotes a easy and concise coding fashion. The language affords a complete
general library and a extensive atmosphere of 1/3-birthday celebration programs,
making it a versatile tool for developers.
Advantages of Python:
A) Ease of Learning and Readability: Python's simple syntax and smooth code shape
make it smooth to learn and examine, even for novices. This quickens the getting to
know curve and promotes collaboration amongst builders.
B) Rapid Development: Python's simplicity and vast libraries allow quicker development
cycles, permitting builders to put in writing code speedy and successfully. This is
specifically useful for prototyping, scripting, and iterative improvement.
8|Page
E-Learning Website | 2022-23
Applications of Python:
A) Web Development: Python's simplicity and effective web frameworks like Django and
Flask have made it a desired choice for constructing dynamic and scalable web
programs.
B) Data Analysis and Visualization: Python's libraries, consisting of NumPy, pandas, and
Matplotlib, provide strong gear for information manipulation, evaluation, and
visualization. It is widely used in information science and analytics projects.
C) Scientific Computing: Python, in conjunction with libraries like SciPy and SymPy,
gives a comprehensive suite of gear for clinical computing, simulations, and
mathematical modelling.
9|Page
E-Learning Website | 2022-23
3.2About Django: -
Django is a excessive-level internet framework written in Python that follows the Model-
View-Controller (MVC) architectural pattern. It gives developers with a powerful set of
tools and libraries for building sturdy, scalable, and stable web programs. Django
changed into to begin with advanced with the aid of Adrian Holovaty and Simon Willison
on the Lawrence Journal-World newspaper in 2003. It turned into released as an open-
supply framework in 2005 and has because grown right into a mature and broadly
followed web development framework. Django follows the precept of "Don't Repeat
Yourself" (DRY), selling code reusability and minimizing redundancy.
Advantages of Django:
A) Rapid Development: Django's cognizance on code reusability and its large collection
of pre-constructed components permit builders to construct net programs quickly and
efficiently. The framework's batteries-included technique gives critical functionality out
of the field, reducing the need for developers to reinvent the wheel.
B) Scalability and Performance: Django is designed to deal with high site visitors and
big-scale programs. Its scalability features, which includes database connection pooling,
caching, and assist for dispensed architectures, permit packages to address extended
loads without sacrificing performance.
10 | P a g e
E-Learning Website | 2022-23
C) Versatility and Flexibility: Django may be used to construct a wide range of net
programs, from small-scale projects to agency-degree structures. Its modular layout and
sizeable ecosystem of 1/3-celebration packages provide flexibility and permit
developers to integrate extra capability seamlessly.
D) Community and Documentation: Django has a colourful and energetic community of
developers who contribute to its increase and provide support through boards,
documentation, and tutorials. This community-pushed technique guarantees that
developers have get right of entry to to assets and assistance when wanted.
E) Testing and Debugging: Django offers strong testing gear and debugging talents,
allowing builders to jot down test cases and debug code successfully. This promotes
code first-class and facilitates identify and connect problems early within the
development manner.
11 | P a g e
E-Learning Website | 2022-23
HTML tags are like keywords which defines that how web browser will format and
display the content. With the help of tags, a web browser can distinguish between an
HTML content and a simple content.
HTML tags contain three main parts: opening tag, content and closing tag. But some
HTML tags are unclosed tags. When a web browser reads an HTML document, browser
reads it from top to bottom and left to right. HTML tags are used to create HTML
documents and render their properties.
Each HTML tags have different properties. An HTML file must have some essential tags
so that web browser can differentiate between a simple text and HTML text. You can use
as many tags you want as per your code requirement.
All HTML tags must enclosed within < > these brackets. Every tag in HTML perform
different tasks. If you have used an open tag , then you must use a close tag (except some
tags) Syntax content
12 | P a g e
E-Learning Website | 2022-23
CSS, short for Cascading Style Sheets, is a language used for styling web pages. It is a
crucial component of web design as it allows developers to control the appearance and
layout of web pages, making them more visually appealing and easier to navigate. CSS
works by defining style rules for HTML elements.
These style rules specify the visual properties of an element, such as its font size, color,
background color, spacing, and layout. The rules can be applied to individual elements
or groups of elements, allowing for consistent styling across a web page or an entire
website. CSS is used in conjunction with HTML, which provides the structure and
content of a web page.
By separating the presentation of a web page from its content, CSS makes it easier to
maintain and update the design of a website without having to modify the underlying
HTML code. CSS has a number of key features that make it a powerful tool for web
design: Selectors: CSS selectors allow developers to target specific HTML elements and
apply styles to them.
Selectors can be based on the element type, class, ID, or other attributes. Cascading: The
"C" in CSS stands for "cascading," which means that multiple style rules can be applied to
a single element, with the most specific rule taking precedence. This allows developers
to create complex styles that override each other based on a hierarchy of importance.
Inheritance: CSS styles can be inherited from parent elements to child elements. This
means that a style applied to a parent element can be automatically applied to all of its
child elements, making it easier to create consistent styles across a website.
Responsive Design: CSS includes features such as media queries and flexible layout
options that allow developers to create websites that adapt to different screen sizes and
device types. This is crucial for creating websites that are accessible and user-friendly
on a variety of devices, from desktop computers to mobile phones and tablets.
Animations and Transitions: CSS includes powerful animation and transition features
that allow developers to create dynamic and engaging web experiences. These features
can be used to create interactive menus, hover effects, and other user interface elements
that make websites more engaging and memorable.
Overall, CSS is a crucial tool for web design that allows developers to create visually
appealing, user-friendly websites. Its powerful features, such as selectors, cascading,
inheritance, responsive design, and animations, make it a versatile language that can be
used to create a wide range of web experiences.
13 | P a g e
E-Learning Website | 2022-23
14 | P a g e
E-Learning Website | 2022-23
Advantages of SQLite:
a) Ease of Use: SQLite is straightforward to use and requires minimal configuration. Its
SQL-based interface makes it familiar to developers already experienced with relational
databases. Creating tables, querying data, and managing transactions can be done using
standard SQL statements.
b) Portability: SQLite databases are self-contained in a single file, making them highly
portable. The database file can be easily shared, copied, or moved between systems
without the need for complex setup or server installation.
c) Efficiency and Performance: SQLite is known for its efficiency and performance, as it
operates directly on the client-side without the overhead of network communication. It
executes SQL queries quickly and provides efficient data storage and retrieval
mechanisms.
d) Low Resource Requirements: SQLite has minimal resource requirements, making it
suitable for embedded systems and applications with limited memory or processing
capabilities. It is lightweight, with a small memory footprint, and performs well even on
low-powered devices.
e) Reliable and Stable: SQLite is well-tested and widely used in production
environments. It has a proven track record of stability and reliability, with a large user
base that continuously tests and improves its performance.
Limitations of SQLite:
a) Concurrency: SQLite has limitations in handling concurrent read and write
operations. While it supports multiple concurrent readers, write operations are
serialized. This makes SQLite less suitable for high-write scenarios or applications with
heavy concurrent write loads.
15 | P a g e
E-Learning Website | 2022-23
An operating system (OS) is the program that, after being initially loaded into the
computer by a boot program, manages all the other application programs in a computer.
The application programs make use of the operating system by making requests for
services through a defined application program interface (API).
In addition, users can interact directly with the operating system through a user
interface, such as a command-line interface (CLI) or a graphical UI (GUI). An operating
system brings powerful benefits to computer software and software development.
Without an operating system, every application would need to include its own UI, as
well as the comprehensive code needed to handle all low-level functionality of the
underlying computer, such as disk storage, network interfaces and so on.
Considering the vast array of underlying hardware available, this would vastly bloat the
size of every application and make software development impractical. Instead, many
common tasks, such as sending a network packet or displaying text on a standard output
device, such as a display, can be offloaded to system software that serves as an
intermediary between the applications and the hardware.
The system software provides a consistent and repeatable way for applications to
interact with the hardware without the applications needing to know any details about
the hardware.
If each application accesses the same resources and services in the same way, that
system software -- the operating system -- can service almost any number of
applications.
This vastly reduces the amount of time and coding required to develop and debug an
application, while ensuring that users can control, configure, and manage the system
hardware through a common and well-understood interface.
16 | P a g e
E-Learning Website | 2022-23
4.1Courses Module : -
The "Courses" model represents a course entity with fields such as name, slug,
description, price, discount, active status, thumbnail image, date, resources, and
length.
It allows storing and managing course details, including their attributes, and
provides methods for easy representation and customization.
4.2Video Module : -
The "Video" model represents a video entity with fields including title, course
(foreign key to "Courses" model), index number, video file (uploadable), and a
boolean field indicating if it's a preview.
It allows managing videos within a course and provides a customized string
representation.
4.3Rating Module : -
17 | P a g e
E-Learning Website | 2022-23
4.5Payment Module : -
The "Coupon Code" model represents a coupon code entity associated with
courses.
It includes fields such as code (a character field with a maximum length of 20
characters), course (foreign key to Courses model with a related name
'coupons'), and discount (an integer field with a default value of 0).
The model allows storing coupon codes for specific courses along with their
corresponding discounts.
18 | P a g e
E-Learning Website | 2022-23
The input is the set of values that is provided by the user to the system. The input design
must enable the user to provide the error free input to the system for efficient
processing. The input design is the process of converting the user-oriented inputs into
computer based formats.
The data fed into the system using simple interactive forms. The forms have been
supplied with messages so that user can enter data without facing any difficulty. The
data is validated wherever it requires in the project.
The input data have to be validated, edited, organized, and accepted by the system
before being proposed to produce the output.
The main objectives of input design are as follows:
Produce effective method of input.
Achieve high level accuracy.
Ensure that the input is acceptable and understood by the user.
Internal Input: When the external inputs are obtained from the user, these inputs are
transferred to the system as messages. These messages are captured and handled as
input for further processing.
In this project the input design is done with JAVA codes. The external inputs are data
given to the system by the user such as username and password for authentication
process.
The external input also includes the request as per the users interest for displaying
today’s, yesterdays and last week’s threads/posts and its replies. The internal input
covers the fetching of data from the database and it will be the input for displaying the
results of the screen.
19 | P a g e
E-Learning Website | 2022-23
The necessary internal inputs are given to the system by Graphical User Interface (GUI)
technology. The GUI system applied to this project enables the user to avoid error and
conclusion arises while entering the input.
5.2 Output Design : -
A quality output is one, which meets the requirements of the end user and presents the
information clearly. In any systems results of the processing are communicated to the
user and to the other systems through outputs design it is determined how the
information is to be displayed for immediate need.
It is the most important and direct source information to the user. Efficient and
intelligent output design improves the systems relationship with the user and helps in
decision making.
The objective of the output design is to convey the information of all the past activities,
current status and to emphasize important events. The output generally refers to the
results and information that is generated from the system. Outputs from computers are
required primarily to communicate the results of processing to the users.
The result for each query option that is submitted by the user, the system displays the
output. The output that is obtained for each query submitted should be tested before
conforming the result
21 | P a g e
E-Learning Website | 2022-23
22 | P a g e
E-Learning Website | 2022-23
23 | P a g e
E-Learning Website | 2022-23
5.4Database Design : -
24 | P a g e
E-Learning Website | 2022-23
Chapter - 6 Coding
6.1 Coding : -
to manage code modifications, music revisions, and allow a couple of builders to work at
the equal codebase simultaneously.
Documentation: Code documentation is vital for understanding how code works and
facilitating future adjustments or protection. Developers often file their code through
including comments, which are explanatory notes embedded inside the code, describing
its reason and functionality.
Iterative Process: Coding is an iterative procedure where developers write code, take a
look at it, discover problems, make modifications, and repeat until the desired capability
is performed. This technique may also contain refining algorithms, optimizing code
performance, or including new functions primarily based on remarks and requirements.
Continuous Learning: Coding is a non-stop learning process as programming languages,
frameworks, and equipment evolve over the years. Developers want to stay updated
with the trendy industry traits, nice practices, and technologies to enhance their coding
talents.
Coding is the essential manner of creating laptop programs that pressure cutting-edge
era. It empowers developers to transform thoughts into functional software program
solutions, enabling automation, information processing, verbal exchange, and a
extensive range of applications across various industries.
Coding Validation and Optimization are two critical processes in software improvement
that target making sure the satisfactory, performance, and effectiveness of code.
Coding Validation:
Coding Validation involves verifying the correctness and adherence of the code to
predefined standards, guidelines, and best practices. It goals to make sure that the code
features as meant and meets the specified necessities. Here are some key aspects of
coding validation:
Syntax and Semantics: The code is checked for syntactical mistakes, which includes
incorrect punctuation or misspellings, and semantic mistakes, which involve incorrect
usage or logic.
Compliance with Standards: The code is evaluated towards coding standards and hints
described by means of the programming language, industry excellent practices, or the
development team. This ensures consistency, maintainability, and clarity of the
codebase.
26 | P a g e
E-Learning Website | 2022-23
Code Reviews: Code opinions involve having different builders or team members
investigate and analyze the code for ability troubles, insects, or areas of development. It
promotes know-how sharing, detects ability troubles, and facilitates hold code best.
Static Code Analysis: Automated tools and techniques are used to investigate the code
statically, with out executing it, to discover potential issues like code smells, security
vulnerabilities, performance bottlenecks, and adherence to coding standards.
Unit Testing: Unit tests are written to validate the conduct of individual devices or
additives of code. By executing those assessments, builders can affirm the anticipated
outputs and validate the functionality of code units.
Optimization:
Optimization includes improving the overall performance, performance, and scalability
of code. It makes a speciality of lowering resource consumption, enhancing execution
velocity, and optimizing algorithms and records structures. Here are a few key
components of code optimization:
Performance Profiling: Profiling gear are used to measure the execution time,
reminiscence usage, and resource usage of the code. This allows become aware of
performance bottlenecks and areas for optimization.
Algorithmic Optimization: The performance of algorithms and information structures is
analyzed and improved to reduce time complexity, minimize resource intake, and
beautify average gadget overall performance.
Code Refactoring: Refactoring involves restructuring and rewriting code with out
converting its outside behavior. It objectives to improve code clarity, maintainability, and
overall performance by putting off redundant or inefficient code, enhancing code
corporation, and applying design styles.
Resource Management: Optimization consists of efficient management of machine
sources, inclusive of reminiscence, document handles, community connections, and
database connections. Proper resource allocation, reuse, and deallocation are crucial for
optimized code.
Caching and Data Access Optimization: Techniques like caching frequently used records,
optimizing database queries, and minimizing I/O operations can significantly enhance
code performance.
Parallelization and Concurrency: In cases wherein the code can advantage from
concurrent execution, optimizing code for parallelism can enhance overall performance
by means of using a couple of processors or threads efficiently.
Both coding validation and optimization play crucial roles in ensuring that software
code is strong, green, and of high exceptional. By validating code for correctness,
27 | P a g e
E-Learning Website | 2022-23
adherence to requirements, and nice practices, and optimizing code for overall
performance and efficiency, developers can create software that meets the necessities,
offers most beneficial overall performance, and offers an terrific person revel in.
6.3 Sample Code : -
Home view:
def home(request):
course = Courses.objects.filter(active=True)
context = {
'courses' : course
}
return render(request, "templates/home.html",context)
home\course model:
from django.db import models
from accounts.models import User
class Courses(models.Model):
name = models.CharField(max_length = 50 , null = False)
slug = models.CharField(max_length = 50 , null = False, unique = True)
description = models.CharField(max_length = 150 , null = True)
price = models.IntegerField(null = False)
discount = models.IntegerField(null = False , default = 0)
active = models.BooleanField(default = False)
thumbnail = models.ImageField(upload_to = "files/thumbnail")
date = models.DateTimeField(auto_now_add = True)
resourses = models.FileField(upload_to = "files/resources", null = True, blank=True )
length = models.IntegerField(null = False)
def __str__(self):
return self.name
class Meta:
verbose_name='Courses'
verbose_name_plural='Course'
class CourseProperty(models.Model):
course = models.ForeignKey(Courses , null = False , on_delete = models.CASCADE)
name = models.CharField(max_length = 80, null = False)
28 | P a g e
E-Learning Website | 2022-23
class Meta:
abstract = True
class Tag(CourseProperty):
pass
class Prereqisite(CourseProperty):
pass
class Learning(CourseProperty):
pass
home html:
{% extends 'base.html' %} {% load static %} {% load course_custom_tags %}{% block
content %}
<section class="home">
<div class="banner">
<img src="{% static 'image/banner.png' %}" alt="" />
</div>
<h1>Our Courses</h1>
<div>
</div>
<main>
{%for course in courses %}
<div class="card">
<div class="img-section">
<img src="{{ course.thumbnail.url }}" alt="" />
</div>
<div class="info">
<h5 class="card-title">{{course.name}}</h5>
<p class="card-text mb-3" style="height: 30px">
{{course.description}}
</p>
<p class="mt-4"> save %{{course.discount}}</p>
<p class="price">
<span style="text-decoration: line-through">₹{{course.price}}</span>
<span>₹{% cal_sellPrice course.price course.discount %}</span></p>
</p>
{% is_enrolled request course as enrolled %}
{% if enrolled %}
29 | P a g e
E-Learning Website | 2022-23
{% elif request.user.is_authenticated %}
<a href="/checkout/{{course.slug}}" class="btn btn-light">enroll Now</a>
<a href="/courses/{{course.slug}}" class="btn btn-light">show more</a>
{% else %}
<a href="{% url 'login' %}" class="btn btn-light">enroll Now</a>
<a href="/courses/{{course.slug}}" class="btn btn-light">show more</a>
{% endif %}
</div>
</div>
</div>
{% endfor %}
</main>
</section>
{% endblock %}
class Video(models.Model):
title = models.CharField(max_length = 250 , null = False)
course = models.ForeignKey(Courses , null = False , on_delete = models.CASCADE)
index_number = models.IntegerField(null = False)
video = models.FileField(upload_to = "files/videos", blank = True)
is_preview = models.BooleanField(default = False)
def __str__(self):
return self.title
class Rating(models.Model):
course = models.ForeignKey(Courses, on_delete=models.CASCADE)
user = models.ForeignKey(User, on_delete=models.CASCADE, null=True)
ratings = models.IntegerField(default= 0)
comments = models.TextField(max_length = 500, blank=True)
dateTime = models.DateTimeField(auto_now=True)
Video view :
30 | P a g e
E-Learning Website | 2022-23
if (video.is_preview is False):
if (request.user.is_authenticated is False):
return redirect('login')
else:
try:
user_course = UserCourse.objects.get(user = user, course = course)
except:
course_owner = None
return redirect('checkout', slug= course.slug)
if previous_lecture < 1 :
previous_lecture = None
if next_lecture > video_count:
next_lecture = None
rating_list = []
ratings_all = []
course_review = Rating.objects.filter(course=course)
user_profile = UserProfile.objects.get(user=rating.user)
average_review = None
if course_review:
average_review = sum(rating_list) / len(rating_list)
user_has_reviewed = False
if request.user.is_authenticated:
user_review = Rating.objects.filter(user=user)
if user_review.exists():
user_has_reviewed = True
msg=request.GET.get('lecture')
context = {
'course' : course,
'video' : video,
'msg' : msg,
'next_lecture' : next_lecture,
'previous_lecture' : previous_lecture,
'course_owner' : course_owner,
'form': form,
'ratings_all':ratings_all,
'user_has_reviewed': user_has_reviewed,
'average_review' : average_review
}
return render(request, "course_page.html",context)
video html:
{% extends 'base.html' %}{% load static %} {% block content %}
<div class="video_list">
<ul class="list-group" >
{% for videos in course.video_set.all %}
<a href="?lecture={{videos.index_number}}">
<li class="list-group-item {%if videos == video%} active-video {% endif %}">
{{videos.index_number}}. {{videos}}
</li></a>
{% endfor %}
</div>
<div class="vid-info">
{% for videos in course.video_set.all %}
{%if videos == video%}
<p class="card-title">{{video.index_number}}. {{videos}}</p>
{% endif %}{% endfor %}
<span id="nextAndPre">
{% if previous_lecture != None %}
<a href="?lecture={{previous_lecture}}"><span><img src="{% static 'image/pre.png'
%}" alt="" /> Previous </a> 
{%else%}
<a href="#"><span><img src="{% static 'image/pre.png' %}" alt="" /> Previous
</a> 
{% endif %}
{% if next_lecture %}
<a href="?lecture={{next_lecture}}">     Next   <img src="{%
static 'image/next.png' %}" alt="" /></a>
{%else%}
<a href="#">     Next   <img src="{% static 'image/next.png'
%}" alt="" /></a>
{% endif %}
</span>
<p>{{course.description}}</p>
<section class="comments">
33 | P a g e
E-Learning Website | 2022-23
{% if user_has_reviewed == True %}
{% else %}
<h4>{{average_review}}</h4>
<div class="star-rating" data-average-review="{{ average_review }}"></div>
{% for all_reviews in ratings_all %}
<div class="comment">
<div class="img">
<img src="{{all_reviews.Profile_Picture.url}}" alt="Profile picture" />
</div>
<div class="user-info">
<span id="uNmae">
{{all_reviews.User}}
</span><span id="rate">{{all_reviews.Rating}}</span><br>
<span id="comm" >{{all_reviews.Comments}}</span>
</div>
</div>
34 | P a g e
E-Learning Website | 2022-23
{%endfor%}
</div>
</section>
</div>
</div>
<script src="https://cdn.fluidplayer.com/v3/current/fluidplayer.min.js"></script>
<script src="{% static 'js/course_page.js' %}"></script>
{% endblock %}
Video css:
.vid-page {
background: #b6b3b6;
}
#vid-all {
background-image: radial-gradient(
farthest-corner at center center,
#ce1a1a 0%,
#ffffff 100%
);
display: grid;
background: #ffffff;
grid-template-columns: 2fr 0.8fr;
padding: 20px;
}
#vid-all a {
text-decoration: none;
}
#vid-all .video {
width: 95%;
height: 420px;
}
.video_list {
35 | P a g e
E-Learning Website | 2022-23
.video_list ul {
height: 100%;
overflow-y: scroll;
}
.video_list ul::-webkit-scrollbar {
width: 7px;
}
.video_list ul::-webkit-scrollbar-track {
background: #ccc;
border-radius: 55px;
margin-left: 5px;
}
.video_list ul::-webkit-scrollbar-thumb {
background: #666;
border-radius: 55px;
}
.list-group a {
margin: 5px 10px 5px 0px;
border: 0px solid #ccc;
border-radius: 10px;
height: 50px;
}
.video_list ul li a {
text-transform: capitalize;
color: black;
background: #e9d3d3;
}
.active-video {
background-color: #37c9ed;
}
36 | P a g e
E-Learning Website | 2022-23
/* ----------------- */
.rating {
border: none;
float: left;
}
.comment {
display: flex;
margin-top: 10px;
margin-bottom: 20px;
}
.comment .user-info,
.img {
margin-bottom: 10px;
37 | P a g e
E-Learning Website | 2022-23
}
.comment img {
height: 50px;
width: 50px;
border-radius: 50%;
}
.comment .user-info {
margin-left: 10px;
width: 100%;
}
.comment #rate {
margin-right: 5px;
}
.comment #comm {
margin-top: 10px;
}
/* ----------------- */
/* ------------------------------- */
.textbox {
border: 1px solid #ccc;
padding: 10px;
font-size: 16px;
outline: none;
width: 65%;
box-sizing: border-box;
transition: border-color 0.2s ease-in-out;
float: left;
}
/* .textbox:focus {
comments {
background-color: #d3d8df;
padding: 10px 15px;
margin-top: 30px;
width: 95%;
border-radius: 10px;
}
#form {
/* background-color: #ccc; */
border: 1px solid rgb(123, 123, 123);
padding: 10px;
38 | P a g e
E-Learning Website | 2022-23
border-radius: 10px;
margin: 10px;
}
#form input[type="text"] {
padding: 10px;
border-radius: 5px;
font-size: 16px;
background-color: #d3d8df;
color: white;
}
#form button[type="submit"] {
background-color: #4caf50;
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
}
#form button[type="submit"]:hover {
background-color: #3e8e41;
}
playbackRateEnabled: true,
allowDownload: true,
playButtonShowing: true,
fillToContainer: false,
posterImage: "",
primaryColor: "#31A9FF",
},
vastOptions: {
adList: [],
adCTAText: false,
adCTATextPosition: "",
},
});
starRatingEls.forEach((starRatingEl) => {
const rating = parseFloat(starRatingEl.getAttribute("data-rating"));
input.addEventListener("click", () => {
// Enable the submit button when a rating is selected
document.getElementById("submit-btn").disabled = false;
});
});
41 | P a g e
E-Learning Website | 2022-23
Chapter - 7 Testing
Black box testing, also called behavioural testing, focuses on the functional requirements
of software.
This testing approach enables the software engineer to derive the input conditions that
will fully exercise all requirements for a program.
Black box testing attempts to find the errors like:
1. Incorrect or missing functions.
2. Interface errors.
3. Errors in data structures or external database access.
4. Behavior or performance errors.
42 | P a g e
E-Learning Website | 2022-23
White box testing is also called Glass box testing is a test case design control; structure
of the procedural design to derive test cases using White box testing method, the
software engineer can derive the test cases that guarantee that all independent paths
within the module have been exercised at least once.
Exercise all logic decisions on their true or false sides. Execute all loops at their
boundaries and within their operational bounds. Exercise internal data structure to
ensure their validity.
The first level of test is unit testing. The purpose of unit testing is to ensure that each
program is fully tested.
Unit testing is a software testing technique that focuses on verifying the individual
components or units of a software system. It involves testing each isolated unit, such as
functions, methods, or classes, in isolation to ensure that they behave as expected.
The main goal of unit testing is to validate the correctness and reliability of individual
units of code. By testing units independently, developers can identify and fix defects
early in the development process, leading to more robust and maintainable code.
values, expected outputs, and assertions to validate the correctness of the unit's
behavior. Developers write multiple test cases to cover various scenarios, including both
normal and exceptional situations.
Test-Driven Development (TDD): Unit testing is often used in conjunction with Test-
Driven Development (TDD) practices. In TDD, developers write tests before
implementing the corresponding code. The tests act as specifications, driving the
development process and ensuring that the code meets the desired behavior.
Automation and Continuous Integration: Unit tests are typically automated and
integrated into the development workflow. They are executed frequently, either
manually or as part of a continuous integration (CI) system, to catch regressions and
validate code changes. Automated unit tests enable developers to quickly detect and fix
issues, maintaining the overall quality of the software.
Integrated trying out, also called integration trying out, is a software program checking
out approach that focuses on verifying the interactions and dependencies between
unique components or modules of a software program system. It involves checking out
the combination points among various devices to ensure that they paintings collectively
as expected.
The predominant purpose of included testing is to discover defects and troubles which
can stand up while one of a kind components are blended and interact with every
different. It goals to hit upon troubles associated with facts communique, interface
compatibility, capability, and general system behavior.
44 | P a g e
E-Learning Website | 2022-23
User Acceptance Testing (UAT) is a software testing technique that makes a speciality of
evaluating the software device's usability and confirming whether it meets the needs
and expectancies of end-users. It includes checking out the gadget with real users in a
controlled environment to accumulate feedback, validate functionality, and make sure
person pride earlier than the device is deployed.
The foremost goal of User Acceptance Testing is to determine if the software program
gadget is prepared for manufacturing use and if it meets the consumer's necessities and
business objectives. It affords an opportunity for stop-users to participate actively in the
checking out method and offer precious insights to enhance the machine.
Here are some key points to apprehend approximately User Acceptance Testing:
45 | P a g e
E-Learning Website | 2022-23
domain. These users are chargeable for validating the machine's capability, usability,
and alignment with their unique wishes.
Testing Environment: User Acceptance Testing is typically conducted in a managed
environment that carefully resembles the manufacturing surroundings. This guarantees
that the users can engage with the device in a realistic placing and gives an opportunity
to pick out any troubles that may stand up at some point of real-international utilization.
Test Scenarios: User Acceptance Testing specializes in real-world scenarios and
workflows that customers are probable to encounter when the use of the system. It
includes executing take a look at instances that cover numerous consumer interactions,
commercial enterprise strategies, and vital functionalities.
Acceptance Criteria: Acceptance standards define the situations that ought to be met for
the software machine to be taken into consideration suited and prepared for production.
These criteria are usually hooked up in collaboration between the undertaking
stakeholders and the users. User Acceptance Testing verifies whether the gadget meets
these predefined acceptance standards.
Feedback and Issue Reporting: During User Acceptance Testing, customers offer
comments at the device's usability, functionality, and any problems or discrepancies
they come across. They report their findings in a established way, documenting any
defects or development hints that they pick out.
Iterative Testing: User Acceptance Testing often entails more than one iterations,
allowing users to retest the machine after troubles were addressed. It guarantees that
the adjustments or fixes made in reaction to consumer feedback are verified and meet
the customers' expectations.
Sign-off and Approval: Once the User Acceptance Testing is completed, the users offer
their final signal-off or approval, indicating their pleasure with the gadget's usability,
capability, and average overall performance. This approval means that the device is
ready to be deployed into the production environment.
46 | P a g e
E-Learning Website | 2022-23
Chapter - 8 Snapshots
HOME PAGE
On the home page, the projects are displayed using a dynamic for loop. Each project is
presented in a card format, featuring essential details such as the save percentage,
original price, and real price. The calculation of the real price is achieved by subtracting
the save percentage from the original price using a Custom Tag.
Below the card, two buttons are provided:
1.The "Enroll Now" button directs users to the payment page, where they can securely
purchase the desired course. This option allows users to access the full range of course
materials and resources.
2.The "Show More" button navigates users to the video page. If the course has been
purchased, all course videos are available for viewing. However, if the course hasn't been
purchased, only the free videos associated with that course are accessible.
These features and functionalities contribute to an enhanced user experience,
facilitating seamless exploration, enrollment, and engagement with the website's course
offerings.
47 | P a g e
E-Learning Website | 2022-23
Video Page
Welcome to our video page, where you can access and explore our comprehensive
collection of lectures. Let's take a closer look at its features:
On the left side of the page, you'll find a sophisticated video player. This player offers
essential controls such as a play and pause button, a sound controller to adjust volume,
a download button for course owners, and a speed controller to adjust playback speed.
Additionally, you can expand the video to full screen for an immersive viewing
experience.
Below the video player, you'll discover important details associated with each video,
including its title, a concise description, and convenient navigation buttons to move to
the next or previous video. Furthermore, we provide an option for you to submit a
comprehensive review of the entire course, allowing you to share your valuable
feedback with us.
On the right side of the video page, you'll find a list of all available videos within the
course. The currently active video is distinguished by a blue highlight, while non-active
videos are displayed in white. Please note that access to all videos is granted exclusively
to course purchasers. However, even if you haven't purchased the course, you'll still be
able to view the selection of free videos associated with it.
48 | P a g e
E-Learning Website | 2022-23
Payments:
On our payment website page, users will encounter a course card displaying
comprehensive course details. Positioned on the right side, users will find the course
name followed by the course price and a prominent payment button. Additionally, there
is an option to enter a coupon code for further discounts, allowing users to maximize
savings on their course purchase.
Upon clicking the payment button, users will be directed to a simulated Razorpay
payment view. Please note that this is a test environment, and real account details
cannot be entered at this stage. To facilitate testing, we provide fake credit or debit card
numbers obtained from the Razorpay website. Users can utilize these numbers to
simulate payment. After entering the fake card details, clicking on the "Pay" button will
lead users to another page where they can choose to either simulate a successful
payment or a failed payment. Selecting the "Succeed" option will complete the
transaction, indicating that the user has successfully purchased the course.
To utilize the actual Razorpay payment gateway, users are required to create a genuine
Razorpay account. Once the account is set up, users can enjoy real payment processing
without the need for fictitious details or the option to simulate payment success or
failure.
49 | P a g e
E-Learning Website | 2022-23
Welcome to our login page, where you will find a seamless and secure entry into your
account. Let's explore the options available:
Email Entry: Enter your email address in the designated field to provide your unique
identifier.
Password Entry: Input your password in the corresponding field. In case of an incorrect
password or non-existent email, an error message will appear as a pop-up. Once the
error message is closed, you can attempt to login again.
Forgot Password: If you forget your password, click on the "Forgot Password" option.
This will lead you to a similar page where you can enter your email address. A password
reset email will be sent to your registered email. By clicking on the link provided in the
email, you will be directed to a page where you can create a new password.
Subsequently, you will be redirected back to the login page.
Login Button: The "Login" button serves as a submit button. Once you have entered your
login details, you can proceed by submitting the information using this button.
50 | P a g e
E-Learning Website | 2022-23
Sign-in page:
Sign-up: If you haven't created an account yet, you can click on the "Sign-up" option. This
will redirect you to the signup page, where you can easily create your account by
following the necessary steps.
Welcome to our sign-in page, where you can easily create an account to access our
platform. Here's how the process works:
Account Creation: To register, simply provide your first name, last name, email address,
password, and confirm your password. Please note that we consider the portion of your
email before the '@' symbol as your username.
Form Submission: After completing the form with accurate information, you can submit
your registration by clicking on the "Sign-up" button.
Existing Account: If you already have an account, you can directly navigate to the login
page by clicking on the "Login" button located at the end of the sign-in page.
51 | P a g e
E-Learning Website | 2022-23
Admin Page
The default admin page in Django is a robust and user-friendly interface designed to
simplify website management. It offers a comprehensive range of features and
functionalities, allowing administrators to effortlessly handle tasks such as managing
user accounts, editing content, monitoring site activity, and much more. With its
intuitive design and customizable options, the Django admin page empowers
administrators to efficiently oversee and control their website's operations.
52 | P a g e
E-Learning Website | 2022-23
53 | P a g e
E-Learning Website | 2022-23
Chapter-10 Conclusion
With the advancements in generation, e-studying web sites can leverage functions like
multimedia content, interactive exams, gamification elements, and collaboration gear to
create enticing and immersive learning environments. They sell lifelong mastering,
professional development, and talent enhancement, making education greater on hand
to people of every age and backgrounds.
Furthermore, e-mastering web sites provide possibilities for global connectivity and
knowledge sharing. They permit inexperienced persons from extraordinary
geographical locations to connect, collaborate, and trade ideas, fostering a feel of
network and facilitating a broader perspective on diverse subjects.
54 | P a g e
E-Learning Website | 2022-23
Chapter-11 Bibliography
Books
Shovic, J. (2016). Learning Django Web Development. Packt Publishing.
Roy, A. (2018). Django for Beginners: Build websites with Python and
Django. Leanpub.
McGaw, C. (2019). Django 2 by Example: Build powerful and reliable
Python web applications from scratch. Packt Publishing.
Mele, A. (2020). Django 3 Web Development Cookbook: Actionable
solutions to common problems in Python web development. Packt
Publishing.
Web-Sites
https://docs.djangoproject.com/
https://simpleisbetterthancomplex.com/
https://stackoverflow.com/
https://djangopackages.org/
https://realpython.com/
55 | P a g e