Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
The main aim of Online Quiz System Project is to facilitate a user friendly environment of
Bluebook implementation and reduces the manual effort. Providing an online
comprehensive solution to manage quiz system where the individuals are participating in a
team.
Scope:
Providing accessibility to the administrators who have a valid userid and password.
Online Quiz System also provides the following facilities such as:
winners.
1.
Administrator must have valid user-id and password to login to the Online Quiz
System.
2.
After the valid administrator logs in he is shown with the list of icons on quiz and
wants to generate reports of the teams.
3.
On selecting the desired icon he is taken to a page whether to enter quiz details of
the teams, view the results of the quiz, and delete previous results of the quiz.
4.
5.
6.
7.
Based on the calculation of average marks the teams are eliminated and final
teams are forwarded to the next round until the winner is declared.
8.
Questions for the teams are flipped automatically according to the time limit and
negative marking is given to the participant if he is not able to answer the
question.
9.
10.
Administrators
Industrialists
E-R DIAGRAM
CODES :
1. ADMIN LOGIN
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
<title>welcome admin</title>
<script language="javascript">
function fun()
{
var us=document.getElementById("id").value;
var psw=document.getElementById("psw").value;
if((us=="admin")&&(psw="admin"))
{
document.getElementById("err").style.visibility="hidden";
return true;
}
else
{
document.getElementById("err").style.visibility="visible";
document.getElementById("id").value="";
document.getElementById("psw").value="";
document.getElementById("id").focus();
return false;
}
}
</script>
</head>
<body onload="document.getElementById('id').focus()">
<div id="wrapper">
<div id="header">
<div id="logo">
<h1><a href="#">Computerization of Blue Book</a></h1>
<h2><a href="http://www.freecsstemplates.org/">Online Quiz</a></h2>
</div>
<!-- end div#logo -->
</div>
<center>
<h1>ADMINISTRATOR LOGIN</h1>
<hr>
</center>
<form action="./adminduties.jsp">
<table align="center" cellpadding="5">
<tr>
<th>User Name:</th><td><input type="text" name="id" id="id"></td>
</tr>
<tr>
<th>Password:</th><td><input type="password" name="psw" id="psw"></td>
</tr>
<tr>
<th colspan="2"><input type="submit" value=" Login " onclick="return
fun()">
<input type="reset" value=" Cancel "></th>
</tr>
<tr>
var noteams=document.getElementById('noteams').value;
if((mpq!="")&&(noq!=""))
{
var t=(noq/noteams)*mpq;
document.getElementById('total').value=t;
}
else
{
alert("Check the information again");
}
}
function check()//submit
{
var total=document.getElementById('total').value;
var pass=document.getElementById('passmarks').value;
if(total<pass)
{
alert("pass marks must be less than total marks");
document.getElementById('passmarks').value="";
document.getElementById('passmarks').focus();
return false;
}
else
{
return true;
}
}
function qpt()
{
var noq=document.getElementById('noques').value;
var noteams=document.getElementById('noteams').value;
if(!(noq % noteams==0))
{
alert("Questions are not enough for teams");
document.getElementById('noques').value="";
document.getElementById('noques').focus();
}
}
</script>
</head>
<body onload="document.getElementById('noteams').focus()">
<div id="wrapper">
<div id="header">
<div id="logo">
<h1><a href="#">Computerization of Blue Book</a></h1>
<h2><a href="http://www.freecsstemplates.org/">Online Quiz</a></h2>
</div>
<!-- end div#logo -->
</div>
<%session.setAttribute("startques","1"); %>
<%session.setAttribute("quiznum","1");%>
<%session.setAttribute("prevnoques","0");%>
<center><br/><br/><br/>
<fieldset>
<legend align="center"><b>Enter Quiz Details</b></legend>
<form action="./save.jsp">
<table cellpadding="5">
<tr>
<th align="right">Enter No. of teams in the quiz : </th>
<td><input type="text" name="noteams" id="noteams"></td>
</tr>
<tr>
</html>
4. END OF QUIZ
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1" import="java.sql.*,vdb.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="logo">
<h1><a href="#">Computerization of Blue Book</a></h1>
<h2><a href="http://www.freecsstemplates.org/">Online Quiz</a></h2>
</div>
<!-- end div#logo -->
</div>
<%
Connection con=Db.connect();
Db.deleteTable(con,"admin");
Db.deleteTable(con,"teams");
%>
<jsp:forward page="./thanks.jsp"></jsp:forward>
</body>
</html>
5. SCORE CALCULATION
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1" import="java.sql.*,vdb.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
<title></title>
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="logo">
<h1><a href="#">Computerization of Blue Book</a></h1>
<h2><a href="http://www.freecsstemplates.org/">Online Quiz</a></h2>
</div>
<!-- end div#logo -->
</div>
<center>
<br/>
<h1>SCORE BOARD</h1>
<HR/>
<br/>
<table border=1>
<tr>
<th>TEAM NAME</th>
<th>SCORE</th>
</tr>
<%!
int maxscore=0;
Connection con=null;
%>
<%
System.out.println("Entered score.jsp");
con=Db.connect();
ResultSet rs=Db.getTable(con,"teams");
while(rs.next())
{
%>
<tr>
<td><%=rs.getString(1) %></td>
<td><%=rs.getString(2) %></td>
</tr>
<%
}
%>
</table>
<br/>
<hr/>
<br/>
<%
ResultSet rs2=Db.getSelected(con,"select max(marks) from teams");
if(rs2.next())
{
maxscore=rs2.getInt(1);
}
%>
<h2>Max. score : <%=maxscore %></h2>
<hr/>
<%
session.setAttribute("maxscore",String.valueOf(maxscore));
int passmarks=Integer.parseInt(session.getAttribute("passmarks").toString());
if(maxscore>=passmarks)
{
%>
<h2>WINNERS FOR THIS ROUND</h2>
<hr/>
<table>
<tr>
<th><h3>TEAM NUMBER</h3></th>
</tr>
<%
ResultSet rs3=Db.getSelected(con,"select teamname from
teams where marks>="+passmarks+" order by marks desc");
int newteams=0;
while(rs3.next())
{
newteams++;
%>
<tr><th><%=rs3.getInt(1) %></th></tr>
<%
}
session.setAttribute("newteams",String.valueOf(newteams)
);
if(newteams!=1)
{
%>
</table>
<br/>
}
}
else
{
%>
<h2>OOPS!! NO WINNERS FOR THIS ROUND</h2>
<BR/>
<form action="./endquiz.jsp" name="f2">
<input type="submit" value="END QUIZ">
</form>
<%
}
%>
<br/>
<input type="button" value="
MAIN MENU
onclick="window.navigate('./endquiz.jsp')">
"
</center>
</body>
</html>
6. THANKS PAGE
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
QUIT
"