Download as pdf or txt
Download as pdf or txt
You are on page 1of 79

A

Major Project Report

On

ONLINE EXAM PORTAL USING JAVA

Submitted in partial fullfilment of the Requirements for the award of the degree in

Bachelor of Technology

In

COMPUTER SCIENCE & ENGINEERING

By

CH.REKHA 20681A0510

K.ANNIE SIRI 20681A0523

D.LOKESH 20681A0512

A.KEERTHAN 20681A0501

Under the Esteemed Guidance of


Mr. M. Uday Kumar

(Assistant Professor)

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

CHRISTU JYOTHI INSTITUTE OF TECHNOLOGY & SCIENCE

Colombo Nagar, Yeshwanthapur, Jangoan-506167, Telangana

2023-2024
CHRISTU JYOTHI INSTITUTE OF TECHNOLOGY & SCIENCE

Colombo Nagar, Yeshwanthapur, Jangaon-506167.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

2023 – 2024

CERTIFICATE

This is to certify that it is a Bonafide record of project work entitled “Online

Exam Portal Using Java” carried out by Ch. Rekha(20681A0510), K. Annie Siri

(20681A0523),D. Lokesh(20681A0512),A. Keerthan(20681A0501) during the academic

year 2023-2024, in partial fulfilment for the requirement for the award of the Degree of

Bachelor of Technology in Computer Science and Engineering offered by Christu Jyothi

Institute of Technology and Science, Jangoan.

Project Co-Guide Project Guide HOD-CSE

Mr. B. MAHENDER Mr. M. UDAY KUMAR Mr. M. RAMARAJU

Assistant Professor Assistant Professor Assistant Professor

External Examiner
CHRISTU JYOTHI INSTITUTE OF TECHNOLOGY & SCIENCE

Colombo Nagar, Yeshwanthapur, Jangaon-506167.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

2023 – 2024

DECLARATION

We hereby declare that the document entitled “Online Exam Portal

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.

Tech) in Computer Science and Engineeringis a record of an original work done by us

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.

CH. REKHA 20681A0510

K. ANNIE SIRI 20681A0523

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

the opportunity to carry out our project work.

We endow our sincere thanks to Principal Dr. S. CHANDRASHEKAR REDDY for his

consistent cooperation and encouragement.

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

suggestions and motivating guidance during our project work.

We would like to extend our gratitude and sincere thanks to our guide Mr. M. UDAY

KUMAR and Mr.B .MAHENDER, Department of Computer Science and Engineering

for theirvaluable and timely suggestions.

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

directly or indirectly helped us in completing our project work.

CH. REKHA 20681A0510

K. ANNIE SIRI 20681A0523

D.LOKESH 20681A0512

A. KEERTHAN 20681A0501

v
CHRISTU JYOTHI INSTITUTE OF TECHNOLOGY & SCIENCE
Colombo Nagar, Yeshwanthapur, Jangaon-506167,Telangana.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Vision and Mission of the Institute

Vision

To admit and groom students from rural background and be a truly technical

institution,benefiting society and nation as a whole institute.

Mission

The mission of the institute is to create, deliver and refine knowledge. Being a

ruraltechnical institute, we aim to:

1. Enhance our position to one of the best technical institutions and to measure our

performance against the highest defined standards.

2. Provide highest quality learning environment to our students for their greater well-

beingso as to equip them with highest technical and professional ethics.

3. Produce engineering graduates fully equipped to meet the ever-growing needs of

industry and society.

vi
CHRISTU JYOTHI INSTITUTE OF TECHNOLOGY & SCIENCE
Colombo Nagar, Yeshwanthapur, Jangaon-506167,Telangana.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Department Vision and Mission

Vision

To be a center of eminence to mould young, fresh minds into challenging computer

science professionals with ethical values.

Mission

1. Enrich the knowledge and wisdom with repository of books and modernized laboratory

aided by dedicated resources.

2. Organize training and activities on upcoming techniques, and inter-personal skills.

3. Develop the ability to provide sustainable solutions to real world situations with

collaborations.

vi
CHRISTU JYOTHI INSTITUTE OF TECHNOLOGY & SCIENCE

Colombo Nagar, Yeshwanthapur, Jangaon-506167,Telangana.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Program Educational Objectives

PEO1 Graduates of B. Tech (CSE) are able to Formulate, Analyze and solve hardware

and software problems within the constraints and pursue research.

PEO2 Demonstrate knowledge in core areas of computer science and related

engineering to comprehend engineering trade-offs to create novel products.

PEO3 Show the awareness of life-long learning needed for a successful professional

career and exhibit ethical values, excellence, leadership and social

responsibility.

vii
CHRISTU JYOTHI INSTITUTE OF TECHNOLOGY & SCIENCE

Colombo Nagar, Yeshwanthapur, Jangaon-506167,Telangana.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

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.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Program Specific Outcomes

PSO1 Proficiency skill:

Understand, analyze and develop computer programs in the areas related to algorithms,

system software, multimedia, web design, big data analytics and networking for efficient

design of computer-Based systems of varying complexity.

PSO2 Problem-Solving Skills:

Apply standard practices and strategies in software project development using open-

ended programming environments to deliver a quality product for business success.

PSO3 Successful Career and Entrepreneurship:

Employ modern computer language, environments and platforms in creating innovative

career paths to be entrepreneur and a zest for higher studies.

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

limitations by creating a user-friendly, secure online assessment system specifically

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

the web portal.

xi
TABLE OF CONTENTS

1.INTRODUCTION ........................................................................................................ 1

1.1 PURPOSE ........................................................................................................... 1

1.2 SCOPE ................................................................................................................ 1

1.3 WHAT IS AN ONLINE EXAMINATION SYSTEM? ...................................... 2

1.4 HOW DOES THE ONLINE EXAMINATION SYSTEM WORK? .................. 2

1.5 WHO USES AN ONLINE EXAMINATION SYSTEM? .................................. 3

2.LITERATURE REVIEW ............................................................................................ 4

2.1 ONLINE ASSESSMENT AND TESTING METHODS .................................... 4

2.2 ONLINE PROCTORING TECHNOLOGIES .......................................... 4

2.3 USER EXPERIENCE IN ONLINE EXAMINATIONS ........................... 5

3.SOFTWARE REQURIEMENT ANALYSIS ............................................................ 6

3.1 EXISTING SYSTEM.......................................................................................... 6

3.1.1 Disadvantages In Existing System ........................................................... 6

3.2 PROPOSED SYSTEM........................................................................................ 7

3.2.1 Advantages In Proposed System .............................................................. 7

3.3 SOFTWARE REQUIREMENT SPECIFICATION ........................................... 7

3.3.1 Functional Requirements ......................................................................... 8

3.3.2 Non Functional Requirements .............................................................. 10

3.3.3 MODULES AND THEIR FUNCTIONALITIES .......................................... 14

xii
4.SOFTWARE DESIGN ............................................................................................... 17

4.1 DATAFLOW DIAGRAM ................................................................................ 17

4.2 UML DIAGRAMS ............................................................................................ 20

4.2.1 Use Case Diagram .................................................................................. 20

4.2.2.Class Diagram ........................................................................................ 22

4.2.3.Sequence Diagram.................................................................................. 24

4.3 ER-DIAGRAM ................................................................................................. 29

4.3.1 Entities.................................................................................................... 29

4.3.2 Relationships .......................................................................................... 31

5.SOFTWARE AND HARDWARE REQUIREMENTS .......................................... 32

5.1SOFTWARE REQUIREMENTS....................................................................... 32

5.2HARDWARE REQUIREMENTS ..................................................................... 32

6.CODING ..................................................................................................................... 33

6.1 ANGULAR ....................................................................................................... 33

6.1.1 start-quiz.component.html...................................................................... 33

6.1.2 start-quiz.component.ts .......................................................................... 37

6.2 SPRING API ..................................................................................................... 41

6.2.1 AuthenticationController.java ................................................................ 41

6.2.2 Quizz Controller.java ............................................................................. 43

xiii
7. TESTING ................................................................................................................... 47

7.1 TYPES OF TESTING ....................................................................................... 47

7.1.1. Unit Testing........................................................................................... 47

7.1.2. Integration Testing ................................................................................ 47

7.1.3 Functional Testing.................................................................................. 47

7.1.4. Non-Functional Testing ........................................................................ 48

7.1.5. Compatibility Testing ............................................................................ 48

7.1.6 Additional Considerations ...................................................................... 49

7.2 TESTCASE FOR ONLINE EXAM PORTAL ................................................. 50

8. OUTPUTS SCREENS............................................................................................... 55

9.CONCLUSION ........................................................................................................... 61

10.FURTHER ENHANCEMENT ............................................................................... 62

11. BIBILOGRAPHY ................................................................................................... 63

xiv
LIST OF FIGURES

Figure 1: Architecture of Online Exam Portal................................................................. 10

Figure 2: Level 0 DFD..................................................................................................... 17

Figure 3: Level 1 DFD.................................................................................................... 18

Figure 4: Level 2 DFD..................................................................................................... 19

Figure 5: Use Case ........................................................................................................... 20

Figure 6: Class Diagram ................................................................................................. 23

Figure 7: Sequence Diagram .......................................................................................... 25

Figure 8: Activity Diagram.............................................................................................. 27

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 12: Test Case For Add Category Without Credentials......................................... 53

Figure 13: Testcase For User Registered Successful...................................................... 53

Figure 14: Test Case For Admin Add Category Successfull.......................................... 54

Figure 15: Test Case For Admin Add Quiz Successfully .............................................. 54

Figure 16: Home Page For Online Exam Portal ............................................................. 55

Figure 17: Login Page For Online Exam Portal ............................................................. 55

Figure 18: Registration Page For Online Exam Portal ................................................... 56

Figure 19: Admin Page For Online Exam Portal ........................................................... 56

Figure 20: Admin Profile For Online Exam Portal ........................................................ 57

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

Figure 26: Quiz Is On Going in Online Exam Portal .................................................... 60

Figure 27: Result Page For Online Exam Portal ............................................................ 60

xvi
LIST OF TABLES

Table 1: Test Cases For Online Exam Portal ................................................................ 51

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

have automated checking of answers based on the response by the candidates.

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

 Responses by the candidates will be checked automatically and instantly.

 Online examination will reduce the hectic job of assessing the answers given by

the candidates.

 Being an integrated Online Examination System it will reduce paper work.

 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

on objective type responses. Furthermore, detailed analytics empower educators to

personalize learning experiences. The future holds exciting possibilities with AI-powered

adaptive tests, gamification for engagement, and VR simulations for realistic assessments.

Online exam portals are undoubtedly shaping the future of examinations.

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

manual workload which is too much in the case of an offline test.

1.4 HOW DOES THE ONLINE EXAMINATION SYSTEM WORK?

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

The administrator has multiple options to create an online test that is

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

Conducting a large-scale test is not an issue when it comes to online tests.

Online exam software has the feature to accommodate even a large pool of students

at once. The additional feature of “candidate management” increases the feasibility of

conducting a test on a large group of candidates in a systematic manner. It allows the

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,

section, and question of the test.

1.5 WHO USES AN ONLINE EXAMINATION SYSTEM?

It is used by Coaching, institutes, colleges, universities, governments, and corporations

to conduct online assessments with ease.

 Professional Certification Bodies

These organizations use online exams to assess a candidate's knowledge and skills for

professional certifications. Content would primarily consist of multiple-choice questions,

simulations, and case studies relevant to the specific certification.

3
2.LITERATURE REVIEW

A literature survey on online exam portal can be conducted by reviewing existing

research papers, articles,

books, and other relevant sources that discuss the design, development, implementation,

and evaluation of such systems.

2.1 ONLINE ASSESSMENT AND TESTING METHODS

“Security in Online Examinations: A Literature Review (2020) by Gupta et al.

explores various security threats in online exams like cheating and impersonation. It

discusses authentication methods, question bank security, and secure communication

protocols to mitigate these risks”[1]

“A Review of Online Assessment Technologies (2019) by Kumar et al. analyzes

different online assessment methods, including multiple-choice questions, essay prompts,

and proctored exams. It evaluates their effectiveness in measuring learning outcomes “[2]

“Comparative Analysis of Online Examination Systems (2018) by Singh et al.

compares various online exam systems based on features like question creation, test

delivery, and automated grading. This can help identify strengths and weaknesses to

consider in your project design.”[3]

2.2 ONLINE PROCTORING TECHNOLOGIES

“A Survey on Online Proctoring Systems for E-learning (2021) by Zhang et al.

reviews different online proctoring technologies, including webcam monitoring, user

activity tracking, and plagiarism detection. It evaluates their effectiveness in ensuring

exam integrity.”[4]

“The Effectiveness of Online Proctoring in Reducing Cheating Behavior (2020)

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]

“Privacy Concerns in Online Proctoring (2019) by Jones et al. discusses privacy

considerations in online proctoring systems. It explores student concerns about data

collection, surveillance, and potential misuse of information”[6]

2.3 USER EXPERIENCE IN ONLINE EXAMINATIONS

“Enhancing User Experience in Online Assessment Platforms (2022) by Lee et al.

investigates factors affecting user experience in online exams, such as interface design,

accessibility features, and navigation ease. It provides recommendations for creating user-

friendly online exam systems”[7]

“The Impact of User Interface Design on Student Performance in Online Exams

(2021) by Chen et al. analyzes how user interface design can influence student

performance in online assessments. It emphasizes the importance of clear instructions,

intuitive navigation, and minimizing distractions”[8]

“Accessibility Considerations for Online Examinations (2020) by Miller et al.

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

alternative question formats”[9]

5
3.SOFTWARE REQURIEMENT ANALYSIS

3.1 EXISTING SYSTEM

Paper-based examinations have been the traditional method of assessment for

centuries. They involve students answering questions physically written on paper, with

answers marked and graded manually or electronically.

 Low-tech: Requires minimal technical infrastructure and knowledge, making it

accessible in resource-constrained settings.

 Familiar format: Students and instructors are accustomed to the paper-based

format, reducing anxiety related to new technology.

 Reduced risk of cheating: Certain types of online cheating (e.g., accessing external

resources) are more difficult in a paper-based setting.

3.1.1 Disadvantages In Existing System

 Time-consuming: Administration, distribution, collection, and grading of paper

exams are labor-intensive processes.

 Prone to errors: Manual grading can be susceptible to human error and

inconsistencies.

 Limited flexibility: Difficult to conduct geographically dispersed exams or offer

various question formats (e.g., simulations, multimedia).

 Security concerns: Risk of paper leaks, damage, or loss during storage or

transportation.

 Environmental impact: Production, distribution, and disposal of paper

contribute to environmental concerns.

 Limited data collection: Limited ability to gather detailed data on student

performance beyond final scores.

6
3.2 PROPOSED SYSTEM

This proposal outlines an online examination system designed to address the

limitations of paper-based exams and leverage the benefits of online platforms. Here's an

overview of the system and its key advantages.

3.2.1 Advantages In Proposed System

 Enhanced Security: Robust authentication, question bank encryption, and online

proctoring ( minimize cheating attempts.

 Improved Efficiency: Streamlined exam creation, delivery, and automatic

grading save time and resources.

 Scalability and Flexibility: Accommodates large numbers of students and

geographically dispersed exams.

 Data-driven Insights: Detailed student performance data enables educators to

analyze learning patterns and improve assessment strategies.

 Accessibility Features: Support for screen readers, adjustable text size, and

alternative question formats for inclusivity.

 Reduced Environmental Impact: Minimizes reliance on paper for exams and

answer sheets.

 Improved User Experience: User-friendly interface with clear instructions and

real-time feedback enhances the exam experience for students.

3.3 SOFTWARE REQUIREMENT SPECIFICATION

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

functional and non-functional requirements, catering to the needs of instructors,

administrators, and students.

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,

and administrators. Here's a breakdown of these functionalities:

1. User Management

 Registration and Login

The system allows instructors, administrators, and students to register for

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

registered users using usernames/emails and passwords.The system authenticates user

credentials against stored data to grant access based on user roles.The system allows users

to log out securely after completing their tasks.

2. User Roles and Permissions

The system defines distinct user roles (e.g., instructor, administrator, student)

with assigned permissions. Instructors can create exams, manage questions, assign exams

to students, and view/analyze exam results.Administrators can manage user accounts,

system configurations, and access security settings.Students can take assigned exams,

submit answers, and view their results.

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

for reuse across exams.

 Exam Delivery

The system securely delivers exams to students within designated timeframes,

enforcing time limits and preventing unauthorized access.The system may integrate with

third-party proctoring services (optional) to monitor student activity during exams and

ensure academic integrity.

 Test Taking

Students have access to a user-friendly interface for taking exams, displaying

questions clearly and allowing navigation between them.The system facilitates secure

answer submission for various question types (selecting options, typing text, uploading

files).Students can review their answers before final submission.

4. Grading and Results

 Automatic Grading

The system implements automatic grading for objective question types (e.g.,

multiple choice) to provide immediate feedback to students.

 Manual Grading

The system allows instructors to manually grade essay or open-ended questions,

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

and instructor feedback.

5. Additional Functionalities

The system may offer functionalities like: Practice exams for students to

prepare.Exam scheduling for instructors to set exam availability times.Downloadable

reports for instructors to export exam data.These functional requirements provide a

blueprint for the core functionalities of an online exam portal, ensuring a streamlined and

efficient examination process for all users.

Non Functional Requirements

Figure 1: Architecture of Online Exam Portal


Non-functional requirements (NFRs) for an online exam portal define the overall

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

seconds) to avoid frustration for users.

Throughput: The system must manage multiple concurrent exams with a

high number of students taking exams simultaneously without experiencing significant

performance lags. This ensures smooth exam delivery even during peak usage periods.

Resource Utilization: Efficient utilization of server and database resources is

crucial. The system should be optimized to minimize processing overhead during exams,

preventing slowdowns or crashes.

2. Scalability:

User Volume: The system must be able to accommodate a growing number

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:

Authentication and Authorization: Robust authentication methods (e.g.,

strong password hashing, multi-factor authentication) are essential to verify user

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

content, create exams, or view sensitive data.

Data Protection: Sensitive exam data (questions, answers, grades) must be

encrypted at rest (stored on servers) and in transit (during transmission) to prevent

unauthorized access or data breaches.

Preventative Measures: Security measures like secure user roles, access controls, session

timeouts, and secure exam delivery protocols should be implemented to safeguard against

unauthorized access attempts and cheating.

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

and prevent unauthorized code execution.

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

to instructors and students as scheduled and minimizes disruptions to the examination

process.

Error Handling and Recovery: The system must have mechanisms to

gracefully handle unexpected errors and recover from system failures. This could involve

error notifications, automatic retries, or failover mechanisms to prevent exam disruptions.

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:

User Interface: An intuitive and user-friendly interface is crucial for both

instructors creating exams and students taking exams. This includes clear navigation, easy

access to functionalities, and a well-designed exam taking experience.

Accessibility: The exam interface should be accessible to students with

disabilities, adhering to accessibility guidelines (e.g., WCAG). This ensures everyone can

participate in exams regardless of ability.

Clear Instructions and Feedback: Providing clear instructions for

instructors creating exams and students taking exams is essential. This includes

informative feedback mechanisms after exam completion to enhance the learning

experience.

6. Maintainability:

Code Quality: Utilizing well-established coding practices ensures code is

readable, maintainable, and testable for future modifications. This allows for easier bug

fixes, feature additions, and system updates.

Modularity: A modular system design facilitates easier updates, adding new

question types, or integrating additional features. This makes the system more adaptable

to future requirements.

Documentation: Comprehensive documentation for developers and

administrators is essential. This should outline system architecture, code functionality,

and operational procedures to ensure efficient management and maintenance of the online

exam portal.

7. Portability:

Platform Independence: Designing the system to function across various

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

reliable internet connection.

Third-Party Integrations: The ability to integrate with external services or

tools (e.g., plagiarism checkers, proctoring software) enhances exam functionalities. This

allows instructors to

3.3.3 MODULES AND THEIR FUNCTIONALITIES

An online exam portal can be broken down into several key modules, each with specific

functionalities to manage the examination process. Here's a breakdown of essential

modules and their functionalities:

User Management Module

1.User Registration:

 Allow instructors, administrators, and students to register with unique usernames,

email addresses, and secure passwords.

 Implement validation to ensure all required fields are filled, email addresses are

formatted correctly, and passwords meet complexity requirements.

2.User Login:

 Enable users to log in with registered credentials (username/password).

 Validate login attempts by checking username existence and verifying password

hashes against stored values.

 Grant access to the portal based on user roles (instructor, administrator, student)

upon successful login.

3.User Roles and Permissions:

 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

take exams and view results.

4.User Profile Management:

 Allow users to view and update their profile information (e.g., name, email)

Exam Management Module

1. Exam Creation:

 Enable instructors to create exams with various question types (multiple choice,

true/false, essay, etc.).

 Allow defining point values for each question, setting time limits for exams, and

providing clear instructions.

2. Question Bank Management:

 Provide a central repository for instructors to create, edit, and organize exam

questions.

 Enable categorization of questions by subject, difficulty level, or other relevant

criteria for easier searchability.

3. Exam Delivery:

 Securely deliver exams to students within designated timeframes.

 Enforce exam time limits and prevent unauthorized access during exam sessions.

4. Scheduled Exams:

 Allow instructors to schedule exams at specific times and dates.

 Notify students about upcoming exams through automated emails or notifications

within the portal.

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:

 Present exam questions clearly, allowing navigation between questions and

review before submission.

 Implement functionalities for different question types (e.g., selecting options,

typing text for essay questions).

3. Answer Submission:

 Enable students to submit answers for all attempted questions.

 Provide options to save and review answers before final submission.

Grading and Results Module

1. Automatic Grading:

 Implement automated grading for objective question types (e.g., multiple choice)

to provide immediate feedback to students.

2. Manual Grading:

 Allow instructors to manually grade essay or open-ended questions, providing

detailed feedback.

3. Result Management:

 Generate comprehensive reports with student grades, answer breakdowns, and

performance analysis for instructors.

 Include features for instructors to download or export exam results in various

formats (e.g., CSV, PDF).

16
4.SOFTWARE DESIGN

4.1 DATAFLOW DIAGRAM

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

processing to output. Here's how they apply to an online exam portal:

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,

Exam Delivery, and Result Calculation.

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

portal as a single process interacting with Students and Administrators.

Figure 2: Level 0 DFD

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

Students), and Grade Exams (for Admins).

Figure 3: Level 1 DFD


Level 2 DFD (and further): You can go into even more detail by further decomposing

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."

Benefits of DFDs in Online Exam Portals:

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.

Documentation: DFDs serve as documentation for the system, making it easier to

understand and maintain in the future.

By using DFDs, online exam portals can be designed to be more efficient, user-friendly,

and secure.

Figure 4: Level 2 DFD

19
4.2 UML DIAGRAMS

4.2.1 Use Case Diagram

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

different actors, which typically include:

Student: The person taking the exams.

Administrator: The person responsible for managing the overall system and user

accounts.

Figure 5: Use Case

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

 Edit Profile (update contact information)

Administrator:

 Login

 Manage Users (create, edit, delete student and teacher accounts)

 Manage System Settings (configure exam duration, question types, etc.)

 Generate Reports (on exam performance, student progress, etc.)

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

in system design, requirement gathering, and communication among stakeholders

involved in developing and using the online exam portal.

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

how different parts of the online exam system interact.

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

likely have attributes like username, password, and role.

 Exam: This class would hold details about the exam itself, such as title, subject,

duration, and maybe even references to questions.

 Question: This class would represent individual questions within an exam. It

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,

including their score, attempted questions, and maybe even timestamps.

2.Relationships:

 Inheritance: This could be used if there are different question types (e.g.,

MultipleChoice inherits from a general Question class).

 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.

 Aggregation: This is a stronger association where one class exists as part of

another. An Exam Result might be an aggregation of a Student and an Exam,

22
meaning the result is incomplete without both.

Figure 6: Class Diagram

Benefits of using a class diagram:

 Clear Communication: It provides a shared understanding of the system's design

among developers and stakeholders.

 Improved Design: It helps identify potential issues early on, like missing

functionalities or redundant functionalities.

 Documentation: It serves as a visual documentation of the system's core

components.

 Improved Design: By visualizing the system structure, class diagrams help

identify potential problems early in the development phase

 Blueprint for Implementation: A well-crafted class diagram acts as a blueprint

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

the development process and improve code quality.

4.2.3.Sequence Diagram

A sequence diagram in an online exam portal focuses on the interactions between

different parts of the system over time. It's like a storyboard that depicts the message flow

between objects involved in a specific scenario, such as a student taking an exam.

Here's how a sequence diagram might be used in an online exam portal:

Scenario: Student Takes an Exam

 Actors:

 Student

 Exam Portal System (encompasses various server-side components)

 Messages:

1. Student logs in with username and password.

2. System validates login credentials and retrieves student information.

3. System sends a message to the exam database to fetch details of the specific exam

the student is registered for.

4. Exam details (title, duration, instructions) are displayed to the student.

5. Student clicks "Start Exam" button.

6. System retrieves questions associated with the exam and shuffles them (if

applicable).

7. System displays the first question to the student.

8. Student selects their answer and clicks "Submit".

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.

13. System displays a completion message and the student's score.

Figure 7: Sequence Diagram

Benefits of using a sequence diagram:

 Visualizing Interactions: It provides a clear view of how different parts of the

system interact with each other during a specific event. This helps identify

potential bottlenecks or areas for improvement in the flow of communication.

 Understanding User Experience: Sequence diagrams can be used to model the

user journey, highlighting the steps a user takes to complete a task (like taking an

exam). This helps ensure a smooth and intuitive user experience.

25
 Error Handling: You can use sequence diagrams to depict how the system

handles errors or unexpected situations. This aids in designing robust error

handling mechanisms.

 Documentation: Like class diagrams, sequence diagrams act as visual

documentation for specific functionalities within the system.

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.

 Rounded rectangles: These represent activities performed by either the student,

instructor, or the system itself (e.g., grading).

 Diamonds: These represent decision points where the flow can branch based on

a condition (e.g., exam time up?).

 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

into the system.

 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

involve downloadable content.

 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.

 Grade Exam (System Activity): This represents the system automatically

grading the exam based on pre-defined answer keys.

 Show Result: This depicts the system presenting the student with their exam score

and feedback (if applicable).

 Review Exam (Optional): This activity could show the student reviewing their

attempted questions and answers.

 Instructor Login: This depicts the instructor logging into the system with their

credentials.

 Create/Manage Exams: This shows the instructor creating exams, adding

questions, and managing exam settings (duration, etc.).

28
4.3 ER-DIAGRAM

An ER diagram serves as a formal representation of the data entities and their

relationships within an online exam portal. It provides a foundational blueprint for

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

includes attributes like:

 User ID (primary key)

 Username

 Password (securely hashed)

 Role (e.g., Student, Instructor, Administrator)

2. Exam: This entity represents an assessment offered within the portal. It may contain

attributes such as:

 Exam ID (primary key)

 Title

 Subject

 Duration (in minutes)

 Start Date/Time (optional)

 End Date/Time (optional)

 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

might have attributes like:

 Question ID (primary key)

 Question Text

 Question Type (e.g., Multiple Choice, True/False, Essay)

 Answer Key (for objective question types)

30
4.3.2 Relationships

1. Takes (Many-to-Many): This relationship connects Users (Students) and Exams. It

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).

2. Composed Of (One-to-Many): This relationship connects Exams and Questions. It

indicates that an exam is composed of multiple questions. An exam can reference multiple

questions, while a question belongs to only one exam.

By creating an ER diagram for an online exam portal, you can:

 Improve database design by ensuring data integrity and reducing redundancy.

 Facilitate communication between developers and stakeholders about the system's

functionality.

 Simplify the process of implementing and maintaining the online exam portal.

 In conclusion, an ER diagram serves as a blueprint for the data organization within

an online exam portal, leading to a well-structured and efficient system.

31
5.SOFTWARE AND HARDWARE REQUIREMENTS

5.1 SOFTWARE REQUIREMENTS

 Operating system : Windows 11

 Code language : Java

 Software : IntelliJ IDE 18

 Front End : Angular

 Middleware : SpringAPI

 Back End : MYSQL

5.2 HARDWARE REQUIREMENTS

 Processor : i7

 Hard Disk : 64 GB

 Ram : 16GB

 Key Board : Standard Windows Key


Board

 Mouse : Two or Three Button


Mouse

32
6.CODING

6.1 ANGULAR

6.1.1 start-quiz.component.html

<div class="bootstrap-wrapper" *ngIf="!isSubmit">

<div class="container-fluid">

<div class="row">

<div class="col-md-2">

<!-- Instructions -->

<mat-card style="margin-top: 70px;">

<h3>Instructions</h3>

<mat-card-content>

<ul>

<li>Do not Refresh the page Otherwisse you will get new questions in this quiz</li>

<li>Do not switch the tab</li>

<li>Do not minimize window</li>

</ul>

</mat-card-content>

</mat-card>

</div><div class="col-md-8">

<!-- Questions -->

<ng-container *ngIf="questions">

<h1 class="quizHead">On Going Quiz <b>{{questions[0].quiz.title}}</b></h1>

</ng-container>

<mat-card *ngFor="let q of questions; let i =index" class="mc">

33
<mat-card-content>

<p><b>Q{{i+1}}) </b><span [innerHTML]="q.content"></span></p>

<mat-divider></mat-divider>

<div class="row" style="margin-top: 28px;">

<div class="col-md-6">

<div class="form-check">

<input class="form-check-input" type="radio" name="option1" id="exampleRadios1"

[value]="q.option1" [(ngModel)]="q.givenAnswer">

<label class="form-check-label" for="option1">{{q.option1}}</label>

</div>

</div>

<div class="col-md-6">

<div class="form-check">

<input class="form-check-input" type="radio" name="option2" id="exampleRadios2"

[value]="q.option2" [(ngModel)]="q.givenAnswer">

<label class="form-check-label" for="option2">{{q.option2}}</label>

</div>

</div>

</div>

<div class="row" style="margin-top: 10px;">

<div class="col-md-6" *ngIf="q.option3">

<div class="form-check">

<input class="form-check-input" type="radio" name="option3" id="exampleRadios3"

[value]="q.option3" [(ngModel)]="q.givenAnswer">

34
<label class="form-check-label" for="option3">{{q.option3}}</label>

</div>

</div>

<div class="col-md-6" *ngIf="q.option4">

<div class="form-check">

<input class="form-check-input" type="radio" name="option4" id="exampleRadios4"

[value]="q.option4" [(ngModel)]="q.givenAnswer">

<label class="form-check-label" for="option4">{{q.option4}}</label>

</div>

</div>

</div>

</mat-card-content>

</mat-card>

<div class="container">

<button mat-raised-button color="primary" class="but" (click)="submitQuiz()">Submit

Quiz</button>

</div>

</div>

<div class="col-md-2">

<!-- Progress -->

<mat-card style="margin-top: 70px;">

<mat-card-header>

<mat-card-title>Progress</mat-card-title>

<mat-card-subtitle>Quiz will automatically submitted when time is over.</mat-card-

35
subtitle>

</mat-card-header>

<mat-card-content>

<h1 class="text-center">{{getFormattedTime()}}</h1>

<mat-spinner mode="determinate" style="margin: auto;"

[value]="(timer/(this.questions.length*2*60))*100"></mat-spinner>

</mat-card-content>

</mat-card>

</div>

</div>

</div>

</div>

<!-- Show Results -->

<div class="bootstrap-wrapper" *ngIf="isSubmit">

<div class="row">

<div class="col-md-6 offset-md-3">

<mat-card>

<mat-card-header>

<mat-card-title>Quiz Results</mat-card-title>

</mat-card-header>

<mat-card-content class="text-center">

<h1>Total Marks : <b>{{marksGot}}</b></h1>

<h1>Correct Answers : <b>{{correctAnswers}}</b></h1>

<h1>Questions Attempted : <b>{{attempted}}</b></h1>

36
</mat-card-content>

<mat-card-actions>

<button mat-raised-button color="primary" style="margin-left: 30%; width: 140px;"

(click)="printPDF()">Print</button>

<button mat-raised-button color="primary" style="margin-left: 2%; width: 140px;"

[routerLink]="'/user-dashboard/AllQuizzes'">Home</button>

</mat-card-actions>

</mat-card>

</div>

</div>

</div>

6.1.2 start-quiz.component.ts

import { LocationStrategy } from '@angular/common';

import { Component, OnInit } from '@angular/core';

import { ActivatedRoute } from '@angular/router';

import { QuestionsServiceService } from 'src/app/Services/Questions

Services/questions-service.service';

import { QuizServicesService } from 'src/app/Services/Quiz Services/quiz-

services.service';

import Swal from 'sweetalert2';

@Component({

selector: 'app-start-quiz',

templateUrl: './start-quiz.component.html',

styleUrls: ['./start-quiz.component.css']

37
})

export class StartQuizComponent implements OnInit {

qid:any;

questions:any;

marksGot=0;

correctAnswers=0;

timer:any;

constructor(private locationSt:LocationStrategy,private route:ActivatedRoute,private

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);

let ss=this.timer - mm*60;

return ${mm} Min:${ss} Sec;

evalQuiz()

this.isSubmit=true;

this.questions.forEach((q: { givenAnswer: any; answer: any; })=>{

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 SPRING API

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("*")

public class AuthenticateController {

@Autowired

private AuthenticationManager authenticationManager;

@Autowired

private UserDetailsServiceImpl userDetailsServiceImpl;

@Autowired

private JwtUtil jwtUtil;

//generate token

@PostMapping("/generate-token")

public ResponseEntity<?> generateToken(@RequestBody JwtRequest jwtRequest)

throws Exception

Try

authenticate(jwtRequest.getUsername(), jwtRequest.getPassword());

}catch (UsernameNotFoundException e) {

// TODO: handle exception

e.printStackTrace();

throw new Exception("User not found");

//return the details of current user

42
@GetMapping("/current-user")

public User getCurrentUser(Principal principal)

return (

(User)this.userDetailsServiceImpl.loadUserByUsername(principal.getName()) );

6.2.2 Quizz Controller.java

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("*")

public class QuizController {

@Autowired

private QuizService quizService;

//add quiz

@PostMapping("/")

public ResponseEntity<Quiz> addQuiz(@RequestBody Quiz quiz)

Quiz quiz1=this.quizService.addQuiz(quiz);

return ResponseEntity.ok(quiz1);

//get quiz

@GetMapping("/{qId}")

public Quiz getQuiz(@PathVariable("qId") Long quizId)

return this.quizService.getQuiz(quizId);

//get All quizzes

@GetMapping("/")

public ResponseEntity<?> getQuiz()

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}")

public void deleteQuiz(@PathVariable("qId") Long qId)

this.quizService.deleteQuiz(qId);

@GetMapping("/category/{cId}")

public List<Quiz> getQuizzesOfCategory(@PathVariable("cId") Long cId)

Category category=new Category();

category.setCid(cId);

return this.quizService.getQuizzesOfCategory(category);

//get Active quizzes

@GetMapping("/active")

public List<Quiz> getActiveQuizzes()

return this.quizService.getActiveQuizzes();

//get Active Quizzes of category

45
@GetMapping("/category/active/{cid}")

public List<Quiz> getActiveQuizzes(@PathVariable("cid") Long cid)

Category category=new Category();

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

online examination system:

7.1 TYPES OF TESTING

7.1.1. Unit Testing

Test individual components of the system, such as user login, question creation modules,

grading algorithms, and reporting functionalities.Verify these components function

correctly under various scenarios (e.g., valid and invalid user credentials, different

question types, edge cases in grading logic).

Utilize unit testing frameworks (JUnit, PHPUnit) to automate test cases and streamline

the process.

7.1.2. Integration Testing

Ensure different parts of the system interact seamlessly. This includes:

Communication between the user interface and server-side logic.Integration with external

services (e.g., payment gateways, plagiarism checkers).

Data flow between various components (e.g., question pool, student responses, grading

engine, report generation).

7.1.3 Functional Testing

Simulate real-world exam scenarios to verify the system's overall functionality.

Test exam creation and management workflows (adding/editing questions, setting time

limits, randomizing questions).

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

concurrently) to assess system performance.

Measure response times for exam loading, question rendering, and result delivery.

Identify and address any performance bottlenecks to ensure smooth exam delivery.

Security Testing: Conduct penetration testing to uncover vulnerabilities in user

authentication, data encryption, and overall system security.

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.

Refine the interface based on user feedback to improve usability.

Accessibility Testing: Verify the system is accessible to users with disabilities.

Use automated testing tools and manual testing to ensure compliance with accessibility

standards.This includes features like screen reader compatibility, keyboard navigation,

and alternative text descriptions for images.

7.1.5. Compatibility Testing

Test the system across different web browsers (Chrome, Firefox, Edge, Safari) on

various operating systems (Windows, macOS, Linux) to ensure consistent functionality.If

mobile access is offered, test the system on different mobile devices and operating

systems (Android, iOS).

48
7.1.6 Additional Considerations

Test Data Management: Create a comprehensive test data set covering various user

roles, question types, and exam scenarios.

Test Case Management: Organize and document test cases effectively for efficient

execution and tracking.

Defect Management: Establish a system for reporting, tracking, and resolving identified

issues.

By implementing a multi-layered testing strategy, you can ensure your online

examination system functions flawlessly, delivers a secure testing environment, and

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

providing students with a positive and stress-free testing environment.

A well-designed testing strategy is crucial for a reliable online exam system. We go

beyond basic functionality checks with layered testing. Unit testing ensures each

component works, integration testing verifies smooth interaction, and functional testing

simulates real exams. Additionally, non-functional testing assesses performance under

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

positive testing experience.

49
7.2 TESTCASE FOR ONLINE EXAM PORTAL

Expected Actual
Sl.No Action Inputs Intput Test
Output
Result

1 Login (Student) Valid username & Successful Successful Pass


password login, access login, access
to student granted
dashboard
2 Login (Student) Valid username & Successful Login fails due Fail
password (case login, access to incorrect case
sensitive) to student (username
dashboard entered in
lowercase)
3 Login (Admin) Valid educator Successful Successful Pass
credentials login, access login, access
to educator granted
dashboard
4 Create New Exam title, New exam New exam Pass
Exam description, created with created with
duration, question specified matching details
set selection details
5 Add Question Question text, Question Question added Pass
(Multiple Choice answer choices, added with with matching
correct answer specified details
selection details
6 Take Exam Valid exam code Access to Access granted, Pass
(Student) exam questions
questions displayed
7 Submit Exam Answered Exam Exam Pass
(Student) questions submitted, submitted, score
score displayed
displayed accurately

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

Table 1: Test Cases For Online Exam Portal

51
Figure 10: Testcase For User Register where already exists

Figure 11: Test Case For User Login Without Credentials

52
Figure 12: Test Case For Add Category Without Credentials

Figure 13: Testcase For User Registered Successful

53
Figure 14: Test Case For Admin Add Category Successfull

Figure 15: Test Case For Admin Add Quiz Successfully

54
8. OUTPUT SCREENS

Figure 16: Home Page For Online Exam Portal

Figure 17: Login Page For Online Exam Portal

55
Figure 18: Registration Page For Online Exam Portal

Figure 19: Admin 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

Figure 25: Student DashBoard For Online Exam Portal

59
Figure 26: Quiz Is On Going in Online Exam Portal

Figure 27: Result Page For Online Exam Portal

60
9.CONCLUSION

The online examination system emerges as a powerful tool for educators, offering

a secure and efficient alternative to traditional pen-and-paper exams. This web-based

platform streamlines the assessment process, allowing for creation, delivery, and grading

of exams online. With features like question randomization and secure testing

environments, it minimizes the risk of cheating.

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.

Additionally, automated grading for objective questions provides immediate feedback,

while educators can manage essay grading efficiently.

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

creating a win-win situation for both educators and students.

61
10.FURTHER ENHANCEMENT

The future of online examination portals is bright, with advancements poised to

enhance both security and the testing experience. Integration with biometric

authentication like facial recognition or fingerprint scanning can bolster security by

verifying test-taker identity. Artificial intelligence can play a role in real-time plagiarism

detection and personalized exam difficulty adjustments based on student performance.

For a more engaging experience, features like interactive question formats with

simulations or multimedia elements can be incorporated. Additionally, the ability to

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,

and adaptable platforms that elevate the assessment landscape.

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

Examinations: International Journal of Advanced Computer Science and

Applications, 11(2), 86-91.

[2] Kumar, A., Singh, R., & Sharma, S. (2019). A Review of Online Assessment

Technologies. International Journal of Advanced Research in Computer Science,

10(2), 271-276.

[3] Singh, P., Sharma, A., & Gupta, M. (2018). Comparative Analysis of Online

Examination Systems. International Journal of Computer Applications, 178(11),

35-40.

[4] Zhang, L., Zhang, Y., & Zhang, H. (2021). A Survey on Online Proctoring

Systems for E-learning. Journal of Educational Computing Research, 59(1), 99-

116.

[5] Smith, J., Johnson, M., & Brown, K. (2020). The Effectiveness of Online

Proctoring in Reducing Cheating Behavior. Journal of Educational Technology

Systems, 49(3), 363-382.

[6] Jones, T., Williams, B., & Davis, C. (2019). Privacy Concerns in Online

Proctoring. Journal of Information Privacy & Security, 15(4), 420-438.

[7] Lee, H., Kim, S., & Park, J. (2022). Enhancing User Experience in Online

Assessment Platforms. International Journal of Human-Computer Interaction,

38(2), 159-174.

[8] Chen, W., Wang, L., & Li, M. (2021). The Impact of User Interface Design on

Student Performance in Online Exams. Computers & Education, 160, 104060.

63

You might also like