Professional Documents
Culture Documents
ONLINE EXAM PORTAL USING JAVA
ONLINE EXAM PORTAL USING JAVA
On
Submitted in partial fullfilment of the Requirements for the award of the degree in
Bachelor of Technology
In
By
CH.REKHA 20681A0510
D.LOKESH 20681A0512
A.KEERTHAN 20681A0501
(Assistant Professor)
2023-2024
CHRISTU JYOTHI INSTITUTE OF TECHNOLOGY & SCIENCE
2023 – 2024
CERTIFICATE
Exam Portal Using Java” carried out by Ch. Rekha(20681A0510), K. Annie Siri
year 2023-2024, in partial fulfilment for the requirement for the award of the Degree of
External Examiner
CHRISTU JYOTHI INSTITUTE OF TECHNOLOGY & SCIENCE
2023 – 2024
DECLARATION
Using Java” submitted to the Christu Jyothi Institute of Technology & Science in partial
fulfilment of the requirements for the awardof the degree of Bachelor of Technology (B.
under the guidance of Mr. M. Uday Kumar, Asst. Prof.and Mr. B . Mahender, Asst. prof.
,and this document has not been submitted to any other university for the award of any
other degree.
D.LOKESH 20681A0512
A. KEERTHAN 20681A0501
ACKNOWLEDGEMENT
On the submission of our project entitled “Online Exam Portal Using Java” we
would like to thank our Director Rev. Fr. D. VIJAYA PAUL REDDY for giving us
We endow our sincere thanks to Principal Dr. S. CHANDRASHEKAR REDDY for his
We would also like to extend our sincere thanks to Mr. M. RAMARAJU., Assistant
Professor, Head of the Department, Computer Science & Engineering, for his valuable
We would like to extend our gratitude and sincere thanks to our guide Mr. M. UDAY
We are very thankful to our teachers for providing the required background during the
project work. We would also like to extend our gratitude to our friends and those who are
D.LOKESH 20681A0512
A. KEERTHAN 20681A0501
v
CHRISTU JYOTHI INSTITUTE OF TECHNOLOGY & SCIENCE
Colombo Nagar, Yeshwanthapur, Jangaon-506167,Telangana.
Vision
To admit and groom students from rural background and be a truly technical
Mission
The mission of the institute is to create, deliver and refine knowledge. Being a
1. Enhance our position to one of the best technical institutions and to measure our
2. Provide highest quality learning environment to our students for their greater well-
vi
CHRISTU JYOTHI INSTITUTE OF TECHNOLOGY & SCIENCE
Colombo Nagar, Yeshwanthapur, Jangaon-506167,Telangana.
Vision
Mission
1. Enrich the knowledge and wisdom with repository of books and modernized laboratory
3. Develop the ability to provide sustainable solutions to real world situations with
collaborations.
vi
CHRISTU JYOTHI INSTITUTE OF TECHNOLOGY & SCIENCE
PEO1 Graduates of B. Tech (CSE) are able to Formulate, Analyze and solve hardware
PEO3 Show the awareness of life-long learning needed for a successful professional
responsibility.
vii
CHRISTU JYOTHI INSTITUTE OF TECHNOLOGY & SCIENCE
Program outcomes
PO No Program Outcomes
PO1 Engineering knowledge apply the knowledge of mathematics, science, engineering
fundamentals, and an engineering specialization to the solution of complex engineering
problems.
PO2 Problem analysis identity, formulate, review research literature, and analyze complex engineering
problems reaching substantiated conclusions using first principles of mathematics, natural
sciences, and engineering sciences
PO3 Design/development of solutions design solutions for complex engineering problems and design
system components or processes that meet the specified needs with appropriate consideration
for the public health and safety, and the cultural, societal, and environmental considerations.
PO4 Conduct investigations of complex problems use research-based knowledge and research
methods including design of experiments, analysis and interpretation of data, and synthesis of the
information to provide valid conclusions.
PO5 Modern tools usage Create, Select, and apply appropriate techniques resources, and modern
engineering and IT tools including predictions and modeling to complex engineering activities
with an understanding of the limitations.
PO6 The engineer and society apply reasoning informed by the contextual knowledge to assess
societal and environment contexts, and demonstrate the knowledge of, and need for sustainable
development.
PO7 Environment and sustainability understand the impact of the professional engineering solutions
in societal and environmental contexts, and demonstrate the knowledge of, and need for
sustainable development.
PO8 Ethics apply ethical principles and commit to professional ethics and responsibilities and norms
of the engineering practice.
P09 Individual and team work function effectively as an individual, and as a member or leader in
diverse teams, and in multidisciplinary settings
PO10 Communication communicates effectively on complex engineering activities with the
engineering community and with society at large, such as, being able to comprehend and write
effective reports and design documentation, make effective presentations.
PO11 Project management and finance demonstrate knowledge and understanding of the engineering
and management principles and apply these to one’s own work, as a member and leader in a
team, to manage projects and in multidisciplinary environments.
PO12 Life-long learning recognizes the need for, and have the preparation and ability to engage and
lifelong learning in the broadest context of technology change.
viii
CHRISTU JYOTHI INSTITUTE OF TECHNOLOGY & SCIENCE
Colombo Nagar, Yeshwanthapur, Jangaon-506167,Telangana.
Understand, analyze and develop computer programs in the areas related to algorithms,
system software, multimedia, web design, big data analytics and networking for efficient
Apply standard practices and strategies in software project development using open-
ix
ABSTRACT
Online exams, conducted over the internet or an intranet using a computer system,
offer a web-based solution for evaluating large numbers of students. This Browser/Server
architecture allows for efficient test administration with multiple choice questions
automatically graded by the system. While the traditional pen and paper format has its
place, it struggles to keep pace with the digital learning environment, especially for IT
students accustomed to online resources and platforms. This proposal addresses these
designed for IT students. This project goes beyond mere practicality; it aims to improve
assessment quality through engaging question formats, empower students with greater
freedom, and promote efficiency with faster administration and grading.One example of
such a system is a MCQ-based Online Examination System using Java. This Test
Management Software offers a complete solution for Computer Based Tests (CBT),
allowing instructors to set up timed multiple-choice exams that are automatically graded
and deliver immediate results upon submission. The Online Examination System can be
implemented as a web portal developed using Java, providing students with a platform
to practice for various mock examinations. In today's world, with numerous exams like
GRE, CAT, and MAT transitioning to online formats, this project would prepare students
for the testing methods they will encounter by offering practice through mock tests on
xi
TABLE OF CONTENTS
1.INTRODUCTION ........................................................................................................ 1
xii
4.SOFTWARE DESIGN ............................................................................................... 17
4.2.3.Sequence Diagram.................................................................................. 24
4.3.1 Entities.................................................................................................... 29
5.1SOFTWARE REQUIREMENTS....................................................................... 32
6.CODING ..................................................................................................................... 33
6.1.1 start-quiz.component.html...................................................................... 33
xiii
7. TESTING ................................................................................................................... 47
8. OUTPUTS SCREENS............................................................................................... 55
9.CONCLUSION ........................................................................................................... 61
xiv
LIST OF FIGURES
Figure 9: ER Diagram..................................................................................................... 30
Figure 10: Testcase For User Register where already exists .......................................... 52
Figure 11: Test Case For User Login Without Credentials ............................................ 52
Figure 15: Test Case For Admin Add Quiz Successfully .............................................. 54
Figure 21: View All Users in Admin Page For Online Exam Portal ............................. 57
Figure 22: Admin Add Category For Online Exam Portal ............................................. 58
Figure 23: Admin Add New Quiz For Online Exam Portal ........................................... 58
Figure 24: View All Quizzes For Online Exam Portal ................................................... 59
xv
Figure 25: Student DashBoard For Online Exam Portal ................................................ 59
xvi
LIST OF TABLES
xvii
1.INTRODUCTION
This project assesses students by conducting online objective tests. The tests would
be highly customizable. This project will enable educational institutes to conduct test and
The project allows faculties to create their own tests. It would enable educational
institutes to perform tests, quiz and create feedback forms. It asks faculty to create his/her
set of questions. Faculty then creates groups and adds related students into the groups.
Further the tests are associated with specific groups so that only associated students can
appear for the test. The result of the response would be available to the faculty of the
question set. Further the result would also be mailed to the student. This project would be
helpful for creating practice tests, say for educational institutes and as a feedback form.
1.1 PURPOSE
Online examination will reduce the hectic job of assessing the answers given by
the candidates.
Can generate various reports almost instantly when and where required.
1.2 SCOPE
This project would be very useful for educational institutes where regular evaluation of
students’ is required. Further it can also be useful for anyone who requires feedback based
personalize learning experiences. The future holds exciting possibilities with AI-powered
adaptive tests, gamification for engagement, and VR simulations for realistic assessments.
1
1.3 WHAT IS AN ONLINE EXAMINATION SYSTEM?
An online examination system is the complete agenda of an online test that has multiple
features and functionalities. The online examination system uses online exam
software through which the tests are created, conducted, and evaluated. This type of
examination system has multiple benefits few of them are that it eliminates the
dependency on paper for the question and answer sheets, and eliminates any sort of
In Online Examination System the entire steps involved in a paper-based test right from
the beginning to the end are digitized with the use of online assessment software. Let’s
read how each step is automated with the application of the online exam platform-
Creation of test
interactive as well as effective. The online test creation platform provides a variety of
question types using which a subjective, objective, or MCQ-type test can be easily
created. Also, the choice of questions can be done from an existing test library or the
test creator can create an all-new set of questions by uploading them with just a click.
Conducting of test
Online exam software has the feature to accommodate even a large pool of students
test taker to categorize the candidates in their respective groups and at the time of
conducting the test, the test taker can assign individual tests to every group,
2
conducting multiple tests at once.
Proctoring of test
At the time of conducting the online test, invigilation becomes a high-priority requirement
as it ensures the test reliability and credibility of the test. Good online assessment software
comes integrated with a proctoring system that ensures a cheat-proof testing environment
on multiple levels. At the start of the test, it ensures candidate authentication, and when
the test begins it records the entire test session in audio and video.
Evaluation of test
The last and most important part of any test is its result, report, and feedback. The online
examination system provides a comprehensive report system that is highly accurate and
instant. The software can instantly score the test paper according to the marks assigned
by the test creator. Later, a test report is generated that provides scores on every subject,
These organizations use online exams to assess a candidate's knowledge and skills for
3
2.LITERATURE REVIEW
books, and other relevant sources that discuss the design, development, implementation,
explores various security threats in online exams like cheating and impersonation. It
and proctored exams. It evaluates their effectiveness in measuring learning outcomes “[2]
compares various online exam systems based on features like question creation, test
delivery, and automated grading. This can help identify strengths and weaknesses to
exam integrity.”[4]
by Smith et al. examines the impact of online proctoring on student behavior in online
4
exams. It explores the psychological factors that deter cheating when students are
remotely monitored.”[5]
investigates factors affecting user experience in online exams, such as interface design,
accessibility features, and navigation ease. It provides recommendations for creating user-
(2021) by Chen et al. analyzes how user interface design can influence student
explores the need for accessible online exam design to cater to students with disabilities.
It discusses features like screen reader compatibility, text magnification options, and
5
3.SOFTWARE REQURIEMENT ANALYSIS
centuries. They involve students answering questions physically written on paper, with
Reduced risk of cheating: Certain types of online cheating (e.g., accessing external
inconsistencies.
transportation.
6
3.2 PROPOSED SYSTEM
limitations of paper-based exams and leverage the benefits of online platforms. Here's an
Accessibility Features: Support for screen readers, adjustable text size, and
answer sheets.
Defining the problem for software requirement analysis in the context of a online
exam portal project for an online exam project. These specifications encompass both
7
3.3.1 Functional Requirements
Functional requirements define the specific actions and functionalities an online
exam portal must perform to facilitate the examination process for instructors, students,
1. User Management
accounts using unique usernames, emails, and secure passwords.The system validates
registration details to ensure they meet specific criteria (e.g., strong passwords, unique
usernames, valid email formats).The system provides a secure login mechanism for
credentials against stored data to grant access based on user roles.The system allows users
The system defines distinct user roles (e.g., instructor, administrator, student)
with assigned permissions. Instructors can create exams, manage questions, assign exams
system configurations, and access security settings.Students can take assigned exams,
8
3. Exam Management:
Exam Creation:
Instructors can create new exams with various question types (multiple choice,
true/false, essay, matching) and define point values for each question.The system allows
instructors to set time limits for exams and provide clear instructions for
students.Instructors can manage a question bank to create, edit, and organize questions
Exam Delivery
enforcing time limits and preventing unauthorized access.The system may integrate with
third-party proctoring services (optional) to monitor student activity during exams and
Test Taking
questions clearly and allowing navigation between them.The system facilitates secure
answer submission for various question types (selecting options, typing text, uploading
Automatic Grading
The system implements automatic grading for objective question types (e.g.,
Manual Grading
9
providing written feedback to students.
Result Management:
The system generates comprehensive reports with student grades, answer breakdowns,
and performance analysis for instructors.Students can securely access their exam results
5. Additional Functionalities
The system may offer functionalities like: Practice exams for students to
blueprint for the core functionalities of an online exam portal, ensuring a streamlined and
characteristics and limitations of the system, focusing on how it operates rather than the
specific actions it performs. These NFRs are crucial for ensuring the online exam portal
delivers a reliable, secure, and user-friendly experience for both instructors and students.
10
Here's a breakdown of key NFRs for an online exam portal:
1. Performance
Response Time: Fast and responsive user experience for all functionalities
(exam creation, test-taking, grading) is essential. This means delivering actions like
question loading, answer submission, and result retrieval within a short timeframe (ideally
performance lags. This ensures smooth exam delivery even during peak usage periods.
crucial. The system should be optimized to minimize processing overhead during exams,
2. Scalability:
of users (instructors and students) over time without impacting performance. This
includes scaling to support new instructors adding courses and a larger student base taking
exams.
Data Volume: The system must handle an increasing amount of exam data
(questions, answers, results) as the exam volume grows. This ensures the system
maintains stability and speed even with a large amount of historical exam data.
3. Security:
identities. Authorization controls must be enforced to restrict access based on user roles
11
(instructor, student, administrator). This ensures only authorized users can access exam
Preventative Measures: Security measures like secure user roles, access controls, session
timeouts, and secure exam delivery protocols should be implemented to safeguard against
Input Validation: Validating all user inputs is crucial to prevent security vulnerabilities
like SQL injection or attempts to manipulate exam data. This helps maintain data integrity
4. Reliability:
System Availability: The online exam portal should strive for high uptime,
minimizing downtime due to maintenance or outages. This ensures exams are accessible
process.
gracefully handle unexpected errors and recover from system failures. This could involve
Data Backup and Redundancy: Data backup and redundancy strategies are
essential to ensure exam data (questions, answers, grades) is protected and recoverable in
case of system failures. This could involve regular backups to secondary storage or cloud-
based solutions.
12
5. Usability:
instructors creating exams and students taking exams. This includes clear navigation, easy
disabilities, adhering to accessibility guidelines (e.g., WCAG). This ensures everyone can
instructors creating exams and students taking exams is essential. This includes
experience.
6. Maintainability:
readable, maintainable, and testable for future modifications. This allows for easier bug
question types, or integrating additional features. This makes the system more adaptable
to future requirements.
and operational procedures to ensure efficient management and maintenance of the online
exam portal.
7. Portability:
13
platforms or environments (e.g., web browsers, mobile devices) provides flexibility for
exam delivery and access. This allows students to take exams from any device with a
tools (e.g., plagiarism checkers, proctoring software) enhances exam functionalities. This
allows instructors to
An online exam portal can be broken down into several key modules, each with specific
1.User Registration:
Implement validation to ensure all required fields are filled, email addresses are
2.User Login:
Grant access to the portal based on user roles (instructor, administrator, student)
Define distinct user roles (instructor, administrator, student) with granular control
14
over access permissions.
For example, instructors can create and manage exams, while students can only
Allow users to view and update their profile information (e.g., name, email)
1. Exam Creation:
Enable instructors to create exams with various question types (multiple choice,
Allow defining point values for each question, setting time limits for exams, and
Provide a central repository for instructors to create, edit, and organize exam
questions.
3. Exam Delivery:
Enforce exam time limits and prevent unauthorized access during exam sessions.
4. Scheduled Exams:
15
Test Taking Module
1. Exam Access:
Provide students with a secure interface to access and take assigned exams.
Verify student identity through login credentials before allowing exam access.
2. Test Interface:
3. Answer Submission:
1. Automatic Grading:
Implement automated grading for objective question types (e.g., multiple choice)
2. Manual Grading:
detailed feedback.
3. Result Management:
16
4.SOFTWARE DESIGN
Data flow diagrams (DFDs) are a way to visually represent the flow of data in an online
exam portal. They show how information moves through the system, from input to
Components of a DFD:
Entities:
These are external sources or destinations of data, such as Students, Administrators, and
a Question Bank.
Processes:
These represent the actions performed by the system on the data, like User Authentication,
Data Flows: These are the arrows that show the movement of data between entities and
processes.
Levels of DFDs:
Context Level (Level 0): This is the most basic level, showing the entire online exam
17
Level 1 DFD: This expands on the context level, breaking down the main process into
smaller sub-processes like User Login, Manage Exams (for Admins), Take Exam (for
the sub-processes from Level 1. For instance, the "Take Exam" process might be broken
down into "Show Questions," "Record Student Response," and "Submit Exam."
Clear Communication: DFDs provide a clear understanding of how the system works
for developers, administrators, and anyone involved in the online exam process.
18
Improved Design: By visualizing data flow, you can identify potential bottlenecks or
inefficiencies and improve the overall design of the online exam portal.
By using DFDs, online exam portals can be designed to be more efficient, user-friendly,
and secure.
19
4.2 UML DIAGRAMS
A use case diagram in an online exam portal visually depicts the interactions between the
system and its users. It illustrates the functionalities of the portal from the perspective of
Administrator: The person responsible for managing the overall system and user
accounts.
20
The use case diagram will show these actors outside a rectangular box representing the
online exam portal system itself. Inside the box, there will be oval shapes representing
the different functionalities or actions users can perform within the system. Lines connect
the actors to the relevant use cases, indicating which actor interacts with which
functionality.
Here are some common use cases you might find in an online exam portal use case
diagram:
Student:
Register (optional)
Login
Take Exam
View Results
Administrator:
Login
The use case diagram provides a clear and concise way to understand the functionalities
of the online exam portal and how different user roles interact with the system. This helps
21
4.2.2.Class Diagram
A class diagram in an online exam portal visually depicts the system's structure,
focusing on the classes and their relationships. It's like a blueprint that helps understand
Here's a breakdown of what a class diagram in an online exam portal might typically
show:
1.Classes:
User: This could represent both Students and Instructors (or Admins). It would
Exam: This class would hold details about the exam itself, such as title, subject,
could have attributes like question text, answer choices (for multiple choice), and
correct answer.
Result: This class might store the outcome of an exam attempt by a student,
2.Relationships:
Inheritance: This could be used if there are different question types (e.g.,
Association: This shows how classes relate to each other. For instance, an Exam
would have an association with multiple Question objects, indicating that an exam
is composed of questions.
22
meaning the result is incomplete without both.
Improved Design: It helps identify potential issues early on, like missing
components.
for writing the actual code. Developers can use it as a reference when translating
23
the classes and their interactions into programming language. This can streamline
4.2.3.Sequence Diagram
different parts of the system over time. It's like a storyboard that depicts the message flow
Actors:
Student
Messages:
3. System sends a message to the exam database to fetch details of the specific exam
6. System retrieves questions associated with the exam and shuffles them (if
applicable).
9. System validates the answer and stores it in the exam attempt database.
10. System retrieves the next question (if any) and displays it to the student.
24
11. Steps 8-10 repeat until all questions are answered or the exam timer expires.
12. System calculates the student's score and stores the final result.
system interact with each other during a specific event. This helps identify
user journey, highlighting the steps a user takes to complete a task (like taking an
25
Error Handling: You can use sequence diagrams to depict how the system
handling mechanisms.
4.2.4Activity Diagram
An activity diagram in an online exam portal depicts the workflows involved in the
system. It focuses on the sequential steps users (students, instructors) take to perform
actions and the system's responses. Unlike a class diagram that shows structure, an
activity diagram highlights the dynamic behavior of the online exam system.
Here's how an activity diagram for an online exam portal might look:
Components:
Start/End ovals: These mark the beginning and end of the overall process.
Diamonds: These represent decision points where the flow can branch based on
Arrows: These show the flow of the process between activities and decisions.
26
Figure 8: Activity Diagram
27
Common Activities in an Online Exam Portal Activity Diagram:
Student Login: This depicts the student entering their credentials and logging
Exam Selection: This shows the student browsing and selecting an exam to take.
Download Exam Paper (if applicable): This activity might be present if exams
Take the Exam: This encompasses the student answering questions within the
allocated time.
Submit Exam: This shows the student submitting their completed exam when
finished.
Show Result: This depicts the system presenting the student with their exam score
Review Exam (Optional): This activity could show the student reviewing their
Instructor Login: This depicts the instructor logging into the system with their
credentials.
28
4.3 ER-DIAGRAM
designing the database schema, ensuring efficient data storage and retrieval.
4.3.1 Entities
1. User: This entity represents individuals interacting with the system. It typically
Username
2. Exam: This entity represents an assessment offered within the portal. It may contain
Title
Subject
Foreign Key referencing User (e.g., instructor who created the exam)
29
Figure 9: ER Diagram
3. Question: This entity represents an individual question presented within an exam. It
Question Text
30
4.3.2 Relationships
signifies that a student can take multiple exams, and an exam can be taken by multiple
students. This relationship is often implemented using a junction table to associate users
and exams with additional attributes specific to the attempt (e.g., score, timestamp).
indicates that an exam is composed of multiple questions. An exam can reference multiple
functionality.
Simplify the process of implementing and maintaining the online exam portal.
31
5.SOFTWARE AND HARDWARE REQUIREMENTS
Middleware : SpringAPI
Processor : i7
Hard Disk : 64 GB
Ram : 16GB
32
6.CODING
6.1 ANGULAR
6.1.1 start-quiz.component.html
<div class="container-fluid">
<div class="row">
<div class="col-md-2">
<h3>Instructions</h3>
<mat-card-content>
<ul>
<li>Do not Refresh the page Otherwisse you will get new questions in this quiz</li>
</ul>
</mat-card-content>
</mat-card>
</div><div class="col-md-8">
<ng-container *ngIf="questions">
</ng-container>
33
<mat-card-content>
<mat-divider></mat-divider>
<div class="col-md-6">
<div class="form-check">
[value]="q.option1" [(ngModel)]="q.givenAnswer">
</div>
</div>
<div class="col-md-6">
<div class="form-check">
[value]="q.option2" [(ngModel)]="q.givenAnswer">
</div>
</div>
</div>
<div class="form-check">
[value]="q.option3" [(ngModel)]="q.givenAnswer">
34
<label class="form-check-label" for="option3">{{q.option3}}</label>
</div>
</div>
<div class="form-check">
[value]="q.option4" [(ngModel)]="q.givenAnswer">
</div>
</div>
</div>
</mat-card-content>
</mat-card>
<div class="container">
Quiz</button>
</div>
</div>
<div class="col-md-2">
<mat-card-header>
<mat-card-title>Progress</mat-card-title>
35
subtitle>
</mat-card-header>
<mat-card-content>
<h1 class="text-center">{{getFormattedTime()}}</h1>
[value]="(timer/(this.questions.length*2*60))*100"></mat-spinner>
</mat-card-content>
</mat-card>
</div>
</div>
</div>
</div>
<div class="row">
<mat-card>
<mat-card-header>
<mat-card-title>Quiz Results</mat-card-title>
</mat-card-header>
<mat-card-content class="text-center">
36
</mat-card-content>
<mat-card-actions>
(click)="printPDF()">Print</button>
[routerLink]="'/user-dashboard/AllQuizzes'">Home</button>
</mat-card-actions>
</mat-card>
</div>
</div>
</div>
6.1.2 start-quiz.component.ts
Services/questions-service.service';
services.service';
@Component({
selector: 'app-start-quiz',
templateUrl: './start-quiz.component.html',
styleUrls: ['./start-quiz.component.css']
37
})
qid:any;
questions:any;
marksGot=0;
correctAnswers=0;
timer:any;
question:QuestionsServiceService) { }
ngOnInit(): void {
this.preventBackButton();
this.qid=this.route.snapshot.params['qid'];
this.loadQuestions();
preventBackButton()
history.pushState(null,"null",location.href);
this.locationSt.onPopState(()=>{
history.pushState(null,"null",location.href);
});
submitQuiz()
Swal.fire({
38
title: 'Do you want to Submit the Quiz?',
showCancelButton: true,
confirmButtonText: 'Submit',
icon:'info'
}).then(e=>{
if(e.isConfirmed)
this.evalQuiz();
});
startTimer()
let t=window.setInterval(()=>{
if(this.timer<=0)
this.submitQuiz();
clearInterval(t);
}else{
this.timer--;
},1000)
getFormattedTime()
39
{
let mm=Math.floor(this.timer/60);
evalQuiz()
this.isSubmit=true;
if(q.givenAnswer==q.answer)
this.correctAnswers++;
let marksSingle=this.questions[0].quiz.maxMarks/this.questions.length;
this.marksGot+=marksSingle;
if(q.givenAnswer.trim()!='')
this.attempted++;
});
printPDF()
window.print();
40
}
6.2.1 AuthenticationController.java
package com.example.ExamPortal.controller;
import java.security.Principal;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.DisabledException;
import
org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.example.ExamPortal.config.JwtUtil;
import com.example.ExamPortal.models.JwtRequest;
import com.example.ExamPortal.models.JwtResponse;
import com.example.ExamPortal.models.User;
41
import com.example.ExamPortal.service.UserDetailsServiceImpl;
@RestController
@CrossOrigin("*")
@Autowired
@Autowired
@Autowired
//generate token
@PostMapping("/generate-token")
throws Exception
Try
authenticate(jwtRequest.getUsername(), jwtRequest.getPassword());
}catch (UsernameNotFoundException e) {
e.printStackTrace();
42
@GetMapping("/current-user")
return (
(User)this.userDetailsServiceImpl.loadUserByUsername(principal.getName()) );
package com.example.ExamPortal.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import com.example.ExamPortal.examModels.Quiz;
import com.example.ExamPortal.service.QuizService;
@RestController
@RequestMapping("/quiz")
43
@CrossOrigin("*")
@Autowired
//add quiz
@PostMapping("/")
Quiz quiz1=this.quizService.addQuiz(quiz);
return ResponseEntity.ok(quiz1);
//get quiz
@GetMapping("/{qId}")
return this.quizService.getQuiz(quizId);
@GetMapping("/")
return ResponseEntity.ok(this.quizService.getQuiz());
@PutMapping("/")
44
public ResponseEntity<Quiz> updateQuiz(@RequestBody Quiz quiz)
return ResponseEntity.ok(this.quizService.updateQuiz(quiz));
//delete quiz
@DeleteMapping("/{qId}")
this.quizService.deleteQuiz(qId);
@GetMapping("/category/{cId}")
category.setCid(cId);
return this.quizService.getQuizzesOfCategory(category);
@GetMapping("/active")
return this.quizService.getActiveQuizzes();
45
@GetMapping("/category/active/{cid}")
category.setCid(cid);
return this.quizService.getActiveQuizzesOfCategory(category);
46
7. TESTING
Building upon the reference provided, here's a breakdown of testing approaches for an
Test individual components of the system, such as user login, question creation modules,
correctly under various scenarios (e.g., valid and invalid user credentials, different
Utilize unit testing frameworks (JUnit, PHPUnit) to automate test cases and streamline
the process.
Communication between the user interface and server-side logic.Integration with external
Data flow between various components (e.g., question pool, student responses, grading
Test exam creation and management workflows (adding/editing questions, setting time
Conduct student exam sessions, simulating test taking, answer submission, and result
viewing.
47
7.1.4. Non-Functional Testing
Performance Testing: Simulate high user loads (multiple students taking exams
Measure response times for exam loading, question rendering, and result delivery.
Identify and address any performance bottlenecks to ensure smooth exam delivery.
Simulate potential attacks (e.g., SQL injection, hacking attempts) to identify and mitigate
security risks.
Ensure secure data handling and prevent unauthorized access to exam content or student
data.
Usability Testing: Observe user interaction with the system to identify usability issues.
Recruit student and educator participants to test the system and gather feedback.
Evaluate the user interface for clarity, ease of navigation, and overall user experience.
Use automated testing tools and manual testing to ensure compliance with accessibility
Test the system across different web browsers (Chrome, Firefox, Edge, Safari) on
mobile access is offered, test the system on different mobile devices and operating
48
7.1.6 Additional Considerations
Test Data Management: Create a comprehensive test data set covering various user
Test Case Management: Organize and document test cases effectively for efficient
Defect Management: Establish a system for reporting, tracking, and resolving identified
issues.
provides a positive user experience for both educators and students.This multi-layered
approach, combined with effective test data management, test case management, and
defect management, lays the groundwork for a dependable and trustworthy online
examination system. It empowers educators to conduct secure and efficient exams while
beyond basic functionality checks with layered testing. Unit testing ensures each
component works, integration testing verifies smooth interaction, and functional testing
pressure, security vulnerabilities, user experience clarity, accessibility for all, and
compatibility across devices. Effective test data, case management, and defect
management round out this strategy, creating a trustworthy online exam system for a
49
7.2 TESTCASE FOR ONLINE EXAM PORTAL
Expected Actual
Sl.No Action Inputs Intput Test
Output
Result
50
8 Submit Exam No answer Exam Exam submitted Fail
(Student) selection submission with a score of
fails zero
(unexpected
behavior)
9 Automatic Selected answers Score Score accurately Pass
Grading calculated reflects correct
(Multiple based on answers
Choice) correct
answers
10 View Results Completed exam Exam score Score and Pass
(Student) and detailed breakdown
breakdown displayed
accurately
11 View Results Exam selection List of student List displayed Pass
(Educator) scores and with accurate
individual scores and
answer details details
51
Figure 10: Testcase For User Register where already exists
52
Figure 12: Test Case For Add Category Without Credentials
53
Figure 14: Test Case For Admin Add Category Successfull
54
8. OUTPUT SCREENS
55
Figure 18: Registration Page For Online Exam Portal
56
Figure 20: Admin Profile For Online Exam Portal
Figure 21: View All Users in Admin Page For Online Exam Portal
57
Figure 22: Admin Add Category For Online Exam Portal
Figure 23: Admin Add New Quiz For Online Exam Portal
58
Figure 24: View All Quizzes For Online Exam Portal
59
Figure 26: Quiz Is On Going in Online Exam Portal
60
9.CONCLUSION
The online examination system emerges as a powerful tool for educators, offering
platform streamlines the assessment process, allowing for creation, delivery, and grading
of exams online. With features like question randomization and secure testing
But it's not just about convenience. Online exams empower students with flexibility,
allowing them to take assessments from any device with an internet connection.
The system goes beyond functionality, offering valuable reports for educators to analyze
student performance and identify areas for improvement. This data-driven approach
fosters better learning outcomes. Ultimately, the online exam system embraces the digital
age, preparing students for success with cutting-edge evaluation techniques, while
61
10.FURTHER ENHANCEMENT
enhance both security and the testing experience. Integration with biometric
verifying test-taker identity. Artificial intelligence can play a role in real-time plagiarism
For a more engaging experience, features like interactive question formats with
conduct proctored exams remotely through webcam and screen monitoring can further
ensure exam integrity. Offline exam capabilities with content that can be downloaded and
completed without an internet connection can cater to areas with limited internet access.
By embracing these advancements, online exam portals can evolve into robust, secure,
These advancements paint a picture of a future where online exam portals are not just
convenient alternatives, but robust, secure, and adaptable platforms that elevate the
assessment landscape for both educators and students. By embracing these innovations,
we can create a more engaging, secure, and effective learning environment for the
generations to come.
62
11. BIBILOGRAPHY
[1] Gupta, S., Yadav, R., Kumar, S., & Verma, S. (2020). Security in Online
[2] Kumar, A., Singh, R., & Sharma, S. (2019). A Review of Online Assessment
10(2), 271-276.
[3] Singh, P., Sharma, A., & Gupta, M. (2018). Comparative Analysis of Online
35-40.
[4] Zhang, L., Zhang, Y., & Zhang, H. (2021). A Survey on Online Proctoring
116.
[5] Smith, J., Johnson, M., & Brown, K. (2020). The Effectiveness of Online
[6] Jones, T., Williams, B., & Davis, C. (2019). Privacy Concerns in Online
[7] Lee, H., Kim, S., & Park, J. (2022). Enhancing User Experience in Online
38(2), 159-174.
[8] Chen, W., Wang, L., & Li, M. (2021). The Impact of User Interface Design on
63