Documente Academic
Documente Profesional
Documente Cultură
Project on
ONLINE EXAMINATION SYSTEM
Developed by
1
Sagar Institute of Technology & Management
Founded By the Sagar Educational Society,Barabanki with affiliation from UttarPradesh
Technical University, Lucknow and is approved by AICTE,
Ministry of HRD, Govt of India
6th Km Stone, Faizabad Road, Barabanki - 225001 (U.P.) INDIA
CERTIFICATE
This is to certify that Ms. Nivedita, Ms. Priya Mishra, Ms.Priya Rastogi,
Ms.Sadhvi students of B.Tech IT IIIrd year
have completed their project on “On Line Examination System ” .
2
Date Signature of Project Guide
ACKNOWLEDGEMENT
The present work would not have been possible without the guidance and help of
Mr.P.N.Shukla and we find it most pleasant to remember and record our obligation to
him. We must unreservedly acknowledge the deep gratitude to our project guide for his
persistent intellectual guidance. It has been matter of great pleasure for us to have worked
under an acadmecian of his repute.
Regards
Nivedita
Priya Mishra
Priya Rastogi
Sadhvi
3
CONTENTS
Page
No.
CHAPTER 1: SYNOPSIS
1.1 Overview of Online Examination system
CHAPTER 6: TESTING
CHAPTER 7: CODING 26-40
4
CHAPTER 8: CONCLUSIONS 41-42
CHAPTER 1
SYNOPSIS
5
CHAPTER 2
REQUIREMENT ANALYSIS
Faculty felt it was very cumbersome to evaluate aptitude test copies, award
marks and inform students about the result of the test within a few hours. A user
friendly On Line Examination System Software is developed to facilitate faculty
for seamless conduct of the aptitude test.
1) Student must have a valid roll number which is used to login at the system
to start the examination.
2) When one roll number is login then it’s not possible to re-login again and
one student can login at only-one system.
3) When the student login then the roll number, name and photo shown at
his/her examination screen till the examination is not completed.
4) Student is able to see only previous question (just back) and option to skip
and review the question.
6
5) Student can see the result of the test at end of test.
• Maintainability:
System should be able to be maintained easily and with no special needs.
Most of the maintenance should be done automatically by the system with no
interaction by the user.
• Portability:
System must be able to run on different machines so that it can be better
used in all the machines.
• Extensibility:
System must be extensible so that future needs can be taken care off.
• Serviceability:
System must be able to provide durable rendering of its services by taking
care of all required possibilities.
7
CHAPTER 3
3.1 Planning
Planning is deciding in advance what to do? How to do it? When to do it? And
who should do it? It bridges the gap from where the organization is to, where it
wants to be. The planning function involves establishing goals and arranging
them in logical order.
8
3.1 Work Break-Down Structure
Online Examination
System
GUI Database M1 M2
M1 : Examination
Module
M2 : MIS Report
module
9
Analysis
Databa
se
3.2 Dependency
Design Between task
GUI
Coding
Testing
Implementation
3.2 Analysis
In system analysis we analyze all requirement and all specifications. There are
two phases in our project:
1. Requirements Gathering
10
• Notice all functions required by user.
For clearly understand the requirements, we do this activity, some steps are:
11
CHAPTER 4
SOFTWARE DESIGN
Linear Sequential Model was used in designing of this software. This is some
time called the waterfall model; this suggests a systematic, sequential, approach
to software development that begins at the system level and progresses through
analysis, design, coding, testing and support.
• Data dictionary
• Data flow diagrams
• ER diagram
Data dictionary consists of description of all the data used in the system. It consists
of logical characteristics of current systems data stores including name, description,
aliases, contents and organization. Data dictionary serves as the basis for identifying
database requirements during system design. Data dictionary is a catalog, a
depositary of the elements in the system.
12
Info table:
Login Table:
Question table:
13
question Varchar(MAX) Not null Question
Answer Table
14
4.1.2Data Flow Diagrams
15
4.1.2.2 1-Level DFD for Examiner
Authentication
Login ADMIN
Login
Ack
Ack
Exam
Manage
ADMINISTRATOR Information Exam
Question
Record
Student
View
Record
Student
Record
Candidate Question
Information Detail
View
Questions ROLL_NUMBER QST
16
4.1.2.3 1-Level DFD for Student
check ANSWER
Evaluate
Marks
Answer
Total Marks
Result
17
4.1.3 ER Diagram
1 n
E_chk MANAGES Info
1 1 1
SETS MAKE
HAS
question
n
ans n qno
login
1
choice1 question
Roll_number Roll_number
HAS
1 name
Choice2
1 qno
choice4 rans
answer question
choice3 marks
ans1
choice4
choice2 choice1
Choice3
18
CHAPTER 5
5.1.1 ASP.Net
19
.NET pages, known officially as "web forms", are the main building
block for application development.[8] Web forms are contained in files with an ".aspx"
extension; these files typically contain static (X)HTML markup, as well as markup defining
server-side Web Controls and User Controls where the developers place all the required
static and dynamic content for the web page. Additionally, dynamic code which runs on the
server can be placed in a page within a block <% -- dynamic code -- %> which is similar to
other web development technologies such as PHP, JSP, and ASP, but this practice is
generally discouraged except for the purposes of data binding since it requires more calls
when rendering the page.
20
5.1.2 SQL Server 2005
Microsoft SQL Server is a relational model database server produced by Microsoft. Its
primary query languages are T-SQL and ANSI SQL. SQL Server 2005 (codenamed
Yukon), released in October 2005, is the successor to SQL Server 2000. It included native
support for managing XML data, in addition to
relational data. For this purpose, it defined an xml data type that could be used either as a
data type in database columns or as literals in queries. XML columns can be associated
with XSD schemas; XML data being stored is verified against the schema. XML is
converted to an internal binary data type before being stored in the database. Specialized
indexing methods were made available for XML data. XML data is queried using
XQuery;CLR Integration was the main features with this edition where one could write
SQL code as Managed Code these are those code which are being executed by
CLR(Common Language Runtime). SQL Server 2005 added some extensions to the T-
SQL language to allow embedding XQuery queries in T-SQL. In addition, it also defines a
new extension to XQuery, called XML DML, that allows query-based modifications to
XML data. SQL Server 2005 also allows a database server to be exposed over web services
using TDS packets encapsulated within SOAP (protocol) requests. When the data is
accessed over web services, results are returned as XML. For relational data, T-SQL has
been augmented with error handling features
(try/catch) and support for recursive queries (Common Table Expressions). SQL Server
2005 has also been enhanced with new indexing algorithms and better error recovery
systems. Data pages are checksummed for better error resiliency, and optimistic
concurrency support has been added for better performance. Permissions and access control
have been made more granular and the query processor handles concurrent execution of
queries in a more efficient way. Partitions on tables and indexes are supported natively, so
scaling out a database onto a cluster is easier. SQL CLR was introduced with SQL Server
2005 to let it integrate with the .NET Framework.
21
CHAPTER 6
TESTING
System testing is an expensive but critical process that can take as much as 50
percent of the budget for program development. The common view of testing
held by users is that it is performed to prove that there are no errors in the
program. Testing is the process of executing a program with the explicit
intention of finding errors that is, making the program fail. A successful test,
then is one that finds an error.
TESTING OBJECTIVES
The main objectives of testing are:
• Testing is a process of executing a program with the intent of finding an error.
• A goal test case is one that has a probability of finding an as yet
undiscovered error.
• A successful test is one that uncovers an as yet undiscovered error.
TESTING PRINCIPLE
The various testing principles are:
• All tests should be traceable to customer requirements.
• Test should be planned long before testing begins.
• The testing should begin “in the small” and progress towards testing “in
the large”.
• Exhaustive testing is not possible.
• To be most efficient, testing should be conducted by an independent
third party.
22
There are two general strategies for testing software:
• Code Testing
The code-testing strategy examines the logic of the program. In this kind
of testing, analyst develops test cases that result in executing every
instruction in the program or module; that is, every path through the
program is tested. A path is a specific combination of conditions that is
handled by the program
• Specification Testing
To perform specification testing, the analyst examines the specifications
stating what the program should do and how it should perform under various
conditions. Then test cases are developed for each condition or combination
of conditions and submitted for processing.
This strategy treats the program as if it were a black box; we do not look
into the program to study the code and is not concerned about whether every
instruction or path through the program is tested.
23
TESTING TECHNIQUES:
Types of testing
24
Black box testing
Features of white box testing are:
• Black box testing to be applied during later stage of testing.
• Black box testing focuses on the functional requirement of the software
• Incorrect or missing functions.
• Interface errors.
• Errors in the data structure or external database access.
• Performance errors.
• Initialization and termination errors
25
CHAPTER 7
CODING
26
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
&
nbsp;
<br />
<br />
<br />
<asp:Login ID="Login1" runat="server" BackColor="#FFFBD6"
BorderColor="#FFDFAD"
BorderPadding="4" BorderStyle="Solid" BorderWidth="1px"
Font-Names="Verdana"
Font-Size="Medium" ForeColor="#333333" Height="185px"
TextLayout="TextOnTop"
Width="312px" Font-Bold="False">
<CheckBoxStyle Font-Bold="True" Font-Size="Larger" />
<TextBoxStyle Font-Size="0.8em" Height="30px"
Width="200px" />
<LoginButtonStyle BackColor="White" BorderColor="#CC9966"
BorderStyle="Groove"
BorderWidth="1px" Font-Bold="True" Font-
Names="Verdana" Font-Size="Larger"
ForeColor="#990000" Height="25px" Width="100px" />
27
<InstructionTextStyle Font-Italic="True"
ForeColor="Black" />
<LabelStyle Font-Bold="True" Font-Size="Larger"
ForeColor="Black" />
<TitleTextStyle BackColor="#990000" Font-Bold="True"
Font-Size="0.9em"
ForeColor="White" />
</asp:Login>
</asp:Panel>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div>
</form>
</body>
</html>
7.1.2 VB Script
Imports system.data
Imports System.Data.SqlClient
Imports System.Data.Sql
Imports System.Data.Common
28
Inherits System.Web.UI.Page
Dim uname As String
Dim rno As String
29
7.2 Registration Form
7.2.1 HTML
<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="register.aspx.vb" Inherits="_Default" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server" enctype="multipart/form-data">
<div style="height: 947px; width: 1179px; font-family: 'Microsoft
Sans Serif'; font-size: inherit; font-weight: normal; color: #000000;
margin-left: 80px;">
30
ImageUrl="~/onilne_exam_banner.jpg" Width="959px">
</asp:ImageMap>
<br />
<br />
<br />
 
;
 
31
<asp:ListItem>EC</asp:ListItem>
<asp:ListItem>EE</asp:ListItem>
<asp:ListItem>EEE</asp:ListItem>
<asp:ListItem>EN</asp:ListItem>
<asp:ListItem>ME</asp:ListItem>
</asp:DropDownList>
 
;
32
<asp:TextBox ID="re_pswd" runat="server" Width="182px"
TextMode="Password"></asp:TextBox>
<br />
&
nbsp;
<asp:CompareValidator ID="CompareValidator1" runat="server"
ErrorMessage="Password Mismatch" ControlToCompare="pswd"
ControlToValidate="re_pswd"></asp:CompareValidator>
<br />
<br />
 
;
* All feilds are madatory to be filled<br />
&
nbsp;
<br />
 
;
<asp:Label ID="Label11" runat="server"></asp:Label>
&
nbsp;
<br />
<br />
<br />
&
nbsp;
<asp:LinkButton ID="LinkButton1" runat="server">Click Here to
Login</asp:LinkButton>
<br />
&
nbsp;
<asp:Button ID="Button1" runat="server" Height="26px" Text="Submit"
Width="83px" />
<br />
&
nbsp; <br />
</div>
</form>
</body>
</html>
7.2.2 VB Scripting
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.Sql
Imports System.Data.Common
Imports System.Drawing
Imports System.IO
Partial Class _Default
Inherits System.Web.UI.Page
33
Dim cs As String = "Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=oles;Data Source=CC3-123"
Dim con As SqlClient.SqlConnection = New
SqlClient.SqlConnection(cs)
Dim comm As SqlClient.SqlCommand = New SqlClient.SqlCommand
Dim st As String = ("Select id from log;")
comm = New SqlClient.SqlCommand(st, con)
Dim dr As SqlClient.SqlDataReader
con.Open()
dr = comm.ExecuteReader()
While (dr.Read())
If (dr.GetString(0).ToString = id.Text) Then
e.IsValid = False
Else
e.IsValid = True
End If
End While
dr.Close()
End Sub
34
Dim myFile As HttpPostedFile = FileUpload1.PostedFile
Dim nFileLen As Integer = myFile.ContentLength
If (nFileLen = 0) Then
lblOutput.Text = "No file was uploaded."
Return
End If
' Check file extension (must be JPG)
If (System.IO.Path.GetExtension(myFile.FileName).ToLower <>
".jpg") Then
lblOutput.Text = "The file must have an extension of JPG"
Return
End If
' Read file into a data stream
Dim myData(nFileLen) As Byte
myFile.InputStream.Read(myData, 0, nFileLen)
' Make sure a duplicate file doesnt exist. If it does, keep
on appending an
' incremental numeric until it is unique
'Dim sFilename As String =
System.IO.Path.GetFileName(myFile.FileName)
Dim file_append As Integer = 0
' Save the stream to disk
Dim sFilename As String = rno.Text + ".jpg"
Dim newFile As System.IO.FileStream = New
System.IO.FileStream(Server.MapPath((sSavePath + sFilename)),
System.IO.FileMode.Create)
newFile.Write(myData, 0, myData.Length)
newFile.Close()
' Check whether the file is really a JPEG by opening it
Dim myCallBack As System.Drawing.Image.GetThumbnailImageAbort
= New System.Drawing.Image.GetThumbnailImageAbort(AddressOf
ThumbnailCallback)
Dim myBitmap As Bitmap
Try
myBitmap = New Bitmap(Server.MapPath((sSavePath +
sFilename)))
' If jpg file is a jpeg, create a thumbnail filename that
is unique.
file_append = 0
Dim sThumbFile As String = rno.Text + sThumbExtension +
".jpg"
While System.IO.File.Exists(Server.MapPath((sSavePath +
sThumbFile)))
file_append = (file_append + 1)
sThumbFile =
(System.IO.Path.GetFileNameWithoutExtension(myFile.FileName) _
+ (file_append.ToString _
+ (sThumbExtension + ".jpg")))
End While
' Save thumbnail and output it onto the webpage
Dim myThumbnail As System.Drawing.Image =
myBitmap.GetThumbnailImage(intThumbWidth, intThumbHeight, myCallBack,
IntPtr.Zero)
myThumbnail.Save(Server.MapPath((sSavePath +
sThumbFile)))
imgPicture.ImageUrl = (sSavePath + sThumbFile)
' Displaying success information
35
lblOutput.Text = "File uploaded successfully!"
' Destroy objects
myThumbnail.Dispose()
myBitmap.Dispose()
Catch errArgument As ArgumentException
' The file wasn't a valid jpg file
lblOutput.Text = "The file wasn't a valid jpg file."
System.IO.File.Delete(Server.MapPath((sSavePath +
sFilename)))
End Try
End If
End Sub
End Class
36
37
7.3.1 VB Scripting
Partial Class Default3
Inherits System.Web.UI.Page
Dim rno As String
38
7.3.2 Exam Screen
39
40
7.3.3 HTML Coding
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="exam.aspx.vb"
Inherits="_Default" %>
41
<asp:Image ID="Image1" runat="server" Height="138px"
ImageUrl="~/Sitm_logo.gif" Width="160px" />
<asp:ImageMap ID="ImageMap1" runat="server" Height="137px"
ImageUrl="~/onilne_exam_banner.jpg"
Width="1136px">
</asp:ImageMap></asp:Panel>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Timer ID="Timer1" runat="server" OnTick ="Timer1_Tick"
Interval ="1000">
</asp:Timer>
</div>
<br />
<br />
RollNumber<asp:TextBox
ID="TextBox1" runat="server" Width="89px"></asp:TextBox>
Name<asp:TextBox ID="TextBox2"
runat="server"></asp:TextBox>
minutes
</ContentTemplate>
</asp:UpdatePanel>
<br />
<br />
<br />
Question
<asp:Label ID="Label1" runat="server" Font-
Bold="True"></asp:Label>
of
42
<asp:Label ID="Label2" runat="server" Text="5" Font-
Bold="True"></asp:Label>
<br />
<br />
<asp:Panel ID="Panel1" runat="server" BackColor="#FFC0C0"
Height="344px" Width="1303px" Direction="LeftToRight"
HorizontalAlign="Left">
<br />
<table style="width: 1235px; height: 221px">
<tr>
<td style="width: 127px; height: 108px">
Question</td>
<td style="width: 968px; height: 108px">
<asp:Label ID="ques" runat="server"
Height="130px" Width="966px"></asp:Label></td>
<td style="width: 203px; height: 108px">
<asp:ImageMap ID="ImageMap2" runat="server"
Height="127px" Width="197px">
</asp:ImageMap></td>
</tr>
<tr>
<td style="width: 127px; height: 40px;">
<asp:RadioButton ID="RadioButton1" runat="server"
GroupName="ans" Text="(A)" /></td>
<td style="width: 968px; height: 40px;">
<asp:Label ID="op1" runat="server" Height="40px"
Width="966px"></asp:Label></td>
<td style="width: 203px; height: 40px;">
<asp:HiddenField ID="q_id" runat="server" />
</td>
</tr>
<tr>
<td style="width: 127px; height: 40px;">
<asp:RadioButton ID="RadioButton2" runat="server"
GroupName="ans" Text="(B)" /></td>
<td style="width: 968px; height: 40px;">
<asp:Label ID="op2" runat="server" Height="40px"
Width="966px"></asp:Label></td>
<td style="width: 203px; height: 40px;">
<asp:HiddenField ID="corr_op" runat="server" />
</td>
</tr>
<tr>
<td style="width: 127px; height: 40px;">
<asp:RadioButton ID="RadioButton3" runat="server"
GroupName="ans" Text="(C)" /></td>
<td style="width: 968px; height: 40px;">
<asp:Label ID="op3" runat="server" Height="40px"
Width="966px"></asp:Label></td>
<td style="width: 203px; height: 40px;">
</td>
</tr>
43
<tr>
<td style="width: 127px; height: 40px;">
<asp:RadioButton ID="RadioButton4" runat="server"
GroupName="ans" Text="(D)" /></td>
<td style="width: 968px; height: 40px;">
<asp:Label ID="op4" runat="server" Height="40px"
Width="966px"></asp:Label></td>
<td style="width: 203px; height: 40px;">
</td>
</tr>
</table>
</asp:Panel>
7.3.4 VB Scripting
Imports system.data
Imports System.Data.SqlClient
Imports System.Data.Sql
Imports System.Data.Common
44
Dim tleft As Integer
Public Function disp() As Boolean
q_id.Value = ds.Tables(0).Rows(index).Item(0)
q_id.DataBind()
ques.Text = ds.Tables(0).Rows(index).Item(1)
ques.DataBind()
op1.Text = ds.Tables(0).Rows(index).Item(2)
op1.DataBind()
op2.Text = ds.Tables(0).Rows(index).Item(3)
op2.DataBind()
op3.Text = ds.Tables(0).Rows(index).Item(4)
op3.DataBind()
op4.Text = ds.Tables(0).Rows(index).Item(5)
op4.DataBind()
corr_op.Value = ds.Tables(0).Rows(index).Item(6)
corr_op.DataBind()
Label1.Text = index + 1
End Function
45
q_id.Value = ds.Tables(0).Rows(0).Item(0)
q_id.DataBind()
ques.Text = ds.Tables(0).Rows(0).Item(1)
ques.DataBind()
op1.Text = ds.Tables(0).Rows(0).Item(2)
op1.DataBind()
op2.Text = ds.Tables(0).Rows(0).Item(3)
op2.DataBind()
op3.Text = ds.Tables(0).Rows(0).Item(4)
op3.DataBind()
op4.Text = ds.Tables(0).Rows(0).Item(5)
op4.DataBind()
corr_op.Value = ds.Tables(0).Rows(0).Item(6)
corr_op.DataBind()
Label1.Text = index + 1
End Sub
46
Else
marks = 0
End If
Dim ds As New DataSet
Dim cs As String
ds = New DataSet("answer")
cs = "Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=oles;Data Source=CC3-123"
Dim con As SqlClient.SqlConnection = New
SqlClient.SqlConnection(cs)
Dim comm As SqlClient.SqlCommand = New SqlClient.SqlCommand()
comm.CommandType = CommandType.Text
Dim st As String = ("insert into
answer(q_id,question,roll_no,name,op1,op2,op3,op4,corr_op,user_op,marks)
values(" + q_id.Value + ",'" + ques.Text + "','" + TextBox1.Text + "','"
+ TextBox2.Text + "','" + op1.Text + "','" + op2.Text + "','" + op3.Text
+ "','" + op4.Text + "','" + corr_op.Value + "','" + ans.ToString + "',"
+ (Integer.Parse(marks)).ToString + ") ;")
comm = New SqlClient.SqlCommand(st, con)
con.Open()
'MsgBox(con.State.ToString)
comm.ExecuteNonQuery()
con.Close()
next_ques()
End Sub
47
result = MsgBox("Are you sure you want to exit",
MsgBoxStyle.YesNo, "Exit")
If (result = MsgBoxResult.Yes) Then
Response.Redirect("result.aspx?name=" + TextBox2.Text +
"&rollno=" + TextBox1.Text)
Else
End If
End Sub
End Class
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
48
</head>
<body>
<form id="form1" runat="server">
<div style="height: 1022px">
49
<br />
&
<asp:Label ID="Label6" runat="server" Font-Size="Large"
Text="Incorrect Questions"></asp:Label>
<asp:TextBox ID="txtIncorrQues" runat="server"></asp:TextBox>
<br />
<br />
&
<asp:Label ID="Label7" runat="server" Font-Size="Large"
Text="Marks"></asp:Label>
<asp:TextBox ID="txtmarks" runat="server"></asp:TextBox>
<br />
<br />
&
nbsp; &
<asp:Label ID="Label8" runat="server" Font-Size="Large"
Text="Status"></asp:Label>
<asp:TextBox ID="txtstatus" runat="server"></asp:TextBox>
<br />
<br />
<br />
<br />
<br />
&
nbsp; &
<asp:Button ID="Button1" runat="server" Height="33px" Text="Show
Result"
Width="122px" />
</div>
</form>
</body>
</html>
7.4.2 VB Scripting
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.Sql
Imports System.Data.Common
Partial Class _Default
Inherits System.Web.UI.Page
50
ds = New DataSet("answer")
cs = "Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=oles;Data Source=CC3-123"
Dim con As SqlClient.SqlConnection = New
SqlClient.SqlConnection(cs)
Dim comm As SqlClient.SqlCommand = New SqlClient.SqlCommand()
comm.CommandType = CommandType.Text
Dim st As String = ("select sum(marks) from answer where name='"
+ txtname.Text + "' and roll_no='" + txtrollno.Text + "' ;")
comm = New SqlClient.SqlCommand(st, con)
Dim dr As SqlClient.SqlDataReader
con.Open()
dr = comm.ExecuteReader()
While (dr.Read())
txtmarks.Text = dr.GetValue(0).ToString
End While
con.Close()
txttotalQues.Text = "20"
txtcorrQues.Text = txtmarks.Text
txtIncorrQues.Text = Integer.Parse(txttotalQues.Text) -
Integer.Parse(txtcorrQues.Text)
If (Integer.Parse(txtmarks.Text) >= 12) Then
txtstatus.ForeColor = Drawing.Color.Green
txtstatus.Text = "Pass"
Else
txtstatus.ForeColor = Drawing.Color.Red
txtstatus.Text = "Fail"
End If
End Sub
End Class
51
7.5 Question Entry Form for Examiner
7.5.1 HTML
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
Inherits="_Default" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
.style3
{
width: 122px;
height: 78px;
}
.style4
{
width: 1022px;
height: 78px;
}
52
.style5
{
height: 78px;
}
.style21
{
width: 122px;
height: 35px;
}
.style22
{
width: 1022px;
height: 35px;
}
.style23
{
height: 35px;
}
.style24
{
width: 122px;
height: 36px;
}
.style25
{
width: 1022px;
height: 36px;
}
.style26
{
height: 36px;
}
.style27
{
width: 122px;
height: 38px;
}
.style28
{
width: 1022px;
height: 38px;
}
.style29
{
height: 38px;
}
</style>
</head>
<body bgcolor="#c4e1ff">
<form id="form1" runat="server">
<div>
53
</asp:ImageMap>
</div>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
&
nbsp; &n
bsp;
<asp:Label ID="Label1" runat="server" Font-Bold="True"
Text="Question Id"></asp:Label>
<asp:TextBox ID="q_id" runat="server" Width="53px"></asp:TextBox>
</p>
<table style="width: 100%; height: 246px;">
<tr>
<td class="style3">
<asp:Label ID="Label2" runat="server"
Text="Question"></asp:Label>
</td>
<td class="style4">
<asp:TextBox ID="ques" runat="server" Height="80px"
Width="1020px"></asp:TextBox>
</td>
<td class="style5">
</td>
</tr>
<tr>
<td class="style21">
<asp:RadioButton ID="RadioButton1" runat="server" Font-
Bold="True" Text="(A)" />
</td>
<td class="style22" width="42px">
<asp:TextBox ID="op1" runat="server" Height="42px"
Width="1022px"></asp:TextBox>
</td>
<td class="style23">
</td>
</tr>
<tr>
<td class="style24">
<asp:RadioButton ID="RadioButton2" runat="server" Font-
Bold="True" Text="(B)" />
</td>
<td class="style25" width="42px">
<asp:TextBox ID="op2" runat="server" Height="42px"
Width="1020px"></asp:TextBox>
</td>
<td class="style26">
</td>
</tr>
<tr>
54
<td class="style27">
<asp:RadioButton ID="RadioButton3" runat="server" Font-
Bold="True" Text="(C)" />
</td>
<td class="style28" width="42px">
<asp:TextBox ID="op3" runat="server" Height="42px"
Width="1021px"></asp:TextBox>
</td>
<td class="style29">
</td>
</tr>
<tr>
<td class="style27">
<asp:RadioButton ID="RadioButton4" runat="server" Font-
Bold="True" Text="(D)" />
</td>
<td class="style28" width="42px">
<asp:TextBox ID="op4" runat="server" Height="42px"
Width="1022px"></asp:TextBox>
</td>
<td class="style29">
</td>
</tr>
</table>
<p>
</p>
<p>
&
nbsp;
<asp:Button ID="Button1" runat="server" Height="37px" Text="Submit"
Width="86px" />
</p>
</form>
</body>
</html>
7.5.2 VB Scripting
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.Sql
Imports System.Data.Common
Partial Class _Default
Inherits System.Web.UI.Page
55
ans = "c"
ElseIf (RadioButton4.Checked = True) Then
ans = "d"
End If
Dim ds As New DataSet
Dim cs As String
ds = New DataSet("question")
cs = "Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=oles;Data Source=CC3-123"
Dim con As SqlClient.SqlConnection = New
SqlClient.SqlConnection(cs)
Dim comm As SqlClient.SqlCommand = New SqlClient.SqlCommand()
comm.CommandType = CommandType.Text
Dim st As String = ("insert into question values(" + q_id.Text +
",'" + ques.Text + "','" + op1.Text + "','" + op2.Text + "','" + op3.Text
+ "','" + op4.Text + "','" + ans.ToString + "') ;")
comm = New SqlClient.SqlCommand(st, con)
con.Open()
comm.ExecuteNonQuery()
con.Close()
End Sub
End Class
56
CHAPTER 8
CONCLUSIONS
a) Result: This software generates result of the examination of all the students.
This result is very handy for our Director at the time of Valediction. He may
discuss the result in one to one basis and advice for further improvement if any.
b) Time saving approach: Time is of essence in an objective type on line test.
This software was expressly designed with that intrinsic objective in view. All
the operations are managed through click of mouse only. This saves time
appreciably.
c) Timer: The application is timed . The student gets a time limit to complete
test. When 5 minute time is left the student is alarmed about the remainig time.
When the time goes up the exam screen is closed and result is shown.
Future Enhancement
The next version will be developed with a feedback option for student and
assessment of examination using higher version of Microsoft Visual Basic and
SQL Server. Student’s performance report can be generated through graphical
representation. Negative Marking concept can be applied in result evaluation.
REFERENCES
57
Websites:
For developing this project we have taken some valuable helps from the
following websites and books:
1. www.daniweb.com
2. www.w3schools.com
3. www.wikipedia.org
4. www.draftlogic.com
Books:
1. ASP.NET 2.0 Web Programming with VB 2005
2. Build Your Own ASP.NET Website Using C# & VB.NET
58