Professional Documents
Culture Documents
SL No
Title
Page. No
Acknowledgement
Introduction
Synopsis
Software Description
12
Database Structure
15
Source Code
16
10
Screen Shots
81
11
Testing
96
12
Conclusion
97
13
Bibliography
100
INDEX
1 of 101
2 of 101
LIST OF FIGURES
FIGURE 1: Starting form of the project..
82
83
84
85
87
88
88
89
91
92
93
95
3 of 101
ACKNOWLEGDEMENT
The project Mock Online Assessment was undertaken as a part of the
syllabus of sixth Semester ________________________ of ____________________
University. The purpose of this project is to provide the student with reliable and
comfortable software through which they can for online exam and provide quick
result.
Firstly we would like to thank our principal and the management for
certifying this project and giving the opportunity to implement this project in college.
We would like to express our deepest and heart full thanks to our project cocoordinator __________________ for this excellent guidance and valuable effort
throughout the development of the project.
Our special thanks goes to Head of the Computer Dept. for providing us with
all facilities we required in the successful completion of the project.
Finally we would like to thanks our friends and other faculty members of the
computer Dept. who also supported us throughout the development of the project.
4 of 101
INTRODUCTION
The project Mock Online Assessment provides the easiest way of handling
Mock Online Assessment. This project is divided into different module means
selecting the user. There are 3 login areas for different users:
1. Administration: he has the access to the database and every report generated by the
institute. His part of job is to register and take admission of candidates like staff and
students. He can modify, delete, insert, and register. He is the super user who is
maintaining every detail each individual.
2. Staff: - staff has the permission to set questions for online exam. They are
generating report for the appeared candidates in exam. Each staff is providing with
different staffed, name and password. They can login through their own id and
password.
3. Student: - the last login area is for students. First they have to take admission in
the institute and register for online exam. Each student will provide with different
student id, name and password. Using their own id & password, they can appear for
online exam.
5 of 101
6 of 101
SYNOPSIS
module
question bank
result
staff
student
7 of 101
Software Requirements:
Hardware Requirements:
Intel Pentium 4
8 of 101
SOFTWARE DESCRIPTION
Front End:
Visual basic 6.0
Although VB.NET is gaining ground fast, VB 6 remains the most popular
programming environment in the entire history of the world! But even if it wasn't as
great as it is, it's still the best place to start learning about programming! One reason
is that the original BASIC ("Beginner's All purpose Symbolic Instruction Code") was
designed as a language to teach people how to program by Kemeny and Kurtz at
Dartmouth College w-a-a-a-y back in 1963. A lot of very talented programmers think
that VB 6 is still the best development environment.. Or perhaps you're reluctant to
pay the new, enhanced prices that Microsoft is asking for .NET software. Whatever
your reasons, it's clear that VB 6 is going to be around for a good while longer. You
can invest in learning how to be an expert programmer using VB 6 and be confident
that you're not wasting your time!]
Learning VB 6
In the 'Essentials' topic Learning Visual Basic, a program that uses one form with two
command buttons was introduced.
We're going to go through the complete steps to create this. First ... in rapid fire ... the
steps. Then ... a more complete explanation.
1. Start Visual Basic. Usually, 'Start > Programs > Microsoft Visual Studio >
Microsoft Visual Basic 6.0'. You should see a window similar to this:
9 of 101
2. Click the default "Standard EXE" icon and then click the "Open" button.
3. Drag a 'Command Button' from the 'Toolbox' to the form and drop it. Drag
another one to the form and drop it.
4. Click the first 'Command Button' to select it. Open the property window and
change the 'Name' property to 'CommandA'.
5. Select the second 'Command Button' from the drop down window at the top of
the property window and then change the 'Name' property to 'CommandB'.
6. Double click the first 'Command Button' object in the form to open the code
window for that button.
7. Enter the code, Msgbox "You clicked Button A" after the automatically
entered code Private Sub CommandA_Click()
8. Double click the second 'Command Button' object in the form to open the
code window for that button.
9. Enter the code, Msgbox "You clicked Button B" after the automatically
entered code Private Sub CommandA_Click()
10 of 101
10. Click the 'Run' button in the toolbar at the top of the VB 6 development
environment window to execute the program.
11. Click either button A or button B and observe the fruits of your labor!
11 of 101
The Enterprise Edition, which is the most complete Visual Basic edition. This
edition is targeted towards professional programmers who may work in a team and
includes additional tools such as Visual SourceSafe, a version-control system that
coordinates team programming.
Well use the Enterprise Edition in this book, so if you have either of the other two
editions, we might occasionally use something not supported in your Visual Basic
edition.
Back End:
Microsoft Access 2003:
Microsoft Access database is collection of data related to a particular
subject or purpose. Within a database, information about a particular entity,
such as an employee or order, is categorized into tables, records, and fields.
A database is a collection of information that's related to a particular subject
or purpose, such as tracking customer orders or maintaining a music collection. If
your database isn't stored on a computer, or only parts of it are, you may be tracking
information from a variety of sources that you have to coordinate and organize
yourself.
For example, suppose the phone numbers of your suppliers are stored in
various locations: in a card file containing supplier phone numbers, in product
information files in a file cabinet, and in a spreadsheet containing order information.
If a supplier's phone number changes, you might have to update that information in
all three places. In a database, however, you only have to update that information in
one place the supplier's phone number is automatically updated wherever you use it
in the database
12 of 101
13 of 101
Process
Entity
Database
Dataflow
14 of 101
A circle is used to represent a process. Both input and output are data flows. A
line with an arrow represents a data flows. The arrow shows the direction of flow
data. External entities are represented by rectangles. Entities supplying data are
known as source and those that consume data are called sinks.
Admissio
n
Registe
r
Administrator
Exam
Student
Result
Evaluatio
n
Staff
Online
examination
Administrator
student, staff
Student
module
Staff
result
15 of 101
Database Design
16 of 101
TABLES USED
Table No: 1
Table Name:
Description:
Module
Assessment
Serial No:
Field Name
Data Type
Description
Mcode
Text
Module code
Msub
Text
Mno
Number
Module number
Table No: 2
Table Name: Question bank
Description:
Serial No:
Field Name
Data Type
Description
Mcode
Text
Module code
Qno
Number
Question number
Qnm
Memo
Main question
Opt1
Memo
Option1
Opt2
Memo
Option2
Opt3
Memo
Option3
Opt4
Memo
Option4
Qans
Memo
Question answer
Qmarks
Number
Question marks
Table No: 3
17 of 101
Table Name:
Description:
Result
describes about the result of the candidates appeared for online exam
Serial No:
Field Name
Data Type
Description
Resno
Auto Number
Result no.
Stcode
Text
Student code
Stname
Text
Student name
Date
Date/Time
Date of examination
Mcode
Text
Module code
Noqatmp
Number
Noq
Number
Number of questions
Timetaken
Text
Time taken
Markobt
Number
Marks obtained
10
Marks
Number
Total marks
11
Grade
Text
grade
Table No: 4
Table Name:
Description:
Serial No:
1
2
3
4
5
6
7
8
Student
Data Type
Text
Text
Text
Number
Text
Date/time
Text
Text
Description
student code
student password
student name
registation number
gender
date of birth
email address
student address
18 of 101
9
10
Qualification
Date
Text
Date/time
student qualification
date of examination
registration
Table No: 5
Table Name:
Description:
Serial No:
1
2
3
4
5
6
7
8
9
10
Staff
Data Type
Text
Text
Text
Text
Text
Number
Text
Text
Date/time
Date/time
Description
staff code
staff member name
staff member password
staff qualification
staff gender
phone number
email address
staff communication address
date of birth
Date
19 of 101
Source Code
20 of 101
If rs.Fields(0) = id Then
If rs.EditMode = adEditNone Then
txtuid.Text = rs.Fields(0)
txtunm.Text = rs.Fields(1)
txtupw.Text = rs.Fields(2)
txtinf.Text = rs.Fields(3)
End If
Exit Do
Else
rs.MoveNext
End If
Loop
cmdsave.SetFocus
End Sub
Private Sub cmdnext_Click()
rs.MoveNext
If rs.EOF Then
rs.MoveLast
End If
display
End Sub
Private Sub cmdpre_Click()
rs.MovePrevious
If rs.BOF Then
rs.MoveFirst
End If
display
End Sub
Private Sub cmdsave_Click()
rs.Close
22 of 101
23 of 101
txtmname.Text = rs!msub
txtmno.Text = rs!mno
End Sub
QUESTION PAPER FORM
'Private Sub Form_Load()
' Text1.Text = Mid$(str(Time), 3, 2)
'end Sub
Dim CN As ADODB.Connection
Dim rs As ADODB.Recordset
Dim nm As String
Dim id As String
Dim pass As String
Dim info As String
Private Sub cmddel_Click()
rs.Delete
rs.MoveNext
If rs.EOF Then rs.MoveLast
display
End Sub
Private Sub cmdexit_Click()
MDIForm1.Show
End Sub
Private Sub cmdfirst_Click()
rs.MoveFirst
display
End Sub
24 of 101
25 of 101
26 of 101
txtopt3.Text = ""
txtopt4.Text = ""
txtqans.Text = ""
txtqmarks.Text = ""
txtmcode.SetFocus
End Sub
Private Sub Form_Activate()
Set rs = New ADODB.Recordset
rs.Open "qbank", CN, adOpenDynamic, adLockOptimistic
display
End Sub
Private Sub Form_Load()
Set CN = New ADODB.Connection
CN.Provider = "microsoft.jet.oledb.3.51"
CN.Open "D:/LOURDU/exam.mdb"
End Sub
Public Sub display()
txtmcode.Text = rs!mcode
txtqnm.Text = rs!qnm
txtqno.Text = rs!qno
txtopt1.Text = rs!opt1
txtopt2.Text = rs!opt2
txtopt3.Text = rs!opt3
txtopt4.Text = rs!opt4
txtqans.Text = rs!qans
txtqmarks.Text = rs!qmarks
End Sub
Private Sub Label10_Click()
End Sub
27 of 101
"PROVIDER=MICROSOFT.JET.OLEDB.3.51;DATA
SOURCE=D:\LOURDU\exam.mdb;"
STR = "select * from result where stcode ='" & Text1.Text & "'" & " And 'date' ='" &
Text2.Text & "'" & " And modcode = '" & Text3.Text & " '"
RS1.Open STR, CN, adOpenDynamic, adLockOptimistic
If RS1.EOF = True Then
'If IsDate(Text2) = True Then
DataEnvironment1.Command2 Text1, Text2, Text3
DataReport1.Show
'End If
Else
MsgBox "THIS INFORMATION IS NOT THERE, PLEASE ENTER CORRECT
INFORMATI0N"
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End If
'CN.Close
'DataReport6.Refresh
'DataEnvironment1.rsCommand2.Close
28 of 101
End Sub
Private Sub Command2_Click()
'Form5.Hide
'MDIForm1.Show
Unload Me
End Sub
EXAMINATION DETAILS
Dim CN As ADODB.Connection
Dim rs As ADODB.Recordset
Dim STR As String
Private Sub cmbmod_Click()
If cmbmod.Text = "" Then
MsgBox " select module name "
cmbmod.SetFocus
End If
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
txt1.Text = cmbmod.Text
STR = "select * from module where msub ='" & txt1.Text & "'"
rs.Open STR, CN, adOpenDynamic, adLockOptimistic
If rs.EOF And rs.BOF Then
MsgBox " select nodule name correctly"
End If
txtmodno.Text = rs!mcode
MAIN.modcode = rs!mcode
29 of 101
'NOQ.SetFocus
End Sub
Private Sub cmbmod_GotFocus()
StatusBar1.Panels(3).Text = "SELECT SUBJECT WHICHONE U WANT "
End Sub
Private Sub cmbmod_LostFocus()
If cmbmod.Text = "" Then
MsgBox " SELECT SUBJECT NAME "
cmbmod.SetFocus
End If
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
txt1.Text = cmbmod.Text
STR = "select * from module where msub ='" & txt1.Text & "'"
rs.Open STR, CN, adOpenDynamic, adLockOptimistic
If rs.EOF And rs.BOF Then
MsgBox " select nodule name correctly"
End If
txtmodno.Text = rs!mcode
MAIN.modcode = rs!mcode
End Sub
Private Sub cmdcon_Click()
INSTRUCTION.Show
End Sub
30 of 101
Text1.Text = "10"
MAIN.NOQ = Text1.Text
Text2.Text = "1"
MAIN.RT = Text2.Text
End Sub
Private Sub Form_Load()
Set CN = New ADODB.Connection
CN.Provider = "microsoft.jet.oledb.3.51"
CN.Open "D:/lourdu/exam.mdb"
Set rs = New ADODB.Recordset
rs.Open "module", CN, adOpenDynamic, adLockOptimistic
While rs.EOF <> True
cmbmod.AddItem rs!msub
rs.MoveNext
Wend
rs.Close
Dim mypanel As Panel
StatusBar1.Panels.clear
Set mypanel = StatusBar1.Panels.Add(1, , , sbrDate)
mypanel.AutoSize = sbrNoAutoSize
mypanel.Bevel = sbrInset
Set mypanel = StatusBar1.Panels.Add(2, , , sbrTime)
mypanel.AutoSize = sbrNoAutoSize
mypanel.Bevel = sbrInset
'mypanel.Alignment = sbrLeft
Set mypanel = StatusBar1.Panels.Add(3)
StatusBar1.Panels(3).Text = "SELECT WHICH SUBJECT U WANT TO ATTEMPT"
StatusBar1.Panels(3).AutoSize = sbrSpring
End Sub
31 of 101
32 of 101
33 of 101
34 of 101
STAFFLOGIN.Show
Unload password
Else
MsgBox ("INVALID PASSWORD DEAR...")
Text1.Text = ""
Text1.SetFocus
End If
End Sub
Private Sub Command2_Click()
If Text1.Text = "REDDY" Then
MDIForm1.Show
Else
MsgBox ("INVALID PASSWORD DEAR...")
Text1.Text = ""
Text1.SetFocus
End If
End Sub
Private Sub Form_Activate()
Text1.SetFocus
End Sub
35 of 101
"PROVIDER=MICROSOFT.JET.OLEDB.3.51;DATA
SOURCE=D:\LOURDU\exam.mdb;"
RS1.Open "select * from result where resno =" + Text1.Text, CN, adOpenDynamic,
adLockOptimistic
If RS1.EOF <> True Then
If IsNumeric(Text1) = True Then
DataEnvironment1.Command1 Text1
PRERES.Show
End If
Else
MsgBox "THIS NUMBER IS NOT THERE ,PLEASE ENTER CORRECT
NUMBER"
Text1.SetFocus
Text1.Text = ""
End If
CN.Close
PRERES.Refresh
DataEnvironment1.rsCommand1.Close
End Sub
Private Sub Command2_Click()
'Form5.Hide
'MDIForm1.Show
'Unload Me
STULOGIN.Show
36 of 101
End Sub
QUESTION PAPER FORM
Dim mark As Integer
Dim CN As ADODB.Connection
Dim rs As ADODB.Recordset
Dim RS1 As ADODB.Recordset
Dim no(50) As Integer
Dim unm, grade As String
Dim i, k, qsta As Integer
Dim modcode As String
Dim hor1, sec1, second, min1, q As Integer
Dim s2, m2, h2 As Integer
Dim res, qno1 As Integer
Dim STR, ans, qsans As String
Dim tm As Timer
Dim mar As Integer
Private Sub cmdexit_Click()
ans = MsgBox("ARE U SURE TO EXIT", vbYesNo)
If ans = vbYes Then
End
End If
End Sub
Private Sub cmdnext_Click()
qsta = qsta + 1
MAIN.qsta = qsta
mark = mark + rs!qmarks
MAIN.ma = mark
MAIN.lo = mark
37 of 101
Text1.Text = mark
If opta.Value = False And optb.Value = False And optc.Value = False And optd.Value
= False Then
MsgBox " select any answer and then click next"
Exit Sub
End If
Call checkans
If i = MAIN.NOQ Then
cmdres.SetFocus
cmdnext.Enabled = False
ans = Empty
End If
Call navi
'If i = 11 Then cmdnext.Enabled = False
End Sub
Private Sub cmdnext_GotFocus()
If opta.Value = False And optb.Value = False And optc.Value = False And optd.Value
= False Then
MsgBox " SELECT ANY ANSWER AND THEN CLICK NEXT"
End If
End Sub
Private Sub cmdres_Click()
Dim nanme As String
marks.Text = mark
'ch.Text = chk
RS1.AddNew
'unm = main.username
q = MAIN.NOQ
RS1!stname = MAIN.stname
RS1!stcode = MAIN.stcode
38 of 101
RS1!marks = Val(marks.Text)
RS1!timetaken = h6.Caption + ":" + m6.Caption + ":" + s6.Caption
RS1!Date = CDate(txtdate.Text)
RS1!modcode = txtmod.Text
'rs1!sec = second
RS1!NOQ = q
RS1!noqatmp = MAIN.qsta
RS1.Update
RS1.Requery
RESULT.Show
End Sub
39 of 101
txtmod.Text = MAIN.modcode
txtdate.Text = Date
no(0) = Int(Rnd * 25) + 1
STR = " select * from qbank where mcode ='" & Trim(txtmod.Text) & "'and qno=" &
no(0)
rs.Open STR, CN, adOpenDynamic, adLockOptimistic
RS1.Open "result", CN, adOpenDynamic, adLockOptimistic
txtqno.Text = rs!qno
lblqnm.Caption = rs!qnm
lbla.Caption = rs!opt1
lblb.Caption = rs!opt2
lblc.Caption = rs!opt3
lbld.Caption = rs!opt4
qsnas = rs!qans
qno1 = 1
s2 = 60
m2 = MAIN.RT
QUESTIONPAPER.Show
TOTQ.Caption = MAIN.NOQ
qno2.Caption = qno1
Call checkans
End Sub
40 of 101
rn = Int(Rnd * 25) + 1
For m = 0 To k
If no(m) = rn Then
GoTo lb
End If
Next m
no(0 + k) = rn
rs.Close
STR = " select * from qbank where mcode ='" & Trim(txtmod.Text) & "'and
qno=" & rn
'" slect * from qbank where mcode = '" & Trim(txtmod.Text)"' and qno = "&rn
rs.Open STR, CN, adOpenDynamic, adLockOptimistic
txtqno.Text = rs!qno
lblqnm.Caption = rs!qnm
lblqnm.Caption = rs!qnm
lbla.Caption = rs!opt1
lblb.Caption = rs!opt2
lblc.Caption = rs!opt3
lbld.Caption = rs!opt4
qsans = rs!qans
i=i+1
Exit Sub
End Sub
41 of 101
chk = chk + 1
ElseIf optc.Value = True Then
ans = "c"
chk = chk + 1
ElseIf optd.Value = True Then
ans = "d"
chk = chk + 1
End If
If ans = qsans Then
mar = mar + rs!qmarks
marks.Text = mar
MAIN.reddy = mar
Print mar
End If
opta.Value = False
optb.Value = False
optc.Value = False
optd.Value = False
End Sub
42 of 101
43 of 101
m6.Caption = min1
s6.Caption = sec1
sec.Caption = s2
If MAIN.RT = 1 Then
m2 = "00"
End If
min.Caption = m2
hor.Caption = h2
End Sub
Private Sub tmobj_Timer()
Dim t As String
If Val(min1) = MAIN.RT Then
Call cmdres_Click
End If
End Sub
DATA REPORT OF STUDENT RESULT
Dim cn1 As ADODB.Connection
Dim CN As ADODB.Connection
Dim rs As ADODB.Recordset
Dim RS1 As ADODB.Recordset
Dim STR As String
Dim str1 As String
Dim a As Integer
Private Sub cmdexit_Click()
End
End Sub
Private Sub Form_Load()
Set CN = New ADODB.Connection
44 of 101
CN.Provider = "microsoft.jet.oledb.3.51"
'cn1.Provider = "microsoft.jet.oledb.3.51"
CN.Open "D:/lourdu/exam.mdb"
Set rs = New ADODB.Recordset
'Set rs1 = New ADODB.Recordset
Text1.Text = MAIN.stcode
STR = "select * from result where stcode ='" & Text1.Text & "'"
rs.Open STR, CN, adOpenDynamic, adLockOptimistic
'rs1.Open "result", cn, adOpenDynamic, adLockOptimistic
rs.MoveLast
txtdate.Caption = rs!Date
txtunm1.Caption = MAIN.stname
txtunm2.Caption = MAIN.stname
txtuid.Caption = MAIN.stcode
txtmod.Caption = rs!modcode
'Text2.Text = main.m
'txtinfo.Caption = "a"
txttmk.Caption = MAIN.reddy
'TXTGRD.Caption = "A"
'main.gr = TXTGRD.Caption
txtt.Caption = rs!timetaken
NOQ1.Caption = rs!NOQ
'Label1.Caption = rs!sec
RESNO.Caption = rs!RESNO
'rs!grade = main.gr
'rs!marobt = main.reddy
qsta.Caption = rs!noqatmp
Label16.Caption = MAIN.lo
'rs.Update
a = ((MAIN.reddy / MAIN.ma) * 100)
If a >= 90 And a <= 100 Then
TXTGRD.Caption = "master"
45 of 101
End Sub
46 of 101
STULOGIN.Show
End If
'ElseIf
If Option2.Value = True Then
MAIN.OPT = 2
password.Show
password.Command2.Enabled = False
End If
'ElseIf
If Option3.Value = True Then
password.Command2.Enabled = True
password.Text1.SetFocus
password.Text1.Text = ""
MAIN.OPT = 3
MDIForm1.MN_FAC.Enabled = False
password.Show
password.Command1.Enabled = False
End If
End Sub
47 of 101
End Sub
Private Sub Timer1_Timer()
If Label1.Visible = True Then
Label1.Visible = False
Else
Label1.Visible = True
End If
End Sub
Private Sub Timer2_Timer()
Image1.Left = Image1.Left + x
Image1.Top = Image1.Top + y
If Image1.Left > Me.ScaleWidth Then
x = x * -1
End If
If Image1.Left < 0 Then
x = x * -1
End If
If Image1.Top > Me.ScaleHeight Then
'top Then
y = y * -1
End If
If Image1.Top < 0 Then
y = y * -1
End If
End Sub
48 of 101
49 of 101
Exit Do
Else
rs.MoveNext
End If
Loop
cmdsave.Enabled = True
cmdsave.SetFocus
cmdreg.Enabled = False
cmdexit.Enabled = False
cmdmodi.Enabled = False
'cmdexam.Enabled = False
End Sub
Private Sub cmdreg_Click()
Call clear
MsgBox "You Should Remember Userid , Userpassword "
If rs.EOF() Then
MsgBox "NO RECORDS AVAIBLE"
i=0
Else
rs.MoveLast
i = Val(Mid$(rs.Fields("staffcode"), 3, 4))
End If
i=i+1
If (i > 0) And (i <= 9) Then
s = "LE" & "000" & i
Else
If (i >= 10) And (i <= 99) Then
s = "LE" & "00" & i
Else
If (i >= 100) And (i <= 999) Then
s = "LE" & "0" & i
50 of 101
Else
End If
End If
End If
txtid = s
txtpsw.Text = ""
txtnm.Text = ""
Combo1.Text = ""
txtmail.Text = ""
txtbdate.Text = ""
'txtsex.Text = ""
Call LOURDU
txtaddress.Text = ""
txtregno.Text = ""
'txtarea.Text = ""
'Txtcity.Text = ""
'txtstate.Text = ""
txtpsw.SetFocus
rs.AddNew
cmdreg.Enabled = False
cmdexit.Enabled = False
cmdmodi.Enabled = False
cmdsave.Enabled = True
StatusBar1.Panels(3).Text = "CLICK ON SAVE BUTTON AFTER GIVING
DETAILS "
End Sub
51 of 101
rs!qualification = Combo1.Text
rs!email = txtmail.Text
rs!dob = txtbdate.Text
'rs!SEX = txtsex.Text
rs!address = txtaddress.Text
rs!phone = Val(txtregno.Text)
'rs!usarea = txtarea.Text
'rs!uscity = Txtcity.Text
'rs!usstate = txtstate.Text
rs!Date = txtdate.Text
rs.Update
MsgBox ("yes")
cmdreg.Enabled = False
cmdsave.Enabled = False
cmdmodi.Enabled = True
'cmdexam.Enabled = True
cmdexit.Enabled = True
'StatusBar1.Panels(3).Text = "YOUR ID IS CREATED "
'xy:
' MsgBox " YOUR USER-ID IS ALREADY CREATED TAKE SOME OTHER
NUMBER "
End Sub
Private Sub Form_Activate()
'CMDREG.SetFocus
cmdsave.Enabled = False
cmdmodi.Enabled = True
cmdexit.Enabled = True
cmdreg.Enabled = True
cmdreg.SetFocus
End Sub
52 of 101
53 of 101
54 of 101
55 of 101
txtnm.Text = rs!staffname
Combo1.Text = rs!qualification
txtdate.Text = rs!Date
txtbdate.Text = rs!dob
txtmail.Text = rs!email
'txtsex.Text = rs!SEX
Call reddy
txtaddress.Text = rs!address
txtregno = rs!phone
'txtarea.Text = rs!usarea
'Txtcity.Text = rs!uscity
'txtstate.Text = rs!usstate
End Sub
Public Sub clear()
txtid.Text = ""
txtpsw.Text = ""
txtnm.Text = ""
Combo1.Text = ""
txtmail.Text = ""
txtbdate.Text = ""
'txtsex.Text = ""
Call LOURDU
txtaddress.Text = ""
txtregno.Text = ""
'txtarea.Text = ""
'Txtcity.Text = ""
'txtstate.Text = ""
End Sub
56 of 101
Dim lo As Integer
If Len(txtpsw.Text) < 3 Then
lo = MsgBox("MINIMUM PASSWORD LENGTH IS 3 ", vbExclamation,
"STOP!!!")
StatusBar1.Panels(3).Text = "MINIMUM PASSWORD LENGTH IS 3"
txtpsw.SetFocus
End If
End Sub
Private Sub txtregno_KeyPress(KeyAscii As Integer)
Dim res As Integer
If Not Chr(KeyAscii) Like "#" Then
KeyAscii = 0
StatusBar1.Panels(3).Text = "ONLY NUMERIC DATA ALLOWED"
res = MsgBox("ONLY NUMERIC DATA ALLOWED", vbInformation)
End If
End Sub
Private Sub txtregno_LostFocus()
Dim lo As Integer
If Len(txtregno.Text) <> 6 Then
StatusBar1.Panels(3).Text = "PHONE NUMBER MUST BE 6 INTEGERS"
lo = MsgBox("PHONE NUMBER MUST BE 6 INTEGERS", vbExclamation,
"STOP!!!")
txtregno.SetFocus
End If
End Sub
57 of 101
Option2.Value = False
End Sub
Public Sub reddy()
If rs!sex = "MALE" Then
Option1.Value = True
Else
Option2.Value = True
End If
End Sub
STAFF LOGIN FORM
Dim a As Variant
Dim STR As String
Dim CN As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub cmdcon_Click()
If txtpsw.Text = "" Then
MsgBox " enter password"
txtpsw.SetFocus
Exit Sub
End If
STR = " SELECT * from staff where staffcode ='" & txtid.Text & "'" & " And
staffpsw = '" & txtpsw.Text & "'"
rs.Open STR, CN, adOpenDynamic, adLockOptimistic
If rs.EOF And rs.BOF Then
MsgBox " ENTER THE DATA CORRECTLY "
rs.Close
txtid.SetFocus
txtid.Text = ""
txtnm.Text = ""
58 of 101
txtpsw.Text = ""
Exit Sub
Else
MAIN.staffcode = txtid.Text
MAIN.staffname = txtnm.Text
If MAIN.OPT = 3 Then
MDIForm1.MN_FAC.Enabled = False
'MDIForm1.MN_EXAM.Enabled = False
MDIForm1.MN_REPO.Enabled = False
MDIForm1.Show
ElseIf MAIN.OPT = 2 Then
MDIForm1.MN_ADMIN.Enabled = False
'MDIForm1.MN_EXAM.Enabled = False
MDIForm1.Show
ElseIf MAIN.OPT = 1 Then
cmdcre.Enabled = True
MODULE.Show
End If
End If
End Sub
Private Sub cmdcre_Click()
STAFF.Show
End Sub
59 of 101
60 of 101
Label5.Move a
a = a + 100
If a = 12000 Then
a = 100
End If
End Sub
LOADING FORM
Dim L%
Dim status As Boolean
Private Sub Form_DblClick()
Unload Me
Database.Show
End Sub
Private Sub Form_Load()
STARTFORM.WindowState = 2
L=0
Label1.Left = L
status = True
ProgressBar2.Visible = False
Label3.Visible = False
End Sub
Private Sub Timer1_Timer()
Static i As Integer
If status Then
L = L + 150
If Label1.Left + Label1.Width > STARTFORM.Width Then
status = False
End If
61 of 101
Else
L = L - 150
If Label1.Left < 0 Then
status = True
End If
End If
Label1.Left = L
i=i+1
If i Mod 1 = 0 Then
Label1.Enabled = Not Label1.Enabled
End If
End Sub
Private Sub Timer2_Timer()
'Unload Me
'Database.Visible = True
ProgressBar2.Visible = True
Label3.Visible = True
If ProgressBar2.Value = 6 Then
'frmmain.Hide
Unload Me
SELECTUSER.Show
Else
ProgressBar2.Value = ProgressBar2.Value + 1
End If
End Sub
62 of 101
Dim rs As ADODB.Recordset
Dim nm As String
Dim id As String
Dim pass As String
Dim info As String
63 of 101
Dim id As String
id = InputBox("Enter the user id", "modification")
rs.MoveFirst
Do While rs.EOF = False
If UCase(id) = UCase(rs!stcode) Then
If rs.EditMode = adEditNone Then
txtid.Text = rs!stcode
txtpsw.Text = rs!stpsw
txtnm.Text = rs!stname
Combo1.Text = rs!qualification
txtdate.Text = Format(rs!Date, "MM/DD/YYYY")
txtbdate.Text = Format(rs!dob, "MM/DD/YYYY")
txtsex.Text = rs!sex
txtmail.Text = rs!email
txtaddress.Text = rs!address
txtregno.Text = rs!registerno
End If
Exit Do
Else
rs.MoveNext
End If
Loop
'cmdsave.Enabled = True
'cmdsave.SetFocus
'cmdreg.Enabled = False
'cmdexit.Enabled = False
'cmdmodi.Enabled = False
'cmdexam.Enabled = False
End Sub
64 of 101
65 of 101
'xy:
' MsgBox " YOUR USER-ID IS ALREADY CREATED TAKE SOME OTHER
NUMBER "
End Sub
Private Sub cmdadd_Click()
Call clear
MsgBox "You Should Remember studentcode and student password "
If rs.EOF() Then
MsgBox "NO RECORDS AVAIBLE"
i=0
Else
rs.MoveLast
i = Val(Mid$(rs.Fields("stcode"), 3, 4))
End If
i=i+1
If (i > 0) And (i <= 9) Then
s = "ST" & "000" & i
Else
If (i >= 10) And (i <= 99) Then
s = "ST" & "00" & i
Else
If (i >= 100) And (i <= 999) Then
s = "ST" & "0" & i
Else
End If
End If
End If
txtid = s
txtpsw.Text = ""
txtnm.Text = ""
66 of 101
Combo1.Text = ""
txtmail.Text = ""
txtbdate.Text = ""
txtsex.Text = ""
txtaddress.Text = ""
txtregno = ""
txtpsw.SetFocus
rs.AddNew
cmdexit.Enabled = False
cmdmodi.Enabled = False
cmdsave.Enabled = True
'StatusBar1.Panels(3).Text = "CLICK ON SAVE BUTTON AFTER DETAILS "
End Sub
Private Sub Form_Activate()
cmdsave.Enabled = False
cmdmodi.Enabled = True
cmdexit.Enabled = True
cmdadd.Enabled = True
cmdadd.SetFocus
End Sub
Private Sub Form_Load()
Set CN = New ADODB.Connection
CN.Provider = "microsoft.jet.oledb.3.51"
CN.Open "D:/lourdu/exam.mdb"
Set rs = New ADODB.Recordset
rs.Open "student", CN, adOpenDynamic, adLockOptimistic
txtdate = Date$
'display
End Sub
67 of 101
68 of 101
69 of 101
Exit Do
Else
rs.MoveNext
End If
Loop
cmdsave.Enabled = True
cmdsave.SetFocus
cmdreg.Enabled = False
cmdexit.Enabled = False
cmdmodi.Enabled = False
cmdexam.Enabled = False
End Sub
Private Sub cmdreg_Click()
Call clear
MsgBox
"YOU
SHOULD
REMEMBER
STUDENTCODE,
STUDENT
PASSWORD"
If rs.EOF() Then
MsgBox "NO RECORDS AVAIBLE"
i=0
Else
rs.MoveLast
i = Val(Mid$(rs.Fields("stcode"), 3, 4))
End If
i=i+1
If (i > 0) And (i <= 9) Then
s = "ST" & "000" & i
Else
If (i >= 10) And (i <= 99) Then
s = "ST" & "00" & i
Else
If (i >= 100) And (i <= 999) Then
70 of 101
71 of 101
rs!stname = txtnm.Text
rs!qualification = Combo1.Text
rs!email = txtmail.Text
rs!dob = txtbdate.Text
'rs!SEX = txtsex.Text
rs!address = txtaddress.Text
rs!phone = Val(txtregno.Text)
'rs!usarea = txtarea.Text
'rs!uscity = Txtcity.Text
'rs!usstate = txtstate.Text
rs!Date = txtdate.Text
rs.Update
MsgBox ("yes")
cmdreg.Enabled = False
cmdsave.Enabled = False
cmdmodi.Enabled = True
cmdexam.Enabled = True
cmdexit.Enabled = True
'StatusBar1.Panels(3).Text = "YOUR ID IS CREATED "
'xy:
' MsgBox " YOUR USER-ID IS ALREADY CREATED TAKE SOME OTHER
NUMBER "
End Sub
Private Sub Form_Activate()
'CMDREG.SetFocus
cmdsave.Enabled = False
cmdmodi.Enabled = True
cmdexam.Enabled = False
cmdexit.Enabled = True
cmdreg.Enabled = True
cmdreg.SetFocus
72 of 101
End Sub
Private Sub Form_Load()
Set con = New ADODB.Connection
con.Provider = "microsoft.jet.oledb.3.51"
con.Open "D:/lourdu/exam.mdb"
Set rs = New ADODB.Recordset
txtdate.Text = Date$
'Text1.Text = Time$
rs.Open "student", con, adOpenDynamic, adLockPessimistic
Dim mypanel As Panel
StatusBar1.Panels.clear
Set mypanel = StatusBar1.Panels.Add(1, , , sbrDate)
mypanel.AutoSize = sbrNoAutoSize
mypanel.Bevel = sbrInset
Set mypanel = StatusBar1.Panels.Add(1, , , sbrTime)
mypanel.AutoSize = sbrNoAutoSize
mypanel.Bevel = sbrInset
mypanel.Alignment = sbrLeft
Set mypanel = StatusBar1.Panels.Add(3)
StatusBar1.Panels(3).Text = "WELCOME TO ONLINE EXAM
StatusBar1.Panels(3).AutoSize = sbrSpring
'rs.Close
End Sub
'Private Sub txtnm_Change()
'KeyAscii = Asc(UCase(Chr(KeyAscii)))
'If KeyAscii = 32 Then Exit Sub
' If IsNumeric(Chr(KeyAscii)) Or _
' (KeyAscii >= 33 And KeyAscii <= 64) Or _
' (KeyAscii >= 91 And KeyAscii <= 96) Or _
' (KeyAscii >= 123 And KeyAscii <= 126) Then
73 of 101
' KeyAscii = 0
' statusBar1.Panels(3).Text = "user name should be charecter"
'End If
'End Sub
74 of 101
txtpsw.SetFocus
End If
End Sub
Private Sub txtnm_KeyPress(KeyAscii As Integer)
Dim klr As Integer
If Not Chr(KeyAscii) Like "[A-Z]" Then
KeyAscii = 0
StatusBar1.Panels(3).Text = "ONLY ALPHABETS ALLOWED"
klr = MsgBox(" ONLY ALPHABETS ALLOWED", vbInformation, "LOGIC
INFOTECH")
End If
End Sub
Private Sub txtnm_LostFocus()
KeyAscii = Asc(UCase(Chr(KeyAscii)))
If KeyAscii = 32 Then Exit Sub
If IsNumeric(Chr(KeyAscii)) Or _
(KeyAscii >= 33 And KeyAscii <= 64) Or _
(KeyAscii >= 91 And KeyAscii <= 96) Or _
(KeyAscii >= 123 And KeyAscii <= 126) Then
KeyAscii = 0
MsgBox ("INCORRECT DATA")
StatusBar1.Panels(3).Text = "user name should be charecter"
End If
End Sub
Private Sub Timer1_Timer()
Text1.Text = Time$
End Sub
Public Sub sho()
txtid.Text = rs!stcode
75 of 101
txtpsw.Text = rs!stpsw
txtnm.Text = rs!stname
Combo1.Text = rs!qualification
txtdate.Text = Format(rs!Date, "MM/DD/YYYY")
txtbdate.Text = Format(rs!dob, "MM/DD/YYYY")
txtmail.Text = rs!email
'txtsex.Text = rs!SEX
Call OP
txtaddress.Text = rs!address
txtregno = rs!phone
'txtarea.Text = rs!usarea
'Txtcity.Text = rs!uscity
'txtstate.Text = rs!usstate
End Sub
Public Sub clear()
txtid.Text = ""
txtpsw.Text = ""
txtnm.Text = ""
Combo1.Text = ""
txtmail.Text = ""
txtbdate.Text = ""
Call lo
'txtsex.Text = ""
txtaddress.Text = ""
txtregno.Text = ""
End Sub
76 of 101
77 of 101
Option2.Value = True
End If
End Sub
Public Sub lo()
Option1.Value = False
Option2.Value = False
End Sub
78 of 101
txtpsw.Text = ""
Exit Sub
Else
MAIN.stcode = txtid.Text
MAIN.stname = txtnm.Text
If MAIN.OPT = 3 Then
MDIForm1.MN_FAC.Enabled = False
' MDIForm1.MN_EXAM.Enabled = False
MDIForm1.MN_REPO.Enabled = False
MDIForm1.Show
ElseIf MAIN.OPT = 2 Then
MDIForm1.MN_ADMIN.Enabled = False
'MDIForm1.MN_EXAM.Enabled = False
MDIForm1.Show
ElseIf MAIN.OPT = 1 Then
cmdcre.Enabled = True
'MODULE.Show
LOMOD.Show
End If
End If
End Sub
Private Sub cmdcre_Click()
STUDENT.Show
End Sub
79 of 101
80 of 101
End Sub
81 of 101
Snap-Shot
FIGURE 1:
STARTING FORM OF THE PROJECT
82 of 101
FIGURE 2:
LOADING FORM OF THE PROJECT
ONLINE EXAM
83 of 101
FIGURE 3:
SELECTING THE USER FORM
84 of 101
FIGURE 4:
STUDENT LOGIN FORM FOR ENTERING ON LINE EXAM
FIGURE 5:
EXAMINATION DETAILS
86 of 101
FIGURE 6:
FORM TO REVIEW EXAM DETAILS
87 of 101
FIGURE 7:
MDI FORM
88 of 101
FIGURE 8:
LOGIN FORM FOR ADMINISTRATOR AND STAFF
FIGURE 9:
QUESTION PAPER FORM
89 of 101
FIGURE 10:
REPORT OF THE STUDENT RESULT
90 of 101
FIGURE 11:
FORM TO VIEW THE STUDENT RESULT
91 of 101
FIGURE 12:
DATA REPORT OF THE STUDENT RESULT
92 of 101
FIGURE 13:
STUDENT REGISTRATION FORM
93 of 101
94 of 101
95 of 101
FIGURE 14:
STUDENT DETAILS FORM
96 of 101
Testing
97 of 101
TESTING
The common overview of testing held by users is that it is performed to prove
that there are no errors in a program. This is extremely difficult since designer cannot
prove to be one hundred percent accurate. Therefore, the most useful and practical
approach is with understanding that testing is the process of executing a program with
explicit intention of finding errors that make the program fail.
Testing has its own cycle. The testing process begins with the product
requirements phase and from there parallels the entire development process. In other
words, for each phase of the development process there is an important testing
activity. Successful testing requires a methodical approach. It requires focusing on
basic critical factors:
Planning
Risk management
Inspections
Measurement tools
Test plan:
Before going for testing, first we have to decide upon the type of testing to be carried
out. The following factors are taken into considerations:
To find out whether the local data structures maintains its integrity
during all steps in an algorithm execution.
98 of 101
To find out whether error handling paths are working correctly or not
Unit Testing: Unit or module testing is the process of testing the individual
components (subprograms or procedures) of a program. The purpose is to discover
discrepancies between the modules interface specification and its actual behavior.
Integration testing
Integration testing is the process of combining and testing multiple
components together. The primary objective of integration testing is to discover errors
in the interfaces between the components. In our system each of the modules
mentioned above are tested for checking the integration between them, after each of
them are tested individually.
99 of 101
CONCLUSION
The project entitled Mock Online Assessment has been successfully
developed and implemented. The testing was carried out by dividing the project into
different modules.
The purpose of this project was easily solved by providing software that could
provide the facility to the students to interact with the software and can appear for
online exam and get instant result within seconds. These projects interact with
different users such as administrator where he is responsible for database records.
Staff is responsible for preparing question and evaluating the result.
100 of 101
Bibliography
Visual basic 6.0 Black Book: The Programmer's Complete Reference Book
By Steven Holzner
102 of 101