The United Kingdom Awarding Body (UKAB) has asked me to design a system for the monitoring of its post-examinations re-marks.
Introduction
The United Kingdom Awarding Body (UKAB) has asked me to design a system for the monitoring of its post-examinations re-marks.
If a centre feels that the grade awarded to a candidate for an examination is lower than expected, the centre can ask for that script to be remarked. The UKAB expects all this to be completed within three weeks.
All the details must be stored for the purpose of analysis and monitoring
File Design
External file name: Re-Mark.dat
General name: Re-mark
Description: Stores details of all current candidates
Record structure
Field name
Field description
Data type
No. bytes
CandName
Candidate's Name
String
6
CandNo
Candidate's Number
String
4
CenterNo
Centre Number
String
5
DateSub
Date of the exam paper submitted
Date
0
SubRef
Subject Reference Code
String
5
OrgMr
Original Mark
Integer
2
OrgGr
Original Grade
String
2
PaperRt
Paper to be returned?
String
3
RemarkedMr
Remarked Mark
Integer
2
RemarkedGr
Remarked Grade
String
2
DateRt
Date of paper when returned
Date
0
Record size 61 bytes
Typical size of file 1 record per script. With 15 scripts= 990 bytes
Data Flow Diagram
Data Requirements
Data to be input:
The following details will be stored for the re-marks:
* Candidate name
* Candidate number
* Centre number
* Subject reference code
* Original mark
* Re-mark
* Centre requested script
* Date paper submitted
* Date paper re-marked
* Grade affected by remark
For a subject the following will be stored:
* Subject Reference Code
* Grade boundaries for grades A-E and U
* Date for the request of the re-mark
Data to be output:
Print out of all candidates remarks details
Print out of all specific centre number
Print out of all specific subject reference code
Print out of all re-marks that have not been returned in a three week period
Print out of all re-marks were the grade have been affected
Analysis of software
I have decided that there are four possible roots which I can follow to complete this project:
* Database
* Spreadsheet
* Bespoke programming
* Website
I will next analyse the pros and cons of each method of completing this task.
* Database:
A database is a very easy way, for a relatively low trained user, to enter data. Once the database has been set up the user can easily input data into the relevant fields. The database creator can create simple methods of data entry, such as Boolean fields, which makes the data entry more effective and reduces the risk of incorrectly entered data. A new record for each customer would be a simple and practical method that could be implemented. This would also provide the basis for a report, which could be more easily created on a database than on a spreadsheet. Data validation is easily implemented on the database package, with different types of validation, such as currency, Boolean, more than, less than, etc. The presentation of the data is more than adequate on a database.
Statistical analysis and mathematical functions are impossible to undertake on a database, details would need to imported and exported between a database and a spreadsheet. This means that if a database were to be used it would have to be used in conjunction with a spreadsheet package; therefore it seems slightly pointless to use a database, because a comprehensive spreadsheet package could do all the functions to complete this task.
* Spreadsheet:
Setting-up a spreadsheet can be undertaken with relative ease. The clear advantage spreadsheets have over and above the other options is the ease of entering mathematical formula and the ease with which numbers can be processed. Unlike the other packages in which data must be exported and imported through different packages, the spreadsheet is capable of completing all aspects of the task. Within the spreadsheet package there is also the opportunity to link sheets, which in this task will prove essential.
Validating data in a spreadsheet is a very simple operation, once a cell has been chosen Validation can be selected from the Data menu. Different types of validation can then be performed on the cells contents. The presentation of the data can be arranged well and easily. Using buttons with macros can make printing and saving operational from the actual spreadsheet page, rather than the user having to use menus.
When the form of the spreadsheet has to be designed it is harder to accomplish what you want, the cells must be stretched or shrunk, unlike a database in which the form can be specified very easily.
* Bespoke program:
The layout, style, form and function of a bespoke program could be tailored exactly to the user's requirements. The program would allow the least computer literate person to use the program; this is because that with enough programming the program created would have the complex workings hidden under a user-friendly face.
Out of all the possible options a well-designed bespoke program would work most successfully. But to gain this high level success a vast amount of time would have to be spent creating the program. Updating the program by a relatively low trained employee would be comparably harder than with the other options. It is the limiting factor of time that will prevent me from using a program over and above the other methods; the feasibility of the program is not very high.
* Website:
With a web site it would be easy to make the user interface and the structure for the application, with very positive results. But when a website is used no mathematical formulae can be entered. All formulae would have to be entered via the spreadsheet and then imported to the website.
It seems unnecessary to use a website because I could very easily cut out the "middle-man" and use the spreadsheet instead, since it has the capabilities to link pages very easily as well.
Form Design
Report Design
Data Validation & Integrity
There are a number of checks that I will carry out to ensure that data are correct whilst entering the data in the system. I will consider that information is available to the system at the point of data entry before validation method.
The following validation that I will include is:
Field
Form
Validation check
Candidate Number
Candidate
. Length 4 digits
2. Type check (must be in digits not characters)
Candidate Name
Candidate
. Presence check (Must not be blank)
2. Type check (must be in characters not digits)
Centre Number
Candidate
. Length 5 digits
2. Type check (must be in digits not characters)
3. Range with in 10000 - 80000
Subject Reference Code
Candidate
. 5 Digits
...
This is a preview of the whole essay
The following validation that I will include is:
Field
Form
Validation check
Candidate Number
Candidate
. Length 4 digits
2. Type check (must be in digits not characters)
Candidate Name
Candidate
. Presence check (Must not be blank)
2. Type check (must be in characters not digits)
Centre Number
Candidate
. Length 5 digits
2. Type check (must be in digits not characters)
3. Range with in 10000 - 80000
Subject Reference Code
Candidate
. 5 Digits
2. Type check (must be in digits not characters)
Original Mark
Input
. Numerical check
2. Range with in 0 - 100 (Total mark)
Original Grade
Input
. Length 1 character
2. Type check (must be in characters not digits)
3. Must be A,B,C,D,E,U
Remarked Mark
Output
. Numerical check
2. Range with in 0 - 100 (Total mark)
Remarked Grade
Output
. Length 1 character
2. Type check (must be in characters not digits)
3. Must be A,B,C,D,E,U
Return of Script?
Input
. Presence check
Re-marked?
. Presence check
Date Of requested
Input
. Numerical check
Integrity
Errors will be detected as easily as possible to minimise the time and effort needed to rectify the adverse effect. A number of validations can be used as said above
The data held in a computer system may become incorrect, corrupted or of 'poor quality' in many different ways and at many stages data processing
* Errors on import- data that is keyed in wrongly transcribed. A batch of transaction data could go astray, or keyed in twice by mistake
* Errors in operating procedure- an update program could for example be run in twice in error and quantities on a master file would then be updated twice
* Program errors- these could lead to corruption of files, a new system may have errors in it that will not surface for the same time or errors may be introduced during program maintenance.
* Viruses- files can be corrupted or deleted if a disk becomes infected with a virus
* Transmission errors- interfaces or noise in a communication link may cause bits to be wrongly received
Data Security
I will maintain data security by keeping data safe from the various hazards to which in may be subjected. These include:
* Natural hazards such as fire, floods or hurricanes
* Deliberate corruption or destruction of data by malicious or terrorists acts
* Illegal access to 'hackers'
* Accidental destruction by hardware failure or program or operator error
Passwords
Passwords will be applied to computer systems so that users cannot access the data unless they know the password. Password can also be applied to individual files so that hierarchy of passwords may exist. Password will be changed regularly in case they become generally known.
Backups
I will make it possible to back up a file by creating another copy, typically on a magnetic tape. This version can be copied again so that three copies are in existence. One of these will be taken to another location or placed in a fireproof safe as a protection against fire.
System Design
When I am design the system I will take into account the hardware and software that are available. I will design the human-computer interface in such a way that the user will find in straight away to use.
Documentation
The documentation is appropriate to the design feature that is being described.
* System flowcharts- these describe the flow of the data around the system
* Entity relationship diagrams- these show the design of a data model
* Structure diagrams- these are means of showing the design of a program or system. They consist of charts showing the system or programs broken down into a number of levels.
* Hierarchy charts- these are used to show a menu hierarchy or a directory hierarchy
Human-computer interface (HCI)
The HCI will be designed carefully with the following number of options available:
* Keyboard input that may involve a command language
* WIMP environment
* Direct manipulation, embed the system within a device
A command line interface using a keyboard is appropriate, but often a WIMP interface is appropriate. In this case a WIMP environment it is important that standards are adhered to so that the user can be confident of consistency between different screens.
Test Data
Testing the system, the data issued with the specification can now be tested to see if the system works properly, the details of these are below:
Candidate Number
Candidate Name
Centre Number
Date Paper Submitted
Subject Reference Code
Original Mark
Original Grade
Paper to be returned
Remarked Mark
Remarked Grade
Grade affected by re-mark
Date Paper returned
2345
Ibrahim Ali
2367
08/07/2003
01325
70
B
Yes
70
B
No
30/07/2003
3655
Akhbab Hussein
56894
4/07/2003
20094
63
B
No
65
B
Yes
28/07/2003
589
Mohammed Ali
68935
8/07/2003
28181
59
D
No
60
D
Yes
28/07/2003
5698
Shamim Miah
2367
08/07/2003
20094
78
A
Yes
78
A
No
30/07/2003
3569
Rana Miah
56894
8/07/2003
28181
66
D
Yes
67
C
Yes
28/07/2003
6983
Soroj Khan
68935
4/07/2003
01325
53
E
No
53
E
No
28/07/2003
6985
Craig Boyce
56984
4/07/2003
54821
65
D
Yes
67
D
Yes
8/07/2003
2356
Alan Crosby
56894
4/07/2003
54821
67
D
No
67
D
No
8/07/2003
225
Alan Hugs
2367
8/07/2003
28181
75
C
No
76
C
Yes
9/07/2003
6598
William Brown
56984
4/07/2003
01325
75
B
No
75
B
No
28/07/2003
5622
Samuel Jones
56894
8/07/2003
28181
63
D
Yes
65
D
Yes
28/07/2003
6556
Benjamin fowler
2367
08/07/2003
20094
56
C
Yes
56
C
No
28/07/2003
5465
Michael Gray
2367
08/07/2003
01325
50
E
No
52
E
Yes
3007/2003
4566
Andy Trotter
56894
4/07/2003
64773
69
A
Yes
70
A
Yes
4/08/2003
4567
Shaun Carl
56894
4/07/2003
64773
80
A
Yes
80
A
No
4/08/2003
Screen Dumps of the Program
Program Listings
Option Explicit
Private Type CandidateType
CandNo As String * 4
CandName As String * 15
CentreNo As String * 5
DateSub As Date
SubRef As String * 5
OrgMr As Integer
OrgGr As String * 1
PaperRt As String * 3
RemarkedMr As Integer
RemarkedGr As String * 1
GradeAff As String * 3
DateRt As Date
End Type
Dim CandidateFile As String
Dim GradeBoundary(1 To 5, 1 To 5) As Integer
.................................................................................................
Private Sub cboCandNo_Click()
Dim Candidate As CandidateType
Dim SearchCandNo As String * 4
Dim Found As Boolean
Found = False
SearchCandNo = cboCandNo.Text
Open CandidateFile For Random As #1 Len = Len(Candidate)
Do While Not EOF(1) And Not Found
Get #1, , Candidate
If Candidate.CandNo = SearchCandNo Then
Found = True
End If
Loop
Close #1
If Found Then
txtCandName.Text = Candidate.CandName
txtCandNo.Text = Candidate.CandNo
txtCentreNo.Text = Candidate.CentreNo
txtDateSub.Text = Candidate.DateSub
cboSubRef1.Text = Candidate.SubRef
txtOrgMr.Text = Candidate.OrgMr
lblOrgGr = Candidate.OrgGr
cboPaperRt.Text = Candidate.PaperRt
txtRemarkedMr.Text = Candidate.RemarkedMr
lblRemarkedGr = Candidate.RemarkedGr
cboGradeAff.Text = Candidate.GradeAff
txtDateRt.Text = Candidate.DateRt
End If
End Sub
.................................................................................................
Private Sub cboCandName_Click()
Dim Candidate As CandidateType
Dim SearchCandName As String * 15
Dim Found As Boolean
Found = False
SearchCandName = cboCandName.Text
Open CandidateFile For Random As #1 Len = Len(Candidate)
Do While Not EOF(1) And Not Found
Get #1, , Candidate
If Candidate.CandName = SearchCandName Then
Found = True
End If
Loop
Close #1
If Found Then
txtCandName.Text = Candidate.CandName
txtCandNo.Text = Candidate.CandNo
txtCentreNo.Text = Candidate.CentreNo
txtDateSub.Text = Candidate.DateSub
cboSubRef1.Text = Candidate.SubRef
txtOrgMr.Text = Candidate.OrgMr
lblOrgGr = Candidate.OrgGr
cboPaperRt.Text = Candidate.PaperRt
txtRemarkedMr.Text = Candidate.RemarkedMr
lblRemarkedGr = Candidate.RemarkedGr
cboGradeAff.Text = Candidate.GradeAff
txtDateRt.Text = Candidate.DateRt
End If
End Sub
.................................................................................................
Private Sub cboSubRef_Click()
Dim Candidate As CandidateType
Dim SearchSubRef As String * 5
SearchSubRef = cboSubRef.Text
Open CandidateFile For Random As #1 Len = Len(Candidate)
lstCandidates.Clear
Do While Not EOF(1)
Get #1, , Candidate
If Candidate.SubRef = SearchSubRef Then
With Candidate
lstCandidates.AddItem .CandNo & " " & .CandName & " " & .CentreNo & " " & .DateSub & " " & .SubRef & " " & .OrgGr & " " & .OrgMr & " " & .PaperRt & " " & .RemarkedMr & " " & .RemarkedGr & " " & .GradeAff & " " & .DateRt
End With
End If
Loop
Close #1
lblHeading.Caption = "Candidates with subject refrence code " & SearchSubRef
End Sub
.................................................................................................
Private Sub cboCentreNo_Click()
Dim Candidate As CandidateType
Dim SearchCentreNo As String * 5
SearchCentreNo = cboCentreNo.Text
Open CandidateFile For Random As #1 Len = Len(Candidate)
lstCandidates.Clear
Do While Not EOF(1)
Get #1, , Candidate
If Candidate.CentreNo = SearchCentreNo Then
With Candidate
lstCandidates.AddItem .CandNo & " " & .CandName & " " & .CentreNo & " " & .DateSub & " " & .SubRef & " " & .OrgGr & " " & .OrgMr & " " & .PaperRt & " " & .RemarkedMr & " " & .RemarkedGr & " " & .GradeAff & " " & .DateRt
End With
End If
Loop
Close #1
lblHeading.Caption = "Candidates of centre number " & SearchCentreNo
End Sub
.................................................................................................
Private Sub cmdClear_Click()
lstCandidates.Clear
End Sub
Private Sub cmdDelete_Click()
Dim GoAhead As Boolean
Dim Candidate As CandidateType
Dim noofrecords As Integer
Dim Counter As Integer
Dim ToBeDeleted As String * 4
ToBeDeleted = txtCandNo.Text
If ToBeDeleted = "" Then
MsgBox "Please select a Candidate"
Else
GoAhead = MsgBox("Are you sure you want to delete " & txtCandName.Text & "?", vbYesNo)
If GoAhead Then
Open CandidateFile For Random As #1 Len = Len(Candidate)
Open "NewStu.dat" For Random As #2 Len = Len(Candidate)
noofrecords = LOF(1) / Len(Candidate)
For Counter = 1 To noofrecords
Get #1, , Candidate
If Candidate.CandNo <> ToBeDeleted Then
Put #2, , Candidate
End If
Next Counter
Close #1
Close #2
Kill CandidateFile
Name "NewStu.dat" As CandidateFile
Call FillComboBoxes
Call RefreshDisplay
End If
End If
End Sub
.................................................................................................
Private Sub cmdDisplayFile_Click()
Call RefreshDisplay
End Sub
.................................................................................................
Private Sub cmdEnter1_Click()
Dim Candidate As CandidateType
Dim Found As Boolean
If ValidData Then
Open CandidateFile For Random As #1 Len = Len(Candidate)
Do While Not EOF(1) And Not Found
Get #1, , Candidate
If Candidate.CandNo = txtCandNo.Text Then
Found = True
End If
Loop
Candidate.CandNo = txtCandNo.Text
Candidate.CandName = txtCandName.Text
Candidate.CentreNo = txtCentreNo.Text
Candidate.DateSub = txtDateSub.Text
Candidate.SubRef = cboSubRef1.Text
Candidate.OrgMr = txtOrgMr.Text
Candidate.OrgGr = lblOrgGr
Candidate.PaperRt = cboPaperRt.Text
Candidate.RemarkedMr = txtRemarkedMr.Text
Candidate.RemarkedGr = lblRemarkedGr
Candidate.GradeAff = cboGradeAff.Text
Candidate.DateRt = txtDateRt.Text
Put #1, Loc(1), Candidate
Close #1
Call RefreshDisplay
Call FillComboBoxes
End If
End Sub
.................................................................................................
Private Sub cmdExit_Click()
End
End Sub
.................................................................................................
Private Sub cmdPrintGradeAff_Click()
Dim Candidate As CandidateType
Dim GradeAfftoPrint As String * 5
Dim noofrecords As Integer
Dim count As Integer
Printer.Print "List of Re-marks were the grade have been affected"
Printer.Print
Printer.Print
Printer.Print " Candiate Candidate Subject Original Original Re-mark Re-mark"
Printer.Print " number. name. ref code. mark. grade mark grade"
Printer.Print
Open CandidateFile For Random As #1 Len = Len(Candidate)
noofrecords = LOF(1) / Len(Candidate)
For count = 1 To noofrecords
Get #1, , Candidate
With Candidate
If .RemarkedGr <> .OrgGr And .RemarkedMr <> "0" Then
Printer.Print .CandNo; Tab(12); .CandName; Tab(22); .SubRef; Tab(32); .OrgMr; Tab(43); .OrgGr; Tab(51); .RemarkedMr; Tab(62); .RemarkedGr
End If
End With
Next count
Close #1
End Sub
..................................................................................................
Private Sub cmdPrintInfoForm_Click()
If ValidData Then
frmDetails.lblCandNo = txtCandNo.Text
frmDetails.lblCandName = txtCandName.Text
frmDetails.lblCentreNo = txtCentreNo.Text
frmDetails.lblDateSub = txtDateSub.Text
frmDetails.lblSubRef = cboSubRef1.Text
frmDetails.lblOrgMr = txtOrgMr.Text
frmDetails.lblOrgGr = lblOrgGr
frmDetails.lblPaperRt = cboPaperRt
frmDetails.lblRemarkedMr = txtRemarkedMr
frmDetails.lblRemarkedGr = lblRemarkedGr
frmDetails.lblGradeAff = cboGradeAff
frmDetails.lblDateRt = txtDateRt
frmDetails.PrintForm
End If
End Sub
..................................................................................................
Private Sub cmdCentreNoList_Click()
Dim Candidate As CandidateType
Dim CentreNotoPrint As String * 5
If cboCentreNo <> "" Then
CentreNotoPrint = cboCentreNo.Text
Open CandidateFile For Random As #1 Len = Len(Candidate)
Printer.Print "Candidates in Centre Number " & CentreNotoPrint
Printer.Print
Printer.Print "Candidate Number Candidate Name"
Printer.Print
Do While Not EOF(1)
Get #1, , Candidate
If Candidate.CentreNo = CentreNotoPrint Then
With Candidate
Printer.Print .CandNo; Tab(15); .CandName
End With
End If
Loop
Close #1
Printer.EndDoc
Else
MsgBox ("Please select a centre number first")
End If
End Sub
.................................................................................................
Private Sub cmdSubRefList_Click(Index As Integer)
Dim Candidate As CandidateType
Dim SubReftoPrint As String * 5
If cboSubRef <> "" Then
SubReftoPrint = cboSubRef.Text
Open CandidateFile For Random As #1 Len = Len(Candidate)
Printer.Print "Candidates with subject refrence code " & SubReftoPrint
Printer.Print
Printer.Print "Candidate Number Candidate Name Centre Number"
Printer.Print
Do While Not EOF(1)
Get #1, , Candidate
If Candidate.SubRef = SubReftoPrint Then
With Candidate
Printer.Print .CandNo; Tab(15); .CandName; Tab(35); .CentreNo
End With
End If
Loop
Close #1
Printer.EndDoc
Else
MsgBox ("Please select a subject refrence code first")
End If
End Sub
.................................................................................................
Private Sub cmdWeek_Click()
Dim Candidate As CandidateType
Dim WeektoPrint As String * 5
Dim noofrecords As Integer
Dim count As Integer
Printer.Print "List of re-marks that have not been returned in a three week period"
Printer.Print "week period"
Printer.Print
Printer.Print " Candiate Candidate Centre Date Date"
Printer.Print " number. name. number. submitted returned"
Printer.Print
Open CandidateFile For Random As #1 Len = Len(Candidate)
noofrecords = LOF(1) / Len(Candidate)
For count = 1 To noofrecords
Get #1, , Candidate
With Candidate
If (DateDiff("d", .DateSub, Now) >= 21 And .DateRt = 0) Or (DateDiff("d", .DateSub, .DateRt >= 21)) Then
Printer.Print .CandNo; Tab(12); .CandName; Tab(22); .CentreNo; Tab(30); Format(.DateSub, "dd/mm/yy"); Tab(41); DateRt
End If
End With
Next count
Close #1
End Sub
.................................................................................................
Private Sub Form_Load()
GradeBoundary(1, 5) = 75
GradeBoundary(1, 4) = 67
GradeBoundary(1, 3) = 60
GradeBoundary(1, 2) = 54
GradeBoundary(1, 1) = 48
GradeBoundary(2, 5) = 70
GradeBoundary(2, 4) = 60
GradeBoundary(2, 3) = 50
GradeBoundary(2, 2) = 40
GradeBoundary(2, 1) = 30
GradeBoundary(3, 5) = 90
GradeBoundary(3, 4) = 78
GradeBoundary(3, 3) = 66
GradeBoundary(3, 2) = 54
GradeBoundary(3, 1) = 42
GradeBoundary(4, 5) = 85
GradeBoundary(4, 4) = 79
GradeBoundary(4, 3) = 74
GradeBoundary(4, 2) = 64
GradeBoundary(4, 1) = 55
GradeBoundary(5, 5) = 68
GradeBoundary(5, 4) = 60
GradeBoundary(5, 3) = 52
GradeBoundary(5, 2) = 46
GradeBoundary(5, 1) = 40
Dim Paper As CandidateType
CandidateFile = App.Path & "/StuData.dat"
Call FillComboBoxes
Call RefreshDisplay
End Sub
.................................................................................................
Private Sub lstCandidates_Click()
Dim Candidate As CandidateType
Dim noofrecords As Integer
Dim Counter As Integer
Dim Found As Boolean
Dim Wanted As String * 4
Wanted = Left(lstCandidates.List(lstCandidates.ListIndex), 4)
Open CandidateFile For Random As #1 Len = Len(Candidate)
Found = False
Do While Not EOF(1) And Not Found
Get #1, , Candidate
If Candidate.CandNo = Wanted Then
Found = True
End If
Loop
Close #1
txtCandName.Text = Candidate.CandName
txtCandNo.Text = Candidate.CandNo
txtCentreNo.Text = Candidate.CentreNo
txtDateSub.Text = Candidate.DateSub
cboSubRef1.Text = Candidate.SubRef
txtOrgMr.Text = Candidate.OrgMr
lblOrgGr = Candidate.OrgGr
cboPaperRt.Text = Candidate.PaperRt
txtRemarkedMr.Text = Candidate.RemarkedMr
lblRemarkedGr = Candidate.RemarkedGr
cboGradeAff.Text = Candidate.GradeAff
txtDateRt.Text = Candidate.DateRt
End Sub
.................................................................................................
Public Sub RefreshDisplay()
Dim Candidate As CandidateType
Dim noofrecords As Integer
Dim Counter As Integer
Open CandidateFile For Random As #1 Len = Len(Candidate)
lstCandidates.Clear
noofrecords = LOF(1) / Len(Candidate)
For Counter = 1 To noofrecords
Get #1, , Candidate
With Candidate
lstCandidates.AddItem .CandNo & " " & .CandName & " " & .CentreNo & " " & .DateSub & " " & .SubRef & " " & .OrgMr & " " & .OrgGr & " " & .PaperRt & " " & .RemarkedMr & " " & .RemarkedGr & " " & .GradeAff & " " & .DateRt
End With
Next Counter
Close #1
lblHeading.Caption = "Current Candidates/Re-marks"
End Sub
.................................................................................................
Public Function ValidData() As Boolean
Dim Valid As Boolean
Dim CandNo As String
Dim CandName As String
Dim CentreNo As String
Dim Achar As String * 1
Dim Birth As String
Dim SubRef As String
Dim OrgMr As String
Dim OrgGr As String
Dim PaperRt As String
Dim RemarkedMr As String
Dim RemarkedGr As String
Dim DateRt As String
Dim GradeAff As String
Dim i As Integer
Valid = True
If (txtCandNo = "") Or (txtCandName = "") Or (txtCentreNo = "") Or (txtDateSub = "") Or (cboSubRef1 = "") Then
MsgBox ("Please enter full details of candidate")
Valid = False
Else
CandNo = txtCandNo.Text
CandName = txtCandName.Text
CentreNo = txtCentreNo.Text
Birth = txtDateSub.Text
SubRef = cboSubRef1
OrgMr = txtOrgMr
OrgGr = lblOrgGr
RemarkedMr = txtRemarkedMr
RemarkedGr = lblRemarkedGr
DateRt = txtDateRt
If Len(CentreNo) <> 5 Then
MsgBox ("Centre number must be within the range 10000 to 80000")
Valid = False
End If
For i = 2 To Len(CentreNo)
Achar = Mid(CentreNo, i, 1)
If (Asc(Achar) < 48) Or (Asc(Achar) > 57) Then
MsgBox ("Character " & i & " in the Centre Number must be a digit")
Valid = False
End If
Next i
If (Len(CandNo) <> 4) Then
MsgBox ("The Candidate Number must contain 4 exactly characters")
Valid = False
End If
For i = 2 To Len(CandNo)
Achar = Mid(CandNo, i, 1)
If (Asc(Achar) < 48) Or (Asc(Achar) > 57) Then
MsgBox ("Character " & i & " in the Candidate Number must be a digit")
Valid = False
End If
Next i
If Len(CandName) > 16 Then
MsgBox ("The Candidate Name is too long. Please shorten to 16 characters")
Valid = False
End If
If (Len(Birth) <> 10) Or (Mid(Birth, 3, 1) <> "/") Or (Mid(Birth, 6, 1) <> "/") Then
MsgBox ("Please enter the date in the form dd/mm/yy")
Valid = False
End If
If (Len(SubRef) <> 5) And (Len(SubRef) <> 5) Then
MsgBox ("Subject Refrence Code must contain 5 characters")
Valid = False
End If
If (Len(OrgMr) <> 2) Then
MsgBox ("Orginal Mark must contain 2 Digits")
Valid = False
End If
If (Len(OrgGr) <> 1) Then
MsgBox ("Orginal Grade must contain 1 Letter")
End If
If (Len(RemarkedMr) <> 2) Then
MsgBox ("Remarked Mark must contain 2 characters")
End If
If (Len(RemarkedGr) <> 1) Then
MsgBox ("Remarked Grade must contain 1 Letter")
Valid = False
End If
If (Len(DateRt) <> 10) Or (Mid(Birth, 3, 1) <> "/") Or (Mid(Birth, 6, 1) <> "/") Then
MsgBox ("Please enter the date in the form dd/mm/yy")
Valid = False
End If
End If
ValidData = Valid
End Function
.................................................................................................
Public Sub FillComboBoxes()
Dim Candidate As CandidateType
Dim noofrecords As Integer
Dim N As Integer
Dim M As Integer
Dim Existing As Boolean
cboCandNo.Clear
cboCandName.Clear
cboCentreNo.Clear
cboSubRef.Clear
Open CandidateFile For Random As #1 Len = Len(Candidate)
noofrecords = LOF(1) / Len(Candidate)
For N = 1 To noofrecords
Get #1, , Candidate
With Candidate
cboCandNo.AddItem .CandNo
cboCandName.AddItem .CandName
cboSubRef.AddItem .SubRef
Existing = False
For M = 0 To cboCentreNo.ListCount - 1
If cboCentreNo.List(M) = .CentreNo Then
Existing = True
End If
Next
If Not Existing Then
cboCentreNo.AddItem .CentreNo
End If
End With
Next
Close #1
End Sub
.................................................................................................
Private Sub txtOrgMr_LostFocus()
Dim OrgMr As Integer
Dim i As Integer
Dim grade As String
OrgMr = txtOrgMr
If cboSubRef1 = "01325" Then
For i = 1 To 5
If OrgMr > GradeBoundary(1, i) Then
grade = i
End If
Next i
End If
If cboSubRef1 = "20094" Then
For i = 1 To 5
If OrgMr > GradeBoundary(2, i) Then
grade = i
End If
Next i
End If
If cboSubRef1 = "28181" Then
For i = 1 To 5
If OrgMr > GradeBoundary(3, i) Then
grade = i
End If
Next i
End If
If cboSubRef1 = "54821" Then
For i = 1 To 5
If OrgMr > GradeBoundary(4, i) Then
grade = i
End If
Next i
End If
If cboSubRef1 = "64773" Then
For i = 1 To 5
If OrgMr > GradeBoundary(5, i) Then
grade = i
End If
Next i
End If
If grade = 5 Then
grade = "A"
ElseIf grade = 4 Then
grade = "B"
ElseIf grade = 3 Then
grade = "C"
ElseIf grade = 2 Then
grade = "D"
ElseIf grade = 1 Then
grade = "E"
Else
grade = "U"
End If
lblOrgGr = grade
End Sub
.................................................................................................
Private Sub txtRemarkedMr_LostFocus()
Dim RemarkedMr As Integer
Dim i As Integer
Dim grade As String
RemarkedMr = txtRemarkedMr
If cboSubRef1 = "01325" Then
For i = 1 To 5
If RemarkedMr > GradeBoundary(1, i) Then
grade = i
End If
Next i
End If
If cboSubRef1 = "20094" Then
For i = 1 To 5
If RemarkedMr > GradeBoundary(2, i) Then
grade = i
End If
Next i
End If
If cboSubRef1 = "28181" Then
For i = 1 To 5
If RemarkedMr > GradeBoundary(3, i) Then
grade = i
End If
Next i
End If
If cboSubRef1 = "54821" Then
For i = 1 To 5
If RemarkedMr > GradeBoundary(4, i) Then
grade = i
End If
Next i
End If
If cboSubRef1 = "64773" Then
For i = 1 To 5
If RemarkedMr > GradeBoundary(5, i) Then
grade = i
End If
Next i
End If
If grade = 5 Then
grade = "A"
ElseIf grade = 4 Then
grade = "B"
ElseIf grade = 3 Then
grade = "C"
ElseIf grade = 2 Then
grade = "D"
ElseIf grade = 1 Then
grade = "E"
Else
grade = "U"
End If
lblRemarkedGr = grade
End Sub
.................................................................................................
AS COMPUTING-UNIT 3 UKAB-REMARK
Ibrahim Ali
Candidate No 5551 - 1 - Centre No 15247