Sunteți pe pagina 1din 77

PROJECT REPORT

ON

Online Examination

Submitted To

In Partial Fulfillment of the Requirement Of

Course Name
(Semester IV )

By
Pragati Verma
Declaration

We, the undersigned hereby declare that the Project report

entitled Online Quiz is designed, written and submitted by us in

partial fulfillment of the requirement for the award of the post

graduate diploma in information technology is our original work. The

empirical findings in this report are based on data collected by us

through discussion with the project guide.

We understand that, any such copying is liable to us

punishment in way the university authorities deem fit.

Place : AJMER

Date : 23/06/2015 Yours Faithfully,

Pragati Verma
Table of Content

1. Introduction.........................................................................................................1
1.1. Project Overview....................................................................................1
1.2. Purpose...................................................................................................1
1.3. Scope......................................................................................................1
1.4. Definitions, Acronyms............................................................................1

2. Functional or Specific Requirements..................................................................2


2.1. External Interface Requirements............................................................4
2.1.1. Hardware Interfaces.................................................................................4
2.1.2. Software Interface....................................................................................4
2.1.3. Third Party Software Interfaces...............................................................4
2.1.4. Communication Protocol..........................................................................4
2.1.5. Assumption and Dependency...................................................................5
2.2. Non-Functional Requirements.................................................................5
2.3. Software System Attributes.....................................................................5
2.3.1. Browser Compatibility.............................................................................5
2.3.2. Globalization Support..............................................................................7
2.3.3. Security.....................................................................................................8
2.3.4. Reliability.................................................................................................8
2.3.5. Availability...............................................................................................8
2.3.6. Portability.................................................................................................8
2.3.7. Performance.............................................................................................9
2.4. Database Requirements..........................................................................9
2.5. Technologies...........................................................................................9
2.6. Software..................................................................................................9
2.7. Hardware................................................................................................9
2.7.1. Server.......................................................................................................9
2.7.2. Client......................................................................................................10

3. Analysis and Design..........................................................................................11


3.1. Use Case Diagram................................................................................11
3.1.1. Use case Overview.................................................................................11
3.1.2. Add Faculty Use Case............................................................................12
3.1.3. Login Use Case......................................................................................12
3.1.4. Manage Student Groups Use Case.........................................................13
3.1.5. Student Registration Use Case...............................................................13
3.1.6. User Profile Edit Use Case.....................................................................14
3.1.7. Manage Test Use Case............................................................................15
3.1.8. Appear for Test Use Case.......................................................................16
3.1.9. Generate Result Use Case......................................................................17
3.2. Activity Diagram..................................................................................18
3.2.1. Login Activity Diagram.........................................................................18
3.2.2. Manage Students Activity Diagram.......................................................19
3.2.3. Manage Tests Activity Diagram.............................................................20
3.2.4. Generate Result Activity Diagram.........................................................21
3.2.5. Student Registration Activity Diagram..................................................22
3.2.6. Answer Test Activity Diagram...............................................................23
3.3. Sequence Diagrams..............................................................................24
3.3.1. Sequence Diagram Overview.................................................................24
3.3.2. Login Sequence Diagram.......................................................................25
3.3.3. Manage Student Groups Sequence Diagram..........................................26
3.3.4. Student Registration Sequence Diagram................................................27
3.3.5. Manage Test Sequence Diagram............................................................28
3.3.6. Appear for Test Sequence Diagram........................................................29
3.4. Class Diagram......................................................................................30
3.5. Database Design..................................................................................31
3.5.1. Table: Student.........................................................................................32
3.5.2. Table: Test..............................................................................................32
3.5.3. Table: TestQuestions..............................................................................32
3.5.4. Table: StudentResponse.........................................................................33
3.5.5. Table: TestSession..................................................................................33
3.5.6. Table: Groups.........................................................................................33
3.5.7. Table: Faculty.........................................................................................33
3.5.8. Table: AssignGroupTest.........................................................................34

4. User Interfaces...................................................................................................35
4.1. Home Page...........................................................................................35
4.2. Registration..........................................................................................36
4.3. Login Interface.....................................................................................37
4.4. Create Questions Interface...................................................................37
4.5. Report...................................................................................................38

1. Scope for Enhancement.....................................................................................41

2. Figures and Tables.............................................................................................42

3. References.........................................................................................................43
Online Quiz

1. Introduction
1.1. Project Overview

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.2. 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.3. 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.

1.4. Definitions, Acronyms

The sub-section provides the definitions of all terms, acronyms, and


abbreviations used in this document to understand the SRS properly.

Sr. No. Terms/Acronyms Description

1.
Student User mostly a student who will appear for the examination

Page 1 of 77
Online Quiz

Sr. No. Terms/Acronyms Description

2.
Administrator Super user, adds faculty and manages system.

Page 2 of 77
Online Quiz

2. Functional or Specific Requirements


Required software is for conducting on-line `objective type examination and
providing immediate results. The system should satisfy the following
requirements:

Administrator Aspect

1. Editing/Deleting/Creating the database.

2. Creating a test

3. Posting questions in the above test

4. Posting multiple options to respective question

5. Marking correct answer within the given options

6. Specifying to allow user defined answer

Student Aspect:

1. Requesting registration

2. Logging into the system.

3. Edit user information.

4. Selecting the test.

5. Selecting whether the test to be taken in practice mode where the


correct answer is shown immediately after the candidate selects
an option.

6. Appearing for the examination.

7. Printing the result at the end of the examination.

8. Reviewing the given responses.

9. Changing password.

10. Resetting of forgotten password

Analysis

1. Authenticating users based on username and password

2. Keeping session track of user activity

Page 3 of 77
Online Quiz

3. Recording candidates responses to every question

4. Checking whether the given response is correct or not

5. Keeping history of test reports of all users

Page 4 of 77
Online Quiz

2.1. External Interface Requirements

2.1.1. Hardware Interfaces

Server side hardware

Hardware recommended by all the software needed.

Communication hardware to serve client requests

Client side hardware

Hardware recommended by respective clients operating system and web


browser.

Communication hardware to communicate the server.

2.1.2. Software Interface

Server side software

Web server software, Apache Tomcat

Server side scripting tools: PHP

Database tools: MySql DBMS.

Compatible operating system: Linux

Client side software

Web browser supporting JavaScript, refer Browser Compatibility 2.3.1

2.1.3. Third Party Software Interfaces

None

2.1.4. Communication Protocol

Following protocols are required to be permitted on the server side

HTTP incoming request

HTTPS incoming request if secure gateway is implemented

Following protocols are required to be permitted on the client side

HTTP outgoing request

HTTPS outgoing request if secure gateway is implemented

Page 5 of 77
Online Quiz

2.1.5. Assumption and Dependency


1. Username are valid email addresses of respective user

2. Administrator has the authority to add/delete faculty level accounts.

3. Faculty have the authority to approve/expel student

4. Faculty have the authority to change students group

2.2. Non-Functional Requirements

System should be able handle multiple users

Database updating should follow transaction processing to avoid data


inconsistency.

2.3. Software System Attributes

2.3.1. Browser Compatibility

The project being web based required compatibility with at least the popular web
browsers. Microsoft Windows XP and above, Linux and Macintosh being the current
popular operating system and Microsoft Internet Explorer, Mozilla Firefox, Opera,
Safari and Google Chrome being the currently popular web browsers.

Operating System

Win 2000 WinXP WinXPSP2 Win Vista Win 7 Mac OS Linux

Browsers

Modern Browsers

IE 8.0 N/A SUPP SUPP SUPP SUPP N/A N/A

IE 7.0 N/A N/A N/A N/A N/A

IE 6.0 N/A N/A N/A N/A N/A

Firefox 3.5 N/A SUPP N/A N/A N/A

Opera 9.23 N/A SUPP N/A N/A N/A

Page 6 of 77
Online Quiz

Safari 9.27 N/A SUPP N/A N/A SUPP

Legacy Old Browsers

IE5.5 N/A N/A N/A N/A N/A

Netscape N/A N/A N/A N/A N/A

Page 7 of 77
Online Quiz

2.3.2. Globalization Support

The questionnaires and their respective options provided by the faculty may or may
not be in English. Hence the questions and their options must be in Unicode format
that will accept any Unicode character.

2.3.2.1. List of Locale

The system will mostly be in US English, although the questions and their options
may not be in US English. Hence the questions and their options are to be in Unicode
format.

Locale Date Format Time Format Currency Format Calendar Character Set

en-US Use Default Use Default Use Default Use Default SBCS

Non en-US dd-MM-yy HH:mm:ss Use Default d-MM-yyyy MBCS/Unicode

2.3.2.2. Content to be localized

The following table lists all the possible area in the system and also mentions whether
that area should support Globalization.

Interface Type Needs Localization?

User Interface Yes*

Emails sent by system, Yes*

Standard Errors and exceptions logged by system in error log No

Logos, Images No

Unit of Measurement ( Ex. Length, Weight, Area, Volume, Paper Size etc) No

Reports Yes*

Page 8 of 77
Online Quiz

*Limited to questionnaires set by user who posted questions.

Page 9 of 77
Online Quiz

2.3.3. Security

Administrator has the highest authority to edit/delete/create database

Faculty have the authority to add/expel students

Students can only view their test records.

Faculty can view all the test records of every student.

Critical information like passwords should be transferred in encrypted form

Passwords should be stored in encrypted form

Password will not be mailed to the user in case user forgets password, instead
either temporary password or a password reset link will be sent.

2.3.4. Reliability

Data validation and verification needs to be done at every stage of activity.

Validating user input

Use of locking mechanism while updating database like transaction


processing

Recovering the transaction using rollback.

2.3.5. Availability

The examination system being an online system should be available anytime.


Constraints:

Though the system should be available 24x7 some features may be restricted.

Quiz creator may allow the specific test to be available only at certain time like
scheduled examination.

The test may be time limited so the candidates appearing will have limited time to
answer the test.

2.3.6. Portability

The web application will be built using PHP which has support to run on any platform
provided the required compilers are available.

For database either XML or MySQL would be used, that too has extensive support
over many popular architectures and operating systems.

Page 10 of 77
Online Quiz

Constraints:

Portability would be limited to the support provided by the respective application vendor on
various architectures and operating environments.

2.3.7. Performance

The system would be used by multiple users at a time and may grow as time passes;
the system would need to implement multithreading to achieve acceptable
performance. Further a database connection pool may also be required for assigning
faster database connection.

2.4. Database Requirements

Database fields for questions and respective options must be in Unicode format to
handle non English characters

2.5. Technologies

This section lists all the technologies for the web based system.

PHP scripting for server side scripting as it has a very strong support for XML and
MySQL.

XML as database format: The database performance requirements are not very high
and the ability to have custom fields in case the quiz creator needs to add more than
expected answer options. This is limited in any other database management system
where we have to first specify the maximum number of fields.

Apache as web server has a tight integration with PHP and is also available for
various popular platforms.

2.6. Software

Netbeans or Eclipse for PHP and XML coding.

Apache Tomcat as Web server

2.7. Hardware

The recommended hardware specified by the respective software would suffice the
needs. The memory and processing power needed would increase as the number of
users increase. The estimated hardware requirements are as specified.

2.7.1. Server

The minimum hardware as recommended by all of the software required on server


side say web server, operating system and development software

Page 11 of 77
Online Quiz

Processing speed of 1.6 GHz

1 GB of RAM

Network interface

2.7.2. Client

The minimum hardware as recommended by all of the software required on client side
say web browser, operating system

Minimum hardware depending on the operating system used

True color visual display unit

User peripherals for better interaction

Page 12 of 77
Online Quiz

3. Analysis and Design


3.1. Use Case Diagram

3.1.1. Use case Overview

Page 13 of 77
Online Quiz

3.1.2. Add Faculty Use Case

3.1.3. Login Use Case

Page 14 of 77
Online Quiz

3.1.4. Manage Student Groups Use Case

3.1.5. Student Registration Use Case

Page 15 of 77
Online Quiz

3.1.6. User Profile Edit Use Case

Page 16 of 77
Online Quiz

3.1.7. Manage Test Use Case

Page 17 of 77
Online Quiz

3.1.8. Appear for Test Use Case

Page 18 of 77
Online Quiz

3.1.9. Generate Result Use Case

Page 19 of 77
Online Quiz

3.2. Activity Diagram

3.2.1. Login Activity Diagram

Page 20 of 77
Online Quiz

3.2.2. Manage Students Activity Diagram

Page 21 of 77
Online Quiz

3.2.3. Manage Tests Activity Diagram

Page 22 of 77
Online Quiz

3.2.4. Generate Result Activity Diagram

Page 23 of 77
Online Quiz

3.2.5. Student Registration Activity Diagram

Page 24 of 77
Online Quiz

3.2.6. Answer Test Activity Diagram

Page 25 of 77
Online Quiz

3.3. Sequence Diagrams

3.3.1. Sequence Diagram Overview

Page 26 of 77
Online Quiz

3.3.2. Login Sequence Diagram

Page 27 of 77
Online Quiz

3.3.3. Manage Student Groups Sequence Diagram

Page 28 of 77
Online Quiz

3.3.4. Student Registration Sequence Diagram

Page 29 of 77
Online Quiz

3.3.5. Manage Test Sequence Diagram

Page 30 of 77
Online Quiz

3.3.6. Appear for Test Sequence Diagram

Page 31 of 77
Online Quiz

3.4. Class Diagram

Page 32 of 77
Online Quiz

3.5. Database Design

Page 33 of 77
Online Quiz

3.5.1. Table: Student

Field Name Data Type Constraints/Description

ID Unsigned Integer Primary Key, AutoIncrement

studentName Varchar2

groupID Unsigned Integer Foreign:Groups.ID

loginID Varchar2

password Varchar2

3.5.2. Table: Test

Field Name Data Type Description

ID Unsigned Integer Primary Key, AutoIncrement

testTitle Varchar2

allowPractice Yes/No

timePerQuestion Unsigned Integer in seconds, infinite if zero

timePerTest Unsigned Integer in minutes, infinite if zero

createdBy Unsigned Integer Foreign:Faculty.ID

Page 34 of 77
Online Quiz

3.5.3. Table: TestQuestions

Field Name Data Type Description

ID Unsigned Integer Primary Key, AutoIncrement

TestID Number Foreign:Test.ID

question Varchar2

option1 Varchar2 atleast two choices are required, hence


this field is required

option2 Varchar2 atleast two choices are required, hence


this field is required

option3 Varchar2

option4 Varchar2

answer Unsigned Integer

allowCustomAns Boolean
wer

userAnswer Varchar2

Page 35 of 77
Online Quiz

3.5.4. Table: StudentResponse

Field Name Data Type Description

ID Unsigned Integer Primary Key, AutoIncrement

studentID Unsigned Integer Foreign:Student.ID

questionID Unsigned Integer Foreign:TestQuestions.ID

optionSelected Unsigned Integer if student does not answer, entry will not
be made in db

customAnswer Varchar2 only if optionSelected field is 0

3.5.5. Table: TestSession

Field Name Data Type Description

ID Unsigned Integer Primary Key, AutoIncrement

testID Unsigned Integer Foreign:Test.ID

studentID Unsigned Integer Foreign:Student.ID

testTakenOn Date/Time field required

Page 36 of 77
Online Quiz

3.5.6. Table: Groups

Field Name Data Type Description

ID Unsigned Integer Primary Key, AutoIncrement

groupName Unsigned Integer

3.5.7. Table: Faculty

Field Name Data Type Description

ID Unsigned Integer Primary Key, AutoIncrement

facultyName Varchar2

loginID Varchar2

pass Varchar2

Page 37 of 77
Online Quiz

3.5.8. Table: AssignGroupTest

Field Name Data Type Description

ID Unsigned Integer Primary Key, AutoIncrement

groupID Unsigned Integer Foreign:Groups.ID

testID Unsigned Integer Foreign:Test.ID

1.1.

Page 38 of 77
Online Quiz

4. User Interfaces
The interfaces of this system are as below
4.1. Student Login Page

Page 39 of 77
Online Quiz

4.2. Registration

Page 40 of 77
Online Quiz

4.3. Student home

4.4. Student Registration Panel

Page 41 of 77
Online Quiz

4.5. Student Subject Panel

4.6. Student Exam Panel

Page 42 of 77
Online Quiz

4.7. Student Question Panel

4.8. Student Result Panel

Page 43 of 77
Online Quiz

4.9. Student Result Review Panel

4.10. Student Result Report Panel:

Page 44 of 77
Online Quiz

Admin Panel:
4.11. Admin Login Panel:

4.12. Admin Home Panel:

Page 45 of 77
Online Quiz

4.13. Admin Add Subject Panel:

4.14. Admin Add Test Panel:

Page 46 of 77
Online Quiz

4.15. Admin Add Question Panel

Source Code:
1.1. Index.php

<?php
session_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Wel come to Online Exam</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="quiz.css" rel="stylesheet" type="text/css">
</head>

<body>
<?php
include("header.php");
include("database.php");
extract($_POST);

if(isset($submit))
{
$rs=mysql_query("select * from mst_user where login='$loginid' and pass='$pass'");
if(mysql_num_rows($rs)<1)
{
$found="N";
}
else

Page 47 of 77
Online Quiz

{
$_SESSION[login]=$loginid;
}
}
if (isset($_SESSION[login]))
{
echo "<h1 class='style8' align=center>Wel come to Online Exam</h1>";
echo '<table width="28%" border="0" align="center">
<tr>
<td width="7%" height="65" valign="bottom"><img src="image/HLPBUTT2.JPG"
width="50" height="50" align="middle"></td>
<td width="93%" valign="bottom" bordercolor="#0000FF"> <a href="sublist.php"
class="style4">Subject for Quiz </a></td>
</tr>
<tr>
<td height="58" valign="bottom"><img src="image/DEGREE.JPG" width="43"
height="43" align="absmiddle"></td>
<td valign="bottom"> <a href="result.php" class="style4">Result </a></td>
</tr>
</table>';

exit;

?>
<table width="100%" border="0">
<tr>
<td width="70%" height="25">&nbsp;</td>
<td width="1%" rowspan="2" bgcolor="#CC3300"><span class="style6"></span></td>
<td width="29%" bgcolor="#CC3333"><div align="center" class="style1">User Login
</div></td>
</tr>
<tr>
<td height="296" valign="top"><div align="center">
<h1 class="style8">Wel come to Online Quiz</h1>
<span class="style5"><img src="image/paathshala.jpg" width="129"
height="100"><span class="style7"><img src="image/HLPBUTT2.JPG" width="50"
height="50"><img src="image/BOOKPG.JPG" width="43" height="43"></span>
</span>
<param name="movie" value="english theams two brothers.dat">
<param name="quality" value="high">
<param name="movie" value="Drag to a file to choose it.">
<param name="quality" value="high">
<param name="BGCOLOR" value="#FFFFFF">
<p align="left" class="style5">&nbsp;</p>
<blockquote>
<p align="left" class="style5"><span class="style7">Wel Come to Online
exam. This Site will provide the quiz for various subject of interest.
You need to login for the take the online exam.</span></p>
</blockquote>
</div></td>
<td valign="top"><form name="form1" method="post" action="">
<table width="200" border="0">
<tr>
<td><span class="style2">Login ID </span></td>

Page 48 of 77
Online Quiz

<td><input name="loginid" type="text" id="loginid2"></td>


</tr>
<tr>
<td><span class="style2">Password</span></td>
<td><input name="pass" type="password" id="pass2"></td>
</tr>
<tr>
<td colspan="2"><span class="errors">
<?php
if(isset($found))
{
echo "Invalid Username or Password";
}
?>
</span></td>
</tr>
<tr>
<td colspan=2 align=center class="errors">
<input name="submit" type="submit" id="submit" value="Login">
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#CC3300"><div align="center"><span
class="style4">New User ? <a href="signup.php">Signup Free</a></span></div></td>
</tr>
</table>
<div align="center">
<p class="style5"><img src="images/topleft.jpg" width="134" height="128">
</p>
</div>
</form></td>
</tr>
</table>

</body>
</html>

1.2. header.php
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
}
-->
</style>
<table border="0" width="100%" cellspacing="0" cellpadding="0"
background="image/topbkg.jpg">
<tr>
<td width="90%" valign="top">
<!--You can modify the text, color, size, number of loops and more on the flash
header by editing the text file (fence.txt) included in the zip file.-->

Page 49 of 77
Online Quiz

<div align="left"><object classid=clsid:D27CDB6E-AE6D-11cf-96B8-


444553540000
codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
b#version=5,0,2,0
width=500
height=68>
<param name=movie value=image/fence.swf>
<param name=quality value=high>
<param name=BGCOLOR value=#000000>
<param name=SCALE value=showall>
<param name=wmode value=transparent>
<embed src=image/fence.swf
quality=high
pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?
P1_Prod_Version=ShockwaveFlash type=application/x-shockwave-flash
width=500
height=68
bgcolor=#000000
scale= showall>
</embed>
</object></div></td>
<td width="10%">
<img border="0" src="image/topright.jpg" width="203" height="68"
align="right"></td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0"
bgcolor="#000000" background="img/blackbar.jpg">
<tr>
<td width="100%" align="right"><img border="0" src="image/blackbar.jpg"
width="89" height="15"></td>
</tr>
</Table>
<Table width="100%">
<tr>
<td>
<?php @$_SESSION['login'];
error_reporting(1);
?>
</td>
<td>
<?php
if(isset($_SESSION['login']))
{
echo "<div align=\"right\"><strong><a href=\"index.php\"> Home </a>|<a
href=\"signout.php\">Signout</a></strong></div>";
}
else

Page 50 of 77
Online Quiz

{
echo "&nbsp;";
}
?>
</td>

</tr>

</table>

1.3. sublist.php

<?php
session_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Online Quiz - Quiz List</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="quiz.css" rel="stylesheet" type="text/css">
</head>
<body>
<?php
include("header.php");
include("database.php");
echo "<h2 class=head1> Select Subject to Give Quiz </h2>";
$rs=mysql_query("select * from mst_subject");
echo "<table align=center>";
while($row=mysql_fetch_row($rs))
{
echo "<tr><td align=center ><a href=showtest.php?subid=$row[0]><font
size=4>$row[1]</font></a>";
}
echo "</table>";
?>
</body>
</html>

1.4. showtest.php

<?php
session_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

Page 51 of 77
Online Quiz

<html>
<head>
<title>Online Quiz - Test List</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="quiz.css" rel="stylesheet" type="text/css">
</head>
<body>
<?php
include("header.php");
include("database.php");
extract($_GET);
$rs1=mysql_query("select * from mst_subject where sub_id=$subid");
$row1=mysql_fetch_array($rs1);
echo "<h1 align=center><font color=blue> $row1[1]</font></h1>";
$rs=mysql_query("select * from mst_test where sub_id=$subid");
if(mysql_num_rows($rs)<1)
{
echo "<br><br><h2 class=head1> No Quiz for this Subject </h2>";
exit;
}
echo "<h2 class=head1> Select Quiz Name to Give Quiz </h2>";
echo "<table align=center>";

while($row=mysql_fetch_row($rs))
{
echo "<tr><td align=center ><a href=quiz.php?
testid=$row[0]&subid=$subid><font size=4>$row[2]</font></a>";
}
echo "</table>";
?>
</body>
</html>

1.5. quiz.php
<?php
session_start();
error_reporting(1);
include("database.php");
extract($_POST);
extract($_GET);
extract($_SESSION);
/*$rs=mysql_query("select * from mst_question where test_id=$tid",$cn) or
die(mysql_error());
if($_SESSION[qn]>mysql_num_rows($rs))
{
unset($_SESSION[qn]);
exit;

Page 52 of 77
Online Quiz

}*/
if(isset($subid) && isset($testid))
{
$_SESSION[sid]=$subid;
$_SESSION[tid]=$testid;
header("location:quiz.php");
}
if(!isset($_SESSION[sid]) || !isset($_SESSION[tid]))
{
header("location: index.php");
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Online Quiz</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="quiz.css" rel="stylesheet" type="text/css">
</head>

<body>
<?php
include("header.php");

$query="select * from mst_question";

$rs=mysql_query("select * from mst_question where test_id=$tid",$cn) or


die(mysql_error());
if(!isset($_SESSION[qn]))
{
$_SESSION[qn]=0;
mysql_query("delete from mst_useranswer where sess_id='" .
session_id() ."'") or die(mysql_error());
$_SESSION[trueans]=0;

}
else
{
if($submit=='Next Question' && isset($ans))
{
mysql_data_seek($rs,$_SESSION[qn]);
$row= mysql_fetch_row($rs);
mysql_query("insert into mst_useranswer(sess_id,
test_id, que_des, ans1,ans2,ans3,ans4,true_ans,your_ans) values ('".session_id()."',
$tid,'$row[2]','$row[3]','$row[4]','$row[5]', '$row[6]','$row[7]','$ans')") or
die(mysql_error());

Page 53 of 77
Online Quiz

if($ans==$row[7])
{

$_SESSION[trueans]=$_SESSION[trueans]+1;
}
$_SESSION[qn]=$_SESSION[qn]+1;
}
else if($submit=='Get Result' && isset($ans))
{
mysql_data_seek($rs,$_SESSION[qn]);
$row= mysql_fetch_row($rs);
mysql_query("insert into mst_useranswer(sess_id,
test_id, que_des, ans1,ans2,ans3,ans4,true_ans,your_ans) values ('".session_id()."',
$tid,'$row[2]','$row[3]','$row[4]','$row[5]', '$row[6]','$row[7]','$ans')") or
die(mysql_error());
if($ans==$row[7])
{

$_SESSION[trueans]=$_SESSION[trueans]+1;
}
echo "<h1 class=head1> Result</h1>";
$_SESSION[qn]=$_SESSION[qn]+1;
echo "<Table align=center><tr class=tot><td>Total
Question<td> $_SESSION[qn]";
echo "<tr class=tans><td>True Answer<td>".
$_SESSION[trueans];
$w=$_SESSION[qn]-$_SESSION[trueans];
echo "<tr class=fans><td>Wrong Answer<td> ". $w;
echo "</table>";
mysql_query("insert into
mst_result(login,test_id,test_date,score) values('$login',$tid,'".date("y/m/d")."',
$_SESSION[trueans])") or die(mysql_error());
echo "<h1 align=center><a href=review.php> Review
Question</a> </h1>";
unset($_SESSION[qn]);
unset($_SESSION[sid]);
unset($_SESSION[tid]);
unset($_SESSION[trueans]);
exit;
}
}
$rs=mysql_query("select * from mst_question where test_id=$tid",$cn) or
die(mysql_error());
if($_SESSION[qn]>mysql_num_rows($rs)-1)
{
unset($_SESSION[qn]);
echo "<h1 class=head1>Some Error Occured</h1>";
session_destroy();

Page 54 of 77
Online Quiz

echo "Please <a href=index.php> Start Again</a>";

exit;
}
mysql_data_seek($rs,$_SESSION[qn]);
$row= mysql_fetch_row($rs);
echo "<form name=myfm method=post action=quiz.php>";
echo "<table width=100%> <tr> <td width=30>&nbsp;<td> <table border=0>";
$n=$_SESSION[qn]+1;
echo "<tR><td><span class=style2>Que ". $n .": $row[2]</style>";
echo "<tr><td class=style8><input type=radio name=ans value=1>$row[3]";
echo "<tr><td class=style8> <input type=radio name=ans value=2>$row[4]";
echo "<tr><td class=style8><input type=radio name=ans value=3>$row[5]";
echo "<tr><td class=style8><input type=radio name=ans value=4>$row[6]";

if($_SESSION[qn]<mysql_num_rows($rs)-1)
echo "<tr><td><input type=submit name=submit value='Next Question'></form>";
else
echo "<tr><td><input type=submit name=submit value='Get Result'></form>";
echo "</table></table>";
?>
</body>
</html>

1.6. review.php
<?php
session_start();
extract($_POST);
extract($_SESSION);
include("database.php");
if($submit=='Finish')
{
mysql_query("delete from mst_useranswer where sess_id='" .
session_id() ."'") or die(mysql_error());
unset($_SESSION[qn]);
header("Location: index.php");
exit;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Online Quiz - Review Quiz </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="quiz.css" rel="stylesheet" type="text/css">
</head>

Page 55 of 77
Online Quiz

<body>
<?php
include("header.php");
echo "<h1 class=head1> Review Test Question</h1>";

if(!isset($_SESSION[qn]))
{
$_SESSION[qn]=0;
}
else if($submit=='Next Question' )
{
$_SESSION[qn]=$_SESSION[qn]+1;

$rs=mysql_query("select * from mst_useranswer where sess_id='" . session_id() ."'",


$cn) or die(mysql_error());
mysql_data_seek($rs,$_SESSION[qn]);
$row= mysql_fetch_row($rs);
echo "<form name=myfm method=post action=review.php>";
echo "<table width=100%> <tr> <td width=30>&nbsp;<td> <table border=0>";
$n=$_SESSION[qn]+1;
echo "<tR><td><span class=style2>Que ". $n .": $row[2]</style>";
echo "<tr><td class=".($row[7]==1?'tans':'style8').">$row[3]";
echo "<tr><td class=".($row[7]==2?'tans':'style8').">$row[4]";
echo "<tr><td class=".($row[7]==3?'tans':'style8').">$row[5]";
echo "<tr><td class=".($row[7]==4?'tans':'style8').">$row[6]";
if($_SESSION[qn]<mysql_num_rows($rs)-1)
echo "<tr><td><input type=submit name=submit value='Next Question'></form>";
else
echo "<tr><td><input type=submit name=submit value='Finish'></form>";

echo "</table></table>";
?>

1.7. result.php

<?php
session_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Online Quiz - Result </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="quiz.css" rel="stylesheet" type="text/css">

Page 56 of 77
Online Quiz

</head>

<body>
<?php
include("header.php");
include("database.php");
extract($_SESSION);
$rs=mysql_query("select t.test_name,t.total_que,r.test_date,r.score from mst_test t,
mst_result r where
t.test_id=r.test_id and r.login='$login'",$cn) or die(mysql_error());

echo "<h1 class=head1> Result </h1>";


if(mysql_num_rows($rs)<1)
{
echo "<br><br><h1 class=head1> You have not given any quiz</h1>";
exit;
}
echo "<table border=1 align=center><tr class=style2><td width=300>Test Name
<td> Total<br> Question <td> Score";
while($row=mysql_fetch_row($rs))
{
echo "<tr class=style8><td>$row[0] <td align=center> $row[1] <td align=center>
$row[3]";
}
echo "</table>";
?>
</body>
</html>

1.8. student : Signup.php

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>New user signup </title>
<script language="javascript">
function check()
{

if(document.form1.lid.value=="")
{
alert("Plese Enter Login Id");
document.form1.lid.focus();
return false;
}

if(document.form1.pass.value=="")

Page 57 of 77
Online Quiz

{
alert("Plese Enter Your Password");
document.form1.pass.focus();
return false;
}
if(document.form1.cpass.value=="")
{
alert("Plese Enter Confirm Password");
document.form1.cpass.focus();
return false;
}
if(document.form1.pass.value!=document.form1.cpass.value)
{
alert("Confirm Password does not matched");
document.form1.cpass.focus();
return false;
}
if(document.form1.name.value=="")
{
alert("Plese Enter Your Name");
document.form1.name.focus();
return false;
}
if(document.form1.address.value=="")
{
alert("Plese Enter Address");
document.form1.address.focus();
return false;
}
if(document.form1.city.value=="")
{
alert("Plese Enter City Name");
document.form1.city.focus();
return false;
}
if(document.form1.phone.value=="")
{
alert("Plese Enter Contact No");
document.form1.phone.focus();
return false;
}
if(document.form1.email.value=="")
{
alert("Plese Enter your Email Address");
document.form1.email.focus();
return false;
}
e=document.form1.email.value;

Page 58 of 77
Online Quiz

f1=e.indexOf('@');
f2=e.indexOf('@',f1+1);
e1=e.indexOf('.');
e2=e.indexOf('.',e1+1);
n=e.length;

if(!(f1>0 && f2==-1 && e1>0 && e2==-1 && f1!=e1+1 && e1!
=f1+1 && f1!=n-1 && e1!=n-1))
{
alert("Please Enter valid Email");
document.form1.email.focus();
return false;
}
return true;
}

</script>
<link href="quiz.css" rel="stylesheet" type="text/css">
</head>

<body>
<?php
include("header.php");
?>
<table width="100%" border="0">
<tr>
<td width="132" rowspan="2" valign="top"><span class="style8"><img
src="images/connected_multiple_big.jpg" width="131" height="155"></span></td>
<td width="468" height="57"><h1 align="center"><span class="style8">New
User Signup</span></h1></td>
</tr>
<tr>
<td><form name="form1" method="post" action="signupuser.php"
onSubmit="return check();">
<table width="301" border="0" align="left">
<tr>
<td><div align="left" class="style7">Login Id </div></td>
<td><input type="text" name="lid"></td>
</tr>
<tr>
<td class="style7">Password</td>
<td><input type="password" name="pass"></td>
</tr>
<tr>
<td class="style7">Confirm Password </td>
<td><input name="cpass" type="password" id="cpass"></td>
</tr>
<tr>

Page 59 of 77
Online Quiz

<td class="style7">Name</td>
<td><input name="name" type="text" id="name"></td>
</tr>
<tr>
<td valign="top" class="style7">Address</td>
<td><textarea name="address" id="address"></textarea></td>
</tr>
<tr>
<td valign="top" class="style7">City</td>
<td><input name="city" type="text" id="city"></td>
</tr>
<tr>
<td valign="top" class="style7">Phone</td>
<td><input name="phone" type="text" id="phone"></td>
</tr>
<tr>
<td valign="top" class="style7">E-mail</td>
<td><input name="email" type="text" id="email"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="Submit" value="Signup">
</td>
</tr>
</table>
</form></td>
</tr>
</table>
<p>&nbsp; </p>
</body>
</html>

1.9. signupuser.php

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>User Signup</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="quiz.css" rel="stylesheet" type="text/css">
</head>

<body>
<?php
include("header.php");
extract($_POST);
include("database.php");

Page 60 of 77
Online Quiz

$rs=mysql_query("select * from mst_user where login='$lid'");


if (mysql_num_rows($rs)>0)
{
echo "<br><br><br><div class=head1>Login Id Already Exists</div>";
exit;
}
$query="insert into mst_user(user_id,login,pass,username,address,city,phone,email)
values('$uid','$lid','$pass','$name','$address','$city','$phone','$email')";
$rs=mysql_query($query)or die("Could Not Perform the Query");
echo "<br><br><br><div class=head1>Your Login ID $lid Created
Sucessfully</div>";
echo "<br><div class=head1>Please Login using your Login ID to take Quiz</div>";
echo "<br><div class=head1><a href=index.php>Login</a></div>";

?>
</body>
</html>

1.10. signout.php
<?php
session_start();
session_destroy();
header("Location: index.php");
?>

2.1. Admin: index.php


<?php
session_start();
error_reporting(1);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Adminstrative AreaOnline Quiz </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../quiz.css" rel="stylesheet" type="text/css">
</head>

<body>
<?php
include("header.php");
extract($_POST);
if(isset($submit))

Page 61 of 77
Online Quiz

{
include("../database.php");
$rs=mysql_query("select * from mst_admin where loginid='$loginid' and
pass='$pass'",$cn) or die(mysql_error());
if(mysql_num_rows($rs)<1)
{
echo "<BR><BR><BR><BR><div class=head1> Invalid User Name
or Password<div>";
exit;

}
$_SESSION['alogin']="true";

}
else if(!isset($_SESSION[alogin]))
{
echo "<BR><BR><BR><BR><div class=head1> Your are not logged in<br>
Please <a href=index.php>Login</a><div>";
exit;
}
?>

<p class="head1">Welcome to Admistrative Area </p>


<div style="margin:auto;width:90%;height:500px;box-shadow:2px 1px 2px 2px
#CCCCCC;text-align:left">
<div style="margin-left:20%;padding-top:5%">
<p class="style7"><a href="subadd.php">Add Subject</a></p>
<p class="style7"><a href="testadd.php">Add Test</a></p>
<p class="style7"><a href="questionadd.php">Add Question </a></p>
<p align="center" class="head1">&nbsp;</p>
</div>
</div>
</body>
</html>

2.2 subadd.php

<?php
session_start();
require("../database.php");
include("header.php");
error_reporting(1);
?>
<link href="../quiz.css" rel="stylesheet" type="text/css">
<?php

extract($_POST);

Page 62 of 77
Online Quiz

echo "<BR>";
if (!isset($_SESSION['alogin']))
{
echo "<br><h2><div class=head1>You are not Logged On Please Login to
Access this Page</div></h2>";
echo "<a href=index.php><h3 align=center>Click Here for Login</h3></a>";
exit();
}
echo "<BR><h3 class=head1>Subject Add </h3>";

echo "<table width=100%>";


echo "<tr><td align=center></table>";
if($submit=='submit' || strlen($subname)>0 )
{
$rs=mysql_query("select * from mst_subject where sub_name='$subname'");
if (mysql_num_rows($rs)>0)
{
echo "<br><br><br><div class=head1>Subject is Already Exists</div>";
exit;
}
mysql_query("insert into mst_subject(sub_name) values ('$subname')",$cn) or
die(mysql_error());
echo "<p align=center>Subject <b> \"$subname \"</b> Added Successfully.</p>";
$submit="";
}
?>
<SCRIPT LANGUAGE="JavaScript">
function check() {
mt=document.form1.subname.value;
if (mt.length<1) {
alert("Please Enter Subject Name");
document.form1.subname.focus();
return false;
}
return true;
}
</script>

<div style="margin:auto;width:90%;height:500px;box-shadow:2px 1px 2px 2px


#CCCCCC;text-align:left">
<title>Add Subject</title>
<form name="form1" method="post" onSubmit="return check();">
<table width="41%" border="0" align="center">
<tr>
<td width="45%" height="32"><div align="center"><strong>Enter Subject Name
</strong></div></td>
<td width="2%" height="5">
<td width="53%" height="32">

Page 63 of 77
Online Quiz

<input name="subname" placeholder="enter language name" type="text"


id="subname">
<tr>
<td height="26"> </td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="26"></td>
<td>&nbsp;</td>
<td><input type="submit" name="submit" value="Add" ></td>
</tr>
</table>
</form>
<p>&nbsp; </p>
</div>

2.3. testadd.php

<?php
session_start();
error_reporting(1);
if (!isset($_SESSION['alogin']))
{
echo "<br><h2>You are not Logged On Please Login to Access this
Page</h2>";
echo "<a href=index.php><h3 align=center>Click Here for Login</h3></a>";
exit();
}
?>
<link href="../quiz.css" rel="stylesheet" type="text/css">
<?php
require("../database.php");

include("header.php");

echo "<br><h2><div class=head1>Add Test</div></h2>";


if($_POST[submit]=='Save' || strlen($_POST['subid'])>0 )
{
extract($_POST);
mysql_query("insert into mst_test(sub_id,test_name,total_que) values
('$subid','$testname','$totque')",$cn) or die(mysql_error());
echo "<p align=center>Test <b>\"$testname\"</b> Added Successfully.</p>";
unset($_POST);
}
?>
<SCRIPT LANGUAGE="JavaScript">

Page 64 of 77
Online Quiz

function check() {
mt=document.form1.testname.value;
if (mt.length<1) {
alert("Please Enter Test Name");
document.form1.testname.focus();
return false;
}
tt=document.form1.totque.value;
if(tt.length<1) {
alert("Please Enter Total Question");
document.form1.totque.value;
return false;
}
return true;
}
</script>
<form name="form1" method="post" onSubmit="return check();">
<table width="58%" border="0" align="center">
<tr>
<td width="49%" height="32"><div align="left"><strong>Enter Subject ID
</strong></div></td>
<td width="3%" height="5">
<td width="48%" height="32"><select name="subid">
<?php
$rs=mysql_query("Select * from mst_subject order by sub_name",$cn);
while($row=mysql_fetch_array($rs))
{
if($row[0]==$subid)
{
echo "<option value='$row[0]' selected>$row[1]</option>";
}
else
{
echo "<option value='$row[0]'>$row[1]</option>";
}
}
?>
</select>

<tr>
<td height="26"><div align="left"><strong> Enter Test Name
</strong></div></td>
<td>&nbsp;</td>
<td><input name="testname" type="text" id="testname"></td>
</tr>
<tr>
<td height="26"><div align="left"><strong>Enter Total Question
</strong></div></td>

Page 65 of 77
Online Quiz

<td>&nbsp;</td>
<td><input name="totque" type="text" id="totque"></td>
</tr>
<tr>
<td height="26"></td>
<td>&nbsp;</td>
<td><input type="submit" name="submit" value="Add" ></td>
</tr>
</table>
</form>
<p>&nbsp; </p>

2.4. questionadd.php

<?php
session_start();
require("../database.php");
include("header.php");
error_reporting(1);
?>
<link href="../quiz.css" rel="stylesheet" type="text/css">
<?php
extract($_POST);

echo "<BR>";
if (!isset($_SESSION[alogin]))
{
echo "<br><h2><div class=head1>You are not Logged On Please Login to
Access this Page</div></h2>";
echo "<a href=index.php><h3 align=center>Click Here for Login</h3></a>";
exit();
}
echo "<BR><h3 class=head1>Add Question </h3>";
if($_POST[submit]=='Save' || strlen($_POST['testid'])>0 )
{
extract($_POST);
mysql_query("insert into
mst_question(test_id,que_desc,ans1,ans2,ans3,ans4,true_ans) values
('$testid','$addque','$ans1','$ans2','$ans3','$ans4','$anstrue')",$cn) or
die(mysql_error());
echo "<p align=center>Question Added Successfully.</p>";
unset($_POST);
}
?>
<SCRIPT LANGUAGE="JavaScript">
function check() {
mt=document.form1.addque.value;
if (mt.length<1) {

Page 66 of 77
Online Quiz

alert("Please Enter Question");


document.form1.addque.focus();
return false;
}
a1=document.form1.ans1.value;
if(a1.length<1) {
alert("Please Enter Answer1");
document.form1.ans1.focus();
return false;
}
a2=document.form1.ans2.value;
if(a1.length<1) {
alert("Please Enter Answer2");
document.form1.ans2.focus();
return false;
}
a3=document.form1.ans3.value;
if(a3.length<1) {
alert("Please Enter Answer3");
document.form1.ans3.focus();
return false;
}
a4=document.form1.ans4.value;
if(a4.length<1) {
alert("Please Enter Answer4");
document.form1.ans4.focus();
return false;
}
at=document.form1.anstrue.value;
if(at.length<1) {
alert("Please Enter True Answer");
document.form1.anstrue.focus();
return false;
}
return true;
}
</script>

<div style="margin:auto;width:90%;height:500px;box-shadow:2px 1px 2px 2px


#CCCCCC;text-align:left">
<form name="form1" method="post" onSubmit="return check();">
<table width="80%" border="1" align="center">
<tr>
<td width="24%" height="32"><div align="left"><strong>Select Test Name
</strong></div></td>
<td width="1%" height="5">
<td width="75%" height="32"><select name="testid" id="testid">
<?php

Page 67 of 77
Online Quiz

$rs=mysql_query("Select * from mst_test order by test_name",$cn);


while($row=mysql_fetch_array($rs))
{
if($row[0]==$testid)
{
echo "<option value='$row[0]' selected>$row[2]</option>";
}
else
{
echo "<option value='$row[0]'>$row[2]</option>";
}
}
?>
</select>

<tr>
<td height="26"><div align="left"><strong> Enter Question
</strong></div></td>
<td>&nbsp;</td>
<td><textarea name="addque" cols="60" rows="2"
id="addque"></textarea></td>
</tr>
<tr>
<td height="26"><div align="left"><strong>Enter Answer1 </strong></div></td>
<td>&nbsp;</td>
<td><input name="ans1" type="text" id="ans1" size="85" maxlength="85"></td>
</tr>
<tr>
<td height="26"><strong>Enter Answer2 </strong></td>
<td>&nbsp;</td>
<td><input name="ans2" type="text" id="ans2" size="85" maxlength="85"></td>
</tr>
<tr>
<td height="26"><strong>Enter Answer3 </strong></td>
<td>&nbsp;</td>
<td><input name="ans3" type="text" id="ans3" size="85" maxlength="85"></td>
</tr>
<tr>
<td height="26"><strong>Enter Answer4</strong></td>
<td>&nbsp;</td>
<td><input name="ans4" type="text" id="ans4" size="85" maxlength="85"></td>
</tr>
<tr>
<td height="26"><strong>Enter True Answer </strong></td>
<td>&nbsp;</td>
<td><input name="anstrue" type="text" id="anstrue" size="50"
maxlength="50"></td>
</tr>

Page 68 of 77
Online Quiz

<tr>
<td height="26"></td>
<td>&nbsp;</td>
<td><input type="submit" name="submit" value="Add" ></td>
</tr>
</table>
</form>
<p>&nbsp; </p>
</div>

2.5. header.php
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
}
-->
</style>
<table border="0" width="100%" cellspacing="0" cellpadding="0"
background="../image/topbkg.jpg">
<tr>
<td width="90%" valign="top">
<!--You can modify the text, color, size, number of loops and more on the flash
header by editing the text file (fence.txt) included in the zip file.-->
<div align="left"><object classid=clsid:D27CDB6E-AE6D-11cf-96B8-
444553540000
codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#v
ersion=5,0,2,0
width=500
height=68>
<param name=movie value=../image/fence.swf>
<param name=quality value=high>
<param name=BGCOLOR value=#000000>
<param name=SCALE value=showall>
<param name=wmode value=transparent>
<embed src=../image/fence.swf
quality=high
pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?
P1_Prod_Version=ShockwaveFlash type=application/x-shockwave-flash
width=500
height=68
bgcolor=#000000
scale= showall>
</embed>
</object></div></td>
<td width="10%">

Page 69 of 77
Online Quiz

<img border="0" src="../image/topright.jpg" width="203" height="68"


align="right"></td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0"
bgcolor="#000000" background="../image/blackbar.jpg">
<tr>
<td width="100%"><img border="0" src="../image/blackbar.jpg" width="89"
height="15"></td>
</tr>
</table>
<table width="100%">
<tr>
<td aling=right>
<?php
if(isset($_SESSION['alogin']))
{
echo "<div align=\"right\"><strong><a href=\"login.php\">Admin Home</a>|
<a href=\"signout.php\">Signout</a></strong></div>";
}
else
{
echo "&nbsp;";
}
?>
</td>
</tr>
</table>

2.6 databse.php

<?php
$cn=mysql_connect("localhost","root","") or die("Could not Connect My Sql");
mysql_select_db("quiz",$cn) or die("Could connect to Database");
?>

Page 70 of 77
Online Quiz

2. Scope for Enhancement


Present system carries certain drawbacks and limitations as listed below

1. Current system provides only multiple choices but single correct answer selection.
Faculty may wish to provide multiple choices multiple selection responses.

2. Incase questions and/or answers need to be in graphics, current system has no


provision.

3. Unregistered users cannot answer test, they must belong to some group. This is a
drawback incase the faculty wants anyone even anonymous users to answer the test.

4. Top score could be displayed on the home page; but this could be easily implemented
while programming the home page.

5. Security logs though not implemented in this system would be well available through
the respective database management system and web server software.

Page 71 of 77
Online Quiz

3. Figures and Tables


1. 3.1.1. Use case Overview
2. 3.1.2. Add Faculty Use Case
3. 3.1.3. Login Use Case
4. 3.1.4. Manage Student Groups Use Case
5. 3.1.5. Student Registration Use Case
6. 3.1.6. User Profile Edit Use Case
7. 3.1.7. Manage Test Use Case
8. 3.1.8. Appear for Test Use Case
9. 3.1.9. Generate Result Use Case
10. 3.2.1. Login Activity Diagram
11. 3.2.2. Manage Students Activity Diagram
12. 3.2.3. Manage Tests Activity Diagram
13. 3.2.4. Generate Result Activity Diagram
14. 3.2.5. Student Registration Activity Diagram
15. 3.2.6. Answer Test Activity Diagram
16. 3.3.1. Sequence Diagram Overview
17. 3.3.2. Login Sequence Diagram
18. 3.3.3. Manage Student Groups Sequence Diagram
19. 3.3.4. Student Registration Sequence Diagram
20. 3.3.5. Manage Test Sequence Diagram
21. 3.3.6. Appear for Test Sequence Diagram
22. 3.4 Class Diagram
23. 3.5. Database Design
24. 3.5.1. Table: Student
25. 3.5.2. Table: Test
26. 3.5.3. Table: TestQuestions
27. 3.5.4. Table: StudentResponse
28. 3.5.5. Table: TestSession
29. 3.5.6. Table: Groups
30. 3.5.7. Table: Faculty
31. 3.5.8. Table: AssignGroupTest
32. 4.1. Login Interface
33. 4.2. Create Group Interface
34. 4.3. Assign Test Interface
35. 4.4. Create Questions Interface
36. 4.5. Register Students Interface.............................................................................................................

Page 72 of 77
Online Quiz

37.References
Apache Tomcat http://tomcat.apache.org

MySQL http://www.mysql.com

UML official website http://www.uml.org/

StarUML - The Open Source UML/MDA Platform http://staruml.sourceforge.net/

Page 73 of 77

S-ar putea să vă placă și