Quiz App Report Chapters
Quiz App Report Chapters
INTRODUCTION
• it will reduce efforts as it will allow the information to be easily stored, accessed,
validated & verified finally.
1
CHAPTER 2
REQUIREMENT ANALYSIS
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.
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.
S. No NAME SOFTWARE
1 Platform Windows 7
S. No NAME SOFTWARE
2 RAM 4 GB
3
2.4 Data Flow Diagram
DATABASE
QUIZ
APPLICATION
SYSTEM
USER
4
CHAPTER 3
PROJECT DESIGN
answers
login
questions
registered
usersession
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.
6
3.3 Screenshots
7
Figure 3.3.3 Quiz Types
8
Figure 3.3.5 Ranking
9
Figure 3.3.7 Add Quiz Page
10
Figure: 3.3.9 Quiz Content Information
11
Figure: 3.3.11 User Info. stored in database
12
CHAPTER 4
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:
13
4.2 Black Box Testing
Some test cases of behavioral testing while knowing structure design &
implementation are as follows:
14
CHAPTER 5
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> 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> 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> 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> 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> <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.' <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> <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 '.$sn.' ::<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.'"> '.$option.'<br /><br
/>';
}
echo'<br /><button type="submit" class="btn btn-primary"><span class="glyphicon
glyphicon-lock" aria-hidden="true"></span> 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 <span class="glyphicon
glyphicon-ok-circle" aria-hidden="true"></span></td><td>'.$r.'</td></tr>
<tr style="color:red"><td>Wrong Answer <span class="glyphicon glyphicon-
remove-circle" aria-hidden="true"></span></td><td>'.$w.'</td></tr>
<tr style="color:#66CCFF"><td>Score <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 <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