0% found this document useful (0 votes)
63 views21 pages

Quiz App Report Chapters

Uploaded by

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

Quiz App Report Chapters

Uploaded by

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

CHAPTER 1

INTRODUCTION

1.1 Need of the Project

• Connectivity – Quiz Application offers impressive interactivity &


connectivity for the user.

• Productivity – User’s productivity will be increased through the use of


dynamic approach.

• Authentication – The application provides authentication to verify whether


it’s a genuine user.

• Security - Highly secured blockchain based e-commerce. One’s security of


details & marks gets secured when doing quiz through the web application.

1.2 Motivation behind the project:


The main motivation behind the project is to be synchronized with the growing
development & innovation in the field of education. The project will offer ready
made questions & answers dynamically on the internet or any connected
environment for both the user & the provider. It too makes it easy for the observer
or the examiner to have done a lot of stuff automatically & saving the utilized time
in those activities when done online.

1.3 Objective of the project:

• A faster experience for both student or user & examiners.

• it will reduce efforts as it will allow the information to be easily stored, accessed,
validated & verified finally.

• Helping users & teachers to avoid hassle as in offline mode.

1
CHAPTER 2

REQUIREMENT ANALYSIS

2.1 Overall Description:

2.1.1 Product Perspective


A quiz web application that usually interacts with user and students. It gives 1
mark on each question being right & no mark on being wrong. A result screen
is displayed on quiz completion that shows total marks on the basis of correct
& wrong answers. Its main purpose is to develop knowledge & skills in
students & simultaneously providing hassle free experience to the examiner or
teacher, by reducing the dependency on the hardware.

2.1.2 Product Function


Account Login: Student/User can login using id & password.

Account Logout: Student/User can logout whenever required.

Result: Student/User who attempts the quiz gets the result at the end.

Play Quiz: Student/User can play the quiz according to her choice.

2.1.3 Development Environment:

This project has been made using following key components:

Code Editor:
We included Visual Studio Code as our editor. This editor offered various
extensions and plugins to enhance our development workflow.

Web Browser:
We used popular browsers like Google Chrome with the latest version to execute
our application.

2
Local Web Server:
Setting up a local web server allowed us to run our quiz application on your
computer without the need for a remote server. We used XAMPP to set up a local
development server. This enabled us to test and debug our application locally.

HTML Structure:
We started by creating the basic HTML structure of our quiz application. Used
HTML tags such as <html>, <head>, and <body> etc. to define the structure and
content of your webpage.

CSS Styling:
We applied CSS styles to enhance the visual appearance of your quiz application.
Used CSS selectors, properties, and values to control the layout, colors, fonts, and
other visual aspects of your quiz. We also used CSS frameworks like Bootstrap to
speed up the development process and create responsive designs.

JavaScript Logic:
A little implementation of the quiz logic has been made using JavaScript.

2.2 Software Interfaces

S. No NAME SOFTWARE

1 Platform Windows 7

2 Database Tool MySql

Table: 2.2.1 Software Interfaces

2.3 Hardware Interfaces

S. No NAME SOFTWARE

1 Processor Intel dual core (32bit)

2 RAM 4 GB

3 Processor Speed 2 GHz

Table: 2.3.1 Software Interfaces

3
2.4 Data Flow Diagram
DATABASE

QUIZ
APPLICATION
SYSTEM

USER

Figure: 2.4.1 Overview

2.5 Use case Diagram

Figure: 2.5.1 Use Case

4
CHAPTER 3

PROJECT DESIGN

3.1 Architectural Design

Client-Server Architecture: Adopting a client-server architecture is


recommended for a quiz application. The client, i.e., a web interface,
interacts with the server to request and receive quiz data, submit answers, and
retrieve results.

Figure: 3.1.1 Architecture Diagram

Data Model and Database Design: We developed an appropriate data model to


represent quiz questions, options, and user responses. Defined relationships
between entities (e.g., quizzes, users, answers) and implemented database tables
accordingly. Ensure efficient indexing and normalization to optimize data
retrieval and storage.

answers
login
questions
registered
usersession

Table: 3.1.2 Database Table

Front-End Technologies: Front-end technologies based on the target


platform. For our quiz application being a web application, HTML, CSS,
and JavaScript framework has been used.

5
Back-End Technologies: A back-end technology stack that suits our
requirements and expertise for handling HTTP requests, routing, and
business logic. Additionally, we chose a suitable database system i.e.,
MySQL, storing quiz questions, answers, and user data.

3.2 Component Diagram


3.2.1 Flow Chart

This diagrammatic representation illustrates a solution model to a given problem.

Figure: 3.2.1 Flowchart

6
3.3 Screenshots

Figure: 3.3.1 Main Page

Figure: 3.3.2 Registration Page

7
Figure 3.3.3 Quiz Types

Figure 3.3.4 History

8
Figure 3.3.5 Ranking

Figure 3.3.6 Admin Page

9
Figure 3.3.7 Add Quiz Page

Figure 3.3.8 Registered Users on Database

10
Figure: 3.3.9 Quiz Content Information

Figure: 3.3.10 History Stored in database

11
Figure: 3.3.11 User Info. stored in database

Figure: 3.3.12 Admin Info. stored in database

12
CHAPTER 4

TESTING

4.1 White Box Testing

Testing performed during code visibility to verify the flow of Inputs and Outputs
through the application, improving design and reusability, strengthening security
following are some test cases:

• Test Case Name: Registration


Input: Enter Name, Password
Outcomes: Successfully registered
Expected Outcomes: Successfully registered
Result: Pass

• Test Case Name: Login


Input: Enter Name correct, Password correct
Outcomes: login successful
Expected Outcomes: login successful
Result: Pass

• Test Case Name: Login


Input: Enter Name correct, Password incorrect
Outcomes: login unsuccessful
Expected Outcomes: login unsuccessful
Result: Fail

• Test Case Name: Login


Input: Enter Name null, Password null
Outcomes: login unsuccessful
Expected Outcomes: login unsuccessful
Result: Fail

13
4.2 Black Box Testing

Some test cases of behavioral testing while knowing structure design &
implementation are as follows:

• Test Case Name: Registration


Input: Enter required details for registration
Outcomes: Successfully registered
Expected Outcomes: Successfully registered
Result: Pass

• Test Case Name: Registration


Input: enter required details for registration
Outcomes: validation not correct
Expected Outcomes: registration unsuccessful
Result: fail

14
CHAPTER 5

CONCLUSION AND FUTURE SCOPE

Finally, we are good enough to build our own Quiz Application with the help of different
technology we used for making our project successful. We come to learn various
technology through this project and enjoy a lot. This project work “Quiz Application”. the
system will be a web-based application and will be implemented on a relational database
system (MySQL). Html (hypertext markup language), CSS (cascading style sheet) and Java
Script will be used to design the web-user interface.

Scope:

• The scope of this project is very broad in terms of gaining knowledge and sharing
knowledge among world.
• It can be used anywhere anytime as it is a web-based application
• The application will be used in educational institutions as well as in corporate
world.
• With more development it will be able to reduce more hassles in the current
version of the application.

Limitation:

• Implementing a concept where user can itself add questions for others
• Implement the concept where the user can solve any query related to each
question at that time only
• To implement a concept where every user can see profile of other user.

15
APPENDIX A

(Code)
<?php
include_once 'database.php';
session_start();
if(!(isset($_SESSION['email'])))
{
header("location:login.php");
}
else
{
$name = $_SESSION['name'];
$email = $_SESSION['email'];
include_once 'database.php';
}
?>

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Welcome | Online Quiz </title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/bootstrap-theme.min.css" />
<link rel="stylesheet" href="css/welcome.css">
<link rel="stylesheet" href="css/font.css">
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/bootstrap.min.js" type="text/javascript"></script>
</head>
<style>
body {
background: url(image/ima.jpg);
background-size: cover;
}
</style>

<body>
<nav class="navbar navbar-default title1">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>

16
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#"><b>Online Quiz</b></a>
</div>

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-left">
<li <?php if(@$_GET['q']==1) echo'class="active"'; ?>><a href="welcome.php?q=1"><span
class="glyphicon glyphicon-home" aria-hidden="true"></span>&nbsp;Home<span
class="sr-only">(current)</span></a></li>
<li <?php if(@$_GET['q']==2) echo'class="active"'; ?>> <a href="welcome.php?q=2"><span
class="glyphicon glyphicon-list-alt" aria-
hidden="true"></span>&nbsp;History</a></li>
<li <?php if(@$_GET['q']==3) echo'class="active"'; ?>> <a href="welcome.php?q=3"><span
class="glyphicon glyphicon-stats" aria-
hidden="true"></span>&nbsp;Ranking</a></li>

</ul>
<ul class="nav navbar-nav navbar-right">
<li <?php echo''; ?>> <a href="logout.php?q=welcome.php"><span class="glyphicon
glyphicon-log-out"
aria-hidden="true"></span>&nbsp;Log out</a></li>
</ul>
</div>
</div>
</nav>
<br><br>
<div class="container">
<div class="row">
<div class="col-md-12">
<?php if(@$_GET['q']==1)
{
$result = mysqli_query($con,"SELECT * FROM quiz ORDER BY date DESC") or
die('Error');
echo '<div class=""><div class="table-responsive"><table class="table table-striped title1">
<tr><td><center><b>S.N.</b></center></td><td><center><b>Topic</b></center></td><td>
<center><b>Total
question</b></center></td><td><center><b>Marks</center></b></td><td><center><b>Action</b></cent
er></td></tr>';
$c=1;
while($row = mysqli_fetch_array($result)) {
$title = $row['title'];
$total = $row['total'];
$sahi = $row['sahi'];
$eid = $row['eid'];
$q12=mysqli_query($con,"SELECT score FROM history WHERE eid='$eid' AND
email='$email'" )or die('Error98');
$rowcount=mysqli_num_rows($q12);
if($rowcount == 0){
echo '<tr style="background-
color:white"><td><center>'.$c++.'</center></td><td><center>'.$title.'</center></td><td><center>'.$total.'
</center></td><td><center>'.$sahi*$total.'</center></td><td><center><b><a

17
href="welcome.php?q=quiz&step=2&eid='.$eid.'&n=1&t='.$total.'" class="btn sub1"
style="color:black;margin:0px;background:#1de9b6"><span class="glyphicon glyphicon-new-window"
aria-hidden="true"></span>&nbsp;<span
class="title1"><b>Start</b></span></a></b></center></td></tr>';
}
else
{
echo '<tr style="color:#99cc32
"><td><center>'.$c++.'</center></td><td><center>'.$title.'&nbsp;<span title="This quiz is already solve
by you" class="glyphicon glyphicon-ok" aria-
hidden="true"></span></center></td><td><center>'.$total.'</center></td><td><center>'.$sahi*$total.'</ce
nter></td><td><center><b><a href="update.php?q=quizre&step=25&eid='.$eid.'&n=1&t='.$total.'"
class="pull-right btn sub1" style="color:black;margin:0px;background:red"><span class="glyphicon
glyphicon-repeat" aria-hidden="true"></span>&nbsp;<span
class="title1"><b>Restart</b></span></a></b></center></td></tr>';
}
}
$c=0;
echo '</table></div></div>';
}?>
<?php
if(@$_GET['q']== 'quiz' && @$_GET['step']== 2)
{
$eid=@$_GET['eid'];
$sn=@$_GET['n'];
$total=@$_GET['t'];
$q=mysqli_query($con,"SELECT * FROM questions WHERE eid='$eid' AND sn='$sn' " );
echo '<div class="panel" style="margin:5%">';
while($row=mysqli_fetch_array($q) )
{
$qns=$row['qns'];
$qid=$row['qid'];
echo '<b>Question &nbsp;'.$sn.'&nbsp;::<br /><br />'.$qns.'</b><br /><br />';
}
$q=mysqli_query($con,"SELECT * FROM options WHERE qid='$qid' " );
echo '<form
action="update.php?q=quiz&step=2&eid='.$eid.'&n='.$sn.'&t='.$total.'&qid='.$qid.'"
method="POST" class="form-horizontal">
<br />';
while($row=mysqli_fetch_array($q) )
{
$option=$row['option'];
$optionid=$row['optionid'];
echo'<input type="radio" name="ans" value="'.$optionid.'">&nbsp;'.$option.'<br /><br
/>';
}
echo'<br /><button type="submit" class="btn btn-primary"><span class="glyphicon
glyphicon-lock" aria-hidden="true"></span>&nbsp;Submit</button></form></div>';
}
if(@$_GET['q']== 'result' && @$_GET['eid'])
{
$eid=@$_GET['eid'];

18
$q=mysqli_query($con,"SELECT * FROM history WHERE eid='$eid' AND email='$email'
" )or die('Error157');
echo '<div class="panel">
<center><h1 class="title" style="color:#660033">Result</h1><center><br /><table
class="table table-striped title1" style="font-size:20px;font-weight:1000;">';
while($row=mysqli_fetch_array($q) )
{
$s=$row['score'];
$w=$row['wrong'];
$r=$row['sahi'];
$qa=$row['level'];
echo '<tr style="color:#66CCFF"><td>Total Questions</td><td>'.$qa.'</td></tr>
<tr style="color:#99cc32"><td>right Answer&nbsp;<span class="glyphicon
glyphicon-ok-circle" aria-hidden="true"></span></td><td>'.$r.'</td></tr>
<tr style="color:red"><td>Wrong Answer&nbsp;<span class="glyphicon glyphicon-
remove-circle" aria-hidden="true"></span></td><td>'.$w.'</td></tr>
<tr style="color:#66CCFF"><td>Score&nbsp;<span class="glyphicon glyphicon-star"
aria-hidden="true"></span></td><td>'.$s.'</td></tr>';
}
$q=mysqli_query($con,"SELECT * FROM rank WHERE email='$email' " )or
die('Error157');
while($row=mysqli_fetch_array($q) )
{
$s=$row['score'];
echo '<tr style="color:#990000"><td>Overall Score&nbsp;<span class="glyphicon
glyphicon-stats" aria-hidden="true"></span></td><td>'.$s.'</td></tr>';
}
echo '</table></div>';
}
?>
<?php
if(@$_GET['q']== 2)
{
$q=mysqli_query($con,"SELECT * FROM history WHERE email='$email' ORDER BY
date DESC " )or die('Error197');
echo '<div class="panel title">
<table class="table table-striped title1" >
<tr
style="color:black;"><td><center><b>S.N.</b></center></td><td><center><b>Quiz</b></center></td><
td><center><b>Question
Solved</b></center></td><td><center><b>Right</b></center></td><td><center><b>Wrong<b></center
></td><td><center><b>Score</b></center></td>';
$c=0;
while($row=mysqli_fetch_array($q) )
{
$eid=$row['eid'];
$s=$row['score'];
$w=$row['wrong'];
$r=$row['sahi'];
$qa=$row['level'];
$q23=mysqli_query($con,"SELECT title FROM quiz WHERE eid='$eid' " )or
die('Error208');

19
while($row=mysqli_fetch_array($q23) )
{ $title=$row['title']; }
$c++;
echo
'<tr><td><center>'.$c.'</center></td><td><center>'.$title.'</center></td><td><center>'.$qa.'</center></td
><td><center>'.$r.'</center></td><td><center>'.$w.'</center></td><td><center>'.$s.'</center></td></tr>';
}
echo'</table></div>';
}

if(@$_GET['q']== 3)
{
$q=mysqli_query($con,"SELECT * FROM rank ORDER BY score DESC " )or
die('Error223');
echo '<div class="panel title"><div class="table-responsive">
<table class="table table-striped title1" >
<tr
style="color:red"><td><center><b>Rank</b></center></td><td><center><b>Name</b></center></td><t
d><center><b>Email</b></center></td><td><center><b>Score</b></center></td></tr>';
$c=0;

while($row=mysqli_fetch_array($q) )
{
$e=$row['email'];
$s=$row['score'];
$q12=mysqli_query($con,"SELECT * FROM user WHERE email='$e' " )or
die('Error231');
while($row=mysqli_fetch_array($q12) )
{
$name=$row['name'];
}
$c++;
echo '<tr><td
style="color:black"><center><b>'.$c.'</b></center></td><td><center>'.$name.'</center></td><td><cente
r>'.$e.'</center></td><td><center>'.$s.'</center></td></tr>';
}
echo '</table></div></div>';
}
?>
</body>

</html>

20
REFERENCES
• https://www.W3schools.com/
• https://www.youtube.com/
• https://www.quora.com/
• https://stackoverflow.com/
• Documents (lucid.app)

21

You might also like