0% found this document useful (0 votes)
70 views50 pages

Spring Boot Using JSP

The Edulearn e-learning platform is designed to facilitate online education by offering features such as course registration, inventory management, and live classes. It includes a comprehensive software requirement specification, COCOMO cost estimation model, and various diagrams like entity-relationship and data flow diagrams to illustrate system architecture and data processing. The project aims to enhance learning accessibility and efficiency through digital resources and future technological expansions.

Uploaded by

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

Spring Boot Using JSP

The Edulearn e-learning platform is designed to facilitate online education by offering features such as course registration, inventory management, and live classes. It includes a comprehensive software requirement specification, COCOMO cost estimation model, and various diagrams like entity-relationship and data flow diagrams to illustrate system architecture and data processing. The project aims to enhance learning accessibility and efficiency through digital resources and future technological expansions.

Uploaded by

priyadas2117
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 50

E-LEARNING PLATFORM

CONTENTS
1 Introduction

2 Scope of the Project

3 Software Requirement Speicification

4 COCOMO & Tdev calculation

5 Entity relationship diagram

6 Data flow diagram

7 Coding Standard Followed & Screenshots

8 Implementation & Testing

9 Future scope and further enhancements

10 Conclusion

11 References and Bibliography


INTRODUCTION:

1.1. PROJECT OVERVIEW:

Edulearn e-learning platform contains the details about essential


courses and study material used in daily student life and its price,
new reservations, maintains the databse, live classes etc.

1.2. PROJECT DESCRIPTION:

Edulearn is a e-learning platform will allow users to do free


registration, will also allow users to add courses to the cart , course
categories , inventory management, personalized messages and
online payment integration. It saves time as it allows online
procedure as users no longer need to go to physical tuition teachers.
It is automatically generated by the server. Admin is the main
authority who can do addition, deletion, and modification of courses
if required.

The project has been planned to be having the view of distributed


architecture, with centralized storage of the database. The
application for the storage of the data has been planned.

This project also covers various features like online registration of


the users, modifying the details of the website by the
management courses or administrator of the website, by adding,
deleting or modifying the student details, courses and live classes
information. In general, this website will allow you to have a
hassle-free education at your own house .
The Edulearn E-learning Platform is the next generation address
book which will provide the delivery of learning and traning through
digital resources.

The future scope includes the expansion of technologies like JAVA


and STS we can also add new technologies and many more for
improving the efficiency of the software.

In recent years, the growth of e-learning platforms has


revolutionized the way we acquire knowledge and skills. These
digital platforms have expanded the horizons of education,
transcending geographical boundaries and offering a plethora of
learning opportunities.

Specialized platforms cater to diverse skills and interests, from programming


and data science to music and culinary arts. This diversity of offerings
empowers learners to pursue their passions, explore new avenues, and forge
career paths that align with their interests and strengths.
SOFTWARE REQUIREMENT SPECIFICATIONS
Software Requirements Specifications provides an overview of the
entire project. It is a description of a software system to be
developed, laying out functional and non-functional requirements.
The software requirements specifications document enlists enough
and necessary requirements that are required for the project
development. To derive the requirements we need to have clear and
through understanding of the project to be developed.This is
prepared after the detailed communication with the project team
and the customer.

The developer is responsible for:-

 Developing the system, which meets the SRS and solving all
the requirements of the system.

 Demonstrating the system and installing the system at


client’s location after acceptance testing is successful.

 Submitting the required user manual describing the system


interfaces to work on it and also the documents of the
system.

 Conducting any user training that might be needed for


using the system.

 Maintain the system for a period of one year after installation.


HARDWARE REQUIREMENTS:-

 Computer that has 1.5Ghz or faster processor

 4GB or above RAM required

 HDD 50GB(or above) or SSD space 50GB(or above)

SOFTWARE REQUIREMENTS:-

 Windows OS(10 or above)

 MySQL Server(8.0 or above)

 Spring Tool Suite(4.22.1)(Spring Boot)

 JDK 17.0.8
COCOMO MODEL
The Constructive Cost Model (COCOMO) is an algorithm software cost
estimation model developed by Barry Bohem. The model uses a
basic Regression formula, with parameters that are derived from
historical project data and current project characteristics.

The necessary steps in this model are:


1. Get an initial estimate of the development effort from
evaluation of thousands of delivered lines of source
code (KDLOC).
2. Determine a set of 15 multiplying factors from various
attributes of the project.
3. Calculate the effort estimate by multiplying the initial estimate
with all the multiplying factors i.e., multiply the values in stepl
and step2.

The initial estimate (also called nominal estimate) is determined by


an equation of the form used in the static single variable models,
using KDLOC as the measure of the size.
To determine the initial effort E; in person-months the equation used is
of the type is shown below

Ei=a*(KDLOC)b

The value of the constant a and b are depends on the project type

In COCOMO, projects are categorized into three types: -

1. Organic: A development project can be treated of the organic


type, if the project deals with developing a well-understood
application program, the size of the development team is
reasonably small, and the team members are experienced in
developing similar methods of projects. Examples of this type of
projects are simple business systems, simple inventory
management systems.
2. Semidetached: A development project can be treated with
semidetached type if the development consists of a mixture of
experienced and inexperienced staff. Team members may have
finite experience in related systems but may be unfamiliar with
some aspects of the order being developed.

3. Embedded: A development project is treated to be of an


embedded type, if the software being developed is strongly
coupled to complex hardware, or if the stringent regulations on the
operational method exist. For Example: ATM, Air Traffic control.

The Values of Constant According to Type of Program Are As Follows

Hence, Eduleam E-learning Platform is Organic, and contains 1.5 KLOC.

Accordingly,
Effort =a*(KLOC) PM

Tdev =c*(efforts)* Months

Estimated Size of the project

=1.5KLOC E=2.4*(2)1-05 =4.9692 PM

D=2.5* (4.9692)0.30=4.5976 Months

Thus, Eduleam E-learning Platform requires effort of person per month and
time require for development is 4.6 months(approx.)
ENTITY RELATIONSHIP DIAGRAM
In software engineering, an entity–relationship model(ER model)
is a data model for describing the data or information aspects of a
business domain or its process requirements, in an abstract way that
lends itself to ultimately being implemented in a database such as a
relational. The main components of ER models are entities (things)
and the relationships that can exist among them.
An entity–relationship model is the result of using a systematic
process to describe and define a subject area of business data. It
does not define business process; only visualize business data. The
data is represented as components (entities) that are linked with
each other by relationships that express the dependencies and
requirements between them, such as: one building may be
divided into zero or more apartments, but one apartment can
only be located in onebuilding. Entities may have various
properties (attributes) that characterize them. Diagrams created
to represent these entities,
attributes, and relationships graphically are called entity–relationship
diagrams.
An ER model is typically implemented as a database. In the case of
a relational database, which stores data in tables, every row of
each table represents one instance of an entity. Some data fields in
these
tables point to indexes in other tables; such pointers are the physical
implementation of the relationships.
The three schema approach to software engineering uses three
levels of ER models that may be developed.

Conceptual data model: The conceptual ER model normally defines


master reference data entities that are commonly used by the
organization. Developing an enterprise-wide conceptual ER model is
useful to supportdocumenting the data architecture for an
organization.Aconceptual ER model may be used as the foundation
for one ormore logical data models . The purpose of the conceptual
ER model is then to establish structural metadata commonality for
the master data entities between the set of logical ER models.

Logical data model: The logical ER model contains more detail than
the conceptual ERmodel. In addition to master data entities,
operational andtransactional data entities are now defined. The
details of each dataentity are developed and the relationships
between these data entities are established. The logical ER model is
however developed independent of technology into which it can be
implemented.

Physical data model: One or more physical ER models may be


developed from each logical ER model. The physical ER model is
normally developed to be instantiated as a database. Therefore,
each physical ER model must contain enough detail to produce a
database and each physical ER model is technology dependent since
each database management system is somewhat different.
The physical model is normally instantiated in the structural
metadata of a database management system as relational database
objects suchas database tables, database indexes such as unique
key indexes, and database constraints such as a foreign key
constraint or a commonality constraint. The ER model is also
normally used to design modifications to the relational database
objects and to maintain the structural metadata of the database.

The first stage of information system design uses these models


during the requirements analysis to describe information needs or
the type of information that is to be stored in a database. The data
modeling technique can be used to describe any ontology (i.e. an
overview and classifications of used terms and their relationships)
for a certain area of interest. In the case of the design of an
information system that is based on a database, the conceptual data
model is, at a later stage (usually called logical design), mapped to a
logical data model, such as the relational model; this in turn is
mapped to a physical model during physical design. Note that
sometimes, both of
these phases are referred to as "physical design". It is also used in
database management system.

ENTITY RELATIONSHIP SYMBOLS:

CARDINALITY:
Cardinality constraints are expressed as follows:
 A double line indicates a participation constraint, totality or
subjectivity : all entities in the entity set must participate in
at least one relationship in the relationship set;
 an arrow from entity set to relationship set indicates a key
constraint, i.e. injectivity: each entity of the entity set can
participate in at most one relationship in the relationship
set;
 A thick line indicates both, i.e. bijectivity: each entity in
the entity set is involved in exactly one relationship.
 An underlined name of an attribute indicates that it is a key:
two different entities or relationships with this attribute
always have different values for this attribute.

ER-DIAGRAM
DATA FLOW DIAGRAM
A data flow diagram (DFD) is a graphical representation of the
"flow" of data through an information system, modelling its process
aspects. A DFD is often used as a preliminary step to create an
overview of the system, which can later be elaborated.
DFDs can also be used for the visualization of data processing
(structured design).

A DFD shows what kind of information will be input to and output


from the system, where the data will come from and go to, and
where the data will be stored. It does not show information about
the timing of process or information about whether processes will
operate in sequence or in parallel (which is shown on a flowchart).

This context-level DFD is next "exploded", to produce a Level 1 DFD


that shows some of the detail of the system being modeled. The
Level 1 DFD shows how the system is divided into sub-systems
(processes), each of whi1ch deals with one or more of the data
flows to or from an external agent, and which together provide all
of the functionality of the system as a whole. It also identifies
internal data stores that must be present in order for the system to
do its job, and shows the flow of data between the various parts of
the system.

Data flow diagrams are one of the three essential perspectives of


the structured-systems analysis and design method SSADM. The
sponsor of a project and the end users will need to be briefed and
consulted throughout all stages of a system's evolution. With a data
flow diagram, users are able to visualize how the system will
operate, what the system will accomplish, and how the system will
be implemented. The old system's dataflow diagrams can be drawn
up and compared with the new system's data flow diagrams to draw
comparisons to implement a more efficient system. Data flow
diagrams can be used to provide the end user with a physical idea of
where the data they input ultimately has an effect upon the
structure of the whole system from order to dispatch to report.
How any system is developed can be determined through a data flow
diagram model.

In the course of developing a set of leveled data flow diagrams the


analyst/designer is forced to address how the system may be
decomposed into component sub-systems, and to identify the
transaction data in the data model.

Data flow diagrams can be used in both Analysis and Design phase of
the SDLC.

There are different notations to draw data flow diagrams. defining


different visual representations for processes, data
stores, data flow, and external entities.

DFD NOTATION:
Steps to Construct Data Flow Diagram:-

Four Steps are generally used to construct a DFD.


 Process should be named and referred for easy reference.
Each name should be representative of the reference.
 The destination of flow is from top to bottom and from left
to right.
 When a process is distributed into lower level details they
are numbered.
 The names of data stores, sources and destinations are
written in capital letters.

Rules for constructing a Data Flow Diagram:-


 Arrows should not cross each other.
 Squares, Circles, Files must bear a name.
 Decomposed data flow squares and circles can have
same names.
 Draw all data flow around the outside of the diagram.

LEVEL- 0 DFD DIAGRAM


LEVEL-1 DFD DIAGRAM

LEVEL-2 DFD DIAGRAM


Coding Standard Followed & Screenshots

1. USER REGISTRATION

BACKEND:
package com.backend.edulearn.controller;
import com.backend.edulearn.entity.User;
import java.util.List;

import com.backend.edulearn.repository.UserRepository;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/users")
@CrossOrigin(origins = "http://localhost:3000") // Specify the allowed origin for CORS
public class UserController {

@Autowired
private UserRepository userRepository;

@PostMapping("/register")
public ResponseEntity<?> registerUser(@RequestBody User user) {
// Check if the email or phone number already exists
User existingUserByEmail = userRepository.findByUemail(user.getUemail());
User existingUserByPhone = userRepository.findByUphno(user.getUphno());

if (existingUserByEmail != null) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body("Email already exists");
}

if (existingUserByPhone != null) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body("Phone number already exists");
}

// If email and phone number are unique, proceed with registration


User savedUser = userRepository.save(user);
return ResponseEntity.status(HttpStatus.CREATED).body(savedUser);
}

@GetMapping("/check-exists")
public ResponseEntity<?> checkExistingUser(@RequestParam String email, @RequestParam String phone)
{ User existingUserByEmail = userRepository.findByUemail(email);
User existingUserByPhone = userRepository.findByUphno(phone);

if (existingUserByEmail != null || existingUserByPhone != null) {


return ResponseEntity.ok(Map.of("existsByEmail", existingUserByEmail != null, "existsByPhone",
existingUserByPhone != null));
}

return ResponseEntity.ok(Map.of("existsByEmail", false, "existsByPhone", false));


}

2. FORGET PASSWORD (USER)


BACKEND:

package com.backend.edulearn.controller;
import com.backend.edulearn.entity.User;
import java.util.List;

import com.backend.edulearn.repository.UserRepository;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/users")
@CrossOrigin(origins = "http://localhost:3000") // Specify the allowed origin for CORS
public class UserController {
@Autowired
private UserRepository userRepository;
@PostMapping("/reset-password")
public ResponseEntity<?> resetPassword(@RequestBody Map<String, String>
requestData) {
String emailOrPhone = requestData.get("emailOrPhone");
String newPassword = requestData.get("newPassword");
String confirmPassword = requestData.get("confirmPassword");

// Check if the input is a valid email or phone number


User user = userRepository.findByUemail(emailOrPhone);
if (user == null) {
user = userRepository.findByUphno(emailOrPhone);
}

if (user == null) {
return ResponseEntity.status(HttpStatus.NOT_FOUND).body("User not
found");
}

if (!newPassword.equals(confirmPassword)) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body("Passwords do
not match");
}

// Update the user's password


user.setUpass(newPassword);

try {
// Save the updated user in the database
User updatedUser = userRepository.save(user);
return ResponseEntity.ok("Password updated successfully for user: " +
updatedUser.getUname());
} catch (Exception e) {
return
ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Error updating
password");
}
}
3. ADD COURSE

FRONTEND :

import React, { useState } from 'react';


import { Form, FormGroup, Label, Input, Button } from
'reactstrap'; import { toast } from 'react-toastify';
import
'react-toastify/dist/ReactToastify.css';
import axios from 'axios';

const AddCourses = () => {


const [course, setCourse] =
useState({ courseTitle: '',
description: '',
thumbnailFile: null,
videoFiles: [],
courseCategory: '',
mentorEmail: '',
});

const handleInputChange = (e) =>


{ const { name, value } =
e.target;
setCourse({ ...course, [name]: value });
};

const handleThumbnailChange = (e)


=> { const file =
e.target.files[0];
setCourse({ ...course, thumbnailFile: file });
};
const handleVideoChange = (e) =>
{ const files = e.target.files;
setCourse({ ...course, videoFiles: [...course.videoFiles, ...files] });
};

const handleSubmit = async (e) => {


e.preventDefault();
const { courseTitle, description, thumbnailFile, videoFiles,
courseCategory, mentorEmail } = course;

if (!courseTitle || !description || !thumbnailFile || videoFiles.length === 0


||
!courseCategory || !mentorEmail)
{ toast.error('Please fill in all
fields'); return;
}

const formData = new FormData();


formData.append('courseTitle', courseTitle);
formData.append('description', description);
formData.append('thumbnailFile',
thumbnailFile); videoFiles.forEach((file,
index) => {
formData.append(`videoFiles[${index}]`, file);
});
formData.append('courseCategory', courseCategory);
formData.append('mentorEmail', mentorEmail);
console.log('Form Data:', JSON.stringify(Object.fromEntries(formData))); //
Log the form data as JSON

try {
const response = await
axios.post('http://localhost:8080/api/courses/create', formData);
if (response.status === 201)
{ toast.success('Course added
successfully'); setCourse({
courseTitle: '',
description: '',
thumbnailFile: null,
videoFiles: [],
courseCategory: '',
mentorEmail: '',
});
setTimeout(() => {
window.location.reload();
}, 2000);
} else {
toast.error('Failed to add course. Please try again later.');
}
} catch (error) {
toast.error(`Something went wrong: ${error.message}`);
}
};
return (
<div style={{
backgroundImage:
'url("/bgh.jpg")',
backgroundSize: 'cover',
minHeight: '100vh',
display: 'flex',
justifyContent:
'center', alignItems:
'center'
}}>
<div
style={{ width:
'400px',
padding:
'20px',
backgroundColor: 'rgba(255, 255, 255, 0.8)',
boxShadow: '0px 4px 8px rgba(0, 0, 0, 0.1)'
}}>
<h1 className="mb-4 text-center">Add New Course</h1>
<Form onSubmit={handleSubmit}>
<FormGroup>
<Label for="courseTitle">Course Title</Label>
<Input type="text" name="courseTitle" id="courseTitle"
value={course.courseTitle} onChange={handleInputChange} />
</FormGroup>
<FormGroup>
<Label for="description">Course Description</Label>
<Input type="textarea" name="description" id="description"
value={course.description} onChange={handleInputChange} />
</FormGroup>
<FormGroup>
<Label for="thumbnailFile">Thumbnail (Choose File)</Label>
<Input type="file" name="thumbnailFile" id="thumbnailFile"
onChange={handleThumbnailChange} />
</FormGroup>
<FormGroup>
<Label for="videoFiles">Course Videos (Choose Files)</Label>
<Input type="file" name="videoFiles" id="videoFiles"
multiple onChange={handleVideoChange} />
</FormGroup>
<FormGroup>
<Label for="courseCategory">Course Category</Label>
<Input type="select" name="courseCategory"
id="courseCategory" value={course.courseCategory}
onChange={handleInputChange}>
<option value="">Select Category</option>
<option value="Programming Languages">Programming Languages</option>
<option value="Business & Management">Business & Management</option>
<option value="Data Science">Data Science</option>
<option value="AI and Machine Learning">AI and Machine
Learning</option>
<option value="Art & Design">Art & Design</option>
<option value="Health & Wellness">Health & Wellness</option>
<option value="JEE">JEE</option>
<option value="Board Exams">Board Exams</option>
</Input>
</FormGroup>
<FormGroup>
<Label for="mentorEmail">Mentor's Email</Label>
<Input type="email" name="mentorEmail" id="mentorEmail"
value={course.mentorEmail} onChange={handleInputChange} />
</FormGroup>
<Button color="primary" type="submit">Add Course</Button>
</Form>
</div>
</div>
);
};

export default AddCourses;

BACKEND :

package com.backend.edulearn.controller;

import com.backend.edulearn.entity.CourseVideo;
import com.backend.edulearn.services.CourseVideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/api/courses")
@CrossOrigin(origins = "http://localhost:3000") // Specify the allowed origin for CORS
public class CourseVideoController {

private final CourseVideoService courseVideoService;


@Autowired
public CourseVideoController(CourseVideoService courseVideoService)
{
this.courseVideoService = courseVideoService;
}

@PostMapping("/create")
public ResponseEntity<String> createCourse(@ModelAttribute CourseVideo
courseVideo) {
try {
courseVideoService.saveCourseVideo(courseVideo);
return new ResponseEntity<>("Course created successfully",
HttpStatus.CREATED);
} catch (Exception e) {
return new ResponseEntity<>("Failed to create course",
HttpStatus.INTERNAL_SERVER_ERROR);
}
}
4,COURSES
FRONTEND:

import React, { useState, useEffect, useCallback } from


'react'; import { useLocation, useNavigate } from 'react-
router-dom'; import apiEndpoints from '../service/api';
import { Alert } from '@mui/material';
import { ToastContainer, toast } from 'react-
toastify'; import
'react-toastify/dist/ReactToastify.css';

const Courses = () => {


const [courses, setCourses] = useState([]);
const [enrollments, setEnrollments] =
useState({}); const [showAlert, setShowAlert] =
useState(false); const navigate =
useNavigate();
const location = useLocation();

const queryParams = new


URLSearchParams(location.search); const isLoggedIn =
queryParams.get('isLoggedIn') === 'true'; const
studentEmail = queryParams.get('studentEmail');

useEffect(() => {
fetchCourses();
}, []);

const fetchCourses = async () =>


{ try {
const response = await apiEndpoints.getAllCourseVideos();
setCourses(response);
} catch (error) {
console.error('Error fetching courses:', error);
}
};
const checkEnrollments = useCallback(async (courses) => {
const enrollmentsCheck = {};
for (const course of
courses) {
try {
const isEnrolled = await apiEndpoints.checkEnrollment(studentEmail,
course.courseId);
enrollmentsCheck[course.courseId] = isEnrolled;
} catch (error) {
console.error(`Error checking enrollment for course
${course.courseId}:`, error);
}
}
setEnrollments(enrollmentsCheck);
}, [studentEmail]);

useEffect(() => {
if (studentEmail) {
checkEnrollments(courses);
}
}, [studentEmail, courses, checkEnrollments]);

const handlePlayClick = (course) =>


{ if (!isLoggedIn) {
setShowAlert(true);
} else if (enrollments[course.courseId]) { navigate(`/video/$
{course.courseId}`);
} else {
toast.error('Please enroll in the course first.',
{ position: "top-center",
autoClose: 3000,
hideProgressBar:
false, closeOnClick:
true, pauseOnHover:
true, draggable: true,
progress: undefined,
});
}
};

const handleEnrollNow = async (courseId)


=> { if (isLoggedIn) {
navigate(`/payment?courseId=${courseId}`);
} else {
setShowAlert(true);
}
};

return (
<div className="courses-container" style={{ backgroundColor: 'rgb(222,
227, 227, 1)', display: 'flex', flexWrap: 'wrap', gap: '20px', padding:
'20px' }}>
{courses.map(course => (
<div key={course.courseId} className="course-card" style={{
width: '300px', boxShadow: '0 4px 8px rgba(0, 0, 0, 0.1)', borderRadius:
'8px', overflow: 'hidden', backgroundColor: '#fff' }}>
<div className="thumbnail-container" style={{ position:
'relative', cursor: 'pointer' }}>
<img src={`http://localhost:8080${course.thumbnailUrl}`}
alt="Course Thumbnail" className="course-thumbnail" style={{ width: '100%',
height: 'auto', objectFit: 'cover' }} />
<div className="play-button" style={{ position:
'absolute', top: '50%', left: '50%', transform: 'translate(-50%, -50%)',
backgroundColor: 'rgba(0, 0, 0, 0.6)', borderRadius: '50%', width: '50px',
height: '50px', display: 'flex', justifyContent: 'center', alignItems:
'center' }} onClick={() => handlePlayClick(course)}>
<span style={{ color: '#fff', fontSize: '24px' }}>▶
</span>
</div>
</div>
<div className="course-details" style={{ padding: '10px' }}>
<h3 style={{ marginBottom: '5px'
}}>{course.courseTitle}</h3>
<p style={{ fontSize: '14px', color: '#333'
}}><strong>Description:
</strong>{course.description}</p>
{enrollments[course.courseId] ? (
<button className="watch-button" style={{
backgroundColor: '#4CAF50', color: '#fff', border: 'none', padding: '6px 10px',
width: 'auto', cursor: 'pointer', marginTop: '10px' }} onClick={() =>
navigate(`/video/${course.courseId}`)}>Watch Now</button>
) : (
<button className="enroll-button" style={{
backgroundColor: '#7C67FF', color: '#fff', border: 'none', padding: '6px 10px',
width: 'auto', cursor: 'pointer', marginTop: '10px' }} onClick={() =>
handleEnrollNow(course.courseId)}>Enroll Now</button>
)}
</div>
</div>
))}
<ToastContainer />
{showAlert && (
<Alert severity="error" variant="filled" onClose={() =>
setShowAlert(false)} sx={{ position: 'fixed', top: '50%', left: '50%',
transform: 'translate(-50%, -50%)', zIndex: 9999, width: '400px', textAlign:
'center', fontSize: '1.2rem' }}>
Please Login/Signup First.
</Alert>
)}
</div>
);
};

export default Courses;

BACKEND:
package com.backend.edulearn.controller;
import com.backend.edulearn.entity.CourseVideo;
import com.backend.edulearn.services.CourseVideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/api/courses")
@CrossOrigin(origins = "http://localhost:3000") // Specify the allowed origin for CORS
public class CourseVideoController {

private final CourseVideoService courseVideoService;


@Autowired
public CourseVideoController(CourseVideoService courseVideoService)
{
this.courseVideoService = courseVideoService;
}

@GetMapping("/all")
public ResponseEntity<List<CourseVideo>> getAllCourseVideos()
{ List<CourseVideo> courseVideos = courseVideoService.getAllCourseVideos();
return new ResponseEntity<>(courseVideos, HttpStatus.OK);
}

5.FEEDBACK

BACKEND:

package com.backend.edulearn.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import com.backend.edulearn.entity.Feedback;
import com.backend.edulearn.repository.FeedbackRepository;

@RestController
@RequestMapping("/api/feedback")
@CrossOrigin(origins = "http://localhost:3000") // Specify the allowed origin for CORS

public class FeedbackController {

@Autowired
private FeedbackRepository feedbackRepository;

@PostMapping("/save")
public ResponseEntity<Feedback> submitFeedback(@RequestBody Feedback feedback)
{ Feedback savedFeedback = feedbackRepository.save(feedback);
return ResponseEntity.ok(savedFeedback);
}
@GetMapping("/{courseId}")
public ResponseEntity<List<Feedback>> getFeedbacksByCourseId(@PathVariable String courseId)
{ List<Feedback> feedbacks = feedbackRepository.findByCourseId(courseId);
return ResponseEntity.ok(feedbacks);
}

}
IMPLEMENTATION & TESTING
A software system test plan is a document that describes the
objectives, scope, approach and focus of software testing effort. The
process of preparing a test plan is a usual way to think the efforts
needed to validate the acceptability of a software product. The
complete document will help people outside the test group
understand the "WHY" and "HOW" product validation. It should be
through enough to be useful but not so through that no one outside
the test group will read it.

INTRODUCTION

Testing is the process of running a system with the intention of


finding errors. Testing enhances the integrity of a system by
detecting deviations in design and errors in the system. Testing aims
at detecting error-prone areas. This helps in the prevention of
errors in a system. Testing also adds value to the product by
conforming to the user requirements.

The main purpose of testing is to detect errors and error-prone areas


in a system. Testing must be thorough and well-planned. A partially
tested system is as bad as an untested system. And the price of an
untested and under-tested system is high.

The implementation is the final and important phase. It involves


user-training, system testing in order to ensure successful running of
the proposed system. The user tests the system and changes are
made according to their needs. The testing involves the testing of
the developed system using various kinds of data. While testing,
errors are noted and correctness is the mode.
OBJECTIVES OF TESTING:

The objective our test plan is to find and report as many bugs as
possible to improve the integrity of our program. Although
exhaustive testing is not possible, we will exercise a broad range of
tests to achieve our goal. Our user interface to utilize these functions
is designed to be user-friendly and provide easy manipulation of the
tree. The application will only be used as a demonstration tool, but
we would like to ensure that it could be run from a variety of
platforms with little impact on performance or usability.

Process Overview:

The following represents the overall flow of the testing process:

1. Identify the requirements to be tested. All test cases shall


be derived using the current Program Specification.

2.Identify which particular test(s) will be used to test each module.

3. Review the test data and test cases to ensure that the unit has
been thoroughly verified and that the test data and test cases are
adequate to verify proper operation of the unit.

4. Identify the expected results for each test.

5. Document the test case configuration, test data, and


expected results.

6. Perform the test(s).

7. Document the test data, test cases, and test configuration used
during the testing process. This information shall be submitted via
the Unit/System Test Report (STR).

8. Successful unit testing is required before the unit is eligible for


component integration/system testing.

9. Unsuccessful testing requires a Bug Report Form to be


generated. This document shall describe the test case, the problem
encountered, its possible cause, and the sequence of events that
led to the problem. It shall be used as a basis for later technical
analysis.

10. Test documents and reports shall be submitted. Any


specifications to be reviewed, revised, or updated shall be
handled immediately.

TEST CASES:

A test case is a document that describe an input, action, or event and


expected response, to determine if a feature of an application is
working correctly. A test case should contain particular such as test
case identifier, test condition, input data.

TESTING STEPS

Unit Testing:

Unit testing focuses efforts on the smallest unit of software design. This
is known as module testing. The modules are tested separately. The
test is carried out during programming stage itself. In this step, each
module is found to be working satisfactory as regards to the
expected output from the module.

Integration Testing:

Data can be lost across an interface. One module can have an adverse
effect on another, sub functions, when combined, may not be
linked in desired manner in major functions. Integration testing is a
systematic approach for constructing the program structure, while
at the same time conducting test to uncover errors associated within
the interface. The objective is to take unit tested modules and builds
program structure. All the modules are combined and tested as a
whole.

Validation:

At the culmination of the integration testing, Software is completely


assembled as a package. Interfacing errors have been uncovered
and corrected and a final series of software test begin in validation
testing. Validation testing can be defined in many ways, but a
simple definition is that the validation succeeds when the software
functions in a manner that is expected by the customer. After
validation test has been conducted, one of the three possible
conditions exists.

a) The function or performance characteristics confirm


to specification and are accepted.

b) A deviation from specification is uncovered and a


deficiency lists is created.

c) Proposed system under consideration has been tested by


using Validation test and found to be working satisfactory.
Tested By: Debasis Banik

Test Type Unit Testing

Test Case 1
Number
Test Case Name User Login

Test Case The user should enter his/ her accurate mail- id
Description and password so that he/she can able to go
for the further options. The test case will
check the application for the same since a
user can only login with the correct user id,
password.

Item(s) to be tested

Verification of the user id and password and


1
successfully loged in.

Specifications

Input Expected Output/Result

1) Correct User id 1) Successful login


and password
2) Incorrect Id or Password 2) Email or Password error
SNAPSHOT OF USER LOGIN:

Negative:

Positive:
Tested By: Shubhodeep Mandal

Test Type Unit Testing

Test Case Number 2

Test Case Name User Registration .

Test Case Description User will enter the details in the


registration form and the credentials will
be checked by the validators used in the
form. If the user’s credentials does match
to the existing details then an error
message will be shown and the email
already exist.

Item(s) to be tested

The entered credentials match or not. If


1
not the registered user gets the option to register.

Specifications

Expected

Input Output/Result
1) Registered mail-id and password 1) Email already exists

2) Account successfully created


2) User credintials
SNAPSHOT OF Registering to a course:

Negative:

Positive:
WHITE BOX TESTING

In white box testing, the UI is bypassed. Inputs and outputs are


tested directly at the code level and the results are compared
against specifications. This form of testing ignores the function of
the program under test and will focus only on its code and the
structure of that code. Test case designers shall generate cases that
not only cause each condition to take on all possible values at least
once, but that cause each such condition to be executed at least
once. To ensure this happens, we will be applying Branch Testing.
Because the functionality of the program is relatively simple, this
method will be feasible to apply.

Each function of the binary tree repository is executed


independently; therefore, a program flow for each function has been
derived from the code.
BLACK BOX TESTING

Black box testing typically involves running through every possible


input to verify that it results in the right outputs using the software
as an end-user would. We have decided to perform Equivalence
Partitioningand Boundary Value Analysis testing on our application.

System Testing

The goals of system testing are to detect faults that can only be
exposed by testing the entire integrated system or some major part
of it. Generally, system testing is mainly concerned with areas such
as performance, security, validation, load/stress, and configuration
sensitivity. But in our case well focus only on function validation and
performance. And in both cases we will use the black-box method
of testing.
OUTPUT TESTING

After performing the validation testing, the next step is output


testing of the proposed system, since no system could be useful if it
does not produce the required output in a specific format. The
output format on the screen is found to be correct. The format was
designed in the system design time according to the user needs. For
the hard copy also; the output comes as per the specified
requirements by the user. Hence output testing did not result in any
correction for the system.

User Acceptance Testing:

User acceptance of a system is the key factor for the success of


any system. The system under consideration is tested for the user
acceptance by constantly keeping in touch with the prospective
system users at the time of developing and making changes
whenever required.

This is done in regard to the following point:


a) Input Screen Design
b) Output Screen Design
c) Format of reports and other outputs.
GOAL OF TESTING

"Program testing can be used to slow the presence of bug, but never to
slow their absence." If the results delivered by the system are
different from the excepted ones then the system is incorrect and
these bugs should be fixed.
FUTURE SCOPE AND FURTHER ENHANCEMENTS

The future scope of a Edulearn E-learning Platform is promising, with several


key trends and opportunities emerging:

 Continuous learning is the paradigm shift that the education sector is


facing these days. Continuous learning is about how learners expand
their skillset in a changing environment with new developments.

 With online courses, learners set their own goals, at their own pace
while learning and going through learning materials. This is a unique
advantage that online education provides to all its learners. It helps
learners navigate through their learning path and achieve their
personal goals by connecting with the instructor and other learners.

 With online courses, learners set their own goals, at their own pace
while learning and going through learning materials. This is a unique
advantage that online education provides to all its learners. It helps
learners navigate through their learning path and achieve their
personal goals by connecting with the instructor and other learners.

eLearning has mitigated various problems associated with learning, such as


time and cost problems, that previously used to restrict learners' learning
paths. These reasons are enough to perpetuate eLearning as a solution to a
lot of major learning problems.

The importance of online education is something that cannot be left out in


the current time period. eLearning is not something that has originated out
of thin air. Learning is a continuous process that people of all walks of life
need for various purposes in their life. It should not be bound to academic
classes only.
CONCLUSION

This project has been appreciated by all the users in the


organization. It is easy to use, since it uses the GUI provided in the
user dialog. User friendly screens are provided. The usage of
software increases the efficiency, decreases the effort. It has been
efficiently employed as a Site management mechanism. It has been
thoroughly tested and implemented.
BIBLIOGRAPHY

 https://www.w3schools.com
 https://www.slideshare.com
 https://www.scribd.com
 https://www.tutorialspoint.com
 https://www.geeksforgeeks.org.com
 https://www.youtube.com
 https://www.javatpoint.com
THANK YOU

You might also like