Documentation for a Visual Basic Mathematics Program

227
June 2012 RACHEL MCGREE VY MATHEMATICS TESTING PROGRAM

description

Documentation for a Mathematics Program written in Visual Basic for the AQA A2 Computing course.

Transcript of Documentation for a Visual Basic Mathematics Program

Page 1: Documentation for a Visual Basic Mathematics Program

June 2012

RACHEL MCGREEVY

MATHEMATICS TESTING PROGRAM

Page 2: Documentation for a Visual Basic Mathematics Program

2

Contents

AnalysisBackground to and identification of problem......................................................3Description of current system.............................................................................3Identification of the prospective user(s)............................................................12Identification of user needs and acceptable limitations....................................13Initial user requirements...................................................................................16Data dictionary (from perspective of end user).................................................17Data source(s) and destination(s).....................................................................19Data flow diagrams (DFDs)...............................................................................20Volumetrics.......................................................................................................22Realistic appraisal of the feasibility of potential solutions.................................22Justification of chosen solution..........................................................................23Prototype..........................................................................................................24Final user requirements....................................................................................34

Design..................................................................................................................36Overall system design.......................................................................................36Description of modular structure of system......................................................36Data dictionary.................................................................................................38Description of record structure.........................................................................43Validation required............................................................................................45File organisation and processing.......................................................................46Identification of appropriate storage media......................................................47Identification of processes & suitable algorithms for data transformation........48User interface design (HCI) rationale including:................................................52Sample of planned data capture and entry designs..........................................54Sample of planned valid output designs...........................................................56Description of measures planned for security and integrity of data..................57Description of measures planned for system security.......................................57Overall test strategy.........................................................................................58

Implementation....................................................................................................59Program listing..................................................................................................59Screen shots of working program.....................................................................59

Testing................................................................................................................114Test plan.........................................................................................................116Hard copy evidence........................................................................................123

System Maintenance..........................................................................................141System overview.............................................................................................141Detailed algorithms.........................................................................................141Annotated listings...........................................................................................141Procedure/function and variable lists..............................................................141

User Manual........................................................................................................147Contents page.................................................................................................147A brief introduction.........................................................................................148Installation instructions...................................................................................148Detailed description of how to use one section of the system........................149Samples of actual screen displays..................................................................149Samples of error messages and recovery procedures (troubleshooting)........168

Appraisal.............................................................................................................178Comparison of project performance against objectives..................................178Possible extensions.........................................................................................182User feedback.................................................................................................183

Analysis

Background to and identification of problem

The maths department of Parkstone Grammar School hands out one set of past papers to each student to pupils at GCSE level each year. The past papers are

Page 3: Documentation for a Visual Basic Mathematics Program

3

used by the students to revise and consolidate their knowledge and practice their exam technique.The teacher will record the marks and before the end of term will predict the final grade and aspirational grade for the pupil in their end of term report. The current system is completely paper-based, and I believe making a computerised system for both the teachers and the students will save time and effort as well as being a lot easier to use.When taking my maths GCSE, I found that I began to lose track of which papers were due on which date, and even began to misplace some of the papers so the teachers would have to re-photocopy some of the papers. To see if other students had the same problem as I did, I conducted a survey with 20 students that were either currently studying for their maths GCSE or have already taken it. Here are the results of the questions I asked them;

Question Tally ( /20 )Did you ever lose one of the past

papers you were given to complete?Yes – 14 No - 6

Did you ever forget or miss the deadline to hand in one of the papers

you were given to complete?

Yes – 17 No - 3

Would you prefer a computerised version of this system?

Yes – 18 No - 2

This poll shows that other students have had a similar experience to me with the current system, and shows that there is a problem with it. I therefore propose to create a system where students can take quizzes containing a number of questions that are similar to questions asked in real exam papers. The teachers can keep track of which quizzes the students have taken and the grades they achieve, and can use the system to predict grades for the students’ final GCSE exams.

Analysis of current system

Students currently pay £1 for a pack of around 36 past papers, 16 calculator papers, and 16 non-calculator pages. An example of a calculator past paper and the kinds of questions asked at GCSE level is pictured below, along with the mark scheme. November 2010 Past Paper

Page 4: Documentation for a Visual Basic Mathematics Program

4

Page 5: Documentation for a Visual Basic Mathematics Program

5

Page 6: Documentation for a Visual Basic Mathematics Program

6

Page 7: Documentation for a Visual Basic Mathematics Program

7

Page 8: Documentation for a Visual Basic Mathematics Program

8November 2010 Mark Scheme

Page 9: Documentation for a Visual Basic Mathematics Program

9

Page 10: Documentation for a Visual Basic Mathematics Program

10

Page 11: Documentation for a Visual Basic Mathematics Program

11

Teachers will set deadlines for when they would like the paper back in. The teacher then marks the papers, grade them, and hand them back to the students. To record how well each student is doing, the teacher has a book in which they have a list of students and a list of papers, and mark the grade they have achieved. A section of this mark book, for the non-calculator past papers is shown below.

Teachers then take an average of the all of the grades the student have achieved, and uses this as their predicted grade in their end of term report, and also predict an aspirational grade. The aspirational grade is usually one grade higher than the predicted grade, and reflects what the teacher thinks the student could achieve with more revision.

When the papers are handed back the students can see where they have gone wrong, and are expected to revise the topics they didn’t answer questions correctly on before completing the next paper. However, students have been known to forget the deadline, lose or do the wrong paper, so not everyone will hand their paper in before the deadline. It can be hard for the teacher to keep track of who has and has not handed their work in, and can only tell whose papers are missing after they have marked the ones that have been handed in. Students then have missing marks and the teachers find it harder to make the final predicted grades.

Page 12: Documentation for a Visual Basic Mathematics Program

12

Some students have also been known to cheat. As these papers are real, the mark schemes for each paper are easily available to online through a quick search of the internet. They then have all the correct answers to work from giving them an unfair advantage over the other students. This does not portray the real level of ability of the student to the teacher and so they predict higher grades than the student is able to achieve, causing them disappointment on results day.

The current system also uses a lot of resources that could be saved by computerising the system. This year, the set that will be handed to the students include the papers from 2003 to 2011, including both the two papers from June and two papers from November. This is 4 papers per year; each printed on two sheets of paper, of 9 years’ worth of past papers. This equals around 72 sheets of paper each student is given and as there are 180 students in one year group, around 12,960 sheets of paper are used for the system every year, before any re-copying of papers as well. This is a massive waste of resources, as well as the price of photocopying all of these papers, costs the school a large sum of money to carry out each year.

Identification of the prospective user(s)

There will be three groups of users – students, teachers & administrators. None of these groups of users will have had any previous experience with computer coding, so none should have to be input by the users in the final program. Therefore the final layout of the program should be usable by any one, and easy to understand for new users to the system.

The teachers will need to be able to create the quizzes for the students that will take them. As the teachers and students will be carrying out different tasks and therefore need different facilities, the students and teachers should have a separate site in the program. This means that different users will have restricted access to certain parts of the program. The students should not be able to access the teacher’s part of the program to have access to their grades & scores of other users, so therefore both the teachers and students should have a password protected area.

The administrators should also have a separate user space to the student and normal teacher accounts, but the user will just be a teacher. The administrators should be able to edit student and teacher information, as well as creating new classes. Therefore the area should be password protected so students are unable to access and edit the student or teacher files.

The teachers are not as computer literate as the students may be so the area of the program designed for the teachers must be simple to use and easy to read and understand, and so they must not have to input any unnecessary items into the final system. The system also needs to be reusable with each cycle of GCSE students, the number of which may vary slightly from year to year, so the program should allow a varying number of student accounts to be created.

The students are all of the same age in year 11, but some will be more computer literate than others, so the student facilities will have to be flexible and simple to understand for any of the users. Some of the more able students could possibly try to exploit any bugs in the system and even try to break the program by inputting erroneous data, so the validation in the system should be as robust as possible. Therefore, the system should use textbox inputs as little as possible to prevent the users from inputting incorrect data to break the system. Students will own computers with varying specifications, so the program will need to run smoothly on any type of computer. As the program will be storing private information, it must be secure in accordance with the 1998 Data Protection act.

Page 13: Documentation for a Visual Basic Mathematics Program

13

Identification of user needs and acceptable limitations

To identify what the user will need, I have conducted an interview with one of the GCSE maths teachers.

InterviewR: Do you think a maths quiz for GCSE students will be useful?T: I think there is a need for this system as the current system is very inefficient and a computerised system would help both the teachers and the students.

R: What do you think are the most important points of the current system that should be transferred into the new system?T: The students should be able to take a quiz to practice answering questions for their final exam. They should receive solutions to where they have gone wrong for the questions they have not answered correctly, and receive a mark for each quiz they take. The teachers must be able to keep track of which quizzes each student has taken, and the grade they achieve. They should then be able to calculate the average grade achieved to make a final exam prediction for the student.

R: What do the students need to be able to do on this system?T: Students should be able to log on to the system and have a list of available quizzes that they can take, and a list of due dates alongside them. They should be able to see how well they’ve done in each quiz they have taken so far and give them a round-up of their grades.

R: How many quizzes should be available to the students?T: The maths departments have collected many exam papers from previous years so we have many questions that can be compiled into a quiz. The students should have as many quizzes as possible available to them to practice with. The students should be able to see a list of quizzes they can take, and which ones they have and have not completed. They should also be able to see any quizzes that have deadlines set by the teachers in order of date.

R: Should the teachers be able to create new quizzes?T: To make the system worthwhile, it should be able to be reused every year. Each year there are two sets of GCSE exams, one in November and the other in June, and teachers should be able to add questions from these papers and make them available for the students.

R: How would you expect the quiz to be laid out?T: There should be one question per slide, with some multiple choice answers to pick from. The student should then click the answer they think is correct, which will then send them to another slide with the correct answer and working on. After that they should be directed to the next slide which displays the next question. There are usually around 30 questions per exam on the real papers, so this would roughly be the same in the quiz, but you could make it so the user chooses the amount of questions. The questions usually start off easy and as the test progresses they steadily become more complex.

R: How many answer choices should there be?T: There should be enough to make sure the student has to work the question out without guessing the answer, but not too many to confuse the pupil. I would say there should be four or five answers to choice from for each question.

Page 14: Documentation for a Visual Basic Mathematics Program

14

R: Should the student be able to see the correct answers?T: The whole point of doing this exercise is to help students improve, and they can only do this if they can see where they went wrong. Therefore I do think they should be able to see the correct answers after they have answered each question.

R: How would you like the answers to be shown?T: Well I think it would be most effective to show them the correct answer, and maybe even the solution of how the answer can be attained, after they have answered each question. Otherwise if they are shown all the answers at once, the student might just skip through them and that defeats the object of doing practice papers.

R: Should anything be done with the results that the students can see?T: It would be nice for them to be able to see their marks visually, how their marks from one quiz compares to another. Their results of the quizzes they have taken so far could possibly be displayed on a graph to show them if they are improving – or not. You could possibly also show them the topic areas they scores well on and which areas they may need to revise more. Then they can go away and revise the topics they haven’t attained grate marks on and come back for the next quiz a little more prepared. It would be useful for the teacher to see all of this for each pupil as well, so we can see which topics we need to revise with the pupils in class.

R: How many questions should there be per quiz and should it be flexible?T: There are usually around 30 questions per exam, which fit with a 1 hour 45 minute time limit. However it does vary sometimes as it depends on the marks given to each question, so it does vary slightly so you should probably make that flexible. The timing of the exam is something the students should be able to work with so the amount of questions should be similar to the real exam.

R: Are the grade boundaries always the same for each exam or should they be flexible?T: The maximum mark for each exam is always 100, however the grade boundaries change, depending on the exam. If the exam is considered harder than normal, then the grade boundaries are lower as they are harder to reach. However, if the exam is considered easier than normal the grade boundaries will be higher as the will be easier to reach. Therefore I think you should allow the teacher user to input grade boundaries for each quiz separately.

R: Is the timing of the quiz important then?T: One of the main issues for some of the students is finishing the exam on time, leaving enough time to check through their answers at the end. Therefore I think it’s vital that the students should be able to practice finishing within the time limit, but should be able to finish the quiz if they do exceed it. In the real exam, the students have 1 hour and 45 minutes to answer all of the questions. If the quiz has a similar amount of questions then the time limit should be the same.

R: Are there any considerations I need to make in terms of the pupils and their ability level?T: There are 4 different levels of maths sets at GCSE standard, Set 1 being the most able at maths, and Set 4 being the least able. Due to students in set 4 struggling with some concepts in maths, they are not taught the whole syllabus. Therefore when they take the quiz, they won’t be able to answer some of the harder questions. However they couldn’t answer them in the real exam either so I do not think you need to worry too much about that.

R: What are the names of the topics in the GCSE syllabus that appear in the exam?

Page 15: Documentation for a Visual Basic Mathematics Program

15

T: The topics are; Number, Algebra, Geometry, Measure, Statistics & Probability. Normally there is at least one question from each topic that appears in the quiz.

R: What do the teachers need to be able to do on this system?T: Teachers should be able to log on to the system separately from the students, and should be able to see a list of all the students in each class they teach, and show all of the results of the quizzes the students have taken so far. We should also be able to set deadlines on each quiz and then be able to see who has and has not met the deadline so far.

R: How many classes does each teacher usually have?T: Each teacher is allocated two classes, and each class normally has two teachers, but they can sometimes have three.

R: What should be done with the results of the quiz?T: The teacher should be able to see the grade attained on each quiz by each pupil, possibly as a graph so we can visualise how many people are attaining which grades. An average grade should also be calculated, depending on how well the students have done in the quizzes they have taken. From this we can then make a final predicted grade and an aspirational grade which they could achieve with some work.

R: What kind of interface would you be expecting on this system?T: Well students should find it easy to navigate around the system without getting lost, and be able to easily find whatever they are looking for. If they cannot find the papers easily then they will use this as an excuse not to do the papers. Some of the older teachers are not that confident using technology, so the system must be very easy to navigate, any writing should be big enough & easy to read and any instructions should be simple.

R: What would expect the administrator to be able to do on the system?T: Well if the student or teacher has entered their information wrong, the admin should be able to change or correct this. They could also change the passwords of any of the users if they have forgotten it, or someone else had found out what it was. If one year the school decided to split maths classes into smaller group and have more classes, the admin should probably also be able to add a new class, and input the set number of the class.

R: What aspects of the current system would you like to see improved with this system?T: It should be really easy to see who’s done what in terms of which quizzes have been taken, because sometimes it’s hard for me to keep track of.

Acceptable LimitationsUsually in the final exam papers, students will gain marks for how they work out their answer, even if their final answer is incorrect. Because my system is computerised, there will be no marks for working out as students will only be able to select one answer, and so will either gain full or zero marks for each question. Quiz grading and predicted grades will be based on the amount of correct answers attained in the quiz so they may be slightly inaccurate to the real ability level of the student.

Another limitation of the computerised system is that at GCSE level, there are usually questions that involve drawing or sketching graph and shape reflections and transformations. However, there is only ever one or at most two of these questions in the exam papers so I have decided to exclude this from my program. This could be a possible extension in the future to have image answers in the quiz as well as plain text.

Page 16: Documentation for a Visual Basic Mathematics Program

16

As the questions will be multiple-choice, the students will have a selection of fixed answers to choose from. When the student is working the answer out to the question and they get a different answer to the four available answers, they can choose the nearest one to the answer they worked out. This means the students are able to guess answers, which can boost their grade higher than it would be otherwise. Another limitation to the multiple choice answer style is that there can be only one part and answer to the question. In the real exams, most questions have several parts to it – i.e. part a), b) & c). However this problem is the same for any multiple choice quiz, and so I have not addressed this in my system.

There will be a new set of students each year, so teachers will have to delete all of the previous years’ users each time a new set of student begins the year. This could be done automatically but this is not the main focus of my system, so I have not incorporated this into my program at the start. If I feel there is room for improvement in my program I may include it later on.

Although there in the real exams, the students take 2 papers, a calculator & a non-calculator paper, I have decided not to include this in my program as student would easily be able to use calculators even if they are not meant to, which would skew their results. By not including it and allowing a calculator to be used in all of the questions, the final predicted grades of the students will be more accurate to what they are able to achieve.

initial user requirements

Student Functions There must be a secure login page so the students and teachers can log in

separately Each student must have their own username and password to log in to

their user space The program must display a list of quizzes to that are available to be taken

by the student The program should display whether the user has taken a quiz or not for

each of the available quizzes, and the grades achieved for the quizzes that have been taken

The deadline of each quiz must be shown on the list of quizzes The program must not allow the student to take quizzes that have already

been taken once by the student, or where the deadline has already passed The program should allow the students to take quizzes created by the

teacher user Each question should have a choice of four answers to choose from, with

one being the correct answer The program should only display one question at one time After a student has answered a question, the correct answer should be

shown to them There should be a timer that counts down from 1 hour and 45 minutes

displayed to the student whilst they are taking the quiz The timer reaching 00:00 should not impede the student’s progress if they

have not finished answering the questions after this time The quiz timer should pause whilst the user is viewing the answer to the

question At the end of the quiz the student should see the score they achieved &

the corresponding grade The student should be able to see which topic areas they have scored best

and worst in More complex questions, and questions from topics not taught to them

should be filtered in quizzes taken by set 4 studentsTeacher Functions

The teacher should be able to create new quizzes for the students to take, including the quiz name, deadline and number of questions

Each quiz should be worth 100 marks, and have a time of 1:45

Page 17: Documentation for a Visual Basic Mathematics Program

17

The user must have a list of pupils in each of the classes they teach showing who has and has not completed each quiz that has been created

The user should be able to create a number of questions for each quiz, including the question text, choice of answers, correct answer, question topic, question marks, question difficulty and question working

There should be between 25 and 35 questions in each quiz Each question in each quiz must be grouped into one of the six topic areas

in the GCSE maths syllabus Questions should be ranked by difficulty, with questions starting the quiz

being simple and becoming more complex The teacher should be able to set a deadline for each quiz, after which the

student is unable to take it The program should show visually how well their students are scoring in

each of the topic areas as a whole, as well as individually Teachers should be able to access data which visually shows the grades

attained by each student.Administrator Functions

The administrator should have a completely separate log in space from the teacher and student users

The administrator should have a secure username and password log in to the program

The administrator should be able to create new classes setting the class name and set

There should be an editing function for the admin to search for a user and edit their details to make sure the data is correct and up to date

The admin should be able to delete users that no longer use the programDesign

The interface of the program should be simple to use and easy to understand

The program must be simple to navigate through The text on screen should be large enough for easy reading, and in a

readable font The program needs to sort data quickly and efficiently due to updates of

the information on a regular basis The program should be professional and efficient to use

Data dictionary (from perspective of end user)

Data Name Description Data Type ExampleTeacher ID Unique Teacher

User IDInteger “05”

Full Teacher Name Forename and Surname of the

user

String “Dianne Hardwick”

Teacher Username Used for teacher’s login

String “DHardwick”

Teacher Password Used to secure the teacher’s login

String “Circle1”

Teacher Classes The name of the two maths sets that the user

teaches

String “11A, 11C”

Student ID Unique Student User ID

Integer “105”

Full Student Name Forename and Surname of the

user

String “Rachel McGreevy”

Student Username Used for student’s String “rachelmcgreevy”

Page 18: Documentation for a Visual Basic Mathematics Program

18

loginStudent Password Used to secure the

student’s loginString “mrblobby”

Student Class The name of the maths set that the

student is in

String “11B”

Quiz ID Unique Quiz ID Integer “09”Quiz Name The name of each

paperString “Quiz 1”

Quiz Deadline The deadline set for each paper

Date “3/2/12”

Number of Questions

Number of questions in the

quiz

Integer “28”

Question Number The number of the question in the

quiz

Integer “10”

Question Text The text of each question

String “Simplify (x+2)(x-3)”

Correct Question Answer

The correct answer to the

question

String “x2-x-6”

Question Answer Choices

The other incorrect answer

choices of the question

String “x2+x-6, x2-x+6, x2+x+6”

Question Topic The topic area the question is from

String “Algebra”

Question Marks Amount of marks the question is

worth

Integer “5”

Question Difficulty Difficulty ranking of each question

Integer “1”

Question Working The working out for each question

to reach the correct answer

String “(x*x)+(x*-3)+(2*x)+(2*-3)”

Student Score The score the student has

achieved in the quiz

Integer “76”

Student Grade The grade the student has

achieved in the quiz

String “B”

Student Topic Marks

The number of marks achieved in each topic area by

each student individually

Integer “11”

Class Topic Marks The number of marks achieved in each topic area in

the class as a whole.

Integer “150”

Class Name The Name of the Maths Class

String “11B”

Class Set The set number of math class

Integer “1”

Admin Username Username used to String “admin1”

Page 19: Documentation for a Visual Basic Mathematics Program

19

login as the adminAdmin Password Password used to

secure admin loginString “equation”

Data source(s) and destination(s)Data Source Data

Student Student Name, Student Username, Student Password, Student Class, Student Question Answer

Teacher Teacher Username, Teacher Password, Teacher Name, Teacher Classes, Quiz Name, Number of Questions, Quiz

Deadline, Question Text, Question Answer Choices, Question Difficulty, Question Answer, Question Marks, Question

Working, Question TopicAdministrator Class Name, Class Set

Data Destination DataStudent Record Student ID, Student Name, Student

Username, Student Password, Student Class

Teacher Record Teacher ID, Teacher Name, Teacher Username, Teacher Password, Classes

TaughtClass Record Class Name, Class SetQuiz Record Quiz ID, Quiz Name, Number of

Questions, Quiz DeadlineQuestion Record Quiz ID, Question Number, Question

Text, Answer Choices, Question Topic, Question Difficulty, Question Marks,

Question WorkingStudent Quiz Record Quiz ID, Student ID, Quiz Score, Quiz

Grade, Quiz Time

Page 20: Documentation for a Visual Basic Mathematics Program

20

Data flow diagrams (DFDs)

Existing System

High Level

Low Level

Page 21: Documentation for a Visual Basic Mathematics Program

21

Proposed System

High Level

Low Level

Page 22: Documentation for a Visual Basic Mathematics Program

22

Volumetrics

Realistic appraisal of the feasibility of potential solutions

Approach Advantages Disadvantages NotesVisual Basic

Front end with file handling

- Visual Basic has a simple drag and drop tool to easily create a GUI

- No other software is incorporated into the

system so the program is simple to use.

- Less complicated programming involved

compared to other solutions

- File handling can limit the data stored

- Not the most efficient way of handling data- Data is stored in an easily accessible text file so could be easily edited or accidentally

deleted.

This is probably the least time consuming and most flexible and simple solution for the

program

Visual Basic Front end linked to a database

- More efficient data storage

- Only requires basic SQL for manipulation of data

- Visual Basic GUI drag and drop tool

- More work involved in the creation of the

program- More complicated

solution- End users must have

database software installed on their

computers, which not everyone will have,

and can be expensive.

More data can be easily handled but

requires other programs to be

installed which is not ideal.

Visual Basic - Visual Basic GUI creator - A large amount of I will not be able to

Student FileStudent ID 3Student Name 30Student Username 15Student Password 15Student Class 3-----------------------------------Total: 66

Quiz FileQuiz ID 2Quiz Name 10Quiz Deadline 10Number of Questions 2----------------------------------Total: 24

Question FileQuiz ID 2 Question Number 2Question Text: 100Correct Answer 20Answer Choice 1 20Answer Choice 2 20Answer Choice 3 20Question Topic 11Question Working 100Question Difficulty 1Question Marks 2------------------------------------Total: 298

Student Quiz FileUser ID 3Quiz ID 3Quiz Score 3Quiz Grade 2----------------------------------Total: 11

The program should be able to store around 180 students, 10 teachers, 20 quizzes – each with around 30 questions.

Student File66*180 = 11880Teacher File68*10 = 680Class File4*10 = 40Quiz File24*20 = 480Question File298*(30*20) = 178800Student Quiz File11*20*180 = 39600

Total Information11880 + 680 + 40 + 480 + 178800 + 39600 = 231480

231480 bytes = 231480/1024226.1 (1dp) Kilobytes

226.1 KB

Class FileClass Name 3Class Set 1-----------------------------------Total: 4

Teacher FileTeacher ID 2Teacher Name 30Teacher Username 15Teacher Password 15First Class Taught 3Second Class Taught 3-----------------------------------Total: 68

Page 23: Documentation for a Visual Basic Mathematics Program

23

linked to spreadsheet

- Spreadsheet software has many functions and is

flexible- Spreadsheet can hold large amounts of data

- Text can be manipulated easily

data may need to be stored in more than one sheet so may become complex

- the solution will have constraints

create an effective solution for the

program using this approach

Java front end with database

- Bespoke front end due to no GUI creator

- As front end is tailored to user, the program will be

more efficient.

- No GUI creator means there will be a lot more work going

into the creation of the program.

- More time and effort is needed to create the

program

More complicated to design the front end of the program and more

time will need to be spent on that part,

meaning the core of the program will not be as developed as needed in the time

limit I have, so is not the best solution

Justification of chosen solution

Obviously a bespoke solution is the best option for my program, as it can be made exactly to the needs of the user and their specifications, without unnecessary add-ons. Creating the program myself, means it will be an original piece of work and so will be unlike any other program that already exists. A self-created piece of software means that it can be updated and re-worked if the user feels that it does not fulfil all of the requirements or have found problems or other improvements that can be made to the system. Creating the program directly from the user’s specification means that the program will run in the most efficient way for them. I have decided to create a program using a Visual Basic front end, with file handling to store data. This is the simplest solution, and although the amount of information the program will need to store is large, it does not require any extra software installed. This solution also does not require any complex front end programming, due to the front end creation tool of Visual Basic. Using the Visual Basic front end creation tool will provide the most user-friendly and effective front end, and therefore is the most efficient solution as I am able to tailor it to the needs of the user.

Page 24: Documentation for a Visual Basic Mathematics Program

24

Prototype

I drew out a diagram to help me decide what pages I’ll need to create a prototype for in my program.User Feedback: Well instead of having to make the teacher create a new user each time, you could put

that on the original login page, so the user themselves can create an account. There could also be a page that enables the user to change their password, or a reminder if they have forgotten their password

or username.I have made the necessary changes below, which has given me a final idea of the layout of the pages for

the program.

Page 25: Documentation for a Visual Basic Mathematics Program

25

This is the first screen the user will see on the program. The

students will press on the Student Login button to be

directed to their login, and the teachers will press on the

Teacher Login button which redirects them to their login.

User Feedback: You could have a better opening

interface design because this one doesn’t really show what

the program is.

The login screens for the students and teachers are the same, but the user can only log in with their password on the correct login space, i.e. a student could not use their username

and password to log in to the teachers area. User Feedback: Using separate login screens is a good idea, as then students can’t log in to

the teacher’s part of the program and see everyone else’s grades, and it also makes the program more secure.

To let the user know what the program is,

I have created a splash screen that starts up when the

program is opened. It flashes up for several seconds and then the

login screen as shown above will

appear

Solution

Page 26: Documentation for a Visual Basic Mathematics Program

26This is the page that allows the creation of new accounts to

access the program. If the type of user selected is ‘student’,

then they will be redirected to another page below that asks

them to enter their class. If the type of user selected is

‘teacher’ then they will be directed to a page where they

enter any classes that they teach.

User Feedback: This is great, but there needs to be some kind of protection against

students creating fake teacher accounts to access other users’

information.

Solution

On the page that the user is directed to once they have

selected the type of account as ‘teacher’, the user will have to

supply a security word, previously agreed upon by the teachers. For the purposes of this project the security word

will be ‘circle’.

Page 27: Documentation for a Visual Basic Mathematics Program

27This is the student’s homepage, which is the first

page they see after they have logged onto the system. The

students name is shown in the top right hand corner. The

page shows each quiz that is available, whether they have taken it and the grade they

achieved if they have, and also the quiz deadline.

User Feedback: The information is set out nice and clearly for the student to see what they’ve already done.

There could be a notification at the top showing how many days there are left until the

final exams.

Solution

I have created a countdown timer in days to alert the user as to how long they have left until their two exams. When the amount is red in colour, there is less than two weeks

until the exam. If the amount is green in colour there is more

than two weeks until the exam date.

This is the page where the user is able to

change their password, by entering their old one first as a security

measure and then entering a new

password twice. User Feedback: This

page is good and it has all of the necessary

security requirements.

Page 28: Documentation for a Visual Basic Mathematics Program

28

This is the screen the student sees after they have selected ‘Take Quiz’ from their homepage, which lists all

of the quizzes for the student to take.

User Feedback: The quizzes that the student has already taken don’t need to be listed as they shouldn’t

be able to take them more than once.

This is the screen the student sees after they have selected the quiz they wish to take from

the take quiz page. It has the question number, question text and question choices on. Once the student selects their answer,

the answer page will appear. User Feedback: You could create it so the user clicks an option before pressing to go

onto the next page in case the student accidentally clicks one of these options. You also should show the user on the question

page the time they have left from the original 1 hour 45 minutes to finish the quiz in.

Solution

Only the quizzes that have not been taken, or those with deadline dates that have not yet

passed are available to select from the list, as stated in the user requirements.

Solution

With the use of radio buttons, the user can now select an option, and then change their answer

without automatically being sent to the answer page if they change their minds. The

remaining time the user has left from the starting time of 1:45 is now shown in the top right of the form, which counts down in real

time.

Page 29: Documentation for a Visual Basic Mathematics Program

29

This is the screen the student sees after they have selected their answer to the question. The answer page shows the question, the

answer they selected, and the working which is shown regardless of whether the student

answered correctly, to make sure they understand how to do the question. Once the student selects next, the next question will

appear. User Feedback: The students should be able to see the amount of marks the question is worth

as well as the correct answer. It should also show if the student answered correctly, as

they might not remember which answer they chose.

This is the screen the student sees when they have answered all of the answers

and have come to the end of the quiz. It shows their overall score achieved and

the grade equivalent. User Feedback: This screen could also

show the time the student has completed the quiz in.

Solution

The answer page now includes whether the student answered the question correctly,

and the amount of marks they gained along with the full amount of marks

available for the question.

Solution

The end of quiz screen now shows the final time the user completed the quiz in. If they did not finish before the 1 hour & 45 minute time limit then the remaining

time will just show as 00:00:00

Page 30: Documentation for a Visual Basic Mathematics Program

30

This is the teacher’s homepage, which is the first page they see after they have logged onto the system. The teachers name is shown in the top right hand corner. The page shows a table with a list

of each student they teach, and the grade they have achieved after taking the quizzes that are available.

User Feedback: The information is set out clearly, but you should make sure each class of students is set out on a different list, and the teachers should be able to look at all of the classes they teach.

This is the page where the teacher can create a new quiz, by entering its name, number of

questions & set a deadline for it. User Feedback: The grade boundaries for each

paper are different as depending on the questions, sometimes an A* is harder to reach than other time. Therefore an option to enter

the grade boundaries for that quiz in particular on this page would be useful.

Solution

Grade boundaries for the grades A* - U are now able to be entered differently for each paper. The end grade that the student achieves will then be calculated according to these grade

boundaries.

Page 31: Documentation for a Visual Basic Mathematics Program

31

This is the page where the teacher can create a question, by entering the details shown.

User Feedback: There should also be an option to upload an image for the question as well, for

questions that may involve graphs or histograms

Solution

The user is now able to browse their files so a previously saved image can be included in the question. I have also

included the question number so the user will know which question they are entering

information for.

This is the login page for the administrator where they enter the

admin username and password, which for the purposes of this program will

be ‘admin1’ & ‘equation’ User Feedback: It is a good idea to

have a separate login for the admin to the teachers so they can edit both the student and teacher details. This also makes the program more secure, and

prevents students finding other student’s personal information.

This is the admin homepage where the user

has the choice of either creating a class or editing

a student or teacher’s user information.

User Feedback: This is a very simple layout, I don’t thin anything needs to be

added.

Page 32: Documentation for a Visual Basic Mathematics Program

32

This is the page where the teacher can create a new class, which they can access from their homepage.

The user just has to enter the name of the class and select which set

number it is. User Feedback: Excellent, this is very nice and simple. You should

make sure that the user can’t write anything in the Class Set box and

can only select a value from the list

This is the page where the admin user searches

for the student whose information they want to edit. The user types in

the student name or part of the name into the

search bar and any users with that name will show

in the list box for the user to select.

User Feedback: Excellent, this is very nice and simple. You could have a label

explaining what to do here, as it isn’t very clear what is happening, other

than that its fine.

This is the page where the

administrator can edit any information that

the user entered when they signed up

for an account to start using the program. Any changes will

overwrite the original data in the student

file.User Feedback:

Again, you should have a small note

telling the user what to do next In case

they have forgotten or are unsure what to

do.

Page 33: Documentation for a Visual Basic Mathematics Program

33

This is the page where the teacher can view the graph of the grade achieved on each quiz by a particular student user. This can be viewed from pressing the

‘grade breakdown’ button on the teacher homepage.

This is the page where the student can view the graph of the grade they have achieved for each quiz they have taken so far. This can be viewed from pressing

the ‘grade breakdown’ button on the student homepage.

This is the page where the admin user searches for the teacher user whose information they want to edit. The

user types in the teacher’s name or part of the name into the search bar

and any users with that name will show in the list box for the user to

select.User Feedback: similarly to the Search Student form, this is very simple, but

you could also do with a label explaining what to do here, as it isn’t very clear what is happening when

you get to this page from clicking the edit teacher information button on the

admin homepage.

This is the page where the administrator can edit any

information that the user entered when they signed up for an account to start using the program. Any changes will

overwrite the original data in the teacher file.

User Feedback: Like the Edit Student Information form, you

could have a small note telling the user what to do next In case they

are unsure what to do.

Page 34: Documentation for a Visual Basic Mathematics Program

34

Final user requirements

Student Functions Students must be able to register to use the program from the start menu There must be a secure login page so the students and teachers can log in

separately Each student must have their own username and password to log in to

their user space Students must be able to change their password when they are logged in The program must display a list of quizzes to that are available to be taken

by the student The program should display whether the user has taken a quiz or not for

each of the available quizzes, and the grades achieved for the quizzes that have been taken

The deadline of each quiz must be shown on the list of quizzes There must be a countdown until the final exams on the student

homepage The program must not allow the student to take quizzes that have already

been taken once by the student, or where the deadline has already passed The program should allow the students to take quizzes created by the

teacher user Each question should have a choice of four answers to choose from, with

one being the correct answer The program should only display one question at one time After a student has answered a question, the correct answer should be

shown to them There should be a timer that counts down from 1 hour and 45 minutes

displayed to the student whilst they are taking the quiz The timer reaching 00:00 should not impede the student’s progress if they

have not finished answering the questions after this time

This is the page where the teacher can view the graph of the average grade being achieved for each topic in the syllabus. This can be viewed from

pressing the ‘topic breakdown’ button on the teacher homepage.

This is the page where the student can view the graph of the grade they have achieved for each topic in the syllabus. This can be viewed from pressing the

‘topic breakdown’ button on the student homepage.

Page 35: Documentation for a Visual Basic Mathematics Program

35

The quiz timer should pause whilst the user is viewing the answer to the question

At the end of the quiz the student should see the score they achieved & the corresponding grade

The time the student has completed the quiz in should be listed on the end screen of each quiz

The student should be able to see which topic areas they have scored best and worst in

More complex questions, and questions from topics not taught to them should be filtered in quizzes taken by set 4 studentsTeacher Functions

The teacher should be able to create new quizzes for the students to take, including the quiz name, deadline and number of questions

Teachers should be allowed to enter different grade boundaries for each paper when creating a new quiz

Each quiz should be worth 100 marks, and have a time of 1:45 The user must have a list of pupils in each of the classes they teach

showing who has and has not completed each quiz that has been created The user should be able to create a number of questions for each quiz,

including the question text, choice of answers, correct answer, question topic, question marks, question difficulty and question working

There should be an option to upload images for each question There should be between 25 and 35 questions in each quiz Each question in each quiz must be grouped into one of the six topic areas

in the GCSE maths syllabus Questions should be ranked by difficulty, with questions starting the quiz

being simple and becoming more complex The teacher should be able to set a deadline for each quiz, after which the

student is unable to take it The program should show visually how well their students are scoring in

each of the topic areas as a whole, as well as individually Teachers should be able to access data which visually shows the grades

attained by each student.Administrator Functions

The administrator should have a completely separate log in space from the teacher and student users

The administrator should have a secure username and password log in to the program

The administrator should be able to create new classes setting the class name and set

There should be an editing function for the admin to search for a user and edit their details to make sure the data is correct and up to date

The admin should be able to delete users that no longer use the programDesign

The interface of the program should be simple to use and easy to understand

The program must be simple to navigate through The text on screen should be large enough for easy reading, and in a

readable font The program needs to sort data quickly and efficiently due to updates of

the information on a regular basis The program should be professional and efficient to use

Page 36: Documentation for a Visual Basic Mathematics Program

36

Design

Overall system design

The overall system breaks down into five main modules, which each break down into smaller sub-modules. The system works using file handling, functions and procedures to complete tasks quickly & efficiently. These five modules are:

Login: This module is for security, where users must register, or existing members must enter their username and password to gain access to the program.Create Quiz: This is where data is inputted by the teacher to create a quiz and its questions. It is then saved to a file which can then be accessed by the Take Quiz module.Take Quiz: This module lays out the questions that were created by the teacher, in a quiz format for the student to answer.View Results: This module processes the data from the student’s answers, and presents it in a suitable format.Data Analysis: This module will use the results to create information about the individual student, as well as the year group as a whole.

Description of modular structure of system

Log in Form: If the user has not used the program before, they will need to create a new account for themselves so they can log in. Here, they will need to enter their details, so they can register with the system. Once they have entered these details, or if they have already done this, they will use their username and password. The validity of the username and password will be checked against the appropriate file, and once confirmed will take them to the appropriate homepage.

Page 37: Documentation for a Visual Basic Mathematics Program

37

Create Quiz: A teacher user will enter the basic information about the quiz, and then create questions for the student to answer. This will then be saved to file and will appear in the list of quizzes that the student can take.

Take Quiz: A student user will select one of the quizzes a teacher has created, which they will then have to answer the questions. Once the student has completed a question, their answers will be saved to file which is then accessed by the view results module.

View Results: Once a student has completed a quiz, their marks are printed on screen, along with their grade. These are calculated by the program on the answers that the student gave in the quiz, compared to the correct answer given by the teacher when they created the quiz.

Page 38: Documentation for a Visual Basic Mathematics Program

38

Data Analysis: Either a student or teacher user can access student quiz results which are presented in a graphical form. The is calculated by the answers that the student gives to the questions, and can focus on an individual student, a particular quiz, a topic in the syllabus or the year group as a whole.

Data dictionary

Data Name Description Data Type

Example Validation

User Type User selects student or teacher type

String “student”

As well as a presence check, if the user selects Teacher as their user

type, they will then have to enter a security word to make sure that

there is not a student pretending to be a teacher trying to access the

systemTeacher ID Unique Teacher User ID Integer “05” Value is generated by the program

so does not need validationFull

Teacher Name

Forename and Surname of the user

String “Dianne Hardwic

k”

There must be a presence check performed on this value to make sure it is not left empty. I will use

regex to check that the string only contains upper and lower case

letters, one or two spaces (depending on whether the user

entered a middle name or not), or a dash for a double barrelled name

Teacher Username

Used for teacher’s login String “DHardwick”

There must be a presence check performed on this value to make sure it is not left empty. I will use

regex to check that the string only contains upper and lower case

letters, digits, dashes or underscores

Teacher Password

Used to secure the teacher’s login

String “Circle1” There must be a presence check performed on this value to make sure it is not left empty. I will use

regex to check that the string only contains upper and lower case

letters, digits, dashes or underscores

First Class Taught

The name of the first class that the user teaches

String “11A” There must be a presence check performed on this value to make

sure it is not left emptySecond The name of the second String “11C” There must be a presence check

Page 39: Documentation for a Visual Basic Mathematics Program

39

Class Taught

class that the user teaches performed on this value to make sure it is not left empty

Security Word

Used for security as a word which a user must enter to

create a teacher account for user type validation

String “circle” There must be a presence check performed on this value to make

sure it is not left empty, and make sure it matches the saved security

wordStudent ID Unique Student User ID Integer “105” Value is generated by the program

so does not need validationFull

Student Name

Forename and Surname of the user

String “Rachel McGreev

y”

There must be a presence check performed on this value to make sure it is not left empty. I will use

regex to check that the string only contains upper and lower case

letters, one or two spaces (depending on whether the user

entered a middle name or not), or a dash for a double barrelled name

Student Username

Used for student’s login String “rachelmcgreev

y”

There must be a presence check performed on this value to make sure it is not left empty. I will use

regex to check that the string only contains upper and lower case

letters, digits, dashes or underscores

Student Password

Used to secure the student’s login

String “mrblobby”

There must be a presence check performed on this value to make sure it is not left empty. I will use

regex to check that the string only contains upper and lower case

letters, digits, dashes or underscores

Student Class

The name of the maths set that the student is in

String “11B” There must be a presence check performed on this value to make

sure it is not left emptyPassword Matches

Used to check whether the password entered matches the password that is saved

for that user

Boolean “yes” Value is generated by the program so does not need validation

Final Exam Dates

The dates of the two final exams that the students will

take

Date “23/06/12”

None – two predetermined dates entered during the creation of the

programQuiz ID Unique Quiz ID Integer “09” Value is generated by the program

so does not need validationQuiz Name The name that the quiz can

be identified byString “Quiz 1” There must be a presence check

performed on this value to make sure it is not left empty. I will use

regex to check that the string only contains upper and lower case

letters, digits or dashes, and has a string length less than the save

length limitQuiz

DeadlineThe deadline set for each

paperDate “3/2/12” Checked to make sure the date is

valid, and is a future date and not a date that has already passed

A* Grade Boundary

The mark that the user needs to get an A* grade

Integer “90” There must be a presence check performed on this value to make

sure it is not left empty, and a check using regex to make sure the

value entered contains integers

Page 40: Documentation for a Visual Basic Mathematics Program

40

only. It should also be checked to make sure the value is lower than

100A Grade

BoundaryThe mark that the user needs to get an A grade

Integer “81” There must be a presence check performed on this value to make

sure it is not left empty, and a check using regex to make sure the

value entered contains integers only. It should also be checked to make sure the value is lower than

the A* grade boundaryB Grade

BoundaryThe mark that the user needs to get an B grade

Integer “72” There must be a presence check performed on this value to make

sure it is not left empty, and a check using regex to make sure the

value entered contains integers only. It should also be checked to make sure the value is lower than

the A grade boundaryC Grade

BoundaryThe mark that the user needs to get an C grade

Integer “63” There must be a presence check performed on this value to make

sure it is not left empty, and a check using regex to make sure the

value entered contains integers only. It should also be checked to make sure the value is lower than

the B grade boundaryD Grade

BoundaryThe mark that the user needs to get an D grade

Integer “52” There must be a presence check performed on this value to make

sure it is not left empty, and a check using regex to make sure the

value entered contains integers only. It should also be checked to make sure the value is lower than

the C grade boundaryE Grade

BoundaryThe mark that the user

needs to get an E grade, below which the user will

get a U grade

Integer “40” There must be a presence check performed on this value to make

sure it is not left empty, and a check using regex to make sure the

value entered contains integers only. It should also be checked to make sure the value is lower than

the D grade boundaryNumber of Questions

Number of questions in the quiz

Integer “28” There must be a presence check performed on this value to make

sure it is not left empty, and a check using regex to make sure the

value entered contains integers only. It should also be checked to make sure the value entered is lower than or equal to 35 and greater than or equal to 25

Question Number

The number of the question in the quiz

Integer “10” Value is generated by the program so does not need validation

Question Text

The text of each question String “Simplify (x+2)(x-

3)”

There must be a presence check performed on this value to make sure it is not left empty. I will use

regex to check that the string only contains upper and lower case

letters, digits dashes or punctuation marks, and has a

Page 41: Documentation for a Visual Basic Mathematics Program

41

string length less than the save length limit

Correct Question Answer

The correct answer to the question

String “x2-x-6” There must be a presence check performed on this value to make sure it is not left empty. I will use

regex to check that the string only contains upper and lower case

letters, digits dashes or punctuation marks, and has a

string length less than the save length limit

First Answer Choice

An incorrect alternative answer to the question

String “x2+x-6” There must be a presence check performed on this value to make sure it is not left empty. I will use

regex to check that the string only contains upper and lower case

letters, digits dashes or punctuation marks, and has a

string length less than the save length limit. It must also be

checked to make sure it is unique from all of the other answer choices

Second Answer Choice

An incorrect alternative answer to the question

String “x2-x+6” There must be a presence check performed on this value to make sure it is not left empty. I will use

regex to check that the string only contains upper and lower case

letters, digits dashes or punctuation marks, and has a

string length less than the save length limit. It must also be

checked to make sure it is unique from all of the other answer choices

Third Answer Choice

An incorrect alternative answer to the question

String “ x2+x+6”

There must be a presence check performed on this value to make sure it is not left empty. I will use

regex to check that the string only contains upper and lower case

letters, digits dashes or punctuation marks, and has a

string length less than the save length limit. It must also be

checked to make sure it is unique from all of the other answer choices

Question Topic

The topic area the question is from

String “Algebra”

There must be a presence check performed on this value to make

sure it is not left emptyQuestion

MarksAmount of marks the

question is worthInteger “5” There must be a presence check

performed on this value to make sure it is not left empty

Question Difficulty

Difficulty ranking of each question

Integer “1” There must be a presence check performed on this value to make

sure it is not left emptyQuestion Working

The working out for each question to reach the

correct answer

String “(x*x)+(x*-3)+(2*x)

+(2*-3)”

There must be a presence check performed on this value to make sure it is not left empty. I will use

regex to check that the string only contains upper and lower case

letters, digits dashes or punctuation marks, and has a

string length less than the save

Page 42: Documentation for a Visual Basic Mathematics Program

42

length limitQuestion

Image PathThe path of the image that is attached to the question

String “C:\Files\My

Pictures\Triangle

There must be a check performed to make sure that if a file path is

entered it is valid, and the document type is valid

Student Question Answer

The answer the student has selected

String “x2+x-6” There must be a presence check performed on this value to make

sure it is not left emptyQuiz Taken Whether the quiz has been

taken or notBoolean “Yes" Value is generated by the program

so does not need validationStudent Score

The score the student has achieved in the quiz

Integer “76” Value is generated by the program so does not need validation

Student Grade

The grade the student has achieved in the quiz

String “B” Value is generated by the program so does not need validation

Quiz Finish Time

The time the user completed the quiz in

Time Value is generated by the program so does not need validation

Student Topic Marks

The number of marks achieved in each topic area by each student individually

Integer “11” Value is generated by the program so does not need validation

Class Topic Marks

The number of marks achieved in each topic area

in the class as a whole.

Integer “150” Value is generated by the program so does not need validation

Class Name The Name of the Maths Class

String “11B” There must be a presence check performed on this value to make

sure it is not left emptyClass Set The set number of math

classInteger “1” There must be a presence check

performed on this value to make sure it is not left empty

Old Password

The current password of the user which is entered when the user wants to change

their password

String “yellow” There must be a presence check performed on this value to make

sure it is not left empty, and that it exactly matches the password saved in the file for that user

New Password

The password that the user wants to change to for

logging in

String “hippopotamus”

There must be a presence check performed on this value to make sure it is not left empty. I will use

regex to check that the string only contains upper and lower case

letters, digits, dashes or underscores

Re Entered New

Password

The new password entered again for extra validation

String “cardigan”

There must be a presence check performed on this value to make

sure it is not left empty, and that it exactly matches the New Password

valueNew

Passwords Match

Used to check whether the new password matches the re-entered new password

Boolean “No” Value is generated by the program so does not need validation

Admin Username

Username used to login as the admin

String “admin1”

None – a predetermined username entered during the creation of the

programAdmin

PasswordPassword used to secure

admin loginString “equatio

n”None – a predetermined password entered during the creation of the

program

Page 43: Documentation for a Visual Basic Mathematics Program

43

Description of record structure

There will be six different held, which will all link to each other:Structure Student Record

User ID: Integer Full name: String Username: String Password: String Class Name: String

There is one of these for each student registered in the system. The Class Name field in this record is linked to the Class Name field in the Class Record.Structure Teacher Record

User ID: Integer Full Name: String Username: String Password: String First Class Taught: String Second Class Taught: String

There is one of these for each student registered in the system. The Classes Taught field in this record is linked to the Class Name fields in the Class Record.Structure Quiz Record

Quiz ID: Integer Quiz Name: String Number of Questions: Integer Quiz Deadline: Date A* Grade Boundary: String A Grade Boundary: String B Grade Boundary: String C Grade Boundary: String D Grade Boundary: String E Grade Boundary: String

There is one of these for quiz created by the teacher. Structure Question Record

Quiz ID: Integer Question Number: Integer Question Text: String First Answer Choice: String Second Answer Choice: String Third Answer Choice: String Question Working: String Question Marks: Integer Question Topic: String Question Difficulty: Integer Image File Path: String

There is one of these for each question in every quiz. The Quiz ID field is linked to the Quiz ID field in the Quiz Record.Structure Class Record

Class Name: String Class Set: Integer

There is one of these for each class in the year group. This is linked to the Classes Taught in the Teacher Record & Class Name in the Student Record.Structure Student Quiz

User ID: Integer Quiz ID: Integer Taken: Boolean Student Score: Integer Student Grade: String Quiz Time: Time

There is one of these for each quiz the student has taken. This is linked to the Student Record. The User ID field is linked to the User ID field in the Student Record, and the Quiz ID field is linked to the Quiz ID field in the Quiz Record.

Page 44: Documentation for a Visual Basic Mathematics Program

44

This is a diagram to show the relationships between each of the records;

The six files may be interpreted as a database;

StudentRecord: UserID, FullName, Username, Password, ClassName, ExamDatesStudentQuizRecord: UserID, QuizID, Taken, StudentAnswers, Score, Grade, TimeTeacherRecord: UserID, FullName, Username, Password, ClassesTaughtQuizRecord: QuizID, QuizName, NumberofQuestions, QuizMarks, Deadlines, GradeBoundariesQuestionRecord: QuizID, QuestionNumber, Text, Image, Answer, Choices, Working, Marks, Topic, DifficultyClassRecord: ClassName, ClassSet

Validation required

As shown in the data dictionary, there will need to be some validation on information entered by the user to prevent erroneous data being stored.

When creating a new user account, or changing the password of an existing account the user will be asked to enter their password twice, to make sure that they did not incorrectly enter it the first time. The system will compare the two entered passwords and compare lengths and ASCII codes of the two fields to make sure they are exact. This validation makes sure the user correctly enters the password they want, and as they are writing it multiple times, they are more likely to remember it. Some Pseudocode for this would be;

Function PasswordsMatch(FirstPassword As String, SecondPassword As String) As BooleanIf FirstPassword = SecondPassword then

PasswordsMatch = TrueElse

PasswordsMatch = FalseEnd IfEnd Function

Another form of validation will be masking the letters when a user types in their password whilst logging in, creating a new account or changing their existing password. Masking the letters with symbols makes sure that anyone else looking at the screen whilst the password is being entered cannot then see it and log in to the students account posing as them. This makes sure the password stays private

Page 45: Documentation for a Visual Basic Mathematics Program

45

to the user and prevents others being able to access the system. This can be done by changing the characters that are displayed when the text in the textbox is entered.

When a new account is created, the user must specify whether they are a student or teacher. As there will be two separate files for students and teachers, when the new user details are stored, they will be saved to the according file. When it comes to logging in, the student login page will only access the student file, and the teacher login page will only access the teacher file. This prevents students logging into the teachers area and accessing other student’s results and gives restricted access to certain areas of the program for certain users.

Whilst both users are inputting information into the system, I will need to check that the user is inputting the correct format of data, such as only entering digits in the number of question in the quiz text box, or only entering letters in the name text box. To do this I will be using Regular Expression (Regex) to make sure the input matches the allowed pattern of characters to be entered. Here is an example of some pseudocode to check made with the full name being entered by the user when making a new account.

Function CheckFullName(FullName as String, NameOk as Boolean) as BooleanRegExPattern = “[a-zA-Z]+(\s)[a-zA-Z\-]+”If FullName Matches RegExPattern then

NameOk = TrueElse

NameOk = FalseEnd ifReturn NameOkEnd Function

The pattern “[a-zA-Z]+(\s)[a-zA-Z\-]+” is a pattern that a full name should match, with “[a-zA-Z]+” meaning one or more letters, “[/s]” meaning one space, followed by one or more letters shown by “[a-zA-Z\-]+” with the dash allowing for a double barelled surname. This also makes sure that an entry is present so doubles as a presence check in the validation.

When a teacher is creating a new account, after they have selected the user type as teacher and input their details, they must enter a pre-agreed security word to confirm that they are indeed a teacher. This prevents students creating a fake teacher account and logging into the teacher’s area to access other student’s results.

Function CheckSecurityWord(WordEntered as String, SecurityWord as String,_ SecurityWord as Boolean) As BooleanIf WordEntered = Security word then

SecurityWordMatches = TrueElse

SecurityWordMatches = FalseEnd IfReturn SecurityWordMatchesEnd Function

As I am saving my data using direct access – see the file organisation section of the design – each entry that is saved will need be be less than or equal to a certain length. I will therefore need to make sure that the entries are less than the save length, by performing a length check on each of the entries. A pseudocode example is shown below of the length check performed on the name entered by the user when creating an account.

Function CheckNameLength (FullName as String, NameLength as Integer, NameOk as String) As Boolean

Page 46: Documentation for a Visual Basic Mathematics Program

46

If Length(FullName)<= NameLength thenNameOk = True

ElseNameOk = False

End IfReturn NameOkEnd Function

File organisation and processingThere are 6 separate files that data will be stored in: Student File, Teacher File, Quiz File, Question File, Student Quiz File and Class File. I will be using visual basic’s inbuilt file handling system which will store the data in the files, rather than using an external database to store the data.

As I am saving the data as structures in all six files, I will be saving the information using a direct access method. Visual Basic’s inbuilt file management routines for direct access quickly store and find data, which is very important in my program as there is a lot of data that will be saved. Although saving records directly makes writing to file slower, the data can be retrieved from the file faster as the program can skip straight to the file that is needed, which is important to make the program run quickly and efficiently.

A sample of how information will be saved in one of the files is show belowLocation In File 1 2 3 4

Student ID 001 002 003 004Student Name Rachel

McGreevyAlex Penson Jennifer Clark Jessica Trent

Student Username rmcgreevy1 APenson JPClark JTrentStudent Password yellow cheese computer mathematics

Student Class 11A 11A 11D 11C

This table shows how the data is saved at each record location, and shows that all parts of one record can be accessed at once, whatever the data. This means the record is saved as a whole, which means saving using direct access is the most efficient method for my program. I am not using serial or sequential access, as it would take a significantly longer time to read from the file as the data would be read from file in order one by one. This would slow down the retrieval of data, and efficient file handling is extremely important in my program.

Page 47: Documentation for a Visual Basic Mathematics Program

47

Identification of appropriate storage mediaFrom my volumetric calculation, my system will need to hold just over 200 kilobytes worth of data, so it is important that I use storage devices that can hold this volume of data. Here is a list of important storage devices that I will use to hold my project during and after its creation.Hard DriveA hard drive is a non-volatile storage device, with a capacity of up to 1 Terabyte. It works using platters spun on a rotating spindle, and data is magnetically read from and written to them using a read/write head. The hard drive is the most convenient place to save the program, as it is stored internally in the computer, so it is the device that I will be using to save the program on during its creation. It would not be the best way to store the final program due to the time consuming transferral of the program onto all of the student’s hard drives. An external hard drive could be used to transport the program around for use and, with storage capacity ranging from 250GB – 500GB, however are fairly expensive and could be easily damaged.USBUSB (Universal Serial Bus) flash drives are a form of non-volatile memory storage, with a capacity of 1GB – 16GB. Flash memory means that data can be written and re-written quickly to the device multiple times. It exceeds its predecessor the Floppy Disc due to its portability and memory capacity, and can be used with any computer with a USB port. When working on my project at home and school, I will use my 4GB USB stick to transfer it between computers. This is a relatively inexpensive form of storage, and keeps a permanent and up to date form of the program. I can then transfer the finished product onto the hard drive of my home computer.Cloud StorageCloud storage is a form of online document storage, which uses a virtual pool of storage on the web. Third party companies host the sites, where users can store any amount (depending on the company) of data, which can be downloaded from and uploaded to from any computer with an internet connection. I will use the website Dropbox to regularly save up-to-date versions of my program online, in case I lose the USB or the data becomes corrupt.CD-ROMA CD-ROM (Compact Disc – Read Only Memory) is a non-volatile form of storage, with a memory capacity usually around 700MB. This would be enough storage space to hold my program, and a very simple way to transfer programs onto computer. As it has Read-Only memory, data can be read from the disc, but not written. This would be a great form of storage to distribute the final program on, as it is an easy way to distribute the program to all the necessary users, with minimal costs as CD’s are relatively inexpensive.

Page 48: Documentation for a Visual Basic Mathematics Program

48

Identification of processes & suitable algorithms for data transformation

QuicksortLevel 1Procedure Quicksort(StudentNames())Less Numbers less than the pivotGreater Numbers greater than the pivotPivotlist Number of pivots usedPivot First Student FileIf length of StudentNames() is equal to or less than one then

Return QuicksortElse

For each item in StudentNames()If item is not pivot thenIf item is less than or equal to pivot, then add item to Less ListIf item is greater than pivot, then add item to Greater List

End ifPivotlist Pivotlist + 1If Pivotlist Length of StudentNames then

Return QuicksortElse

Return (Quicksort (Less), (Quicksort(Greater))End IfReturn QuicksortEnd Function

Level 2Sub Quicksort(StudentNames(), First, Last)LeftPointer, RightPointer As IntegerTemp As StringIf First < Last ThenLeftPointer = FirstRightPointer = Last + 1Do

DoLeftPointer = LeftPointer + 1

Loop Until StudentNames(LeftPointer) >= StudentNames(First) Or LeftPointer > LastDo

RightPointer = RightPointer - 1Loop Until StudentNames(RightPointer) <= StudentNames(First)If LeftPointer < RightPointer Then

Temp = StudentNames(LeftPointer)StudentNames(LeftPointer) = StudentNames(RightPointer)StudentNames(RightPointer) = Temp

End IfLoop Until LeftPointer > RightPointerTemp = StudentNames(First)StudentNames(First) = StudentNames(RightPointer)StudentNames(RightPointer) = TempQuicksort(StudentNames, First, RightPointer - 1)Quicksort(StudentNames, RightPointer + 1, Last)End IfEnd Sub

Writing Score to fileProcedure SaveStudentUser (ID, Name, Username, Password, Class)

Page 49: Documentation for a Visual Basic Mathematics Program

49

Open StudentRecord FilePosition New file location number at end of fileStudentRecord.UserID = ID StudentRecord.StudentName = NameStudentRecord.Username = UsernameStudentRecord.Password = PasswordStudentRecord.Class = ClassSave to StudentRecord(Position)Close StudentRecord FileEnd Procedure

Reading Scores From file Procedure SaveStudentUser (RecordLocation)Open StudentRecord FileOpen from StudentRecord(RecordLocation)StudentRecord.StudentName = NameStudentRecord.Username = UsernameStudentRecord.Password = PasswordStudentRecord.Class = ClassClose StudentRecord FileReturn Name, Username, Password and ClassEnd Procedure

Alter PasswordSub CheckAndSavePassword(RecordLocation, OldPasswordMatches, NewPasswordMatches, OldPassword, NewPassword, ReEnteredNewPassword)Open StudentRecord FileOpen StudentRecord(RecordLocation) RecordIf OldPassword = StudentRecord.Password Then

OldPasswordMatches = TrueIf NewPassword = ReEnteredNewPassword Then

StudentRecord.Password = NewPassword NewPasswordMatches = True Save StudentRecord(Recordlocation) Else Output – “Your New Password Entries Do Not Match" NewPasswordMatches = False End IfElse OldPasswordMatches = False OutPut - "Incorrect Current Password"End IfClose StudentRecord FileEnd Sub

Binary SearchProcedure BinarySearch (StudentRecord, First, Last, StudentSought)StudentFound = FalseSearchFailed = FalseMidpoint (First + Last)/ 2If StudentRecord(Midpoint).FullName = StudentSoughtThen StudentFound TrueElseIf First >= LastThen SearchFailed TrueElseIf StudentRecord(Midpoint).FullName < StudentSoughtThen BinarySearch (StudentRecord, Midpoint+1, Last, StudentSought)Else BinarySearch (StudentRecord, First, Midpoint-1, StudentSought)If SeachFailed = True Then Output “Search has failed”

Page 50: Documentation for a Visual Basic Mathematics Program

50

If StudentFound = True Then Output ItemEnd Procedure

Find User from FilePublic Sub FindStudentUser(ByVal Username As String)UserFound As Boolean FalseOpen StudentRecord FileWhile Not End of File Open StudentRecord(i) Record If Username = Student.Username Then UserFound = True RecordLocation = i Exit While End If i = i + 1End WhileClose StudentRecord FileEnd Sub

Validate Text Box InputFunction ValidateTextBox(Text, SaveLength, MsgText, RegexPattern, ValidInput) As Boolean MyRegex As Regex(RegexPattern) If Length(Text) > SaveLength Or MyRegex.IsNotMatch(Text) Then ValidInput = False Output - "Invalid " & MsgText & ". Please try again" End If Return ValidInputEnd Function

Check AnswerFunction CheckForCorrectAnswer(RadioButton, CorrectAnswer, QuestionMarks, CorrectAnswerChosen) As Boolean If RadioButton.Checked And RadioButton.Text = CorrectAnswer Then CorrectAnswerChosen = True StudentQuizScore = StudentQuizScore + QuestionMarks QuestionScore = QuestionMarks End If Return CorrectAnswerChosen End FunctionEnd Class

Drawing a graphLevel 1Procedure Graph (StudentScore)Open StudentScore fileX, Y As IntegerSet Graph(X, Y)X Total Number of Quizzes / Quiz NumberY StudentScoreSet Graph(X, Y)Add Coordinates (X, Y)Close StudentQuiz fileEnd

Level 2Sub DrawScoreGraph(Scores(), k, GraphPanel)Scores(0) = 0X1, Y1, X2, Y2 As IntegerGraphGraphics As GraphicsGraphPen As Pen

Page 51: Documentation for a Visual Basic Mathematics Program

51

GraphGraphics = GraphPanel.CreateGraphics GraphGraphics.Clear(Color.SlateGray) GraphPen = New Pen(Color.Red, 5) For Count = 1 To k X1 = (Count - 1) * (GraphPanel.Width / k) Y1 = GraphPanel.Height - ((GraphPanel.Height / 100) * (Convert.ToInt64(Scores(Count - 1)))) X2 = Count * (GraphPanel.Width / k) Y2 = GraphPanel.Height - ((GraphPanel.Height / 100) * (Convert.ToInt64(Scores(Count)))) graphic.DrawLine(GraphPen, X1, Y1, X2, Y2) Next graphic.DrawLine(Pens.Black, 1, 1, 1, (GraphPanel.Height - 1)) graphic.DrawLine(Pens.Black, 1, (GraphPanel.Height - 1), GraphPanel.Width, GraphPanel.Height - 1)

Page 52: Documentation for a Visual Basic Mathematics Program

52

User interface design (HCI) rationale

This is the first page the user will see when they open the program. They will choose their user

type to lead them to their log in page or select to create a new user account.

This is the page that the user will be directed to after they have selected either student or teacher login. They are asked to enter their log in details to

access the main part of the program.

This is the page that the user will be directed to if they selected that they are a student user and correctly

entered their log in details. This is the homepage where they can see all of the quizzes available and their scores

if taken.

This is the page that both student and teacher users will be directed to if they choose the ‘Alter Password’ button on both of their homepages. Here the user can change

their log in password to something different.

Simple layout of page causes no confusion as to what the user must do

Two identically sized textboxes used for good aesthetics, with masking for the password

characters

Buttons lead the user straight to where they want to go with clear labels

No other unnecessary details are on the page to maintain a simple design.

Quizzes and grades (if applicable) are displayed directly after log on, so the user knows straight away

what quizzes they need to take.

All other options of what the user can do are displayed as buttons so can quickly and easily be

selected

Three identically sized textboxes used for good design, with masking for the two password entries

Simple GUI as specified in the user requirements, so no confusion is caused over what the user must

enter

Page 53: Documentation for a Visual Basic Mathematics Program

53

This is the page that the student user will be directed to if they choose the “Take Quiz” button on their

homepage. It shows a list of quizzes that are available for them to take, one of which they are able to select.

This is the page that the student user will see when they have selected an exam to take, and they have selected

‘GO’. This is the question page, and will show the question and the possible answers.

This is the page that the student user will be directed to once they have selected an answer on the question page. It shows the question, correct answer and the

working out.

This is the page that the student user will be directed to once they have answered all of the questions in the quiz. The page will show their final score and grade, and the

time that they finished the quiz in.

A list of all the un-taken quizzes is given for the user to select one to take.

Only the un-taken quizzes are listed to the user cannot overwrite their score that they have already

attained

Confirms the quiz that the user wishes to take, and takes them straight to the first question

Lists the question number so the user know where they are at in the quiz

Four separately spaced answers are laid out on the screen for the user to select one.

A simple layout helps the user to focus on the question rather than the program

Shows the question again in case the user had forgotten the exact elements in it

Shows the working of the problem in case the user does not understand how the correct answer is

attained

No unnecessary detail is added onto the page to distract the user from the program’s purpose

The score is worked out from the student answers compared to the correct answers, and a grade is

calculated from that, according to the grade boundaries given

Displays the time that the user managed to complete the quiz in

Takes the user back to their homepage, where they can view the updates results or select one of the other

options

Page 54: Documentation for a Visual Basic Mathematics Program

54

Sample of planned data capture and entry designs

This is the page that the user will be directed to if they selected that they are a teacher user and correctly

entered their log in details. This is the homepage where they can see all of the students that they teach and their

grades in all of the quizzes available.

This is the page that the user will be directed to if they selected the “Create Class” button on their homepage. It will allow them to create a new class that students are taught in,

the name of the class and the set number it is.

This is the page that the teacher user will be directed to if they select the “Create Quiz”

button on their homepage. It allows them to enter the basic information that the system will

need to store about the quiz.

This is the page that the teacher user will be directed to once they have entered all of the basic information in about the quiz. Here they enter the information about each individual

question, so there will be as many of these pages as the number of question there will be in the

quiz.

Displays all of the students along with the results in each of the quizzes available, so the user knows

instantly which user has done what

All other options of what the user can do are displayed as buttons so can quickly and easily be

selected

Two equally sized text boxes are used for a simple design, with a combo box for the Class Set

A combo box lists all of the available sets numbers of 1 to 5 to rank the abilities of the students

No extra detail for quick and easy entry of a new class, then takes the user back to the homepage

directly

Allows the user to enter the details of the quiz that will be displayed to the student

Grade boundaries differ depending on the difficulty of the questions so student grades are calculated using

these

All textboxes and combo boxes will be of the same size down the page for a simple design

The page is easy to understand so the user will know exactly what to enter into each of the

options

Page 55: Documentation for a Visual Basic Mathematics Program

55

Sample of planned valid output designs

This is the page where the teacher can view the graph of the average grade being achieved for each topic in the syllabus. This can be viewed from pressing the ‘topic breakdown’ button on

the teacher homepage.

This is the page where the student can view the graph of the grade they have achieved for each topic in the syllabus. This can be viewed from pressing the ‘topic breakdown’ button on

the student homepage.

This is the page where the student can view the graph of the grade they have achieved for each quiz they have taken so far. This can be viewed from pressing the ‘grade breakdown’ button on

the student homepage.

The axes are labelled to show the graph that the teacher is viewing, largely and clearly

No unnecessary detail is added onto the page to distract the user from the program’s purpose

Takes the user back directly to their homepage after viewing results

No unnecessary detail is added onto the page to distract the user from the program’s purpose

The axes are labelled to show the graph that the student is viewing so it is easy for them to

use

Takes the user back directly to their homepage after viewing results

The information in the graph can be identified from the labelled axes for the student

No unnecessary detail is added onto the page to distract the user from the program’s purpose

Takes the user back directly to their homepage after viewing results

Page 56: Documentation for a Visual Basic Mathematics Program

56

Sample of Planned Validation

Both text boxes must have a presence check performed on them to make sure they have

input some data.

When the user types in their password, the letters are masked, so other people who can

see the screen whilst the user is typing in their password cannot see it.

When enter is pressed, the program will check the username and password combination

against the list of usernames and passwords saved in the student or teacher file to make

sure the user trying to login exists in the system

User must enter old password to prove that they are not someone else using another person’s account when they are not there

The new password must be entered twice to make sure they have spelt it correctly the first

time they entered it

There must be a presence check to make sure the user has not left both of the new passwords

input empty as they would both still match

The inputs in all of the text boxes on this form are masked so other users surrounding them cannot see what they are entering for added

securityThe combo boxes will be checked to make sure

the user has entered one of the pre-entered fields and not entered another option

All of the textboxes, especially combo boxes have a presence check performed on them by the program to make sure that they have been filled out as the user may easily forget to enter

the information

The question mark textbox must be checked to make sure the input is an integer rather than a

string

The text boxes must have a length check performed on them to make sure the user’s

input is not greater than the save length of the field

Page 57: Documentation for a Visual Basic Mathematics Program

57

Description of measures planned for security and integrity of data

The Data Protection Act of 1998 defines the laws of the processing of personal data of an identifiable living person. Personal data is defined as data which relates to a living individual who can be identified from that data, and as my system will be holding the names of students and their quiz results, and the names of teachers, the system would have to comply with the Data Protection Act.The Data Protection Act comprises of 8 main statements, which the program must abide by to protect the data stored about the users of the system. As stated in one of the principles, the data will only be used for the purposes it was collected for – provide students with practices quizzes for their maths GCSE and provide teachers with the abilities of their students. This data won’t be used anywhere else or passed on to a third party - another important part of the Data Protection Act. Any student is able to access the information that is stored about them, which is mainly their quiz scores, on their homepage which is always displayed when they are logged in. The last principle that will apply to my program is that adequate security measures are in place to prevent unauthorised access to private information. This could be information such as the quiz results and grades for other students or login usernames and password to the program. Creating a log in for users ensures that students can only access their own results, and not those of others, making sure they can only access certain parts of the program. Adding in a security word required to create a new teacher account assures that no student can pose as a teacher to view other student information.

Description of measures planned for system security

I have designed several security procedures that I will implement in my program, to make sure that only the people who are authorised to use the program can access it.

The main security function in the program is the logging in of users to access the software. Only registered users are able to use the program, and access any information. As there are two types of user group who will have different levels of access to the system – students & teachers – a different log in area for each type of user will be created. This makes sure students cannot access information about other students in the year group that the teacher will be able to access.

To enforce this, I will assign a security word that must be entered when trying to register for a teachers account to access the program. This is a pre-agreed upon word by the teachers, which will be ‘circle’ for the purposes of this project, that the students are not informed of. This way, if a student were to attempt to sign up for a teachers account to access other student’s information, they would be unable to due to the unknown security word.

Another security measure I will utilize is the use of masked passwords when they are being entered into the registration page, the log in page and the alter password page. This prevents other people that are looking at the screen whilst the user enters their details from finding out their password and logging in as the student. This way, only the user and their teacher can access their information.

Page 58: Documentation for a Visual Basic Mathematics Program

58

Overall test strategy

I will have to test my program during its build and after its completion, testing many different aspects of the design. As well as testing that each form will follow on to the next and some procedures and functions are working, I will have to test that the validation that I implement into the system is working correctly. This is very important, as I need to make sure that the program is robust and will not break easily after entering invalid data.

Whilst I am coding the program, I will use the method of white-box testing to check that the system is running and successfully processing input data. White-box testing is using knowledge of the internal coding of a program to create test cases to resolve any bugs, and make sure the system is functioning as it should be in any given situation, step-by-step. When each of the five modules of the system is completed I will test to make sure all of the underlying procedures and functions in the whole module work together as they should do.

I will then give a copy of the final program to the user so they can run their own tests on it to confirm that the program is of a suitable standard. As they have no knowledge of the program’s design or any experience in programming at all, they will be using black-box testing, with a set of tests drawn from their needs to make sure the program meets all of their needs. This will be useful to get an outside opinion to the program, and outline any potential errors that may occur during use.

To perform the white-box and black-box testing, both the user and I will be using BET testing, which includes using boundary, erroneous & typical data to test whether the program will process input/outputs properly. An example of BET testing for a piece of data that must be a length of four integers would have boundary data of 0000, erroneous data of 01A, and typical data of 1065. Using BET tests for White-box and Black-box testing will make sure my program is up to par and functioning as required by the user.

Page 59: Documentation for a Visual Basic Mathematics Program

59

Implementation

Program listing & Screen shots of working program

Splash Screen

Login Selection ScreenPublic Class LoginSelectionScreen Private Sub CreateNewUserBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CreateNewUserBtn.Click CreateNewUser.Show() Me.Hide() End Sub Private Sub StudentLoginBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentLoginBtn.Click StudentLoginScreen.Show() Me.Hide() End Sub Private Sub TeacherLoginBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TeacherLoginBtn.Click TeacherLoginScreen.Show() Me.Hide() End Sub Private Sub AdministratorLoginBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AdministratorLoginBtn.Click AdministratorLoginScreen.Show() Me.Hide() End Sub Private Sub ExitProgramBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitProgramBtn.Click Me.Close() End SubEnd Class

Page 60: Documentation for a Visual Basic Mathematics Program

60

Student Login ScreenPublic Class StudentLoginScreen Private Sub StudentPasswordTbx_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentPasswordTbx.TextChanged ' this changes the characters being entered into the password text box to mask what is being written StudentPasswordTbx.PasswordChar = "*" End Sub Private Sub CancelBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CancelBtn.Click LoginSelectionScreen.Show() Me.Close() End Sub Private Sub StudentLoginBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentLoginBtn.Click CheckStudentLoginDetails() End Sub Private Sub CheckStudentloginDetails() Username = StudentUsernameTbx.Text Password = StudentPasswordTbx.Text 'this finds the user in the student file from the username they have entered Call FindStudentUser(Username) 'this makes sure the input is valid before showing the student homepage If Username <> "" And Password <> "" And CountStudentsInFile() > 0 And UserFound = True And PasswordsMatch(RecordLocation, Password) Then StudentHomepage.Show() Me.Close() Else 'this clears the text box for the user StudentPasswordTbx.Clear() End If End Sub Public Function CountStudentsInFile() As Integer Dim Student As StudentRecord FileOpen(1, StudentFile, OpenMode.Random, , , Len(Student)) 'this counts how many students are in the file, based of the total length of the file divided by the length of one students record CountStudentsInFile = LOF(1) / Len(Student) FileClose(1) End Function Private Function PasswordsMatch(ByVal RecordLocation As Integer, ByVal Password As String) As Boolean Dim Student As StudentRecord FileOpen(1, StudentFile, OpenMode.Random, , , Len(Student)) FileGet(1, Student, RecordLocation) StudentID = Student.UserID 'checks the password entered is the same as the password that is stored for that user If Password = Student.Password.Substring(0, Len(Password)) Then PasswordsMatch = True Else MsgBox("Incorrect Password, Try again") PasswordsMatch = False StudentPasswordTbx.Clear() End If FileClose(1) End FunctionEnd Class

Page 61: Documentation for a Visual Basic Mathematics Program

61

Student HomepagePublic Class StudentHomepage Private Sub StudentHomepage_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'these are called to find the user information and display the appropriate information on the homepage Call FindStudentUser(Username) Call ChangeLabelNames(RecordLocation) Call ShowDataInTable(QuizList, NoQuizzesLbl) End Sub

Private Sub AlterStudentPasswordBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AlterStudentPasswordBtn.Click AlterStudentPassword.Show() Me.Close() End Sub

Private Sub StudentHomepageBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentHomepageBtn.Click LoginSelectionScreen.Show() Me.Close() End Sub Private Sub TakeQuizBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TakeQuizBtn.Click TakeQuiz.Show() Me.Close() End Sub

Private Sub StudentGradeBreakdownBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentGradeBreakdownBtn.Click StudentGradeBreakdown.Show()

Page 62: Documentation for a Visual Basic Mathematics Program

62

Me.Close() End Sub

Private Sub ChangeLabelNames(ByVal RecordLocation As Integer) Dim NovExam As Date = "10.11.12" Dim JuneExam As Date = "12.06.13" Dim Student As StudentRecord FileOpen(1, StudentFile, OpenMode.Random, , , Len(Student)) FileGet(1, Student, RecordLocation) ' displays the students name in the top right corner of the homepage StudentNameLbl.Text = Student.FullName FileClose(1) ' calculates the amount of days until the final exam dates and displays them in a text box ' the text will turn red if the date is less than 2 weeks away NovemberExamCountLbl.Text = DateDiff(DateInterval.Day, Date.Today, NovExam) & " Days" If DateDiff(DateInterval.Day, Date.Today, NovExam) <= 14 Then NovemberExamCountLbl.ForeColor = Color.Red End If JuneExamCountLbl.Text = DateDiff(DateInterval.Day, Date.Today, JuneExam) & " Days" If DateDiff(DateInterval.Day, Date.Today, JuneExam) <= 14 Then JuneExamCountLbl.ForeColor = Color.Red End If End SubEnd Class

Page 63: Documentation for a Visual Basic Mathematics Program

63

Alter Student PasswordPublic Class AlterStudentPassword Private Sub CancelPasswordChangeBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CancelPasswordChangeBtn.Click StudentHomepage.Show() Me.Close() End Sub

Private Sub OldPasswordTbx_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OldPasswordTbx.TextChanged ' this changes the characters being entered into the old password text box to mask what is being written OldPasswordTbx.PasswordChar = "*" End Sub

Private Sub NewPasswordTbx_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewPasswordTbx.TextChanged ' this changes the characters being entered into the new password text box to mask what is being written NewPasswordTbx.PasswordChar = "*" End Sub

Private Sub ReEnteredNewPasswordTbx_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ReEnteredNewPasswordTbx.TextChanged ' this changes the characters being entered into the new re-entered password text box to mask what is being written ReEnteredNewPasswordTbx.PasswordChar = "*" End Sub

Private Sub ChangePasswordBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChangePasswordBtn.Click Dim OldPasswordMatches, NewPasswordMatches As Boolean 'checks to make sure the inputs are valid before finding the user in the student file and replacing the new password If ValidateAlterPasswordInputs(OldPasswordTbx.Text, NewPasswordTbx.Text, ReEnteredNewPasswordTbx.Text) Then Call FindStudentUser(Username) Call CheckAndSaveStudentPassword(RecordLocation, OldPasswordMatches, NewPasswordMatches) End If End Sub

Private Sub CheckAndSaveStudentPassword(ByVal RecordLocation As Integer, ByRef OldPasswordMatches As Boolean, ByRef NewPasswordMatches As Boolean) Dim Student As StudentRecord FileOpen(1, StudentFile, OpenMode.Random, , , Len(Student)) FileGet(1, Student, RecordLocation) 'checks entered password is equal to saved password If OldPasswordTbx.Text = Student.Password.Substring(0, Len(OldPasswordTbx.Text)) Then OldPasswordMatches = True If NewPasswordTbx.Text = ReEnteredNewPasswordTbx.Text Then 'saves new password over the old password and saves the new student information to file Student.Password = NewPasswordTbx.Text NewPasswordMatches = True

Page 64: Documentation for a Visual Basic Mathematics Program

64

FilePut(1, Student, RecordLocation) Else MsgBox("Your New Password Entries Do Not Match") NewPasswordMatches = False End If Else OldPasswordMatches = False MsgBox("Incorrect Current Password") End If FileClose(1) 'closes the form if the new password has been saved correctly If OldPasswordMatches And NewPasswordMatches Then StudentHomepage.Show() Me.Close() End If End SubEnd Class

Student Grade BreakdownPublic Class StudentGradeBreakdown Private Sub StudentGradeBreakdown_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call ShowDataInTable(QuizList, NoQuizzesLbl) End Sub

Private Sub BackBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackBtn.Click StudentHomepage.Show() Me.Close() End Sub

Private Sub LoadGraphBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadGraphBtn.Click Call LoadStudentDetails() End Sub Sub LoadStudentDetails()

Page 65: Documentation for a Visual Basic Mathematics Program

65

' loads the student information, retrieves the scores from each quiz the student has taken and puts them into an array Dim Student As StudentRecord Dim StudentQuiz As StudentQuizRecord Dim Quiz As QuizRecord Dim j, k As Integer Dim Position As Integer = 1 Dim Count As Integer = 1 Dim Finished As Boolean = False i = 1 ' finds how many quizzes have been created FileOpen(1, QuizFile, OpenMode.Random, , , Len(Quiz)) k = LOF(1) / Len(Quiz) Dim Scores(k) As String FileClose(1) FileOpen(1, StudentFile, OpenMode.Random, , , Len(Student)) FileOpen(2, StudentQuizFile, OpenMode.Random, , , Len(StudentQuiz)) 'finds the student that is currently logging in from the student file While Not EOF(1) FileGet(1, Student, Position) If Student.UserID = StudentID Then j = 1 ' finds the quiz results of the user from the student-quiz file While Not EOF(2) FileGet(2, StudentQuiz, i) If StudentQuiz.UserID = StudentID Then Scores(j) = StudentQuiz.StudentScore j = j + 1 End If i = i + 1 End While 'fills the rest array with zero's for the quizzes that haven't been taken by the user yet Do If j <= k Then Scores(j) = 0 j = j + 1 End If Loop Until j > k Exit While End If Position = Position + 1 End While FileClose(1) FileClose(2) 'draws a graph using the scores from the quizzes the student has taken Call DrawScoreGraph(Scores, k, StudentScoreGraphPanel) End Sub

Public Sub New() 'this sub dynamically creates the labels for the axis Dim LblArray(7, 7) As Label Dim Scores(6) As String Dim i, j, k As Integer Dim z As Integer = 100 Dim loc As Point Dim Quiz As QuizRecord InitializeComponent() ' displays the 0 to 100 grade along the y axis of the graph

Page 66: Documentation for a Visual Basic Mathematics Program

66

i = 0 For j = 0 To 5 LblArray(i, j) = New Label loc.X = i loc.Y = j * YAxisGraphLabelPnl.Height \ 5 If loc.Y = YAxisGraphLabelPnl.Height Then loc.Y = YAxisGraphLabelPnl.Height - 11 End If LblArray(i, j).Location = loc LblArray(i, j).Width = YAxisGraphLabelPnl.Width LblArray(i, j).Height = YAxisGraphLabelPnl.Height \ 10 LblArray(i, j).Text = "" & z LblArray(i, j).Name = "" & z ' adds the label to the panel for it to be displayed on the form YAxisGraphLabelPnl.Controls.Add(LblArray(i, j)) z = z - 20 Next ' adds the quiz names to the x-axis of the graph j = 0 FileOpen(1, QuizFile, OpenMode.Random, , , Len(Quiz)) k = LOF(1) / Len(Quiz) For i = 1 To k LblArray(i, j) = New Label FileGet(1, Quiz, i) loc.X = (i * XAxisGraphLabelPnl.Width \ k) - 17 If loc.X = (XAxisGraphLabelPnl.Width - 17) Then loc.X = XAxisGraphLabelPnl.Width - 35 End If loc.Y = j LblArray(i, j).Location = loc LblArray(i, j).Width = XAxisGraphLabelPnl.Width \ 10 LblArray(i, j).Height = XAxisGraphLabelPnl.Height LblArray(i, j).Text = "" & Quiz.QuizName LblArray(i, j).Name = "" & Quiz.QuizName 'adds the label to the panel for it to be displayed on the form XAxisGraphLabelPnl.Controls.Add(LblArray(i, j)) Next FileClose(1) End SubEnd Class

Page 67: Documentation for a Visual Basic Mathematics Program

67

Take QuizPublic Class TakeQuiz Dim Exists As Boolean = True Dim QuizSelected As Boolean

Private Sub TakeQuiz_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load QuizSelected = False ' shows a list of available quizzes to take in the list box Call ShowQuizList() 'closes the form if no quizzes have been created yet If Exists = False Then StudentHomepage.Show() Me.Close() End If End Sub

Private Sub TakeQuizBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TakeQuizBtn.Click ' makes sure a quiz has been selected from the list before preceeding If QuizSelected = True Then SelectedQuiz = QuizListLbx.SelectedItem.ToString.ToUpper ShowQuizInformation.Show() Me.Close() Else MsgBox("There is no quiz selected. Please select a quiz and try again")

Page 68: Documentation for a Visual Basic Mathematics Program

68

End If End Sub

Private Sub CancleBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CancleBtn.Click StudentHomepage.Show() Me.Close() End Sub

Private Sub QuizListLbx_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuizListLbx.SelectedIndexChanged ' this means that a quiz has been selected from the list by the user QuizSelected = True End Sub

Private Sub ShowQuizList() Dim Quiz As QuizRecord Dim StudentQuiz As StudentQuizRecord Dim y As Integer Dim Taken As Boolean Dim AfterDeadline As Boolean FileOpen(1, QuizFile, OpenMode.Random, , , Len(Quiz)) FileOpen(2, StudentQuizFile, OpenMode.Random, , , Len(StudentQuiz)) ' makes sure at least one quiz has been created before creating the list If LOF(1) > 0 Then For i = 1 To (LOF(1) / Len(Quiz)) Taken = False AfterDeadline = False FileGet(1, Quiz, i) If Quiz.Deadline < Today.Date Then AfterDeadline = True End If For y = 1 To (LOF(2) / Len(StudentQuiz)) FileGet(2, StudentQuiz, y) If StudentQuiz.QuizID = Quiz.QuizID And StudentQuiz.UserID = StudentID Then Taken = True End If Next ' only adds the quiz to the list if the user has not taken it or the deadline has not passed If Not Taken And Not AfterDeadline Then QuizListLbx.Items.Add(Quiz.QuizName) End If Next Else Exists = False MsgBox("There Are Currently No Quizzes To Take. Please Try Again Later") End If FileClose(1) FileClose(2) End SubEnd Class

Page 69: Documentation for a Visual Basic Mathematics Program

69

Quiz Information PagePublic Class ShowQuizInformation Private Sub ShowQuizInformation_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' find the information to display in the labels Call GetQuizInfo(SelectedQuiz) End Sub

Private Sub BackBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackBtn.Click TakeQuiz.Show() Me.Close() End Sub

Private Sub TakeQuizBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TakeQuizBtn.Click QuizQuestionPage.Show() Me.Close() End Sub

Private Sub GetQuizInfo(ByVal SelectedQuiz As String) Dim SavedQuiz As String Dim Quiz As QuizRecord FileOpen(1, QuizFile, OpenMode.Random, , , Len(Quiz)) i = 1 ' finds the information for the selected quiz and displays it in the labels on the form While Not EOF(1) FileGet(1, Quiz, i) SavedQuiz = Quiz.QuizName.ToUpper If SavedQuiz = SelectedQuiz Then SelectedQuizID = Quiz.QuizID NoOfQuestionsInQuiz = Quiz.NumberOfQuestions QuizNameLbl.Text = Quiz.QuizName NoOfQsLbl.Text = Quiz.NumberOfQuestions

Page 70: Documentation for a Visual Basic Mathematics Program

70

Exit While End If i = i + 1 End While FileClose(1) End SubEnd Class

Quiz Question PagePublic Class QuizQuestionPage Dim SavedQuestionNumber As Integer Private Sub QuizQuestionPage_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ShowQuestionInfo() End Sub

Private Sub NextBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NextBtn.Click 'stops the timer on the form and saves the users answer QuizTimer.Stop() Call SaveQuestionAnswer() Me.Close() QuestionAnswerPage.Show() End Sub

Private Sub QuestionImageBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuestionImageBtn.Click QuestionImagePage.Show() Me.Hide() End Sub

Private Sub QuizTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuizTimer.Tick ' counts down the timer on the question page Time = QuizTimeLbl.Text ' stops the timer once it reaches zero If Time > "00:00:00" Then ' subtracts one second from the time every time the timer ticks Dim RemainingTime As TimeSpan = Time.Subtract("00:00:01")

Page 71: Documentation for a Visual Basic Mathematics Program

71

' sets the format for the time to be displayed in on the form QuizTimeLbl.Text = String.Format("{0:d1}:{1:d1}:{2:d1}", RemainingTime.Hours, RemainingTime.Minutes, RemainingTime.Seconds) End If End Sub

Private Sub ShowQuestionInfo() QuestionNumberLbl.Text = QuestionNumber Call GetQuestionInformation() 'starts the timer on the quiz time if the quiz is just being started else restarts the timer from where it left off If QuestionNumber = 1 Then QuizTimeLbl.Text = QuizTime Else QuizTimeLbl.Text = Time.Subtract("00:00:01").ToString End If QuizTimer.Start() End Sub Private Sub GetQuestionInformation() ' displays all of the question information in the labels Dim EmptyField As String = "Empty " Dim Question As QuestionRecord FileOpen(1, QuestionFile, OpenMode.Random, , , Len(Question)) i = 1 While Not EOF(1) FileGet(1, Question, i) SavedQuizID = Question.QuizID SavedQuestionNumber = Question.QuestionNumber If SavedQuizID = SelectedQuizID And SavedQuestionNumber = QuestionNumber Then QuestionTextLbl.Text = Question.QuestionText Answer1RBtn.Text = Question.CorrectAnswer Answer2RBtn.Text = Question.AnswerChoice1 Answer3RBtn.Text = Question.AnswerChoice2 Answer4RBtn.Text = Question.AnswerChoice3 ' hides the question image button if the field was left empty when the question was created If Question.QuestionImage = EmptyField Then QuestionImageBtn.Hide() End If Exit While End If i = i + 1 End While FileClose(1) End Sub

Private Sub SaveQuestionAnswer() ' checks whether the user answered correctly and saves the quiz and question score Dim Question As QuestionRecord CorrectAnswerChosen = False FileOpen(1, QuestionFile, OpenMode.Random, , , Len(Question)) i = 1 While Not EOF(1) FileGet(1, Question, i) SavedQuizID = Question.QuizID SavedQuestionNumber = Question.QuestionNumber If SavedQuizID = SelectedQuizID And SavedQuestionNumber = QuestionNumber Then CorrectAnswerChosen = False

Page 72: Documentation for a Visual Basic Mathematics Program

72

QuestionScore = 0 ' checks for each radio button whether it has been checked and if it is the correct answer Call CheckForCorrectAnswer(Answer1RBtn, Question.CorrectAnswer, Question.QuestionMarks, CorrectAnswerChosen) Call CheckForCorrectAnswer(Answer2RBtn, Question.CorrectAnswer, Question.QuestionMarks, CorrectAnswerChosen) Call CheckForCorrectAnswer(Answer3RBtn, Question.CorrectAnswer, Question.QuestionMarks, CorrectAnswerChosen) Call CheckForCorrectAnswer(Answer4RBtn, Question.CorrectAnswer, Question.QuestionMarks, CorrectAnswerChosen) Exit While End If i = i + 1 End While FileClose(1) End Sub

Private Function CheckForCorrectAnswer(ByVal RadioButton As RadioButton, ByVal CorrectAnswer As String, ByVal QuestionMarks As Integer, ByRef CorrectAnswerChosen As Boolean) As Boolean ' checks if the button has been checked and if that is the correct answer, adding to the quiz score if it is If RadioButton.Checked And RadioButton.Text = CorrectAnswer Then CorrectAnswerChosen = True StudentQuizScore = StudentQuizScore + QuestionMarks QuestionScore = QuestionMarks End If Return CorrectAnswerChosen End Function

End Class

Page 73: Documentation for a Visual Basic Mathematics Program

73

Question Image PagePublic Class QuestionImagePage Private Sub QuestionImagePage_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ShowImage() End Sub

Private Sub ClosePageBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClosePageBtn.Click QuizQuestionPage.Show() Me.Close() End Sub

Private Sub ShowImage() Dim SavedQuestionNumber, SavedQuizID As Integer Dim Question As QuestionRecord FileOpen(1, QuestionFile, OpenMode.Random, , , Len(Question)) i = 1 ' finds the question information from the question file and shows the image in the image box While Not EOF(1) FileGet(1, Question, i) SavedQuizID = Question.QuizID SavedQuestionNumber = Question.QuestionNumber If SavedQuizID = SelectedQuizID And SavedQuestionNumber = QuestionNumber Then QuestionImageBox.ImageLocation = Question.QuestionImage Exit While End If i = i + 1 End While FileClose(1) End Sub

End Class

Page 74: Documentation for a Visual Basic Mathematics Program

74

Quiz Answer PagePublic Class QuestionAnswerPage Dim SavedQuizID As Integer Private Sub QuestionAnswerPage_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call ShowInformationInLabels() End Sub

Private Sub NextQuestionBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NextQuestionBtn.Click ShowNext() End Sub

Private Sub ShowInformationInLabels() Dim SavedQuizID, SavedQuestionNumber As Integer Dim Question As QuestionRecord FileOpen(1, QuestionFile, OpenMode.Random, , , Len(Question)) i = 1 ' finds the question information from the question file and displays it on the form While Not EOF(1) FileGet(1, Question, i) SavedQuizID = Question.QuizID SavedQuestionNumber = Question.QuestionNumber If SavedQuizID = SelectedQuizID And SavedQuestionNumber = QuestionNumber Then QuestionNumberLbl.Text = QuestionNumber QuestionTextLbl.Text = Question.QuestionText QuestionAnswerLbl.Text = "The correct answer is: " & Question.CorrectAnswer QuestionWorkingLbl.Text = Question.QuestionWorking ' shows how many marks the student gained out of the marks that were available for the question QuestionScoreLbl.Text = QuestionScore QuestionMarksLbl.Text = "/ " & Question.QuestionMarks ' displays to the user whether they got the correct answer or not If CorrectAnswerChosen Then CorrectAnswerLbl.Text = "You answered correctly!" Else CorrectAnswerLbl.Text = "You answered incorrectly." End If Exit While End If i = i + 1 End While FileClose(1) End Sub

Private Sub ShowNext() ' saves the student quiz if the user has answered all of the questions else prepares the next quiz question QuestionNumber = QuestionNumber + 1 If QuestionNumber > NoOfQuestionsInQuiz Then Call SaveStudentQuiz() QuestionNumber = 1 EndOfQuiz.Show() Me.Close() Else Me.Close() QuizQuestionPage.Show() End If

Page 75: Documentation for a Visual Basic Mathematics Program

75

End Sub

Private Sub SaveStudentQuiz() Dim StudentQuiz As StudentQuizRecord Dim Position As Integer FileOpen(1, StudentQuizFile, OpenMode.Random, , , Len(StudentQuiz)) ' finds the position of the end of the file to put the new record Position = (LOF(1) / Len(StudentQuiz)) + 1 StudentQuiz.UserID = StudentID StudentQuiz.QuizID = SelectedQuizID StudentQuiz.StudentScore = StudentQuizScore Call GetStudentGrade(StudentGrade) StudentQuiz.StudentGrade = StudentGrade StudentQuiz.QuizTime = Time.Subtract("00:00:01").ToString ' saves the new record to the student quiz file FilePut(1, StudentQuiz, Position) FileClose(1) End Sub

Private Function GetStudentGrade(ByRef StudentGrade As String) As String Dim Quiz As QuizRecord FileOpen(2, QuizFile, OpenMode.Random, , , Len(Quiz)) i = 1 ' finds the quiz the user has taken and finds the grade the student has achieved While Not EOF(2) FileGet(2, Quiz, i) SavedQuizID = Quiz.QuizID If SavedQuizID = SelectedQuizID Then StudentGrade = "" ' finds the grade the user has achieved compairing their score with the grade boundaries of the quiz Call CheckGradeBoundaries(StudentQuizScore, Quiz.AStarGrade, "A*", StudentGrade) Call CheckGradeBoundaries(StudentQuizScore, Quiz.AGrade, "A", StudentGrade) Call CheckGradeBoundaries(StudentQuizScore, Quiz.BGrade, "B", StudentGrade) Call CheckGradeBoundaries(StudentQuizScore, Quiz.CGrade, "C", StudentGrade) Call CheckGradeBoundaries(StudentQuizScore, Quiz.DGrade, "D", StudentGrade) Call CheckGradeBoundaries(StudentQuizScore, Quiz.AStarGrade, "E", StudentGrade) If StudentQuizScore < Quiz.EGrade Then StudentGrade = "U" Exit While End If End If i = i + 1 End While FileClose(2) Return StudentGrade End Function

Private Function CheckGradeBoundaries(ByVal StudentQuizScore As Integer, ByVal QuizGradeBoundary As Integer, ByVal GradeMark As String, ByRef StudentGrade As String) As String ' checks student grade agains the gradeboundary

Page 76: Documentation for a Visual Basic Mathematics Program

76

If StudentQuizScore >= QuizGradeBoundary And StudentGrade = "" Then StudentGrade = GradeMark End If Return StudentGrade End Function

End Class

End of Quiz Public Class EndOfQuiz Private Sub EndOfQuiz_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'quiz information that is calculated at the end of the quiz is displayed to the student QuizScoreLbl.Text = StudentQuizScore QuizGradeLbl.Text = StudentGrade QuizTimeLbl.Text = Time.Subtract("00:00:01").ToString End Sub

Private Sub CloseBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CloseBtn.Click ' resets the time to the original quiz time and quiz score to zero for the next quiz. Time = QuizTime StudentQuizScore = 0 StudentHomepage.Show() Me.Close() End SubEnd Class

Page 77: Documentation for a Visual Basic Mathematics Program

77

Teacher Login ScreenPublic Class TeacherLoginScreen Private Sub TeacherPasswordTbx_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TeacherPasswordTbx.TextChanged ' this changes the characters being entered into the password text box to mask what is being written TeacherPasswordTbx.PasswordChar = "*" End Sub

Private Sub CancelBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CancelBtn.Click LoginSelectionScreen.Show() Me.Close() End Sub

Private Sub TeacherLoginBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TeacherLoginBtn.Click CheckTeacherLoginDetails() End Sub

Private Sub CheckTeacherLoginDetails() Username = TeacherUsernameTbx.Text Password = TeacherPasswordTbx.Text 'this finds the user in the student file from the username they have entered Call FindTeacherUser(Username) 'this makes sure the input is valid before showing the student homepage If Username <> "" And Password <> "" And CountTeachersInFile() > 0 And UserFound = True And PasswordsMatch(RecordLocation) Then TeacherHomepage.Show() Me.Close() Else 'this clears the text box for the user TeacherPasswordTbx.Clear() End If End Sub

Public Function CountTeachersInFile() As Integer Dim Teacher As TeacherRecord

Page 78: Documentation for a Visual Basic Mathematics Program

78

FileOpen(1, TeacherFile, OpenMode.Random, , , Len(Teacher)) 'this counts how many teachers are in the file, based of the total length of the file divided by the length of one teachers record CountTeachersInFile = LOF(1) / Len(Teacher) FileClose(1) End Function

Private Function PasswordsMatch(ByVal RecordLocation As Integer) As Boolean Dim Teacher As TeacherRecord FileOpen(1, TeacherFile, OpenMode.Random, , , Len(Teacher)) FileGet(1, Teacher, RecordLocation) 'checks the password entered is the same as the password that is stored for that user If Password = Teacher.Password.Substring(0, Len(Password)) Then PasswordsMatch = True Else MsgBox("Incorrect Password. Please Try again") PasswordsMatch = False TeacherPasswordTbx.Clear() End If FileClose(1) End FunctionEnd Class

Page 79: Documentation for a Visual Basic Mathematics Program

79

Teacher HomepagePublic Class TeacherHomepage Dim ClassName As String Private Sub LogOutBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LogOutBtn.Click LoginSelectionScreen.Show() Me.Close() End Sub

Private Sub TeacherGradeBreakdownBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TeacherGradeBreakdownBtn.Click GradeBreakdown.Show() Me.Close() End Sub

Private Sub AlterTeacherPasswordBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AlterTeacherPasswordBtn.Click AlterTeacherPassword.Show() Me.Close() End Sub

Private Sub TeacherHomepage_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' finds the teacher user and displays the relevant information on the form Call FindTeacherUser(Username) Call ChangeLabelName(RecordLocation) Call ShowDataInTable(RecordLocation, FirstClassStudentList, FirstClassName) Call ShowDataInTable(RecordLocation, SecondClassStudentList, SecondClassName) End Sub

Private Sub ChangeLabelName(ByVal RecordLocation As Integer) ' adds the teacher name to the label in the top right corner of the form Dim Teacher As TeacherRecord FileOpen(1, TeacherFile, OpenMode.Random, , , Len(Teacher)) FileGet(1, Teacher, RecordLocation) TeacherNameLbl.Text = Teacher.FullName FileClose(1) End Sub

Private Sub CreateQuizBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CreateQuizBtn.Click CreateQuiz.Show() Me.Close() End Sub

Private Sub ShowDataInTable(ByVal RecordLocation As Integer, ByVal StudentList As Object, ByVal ClassName As String) Dim Quiz As QuizRecord Dim Student As StudentRecord Dim StudentQuiz As StudentQuizRecord Dim j, k, x, y, z, ID As Integer Dim QuizItem As ListViewItem ' adds the student name column to the list view box StudentList.Columns.Add("Student Name", 100, HorizontalAlignment.Left) ' find the amount of quizzes in the quiz file FileOpen(1, QuizFile, OpenMode.Random, , , Len(Quiz))

Page 80: Documentation for a Visual Basic Mathematics Program

80

k = (LOF(1) / Len(Quiz)) Dim QuizInformation(k) As String If LOF(1) = 0 Then ' hides the class tab box if there have been no quizzes created ClassTab.Hide() Else FileOpen(2, StudentFile, OpenMode.Random, , , Len(Student)) FileOpen(3, StudentQuizFile, OpenMode.Random, , , Len(StudentQuiz)) NoQuizzesLbl.Hide() ' adds a column with the header as the quiz name, for each quiz in the quiz file For j = 1 To k FileGet(1, Quiz, j) StudentList.Columns.Add(Quiz.QuizName, 100, HorizontalAlignment.Left) Next For x = 1 To (LOF(2) / Len(Student)) z = 1 FileGet(2, Student, x) ' checks if the student is in the correct class If Student.ClassName = ClassName Then ID = Student.UserID ' adds the student name to a new row QuizInformation(0) = Student.FullName ' adds each quiz result to the student row For y = 1 To (LOF(3) / Len(StudentQuiz)) FileGet(3, StudentQuiz, y) If StudentQuiz.UserID = ID Then QuizInformation(z) = StudentQuiz.StudentGrade z = z + 1 End If Next Do ' fills the rest of the array with a hash where the quizzes have not been taken yet If (z - 1) < k Then QuizInformation(z) = "-" z = z + 1 End If Loop Until z - 1 = k ' adds the row to the list view box QuizItem = New ListViewItem(QuizInformation) StudentList.Items.Add(QuizItem) End If Next End If FileClose(1) FileClose(2) FileClose(3) End SubEnd Class

Page 81: Documentation for a Visual Basic Mathematics Program

81

Alter Teacher PasswordPublic Class AlterTeacherPassword Private Sub CancelPasswordChangeBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CancelPasswordChangeBtn.Click TeacherHomepage.Show() Me.Close() End Sub

Private Sub OldPasswordTbx_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OldPasswordTbx.TextChanged ' this changes the characters being entered into the old password text box to mask what is being written OldPasswordTbx.PasswordChar = "*" End Sub

Private Sub NewPasswordTbx_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewPasswordTbx.TextChanged ' this changes the characters being entered into the new password text box to mask what is being written NewPasswordTbx.PasswordChar = "*" End Sub Private Sub ReEnteredNewPasswordTbx_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ReEnteredNewPasswordTbx.TextChanged ' this changes the characters being entered into the new re-entered password text box to mask what is being written ReEnteredNewPasswordTbx.PasswordChar = "*" End Sub

Private Sub ChangePasswordBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChangePasswordBtn.Click Dim OldPasswordMatches, NewPasswordMatches As Boolean

Page 82: Documentation for a Visual Basic Mathematics Program

82

'checks to make sure the inputs are valid before finding the user in the teacher file and replacing the new password If ValidateAlterPasswordInputs(OldPasswordTbx.Text, NewPasswordTbx.Text, ReEnteredNewPasswordTbx.Text) Then Call FindTeacherUser(Username) Call CheckAndSaveTeacherPassword(RecordLocation, OldPasswordMatches, NewPasswordMatches) End If End Sub

Private Sub CheckAndSaveTeacherPassword(ByVal RecordLocation As Integer, ByRef OldPasswordMatches As Boolean, ByRef NewPasswordMatches As Boolean) Dim Teacher As TeacherRecord FileOpen(1, TeacherFile, OpenMode.Random, , , Len(Teacher)) FileGet(1, Teacher, RecordLocation) 'checks entered password is equal to saved password If OldPasswordTbx.Text = Teacher.Password.Substring(0, Len(OldPasswordTbx.Text)) Then OldPasswordMatches = True If NewPasswordTbx.Text = ReEnteredNewPasswordTbx.Text Then 'saves new password over the old password and saves the new teacher information to file Teacher.Password = NewPasswordTbx.Text NewPasswordMatches = True FilePut(1, Teacher, RecordLocation) Else MsgBox("Your New Password Entries Do Not Match") NewPasswordMatches = False End If Else OldPasswordMatches = False MsgBox("Incorrect Current Password") End If FileClose(1) 'closes the form if the new password has been saved correctly If OldPasswordMatches And NewPasswordMatches Then TeacherHomepage.Show() Me.Close() End If End SubEnd Class

Page 83: Documentation for a Visual Basic Mathematics Program

83

Teacher Grade BreakdownPublic Class GradeBreakdown Dim k As Integer Dim Count As Integer = 1 Private Sub BackBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackBtn.Click Me.Close() TeacherHomepage.Show() End Sub

Private Sub GradeBreakdown_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call LoadStudents() YAxisGraphLabelPnl.Hide() XAxisGraphLabelPnl.Hide() StudentInfoListView.Hide() End Sub

Private Sub LoadStudents() ' loads the students into the list boz Dim Student As StudentRecord Dim Teacher As TeacherRecord Dim Position As Short = 1 Dim StudentName As String Dim StudentNames(190) As String Dim Finished As Boolean = False FileOpen(1, StudentFile, OpenMode.Random, , , Len(Student)) ' finds the students that are in one of the two classes the user teaches While Not EOF(1) FileGet(1, Student, Position) If Student.ClassName = FirstClassName Or Student.ClassName = SecondClassName Then StudentNames(Count) = Student.FullName Count = Count + 1 End If Position = Position + 1 End While FileClose(1) Count = 1 ' finds the amount of students in the array Do StudentName = StudentNames(Count) If StudentName = "" Then Finished = True End If Count = Count + 1 Loop Until Finished = True Count = Count - 2 ' sorts the students into alphabetical order by first name and adds them to the list box Call Quicksort(StudentNames, 1, Count) For i = 1 To Count StudentNamesLbx.Items.Add(StudentNames(i)) Next End Sub

Private Sub Quicksort(ByRef StudentNames() As String, ByVal First As Integer, ByVal Last As Integer) Dim LeftPointer, RightPointer Dim Temp As String

Page 84: Documentation for a Visual Basic Mathematics Program

84

' makes sure the list is longer than 1 If First < Last Then LeftPointer = First RightPointer = Last + 1 Do ' finds a name greater than the first name in the list Do LeftPointer = LeftPointer + 1 Loop Until StudentNames(LeftPointer) >= StudentNames(First) Or LeftPointer > Last ' finds a name less than the last name is the list Do RightPointer = RightPointer - 1 Loop Until StudentNames(RightPointer) <= StudentNames(First) ' swaps the names if the pointers have not crossed If LeftPointer < RightPointer Then Temp = StudentNames(LeftPointer) StudentNames(LeftPointer) = StudentNames(RightPointer) StudentNames(RightPointer) = Temp End If Loop Until LeftPointer > RightPointer 'swaps the pivot name with the right pointer name Temp = StudentNames(First) StudentNames(First) = StudentNames(RightPointer) StudentNames(RightPointer) = Temp

' recursively calls itself to the left of the pivot and right of the pivot until the whole list is sorted Quicksort(StudentNames, First, RightPointer - 1) Quicksort(StudentNames, RightPointer + 1, Last) End If

End Sub

Private Sub StudentNamesLbx_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentNamesLbx.SelectedIndexChanged ' shows the graph of the students results once a student has been selected from the list box StudentInfoListView.Clear() XAxisGraphLabelPnl.Show() YAxisGraphLabelPnl.Show() StudentInfoListView.Show() Call LoadStudentDetails() Call ShowDataInTable() End Sub

Sub LoadStudentDetails() Dim Student As StudentRecord Dim StudentQuiz As StudentQuizRecord Dim Quiz As QuizRecord Dim ID, j As Integer Dim Position As Integer = 1 Dim Count As Integer = 1 Dim Finished As Boolean = False i = 1 ' finds how many quizzes are in the quiz file FileOpen(1, QuizFile, OpenMode.Random, , , Len(Quiz)) k = LOF(1) / Len(Quiz) Dim Scores(k) As String

Page 85: Documentation for a Visual Basic Mathematics Program

85

FileClose(1) FileOpen(1, StudentFile, OpenMode.Random, , , Len(Student)) FileOpen(2, StudentQuizFile, OpenMode.Random, , , Len(StudentQuiz)) ' finds the student the user has selected While Not EOF(1) FileGet(1, Student, Position) If Student.FullName = StudentNamesLbx.Text Then ID = Student.UserID j = 1 ' lists the student scores in the scores array While Not EOF(2) FileGet(2, StudentQuiz, i) If StudentQuiz.UserID = ID Then Scores(j) = StudentQuiz.StudentScore j = j + 1 End If i = i + 1 End While ' fills in the rest of the array with zero's for any quizzes that have not been taken yet Do If j <= k Then Scores(j) = 0 j = j + 1 End If Loop Until j > k Exit While End If Position = Position + 1 End While FileClose(1) FileClose(2) ' draws the graph of the student results using the scores array Call DrawScoreGraph(Scores, k, ScoreGraphPanel) End Sub

Private Sub ShowDataInTable() Dim Quiz As QuizRecord Dim Student As StudentRecord Dim StudentQuiz As StudentQuizRecord Dim QuizItem As ListViewItem Dim j, k, ID As Integer Dim Position As Integer = 1 Dim z As Integer = 1 ' adds the student name column to the list view box StudentInfoListView.Columns.Add("Student Name", 100, HorizontalAlignment.Left) FileOpen(1, QuizFile, OpenMode.Random, , , Len(Quiz)) FileOpen(2, StudentFile, OpenMode.Random, , , Len(Student)) FileOpen(3, StudentQuizFile, OpenMode.Random, , , Len(StudentQuiz)) ' finds how many quizzes are in the quiz file k = (LOF(1) / Len(Quiz)) Dim QuizInformation(k) As String ' adds a column for each quiz, with the header as the quiz name For j = 1 To k FileGet(1, Quiz, j) StudentInfoListView.Columns.Add(Quiz.QuizName, 100, HorizontalAlignment.Left) Next

Page 86: Documentation for a Visual Basic Mathematics Program

86

' finds the student selected in the list box and adds their information to the list view box While Not EOF(2) FileGet(2, Student, Position) If Student.FullName = StudentNamesLbx.Text Then ID = Student.UserID QuizInformation(0) = Student.FullName For y = 1 To (LOF(3) / Len(StudentQuiz)) FileGet(3, StudentQuiz, y) If StudentQuiz.UserID = ID Then QuizInformation(z) = StudentQuiz.StudentGrade z = z + 1 End If Next ' fills in the rest of the array with a dash for quizzes that have not been taken yet Do If (z - 1) < k Then QuizInformation(z) = "-" z = z + 1 End If Loop Until z - 1 = k ' adds the student information as a new row in the list view box QuizItem = New ListViewItem(QuizInformation) StudentInfoListView.Items.Add(QuizItem) Exit While End If Position = Position + 1 End While FileClose(1) FileClose(2) FileClose(3) End Sub

Public Sub New() 'this sub dynamically creates the labels for the axis Dim LblArray(7, 7) As Label Dim Scores(6) As String Dim i, j As Integer Dim z As Integer = 100 Dim loc As Point Dim Quiz As QuizRecord InitializeComponent() ' displays the 0 to 100 grade along the y axis of the graph i = 0 For j = 0 To 5 LblArray(i, j) = New Label loc.X = i loc.Y = j * YAxisGraphLabelPnl.Height \ 5 If loc.Y = YAxisGraphLabelPnl.Height Then loc.Y = YAxisGraphLabelPnl.Height - 11 End If LblArray(i, j).Location = loc LblArray(i, j).Width = YAxisGraphLabelPnl.Width LblArray(i, j).Height = YAxisGraphLabelPnl.Height \ 10 LblArray(i, j).Text = "" & z LblArray(i, j).Name = "" & z ' adds the label to the panel for it to be displayed on the form YAxisGraphLabelPnl.Controls.Add(LblArray(i, j)) z = z - 20 Next

Page 87: Documentation for a Visual Basic Mathematics Program

87

' adds the quiz names to the x-axis of the graph j = 0 FileOpen(1, QuizFile, OpenMode.Random, , , Len(Quiz)) k = LOF(1) / Len(Quiz) For i = 1 To k LblArray(i, j) = New Label FileGet(1, Quiz, i) loc.X = (i * XAxisGraphLabelPnl.Width \ k) - 17 If loc.X = (XAxisGraphLabelPnl.Width - 17) Then loc.X = XAxisGraphLabelPnl.Width - 35 End If loc.Y = j LblArray(i, j).Location = loc LblArray(i, j).Width = XAxisGraphLabelPnl.Width \ 10 LblArray(i, j).Height = XAxisGraphLabelPnl.Height LblArray(i, j).Text = "" & Quiz.QuizName LblArray(i, j).Name = "" & Quiz.QuizName 'adds the label to the panel for it to be displayed on the form XAxisGraphLabelPnl.Controls.Add(LblArray(i, j)) Next FileClose(1) End Sub

End Class

Create New QuizImports System.Text.RegularExpressionsPublic Class CreateQuiz Private Sub CancelBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CancelBtn.Click TeacherHomepage.Show() Me.Close() End Sub

Page 88: Documentation for a Visual Basic Mathematics Program

88

Private Sub CreateQuizBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CreateQuizBtn.Click Call SaveQuizInformation() If ValidInput Then Me.Close() End If End Sub

Private Sub SaveQuizInformation() Dim Quiz As QuizRecord Dim Position As Integer FileOpen(1, QuizFile, OpenMode.Random, , , Len(Quiz)) ' creates a new position on the end of the file Position = (LOF(1) / Len(Quiz)) + 1 ' checks the validity of the inputs If ValidateQuizInfoInputs() Then QuizID = Position Quiz.QuizID = QuizID Quiz.QuizName = QuizNameTbx.Text Quiz.NumberOfQuestions = NoOfQsTbx.Text ' makes sure deadline date is set after or for today If DeadlineDateTbx.Text <> "" And DeadlineDateTbx.Text >= Date.Today Then Quiz.Deadline = DeadlineDateTbx.Text Quiz.AStarGrade = AStarGradeTbx.Text Quiz.AGrade = AGradeTbx.Text Quiz.BGrade = BGradeTbx.Text Quiz.CGrade = CGradeTbx.Text Quiz.DGrade = DGradeTbx.Text Quiz.EGrade = EGradeTbx.Text Else ValidInput = False MsgBox("Invalid Quiz Deadline. Please try again") End If ' makes sure the inputs in the form are valid before saving If ValidInput Then FilePut(1, Quiz, Position) CreateQuestionInformation.Show() End If End If FileClose(1) End Sub

Private Function ValidateQuizInfoInputs() As Boolean ' is returned as true if all inputs are valid, but returned as false if not ValidInput = True Call ValidateTextBox(QuizNameTbx.Text, 10, "quiz name", "[a-zA-Z\d]+[a-zA-Z\-\s\d]*", ValidInput) Call ValidateNumberofQs(NoOfQsTbx.Text, "number of questions", "[\d]+", ValidInput) Call ValidateGradeBoundary(AStarGradeTbx.Text, 100, "A* grade", "[\d]+", ValidInput) Call ValidateGradeBoundary(AGradeTbx.Text, AStarGradeTbx.Text, "A grade", "[\d]+", ValidInput) Call ValidateGradeBoundary(BGradeTbx.Text, AGradeTbx.Text, "B grade", "[\d]+", ValidInput) Call ValidateGradeBoundary(CGradeTbx.Text, BGradeTbx.Text, "C grade", "[\d]+", ValidInput) Call ValidateGradeBoundary(DGradeTbx.Text, CGradeTbx.Text, "D grade", "[\d]+", ValidInput)

Page 89: Documentation for a Visual Basic Mathematics Program

89

Call ValidateGradeBoundary(EGradeTbx.Text, DGradeTbx.Text, "E grade", "[\d]+", ValidInput) If ValidInput Then ValidateQuizInfoInputs = True Else ValidateQuizInfoInputs = False End If End Function

Private Function ValidateNumberofQs(ByVal Text As String, ByVal MsgText As String, ByVal RegexPattern As String, ByRef ValidInput As Boolean) As Boolean Dim MyRegex As New System.Text.RegularExpressions.Regex(RegexPattern) ' checks the nuber of questions input is in the correct format and is between 25 and 35 If MyRegex.IsMatch(Text) And 25 <= Convert.ToInt16(Text) <= 35 Then NumberOfQuestions = Convert.ToInt32(NoOfQsTbx.Text) Else ValidInput = False MsgBox("Invalid " & MsgText & ". Please try again") End If Return ValidInput End Function

Private Function ValidateGradeBoundary(ByVal GradeBoundary As String, ByVal HigherGradeBoundary As String, ByVal MsgText As String, ByVal RegexPattern As String, ByRef ValidInput As Boolean) As Boolean ' checks the grade boundary score is in the correct format and less than the previous grade boundary Dim MyRegex As New System.Text.RegularExpressions.Regex(RegexPattern) If MyRegex.IsMatch(GradeBoundary) And Convert.ToInt16(GradeBoundary) < Convert.ToInt16(HigherGradeBoundary) Then Else ValidInput = False MsgBox("Invalid " & MsgText & ". Please try again") End If Return ValidInput End Function

End Class

Page 90: Documentation for a Visual Basic Mathematics Program

90

Create New QuestionPublic Class CreateQuestionInformation Private Sub CreateQuestionInformation_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' shows the correct question number in the top left corner of the form i = 1 QNumberLbl.Text = i End Sub Private Sub BrowseBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BrowseBtn.Click ' lets the user browse for .jpeg files in their documents for the image path text box FindImageFile.InitialDirectory = "C:\My Documents" FindImageFile.Title = "Locate Image Path" FindImageFile.Filter = "Image Files|*.jpg" FindImageFile.ShowDialog() ImagePathTbx.Text = FindImageFile.FileName End Sub

Private Sub SaveQuestionBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveQuestionBtn.Click Call SaveQuestionToFile() End Sub

Private Sub SaveQuestionToFile() Dim Question As QuestionRecord Dim Position As Integer FileOpen(1, QuestionFile, OpenMode.Random, , , Len(Question)) ' creates a new position at the end of the file Position = (LOF(1) / Len(Question)) + 1 ' checks the validity of the inputs If ValidateQuestionInfoInputs() Then Question.QuizID = QuizID Question.QuestionNumber = i

Page 91: Documentation for a Visual Basic Mathematics Program

91

Question.QuestionText = QTextTbx.Text Question.CorrectAnswer = CorrectAnswerTbx.Text Question.AnswerChoice1 = AnswerChoice1Tbx.Text Question.AnswerChoice2 = AnswerChoice2Tbx.Text Question.AnswerChoice3 = AnswerChoice3Tbx.Text Question.QuestionDifficulty = QDifficultyCbx.Text Question.QuestionTopic = QTopicCbx.Text Question.QuestionWorking = QWorkingTbx.Text Question.QuestionMarks = QMarksCbx.Text ' checks that the image path exists and is valid if one has been entered If ImagePathTbx.Text <> "" Then If My.Computer.FileSystem.FileExists(ImagePathTbx.Text) Then Question.QuestionImage = ImagePathTbx.Text Else ValidInput = False MsgBox("Invalid file path. Please try again.") End If Else Question.QuestionImage = "Empty" End If ' makes sure all inputs are valid before saving the record to file If ValidInput Then FilePut(1, Question, Position) End If ' prepares the form for the next question's information to be entered If ValidInput Then Call ClearInputBoxes() i = i + 1 QNumberLbl.Text = i ' closes the form if the correct number of questions have been entered for the quiz If i = (NumberOfQuestions + 1) Then MsgBox("The Quiz Has Been Saved") FileClose(1) TeacherHomepage.Show() Me.Close() End If End If End If FileClose(1) End Sub

Private Function ValidateQuestionInfoInputs() As Boolean ' function value is returned as true if all inputs are valid, but returned as false if not ValidInput = True Call ValidateTextBox(QTextTbx.Text, 100, "question text", "[a-zA-Z\d\-\.\?\*\=\+\s]+", ValidInput) Call ValidateTextBox(CorrectAnswerTbx.Text, 20, "correct answer", "[a-zA-Z\d\-\.\?\*\=\+\s]+", ValidInput) Call ValidateTextBox(AnswerChoice1Tbx.Text, 20, "first answer choice", "[a-zA-Z\d\-\.\?\*\=\+\s]+", ValidInput) Call ValidateTextBox(AnswerChoice2Tbx.Text, 20, "second answer choice", "[a-zA-Z\d\-\.\?\*\=\+\s]+", ValidInput) Call ValidateTextBox(AnswerChoice3Tbx.Text, 20, "third answer choice", "[a-zA-Z\d\-\.\?\*\=\+\s]+", ValidInput) Call ValidateComboBox(QDifficultyCbx.SelectedItem, "question difficulty ranking", ValidInput)

Page 92: Documentation for a Visual Basic Mathematics Program

92

Call ValidateComboBox(QTopicCbx.SelectedItem, "question topic", ValidInput) Call ValidateTextBox(QWorkingTbx.Text, 100, "question working", "[a-zA-Z\d\-\.\?\*\=\+\s]+", ValidInput) Call ValidateComboBox(QMarksCbx.SelectedItem, "question marks", ValidInput) If ValidInput Then ValidateQuestionInfoInputs = True Else ValidateQuestionInfoInputs = False End If End Function

Private Sub ClearInputBoxes() ' clears all the text and combo boxes on the form ready for the next set of values to be entered QDifficultyCbx.SelectedIndex = -1 QTextTbx.Clear() CorrectAnswerTbx.Clear() AnswerChoice1Tbx.Clear() AnswerChoice2Tbx.Clear() AnswerChoice3Tbx.Clear() QTopicCbx.SelectedIndex = -1 QWorkingTbx.Clear() QMarksCbx.SelectedIndex = -1 ImagePathTbx.Clear() End SubEnd Class

Page 93: Documentation for a Visual Basic Mathematics Program

93

Create New userPublic Class CreateNewUser Private Sub PasswordTbx_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PasswordTbx.TextChanged ' this changes the characters being entered into the password text box to mask what is being written PasswordTbx.PasswordChar = "*" End Sub Private Sub ReEnteredPasswordTbx_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ReEnteredPasswordTbx.TextChanged ' this changes the characters being entered into the re-entered password text box to mask what is being written ReEnteredPasswordTbx.PasswordChar = "*" End Sub

Private Sub BackBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackBtn.Click Me.Close() LoginSelectionScreen.Show() End Sub

Private Sub NextPageBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NextPageBtn.Click Call SaveAndShowNextForm() End Sub

Private Sub SaveAndShowNextForm() ' checks to make sure both passwords match and all inputs are valid If ValidPasswordEntry(PasswordTbx.Text, ReEnteredPasswordTbx.Text) And ValidateUserInfoInputs() Then FullName = FullNameTbx.Text Username = UserNameTbx.Text Password = PasswordTbx.Text If StudentUserRBtn.Checked Then NewStudentUser.Show() Me.Close()

Page 94: Documentation for a Visual Basic Mathematics Program

94

Else NewTeacherUser.Show() Me.Close() End If Else ' clears password text boxes if inputs were not valid PasswordTbx.Clear() ReEnteredPasswordTbx.Clear() End If End Sub

Private Function ValidPasswordEntry(ByVal FirstPassword As String, ByVal SecondPassword As String) As Boolean ' checks if the two passwords entered are the same incase the user mistypes it Select Case FirstPassword Case Is <> SecondPassword MsgBox("Error - Your Passwords Do Not Match. Please Re-enter Them.") ValidPasswordEntry = False Case Is = SecondPassword If FirstPassword = "" Then ValidPasswordEntry = False MsgBox("Error - You Left a Password Field Empty. Please Re-enter Them") Else ValidPasswordEntry = True End If End Select End Function

Private Function ValidateUserInfoInputs() As Boolean ' returned as true if inputs are present and are of the right length and format, returned as false if not ValidInput = True Call ValidateTextBox(FullNameTbx.Text, 30, "full name", "[a-zA-Z]+(\s)[a-zA-Z\-]+", ValidInput) Call ValidateTextBox(UserNameTbx.Text, 15, "username", "[_a-zA-Z\d\-]+", ValidInput) Call ValidateTextBox(PasswordTbx.Text, 15, "password", "[_a-zA-Z\d\-]+", ValidInput) If ValidInput Then ValidateUserInfoInputs = True Else ValidateUserInfoInputs = False End If End Function

End Class

Page 95: Documentation for a Visual Basic Mathematics Program

95

New Student UserPublic Class NewStudentUser Private Sub NewStudentUser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call ListClassesInComboBox(StudentClassCBox) End Sub

Private Sub BackBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackBtn.Click CreateNewUser.Show() Me.Close() End Sub

Private Sub NewStudentUserBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewStudentUserDoneBtn.Click Call CheckAndSaveUser() End Sub

Private Sub CheckAndSaveUser() ' checks a class has been selected from the combo box before saving ValidInput = True Call ValidateComboBox(StudentClassCBox.SelectedItem, "class name", ValidInput) If ValidInput Then ClassName = StudentClassCBox.SelectedItem Call SaveStudentUser() LoginSelectionScreen.Show() Me.Close() End If End Sub

Private Sub SaveStudentUser() Dim Position As Integer

Page 96: Documentation for a Visual Basic Mathematics Program

96

Dim Student As StudentRecord FileOpen(1, StudentFile, OpenMode.Random, , , Len(Student)) ' creates a new position to save the record at the end of the file Position = LOF(1) / Len(Student) + 1 Student.UserID = Position Student.FullName = FullName Student.Username = Username Student.Password = Password Student.ClassName = ClassName FilePut(1, Student, Position) FileClose(1) End SubEnd Class

New Teacher UserPublic Class NewTeacherUser Private Sub NewTeacherUser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call ListClassesInComboBox(FirstClassCbx) Call ListClassesInComboBox(SecondClassCbx) End Sub

Private Sub BackBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackBtn.Click CreateNewUser.Show() Me.Close() End Sub

Private Sub SecurityWordTbx_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SecurityWordTbx.TextChanged

Page 97: Documentation for a Visual Basic Mathematics Program

97

SecurityWordTbx.PasswordChar = "*" End Sub

Private Sub SaveTeacherBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveTeacherBtn.Click If ValidateTeacherClassInputs() Then Call SaveTeacherUser() LoginSelectionScreen.Show() Me.Close() End If End Sub

Private Function ValidateTeacherClassInputs() As Boolean ValidInput = True 'checks two classes have been selected in the classes taught combo boxes Call ValidateComboBox(FirstClassCbx.SelectedItem, "first class taught", ValidInput) Call ValidateComboBox(SecondClassCbx.SelectedItem, "second class taught", ValidInput) ' makes sure the user has entered the correct security word and the two classes have been selected and are not the same If SecurityWordTbx.Text.ToUpper = "CIRCLE" And ValidInput And FirstClassCbx.SelectedItem <> SecondClassCbx.SelectedItem Then ValidateTeacherClassInputs = True Else ValidateTeacherClassInputs = False If SecurityWordTbx.Text.ToUpper <> "CIRCLE" Then MsgBox("Invalid security word. Please try again") If FirstClassCbx.SelectedItem = SecondClassCbx.SelectedItem Then MsgBox("Please enter two different classes.") SecurityWordTbx.Clear() End If End Function

Private Sub SaveTeacherUser() Dim Position As Short Dim Teacher As TeacherRecord FileOpen(1, TeacherFile, OpenMode.Random, , , Len(Teacher)) ' creates a new position to save the record at the end of the file Position = LOF(1) / Len(Teacher) + 1 Teacher.UserID = Position Teacher.FullName = FullName Teacher.Username = Username Teacher.Password = Password Teacher.FirstClassTaught = FirstClassCbx.SelectedItem Teacher.SecondClassTaught = SecondClassCbx.SelectedItem FilePut(1, Teacher, Position) FileClose(1) End SubEnd Class

Page 98: Documentation for a Visual Basic Mathematics Program

98

Admin Login Page Private Sub AdminPasswordTbx_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AdminPasswordTbx.TextChanged ' this changes the characters being entered into the password text box to mask what is being written AdminPasswordTbx.PasswordChar = "*" End Sub

Private Sub ExitAdminLoginBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitAdminLoginBtn.Click Me.Close() LoginSelectionScreen.Show() End Sub

Private Sub AdminLoginBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AdminLoginBtn.Click If CorrectLogin() Then AdministratorHompage.Show() Me.Close() End If End Sub

Private Function CorrectLogin() As Boolean ' checks the username and password are correct before showing the admin homepage If AdminUsernameTbx.Text = "admin1" And AdminPasswordTbx.Text = "equation" Then CorrectLogin = True

Page 99: Documentation for a Visual Basic Mathematics Program

99

Else CorrectLogin = False MsgBox("Incorrect Username or Password") AdminPasswordTbx.Clear() End If End Function

End Class

Admin HomepagePublic Class AdministratorHompage Private Sub LogOutBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LogOutBtn.Click LoginSelectionScreen.Show() Me.Close() End Sub

Private Sub CreateClassBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CreateClassBtn.Click CreateNewClass.Show() Me.Close() End Sub

Private Sub EditStudentBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EditStudentBtn.Click SearchStudent.Show() Me.Close() End Sub

Private Sub EditTeacherBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EditTeacherBtn.Click SearchTeacher.Show() Me.Close() End SubEnd Class

Page 100: Documentation for a Visual Basic Mathematics Program

100

Create New ClassPublic Class CreateNewClass Private Sub AddClassBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddClassBtn.Click ' shows the admin homepage once the class has been saved to file If SavedClassToFile() Then AdministratorHompage.Show() Me.Close() End If End Sub

Private Sub BackBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackBtn.Click AdministratorHompage.Show() Me.Close() End Sub

Private Function SavedClassToFile() As Boolean ' returned as true if the inputs are valid and the class has been saved, returned as false if not Dim ClassR As ClassRecord Dim Position As Integer FileOpen(1, ClassFile, OpenMode.Random, , , Len(ClassR)) ' creates a new position to save the record at the end of the file Position = (LOF(1) / Len(ClassR)) + 1 ' makes sure inputs are valid before saving If ValidateClassInfoInputs() Then ClassR.ClassName = ClassNameTbx.Text ClassR.ClassSet = Convert.ToInt16(ClassSetCbx.SelectedItem) FilePut(1, ClassR, Position) SavedClassToFile = True Else SavedClassToFile = False End If

Page 101: Documentation for a Visual Basic Mathematics Program

101

FileClose(1) End Function

Private Function ValidateClassInfoInputs() As Boolean ' returned as true if the inputs are present, and are of the right format and length, returned as false if not ValidInput = True ValidateTextBox(ClassNameTbx.Text, 3, "class name", "[\d]+[A-Z]", ValidInput) ValidateComboBox(ClassSetCbx.SelectedItem, "class set", ValidInput) If ValidInput Then ValidateClassInfoInputs = True Else ValidateClassInfoInputs = False End If End Function

End Class

Search Student UserPublic Class SearchStudent Dim StudentSelected As Boolean = False Private Sub SearchStudentBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SearchStudentBtn.Click ' makes sure the user has entered something in the name text box before searching the file Dim Name As String Name = StudentNameTbx.Text.ToUpper If Name <> "" Then Call CheckForStudentName(Name) Else MsgBox("Invalid Name. Try again") End If End Sub

Page 102: Documentation for a Visual Basic Mathematics Program

102

Private Sub EditStudentBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EditStudentBtn.Click ' makes sure a student has been selected from the list before opening the edit student info form If StudentSelected = True Then SelectedName = StudentsFoundLbx.SelectedItem.ToString.ToUpper EditStudentInfo.Show() Me.Close() Else MsgBox("Please select a student first.") End If End Sub

Private Sub CancelBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CancelBtn.Click AdministratorHompage.Show() Me.Close() End Sub

Private Sub StudentsFoundLbx_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentsFoundLbx.SelectedIndexChanged ' means that a student has been selected from the list box StudentSelected = True End Sub

Private Sub CheckForStudentName(ByVal Name As String) Dim Exists As Boolean Dim SavedName As String Dim Student As StudentRecord FileOpen(1, StudentFile, OpenMode.Random, , , Len(Student)) i = 1 ' goes through each student in the file and checks if the saved name includes the name entered ' by the administrator, and adds them to the list box if it is While Not EOF(1) FileGet(1, Student, i) SavedName = Student.FullName.ToUpper If InStr(SavedName, Name) <> 0 Then Exists = True StudentsFoundLbx.Items.Add(Student.FullName) End If i = i + 1 End While FileClose(1) ' displays an error if no users in the student file include the name entered in the text box If Exists = False Then MsgBox("No Student Found. Try The Search Again") End If End SubEnd Class

Page 103: Documentation for a Visual Basic Mathematics Program

103

Edit Student UserPublic Class EditStudentInfo Private Sub EditStudentInfo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' shows the current student information in the text boxes as the form loads Call ListClassesInComboBox(ClassNameCbx) Call GetStudentInformation(SelectedName) End Sub

Private Sub PasswordTbx_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PasswordTbx.TextChanged ' this changes the characters being entered into the password text box to mask what is being written PasswordTbx.PasswordChar = "*" End Sub

Private Sub CancelBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CancelBtn.Click AdministratorHompage.Show() Me.Close() End Sub

Private Sub SaveInformationBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveInformationBtn.Click ' checks the inputs are valid before saving the record If ValidateStudentInfoInputs() Then Call SaveNewInformation() AdministratorHompage.Show() Me.Close() End If End Sub

Page 104: Documentation for a Visual Basic Mathematics Program

104

Private Sub GetStudentInformation(ByVal SelectedName As String) Dim SavedName As String Dim Student As StudentRecord FileOpen(1, StudentFile, OpenMode.Random, , , Len(Student)) i = 1 ' finds the selected student in the file and lists the student information into the text and combo boxes While Not EOF(1) FileGet(1, Student, i) SavedName = Student.FullName.ToUpper If InStr(SavedName, SelectedName) <> 0 Then FullNameTbx.Text = Student.FullName UsernameTbx.Text = Student.Username PasswordTbx.Text = Student.Password ClassNameCbx.SelectedItem = Student.ClassName Exit While End If i = i + 1 End While FileClose(1) End Sub

Private Function ValidateStudentInfoInputs() As Boolean ' returned as true if all inputs are present and are of the right length and format, returned as false if not ValidInput = True ValidateTextBox(FullNameTbx.Text, 30, "full name", "[a-zA-Z]+(\s)[a-zA-Z\-]+", ValidInput) ValidateTextBox(UsernameTbx.Text, 15, "username", "[_a-zA-Z\d\-]+", ValidInput) ValidateTextBox(PasswordTbx.Text, 15, "password", "[_a-zA-Z\d\-]+", ValidInput) ValidateComboBox(ClassNameCbx.SelectedItem, "class name", ValidInput) If ValidInput Then ValidateStudentInfoInputs = True Else ValidateStudentInfoInputs = False End If End Function

Private Sub SaveNewInformation() ' saves the new student information in the same place in the file Dim Student As StudentRecord FileOpen(1, StudentFile, OpenMode.Random, , , Len(Student)) FileGet(1, Student, i) Student.FullName = FullNameTbx.Text Student.Username = UsernameTbx.Text Student.Password = PasswordTbx.Text Student.ClassName = ClassNameCbx.Text FilePut(1, Student, i) FileClose(1) End SubEnd Class

Page 105: Documentation for a Visual Basic Mathematics Program

105

Search Teacher UserPublic Class SearchTeacher Dim TeacherSelected As Boolean = False Private Sub SearchTeacherBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SearchTeacherBtn.Click ' makes sure the user has entered something in the name text box before searching the file Dim Name As String If TeacherNameTbx.Text <> "" Then Name = TeacherNameTbx.Text.ToUpper Call CheckForTeacherName(Name) Else MsgBox("Invalid Name. Try again") End If End Sub

Private Sub EditTeacherBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EditTeacherBtn.Click ' makes sure a teacher has been selected from the list before opening the edit teacher info form If TeacherSelected = True Then SelectedName = TeachersFoundLbx.SelectedItem.ToString.ToUpper EditTeacherInfo.Show() Me.Close() Else MsgBox("Please select a teacher first.") End If End Sub

Private Sub CancelBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CancelBtn.Click AdministratorHompage.Show() Me.Close() End Sub

Page 106: Documentation for a Visual Basic Mathematics Program

106

Private Sub TeachersFoundLbx_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TeachersFoundLbx.SelectedIndexChanged ' means that a teacher has been selected from the list box TeacherSelected = True End Sub

Private Sub CheckForTeacherName(ByVal Name As String) Dim Exists As Boolean Dim SavedName As String Dim Teacher As TeacherRecord FileOpen(1, TeacherFile, OpenMode.Random, , , Len(Teacher)) i = 1 ' goes through each teacher in the file and checks if the saved name includes the name entered ' by the administrator, and adds them to the list box if it is While Not EOF(1) FileGet(1, Teacher, i) SavedName = Teacher.FullName.ToUpper If InStr(SavedName, Name) <> 0 Then Exists = True TeachersFoundLbx.Items.Add(Teacher.FullName) End If i = i + 1 End While FileClose(1) ' displays an error if no users in the teacher file include the name entered in the text box If Exists = False Then MsgBox("No Teacher Found. Try The Search Again") End If End SubEnd Class

Page 107: Documentation for a Visual Basic Mathematics Program

107

Edit Teacher UserPublic Class EditTeacherInfo Private Sub CancelBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CancelBtn.Click AdministratorHompage.Show() Me.Close() End Sub

Private Sub EditTeacherInfo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' shows the current teacher information in the text boxes as the form loads ListClassesInComboBox(FirstClassNameCbx) ListClassesInComboBox(SecondClassNameCbx) Call GetTeacherInformation(SelectedName) End Sub

Private Sub PasswordTbx_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PasswordTbx.TextChanged ' this changes the characters being entered into the password text box to mask what is being written PasswordTbx.PasswordChar = "*" End Sub

Private Sub SaveInformationBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveInformationBtn.Click ' checks the inputs are valid before saving the record If ValidateTeacherInfoInputs() Then Call SaveNewInformation() AdministratorHompage.Show() Me.Close() End If End Sub

Private Sub GetTeacherInformation(ByVal SelectedName As String) Dim SavedName As String Dim Teacher As TeacherRecord FileOpen(1, TeacherFile, OpenMode.Random, , , Len(Teacher)) i = 1 ' finds the selected teacher in the file and lists the teacher information into the text and combo boxes While Not EOF(1) FileGet(1, Teacher, i) SavedName = Teacher.FullName.ToUpper If InStr(SavedName, SelectedName) <> 0 Then FullNameTbx.Text = Teacher.FullName UsernameTbx.Text = Teacher.Username PasswordTbx.Text = Teacher.Password FirstClassNameCbx.Text = Teacher.FirstClassTaught SecondClassNameCbx.Text = Teacher.SecondClassTaught Exit While End If i = i + 1 End While FileClose(1) End Sub

Private Function ValidateTeacherInfoInputs() As Boolean ' returned as true if all inputs are present and are of the right length and format, returned as false if not

Page 108: Documentation for a Visual Basic Mathematics Program

108

ValidInput = True ValidateTextBox(FullNameTbx.Text, 30, "full name", "[a-zA-Z]+(\s)[a-zA-Z\-]+", ValidInput) ValidateTextBox(UsernameTbx.Text, 15, "username", "[_a-zA-Z\d\-]+", ValidInput) ValidateTextBox(PasswordTbx.Text, 15, "password", "[_a-zA-Z\d\-]+", ValidInput) ValidateComboBox(FirstClassNameCbx.SelectedItem, "first class taught", ValidInput) ValidateComboBox(SecondClassNameCbx.SelectedItem, "second class taught", ValidInput) If ValidInput Then ValidateTeacherInfoInputs = True Else ValidateTeacherInfoInputs = False End If End Function

Private Sub SaveNewInformation() ' saves the new teacher information in the same place in the file Dim Teacher As TeacherRecord FileOpen(1, TeacherFile, OpenMode.Random, , , Len(Teacher)) FileGet(1, Teacher, i) Teacher.FullName = FullNameTbx.Text Teacher.Username = UsernameTbx.Text Teacher.Password = PasswordTbx.Text Teacher.FirstClassTaught = FirstClassNameCbx.Text Teacher.SecondClassTaught = SecondClassNameCbx.Text FilePut(1, Teacher, i) FileClose(1) End SubEnd Class

Page 109: Documentation for a Visual Basic Mathematics Program

109

Global VariablesModule GlobalVariableList Public Username, Password, FullName, ClassName, SelectedName, SelectedQuiz, StudentGrade, FirstClassName, SecondClassName As String Public NumberofRecords, i, RecordLocation, QuizID, NumberOfQuestions, StudentID, SelectedQuizID, NoOfQuestionsInQuiz, SavedQuizID As Integer Public QuestionNumber As Integer = 1 Public QuestionScore As Integer = 0 Public StudentQuizScore As Integer = 0 Public QuizTime As Date = "01:45" Public Time As Date Public ValidInput, CorrectAnswerChosen, UserFound As Boolean Public Student(200) As StudentRecord Public Teacher(20) As TeacherRecord Public ClassR(10) As ClassRecord Public Quiz(20) As QuizRecord Public Question(600) As QuestionRecord Public StudentQuiz(3600) As StudentQuizRecord Public Const StudentFile = "StudentRecord.txt" Public Const TeacherFile = "TeacherRecord.txt" Public Const ClassFile = "ClassRecord.txt" Public Const QuizFile = "QuizRecord.txt" Public Const QuestionFile = "QuestionRecord.txt" Public Const StudentQuizFile = "StudentQuizRecord.txt"End Module

Public FunctionsImports System.Text.RegularExpressionsModule PublicFunctions

Public Sub FindStudentUser(ByVal Username As String) Dim Student As StudentRecord UserFound = False FileOpen(1, StudentFile, OpenMode.Random, , , Len(Student)) i = 1 ' searches through the student file to find the record location of the user, using the username they entered While Not EOF(1) FileGet(1, Student, i) If Username = Student.Username.Substring(0, Len(Username)) Then UserFound = True RecordLocation = i Exit While End If i = i + 1 End While FileClose(1) End Sub

Public Sub FindTeacherUser(ByVal Username As String) Dim Teacher As TeacherRecord UserFound = False FileOpen(1, TeacherFile, OpenMode.Random, , , Len(Teacher)) i = 1 ' searches through the teacher file to find the record location of the user, using the username they entered ' and finding the two classes that they teach While Not EOF(1) FileGet(1, Teacher, i)

Page 110: Documentation for a Visual Basic Mathematics Program

110

If Username = Teacher.Username.Substring(0, Len(Username)) Then UserFound = True RecordLocation = i FirstClassName = Teacher.FirstClassTaught SecondClassName = Teacher.SecondClassTaught Exit While End If i = i + 1 End While FileClose(1) End Sub

Public Sub ListClassesInComboBox(ByVal ComboBox As Object) Dim ClassR As ClassRecord FileOpen(1, ClassFile, OpenMode.Random, , , Len(ClassR)) i = 1 ' lists all of the classes in the class file in the combo box While Not EOF(1) FileGet(1, ClassR, i) ComboBox.Items.Add(ClassR.ClassName) i = i + 1 End While FileClose(1) End Sub

Public Function ValidateTextBox(ByVal Text As String, ByVal SaveLength As Integer, ByVal MsgText As String, ByVal RegexPattern As String, ByRef ValidInput As Boolean) As Boolean ' ValidInput is returned as true if the input is not empty, and is of the right length and format, returned as false if not Dim MyRegex As New System.Text.RegularExpressions.Regex(RegexPattern) If Len(Text) <= SaveLength And MyRegex.IsMatch(Text) Then Else ValidInput = False MsgBox("Invalid " & MsgText & ". Please try again") End If Return ValidInput End Function

Public Function ValidateComboBox(ByVal Text As String, ByVal MsgText As String, ByRef ValidInput As Boolean) As Boolean ' ValidInput is returned as true if the combo box has not been left empty by the user, returned as false if not If Text <> "" Then Else ValidInput = False MsgBox("Invalid " & MsgText & ". Please try again") End If Return ValidInput End Function

Public Sub ShowDataInTable(ByVal QuizList, ByVal NoQuizzesLbl) Dim StudentQuiz As StudentQuizRecord Dim Quiz As QuizRecord Dim y As Integer = 1 Dim NewQuizID As Integer Dim Exists As Boolean = False Dim QuizInformation(4) As String Dim QuizItem As ListViewItem ' adds the columns to the list view box

Page 111: Documentation for a Visual Basic Mathematics Program

111

QuizList.Columns.Add("Quiz Name", 100, HorizontalAlignment.Left) QuizList.Columns.Add("Quiz Taken", 100, HorizontalAlignment.Left) QuizList.Columns.Add("Quiz Score", 100, HorizontalAlignment.Left) QuizList.Columns.Add("Quiz Grade", 100, HorizontalAlignment.Left) QuizList.Columns.Add("Quiz Deadline", 120, HorizontalAlignment.Left) FileOpen(1, QuizFile, OpenMode.Random, , , Len(Quiz)) If LOF(1) = 0 Then ' hides the table if no quizzes have been created yet NoQuizzesLbl.Show() QuizList.Hide() Else NoQuizzesLbl.Hide() QuizList.Show() FileOpen(2, StudentQuizFile, OpenMode.Random, , , Len(StudentQuiz)) ' finds the result for each quiz in the quiz file For i = 1 To (LOF(1) / Len(Quiz)) Exists = False FileGet(1, Quiz, i) QuizInformation(0) = Quiz.QuizName NewQuizID = Quiz.QuizID ' finds the result for that quiz in the student quiz file For y = 1 To (LOF(2) / Len(StudentQuiz)) FileGet(2, StudentQuiz, y) If StudentID = StudentQuiz.UserID And NewQuizID = StudentQuiz.QuizID Then Exists = True QuizInformation(1) = "Yes" QuizInformation(2) = StudentQuiz.StudentScore QuizInformation(3) = StudentQuiz.StudentGrade Exit For End If Next ' if quiz hasn't been taken then the score and grade columns are filled with dashes If Exists = False Then QuizInformation(1) = "No" QuizInformation(2) = "-" QuizInformation(3) = "-" End If QuizInformation(4) = Quiz.Deadline ' adds the quiz row to the list view box QuizItem = New ListViewItem(QuizInformation) QuizList.Items.Add(QuizItem) Next FileClose(2) End If FileClose(1) End Sub

Public Sub DrawScoreGraph(ByVal Scores() As String, ByVal k As Integer, ByVal GraphPanel As Object) Scores(0) = 0 Dim X1, Y1, X2, Y2 As Integer Dim graphic As Graphics Dim myPen As Pen graphic = GraphPanel.CreateGraphics

Page 112: Documentation for a Visual Basic Mathematics Program

112

graphic.Clear(Color.SlateGray) ' sets the properties of the graph line being drawn myPen = New Pen(Color.Red, 5) ' finds two sets of co-ordinates for the next and last result and draws a line between them for each of the quiz results For Count = 1 To k X1 = (Count - 1) * (GraphPanel.Width / k) Y1 = GraphPanel.Height - ((GraphPanel.Height / 100) * (Convert.ToInt64(Scores(Count - 1)))) X2 = Count * (GraphPanel.Width / k) Y2 = GraphPanel.Height - ((GraphPanel.Height / 100) * (Convert.ToInt64(Scores(Count)))) graphic.DrawLine(myPen, X1, Y1, X2, Y2) Next ' draws the x and y axes of the graph graphic.DrawLine(Pens.Black, 1, 1, 1, (GraphPanel.Height - 1)) graphic.DrawLine(Pens.Black, 1, (GraphPanel.Height - 1), GraphPanel.Width, GraphPanel.Height - 1) End Sub

Public Function ValidateAlterPasswordInputs(ByVal OldPassword As String, ByVal NewPassword As String, ByVal ReEnteredNewPassword As String) As Boolean ' returned as true if all inputs are present and are of the right length and format, returned as false if not ValidInput = True ValidateTextBox(OldPassword, 15, "old password", "[_a-zA-Z\d\-]+", ValidInput) ValidateTextBox(NewPassword, 15, "new password", "[_a-zA-Z\d\-]+", ValidInput) ValidateTextBox(ReEnteredNewPassword, 15, "re-entered new password", "[_a-zA-Z\d\-]+", ValidInput) If ValidInput Then ValidateAlterPasswordInputs = True Else ValidateAlterPasswordInputs = False End If End FunctionEnd Module

Structures ModuleModule StructuresModule Structure StudentRecord <VBFixedString(3)> Dim UserID As Integer <VBFixedString(30)> Dim FullName As String <VBFixedString(15)> Dim Username As String <VBFixedString(15)> Dim Password As String <VBFixedString(3)> Dim ClassName As String End Structure

Structure TeacherRecord <VBFixedString(2)> Dim UserID As Integer <VBFixedString(30)> Dim FullName As String <VBFixedString(15)> Dim Username As String <VBFixedString(15)> Dim Password As String <VBFixedString(3)> Dim FirstClassTaught As String <VBFixedString(3)> Dim SecondClassTaught As String End Structure

Structure QuizRecord <VBFixedString(2)> Dim QuizID As Integer

Page 113: Documentation for a Visual Basic Mathematics Program

113

<VBFixedString(10)> Dim QuizName As String <VBFixedString(2)> Dim NumberOfQuestions As Integer <VBFixedString(2)> Dim AStarGrade As String <VBFixedString(2)> Dim AGrade As String <VBFixedString(2)> Dim BGrade As String <VBFixedString(2)> Dim CGrade As String <VBFixedString(2)> Dim DGrade As String <VBFixedString(2)> Dim EGrade As String Dim Deadline As Date End Structure

Structure QuestionRecord <VBFixedString(3)> Dim QuizID As Integer <VBFixedString(2)> Dim QuestionNumber As Integer <VBFixedString(100)> Dim QuestionText As String <VBFixedString(20)> Dim CorrectAnswer As String <VBFixedString(20)> Dim AnswerChoice1 As String <VBFixedString(20)> Dim AnswerChoice2 As String <VBFixedString(20)> Dim AnswerChoice3 As String <VBFixedString(11)> Dim QuestionTopic As String <VBFixedString(100)> Dim QuestionWorking As String <VBFixedString(1)> Dim QuestionDifficulty As Integer <VBFixedString(2)> Dim QuestionMarks As Integer <VBFixedString(50)> Dim QuestionImage As String End Structure

Structure StudentQuizRecord <VBFixedString(3)> Dim UserID As Integer <VBFixedString(3)> Dim QuizID As Integer <VBFixedString(3)> Dim StudentScore As String <VBFixedString(2)> Dim StudentGrade As String <VBFixedString(8)> Dim QuizTime As String End Structure

Structure ClassRecord <VBFixedString(3)> Dim ClassName As String <VBFixedString(1)> Dim ClassSet As Integer End StructureEnd Module

Page 114: Documentation for a Visual Basic Mathematics Program

114

Testing

Test Data

Classes

Quizzes

Sample of Quiz Questions

Class Name: 11AClass Set: 1

Class Name: 11BClass Set: 2

Class Name: 11CClass Set: 3

Class Name: 11DClass Set: 4

QuizID: 01Name: Quiz 1

Number of Questions: 28Quiz Deadline: 10.5.2012A* Grade Boundary: 90A Grade Boundary: 80B Grade Boundary: 70C Grade Boundary: 60D Grade Boundary: 50E Grade Boundary: 40

QuizID: 002Name: Quiz 2

Number of Questions: 31Quiz Deadline: 15.5.2012A* Grade Boundary: 93A Grade Boundary: 85B Grade Boundary: 72C Grade Boundary: 64D Grade Boundary: 52E Grade Boundary: 41

QuizID: 003Name: Quiz 3

Number of Questions: 30Quiz Deadline: 28.5.12A* Grade Boundary: 85A Grade Boundary: 75B Grade Boundary: 65C Grade Boundary: 58D Grade Boundary: 49E Grade Boundary: 38

QuizID: 004Name: Quiz 4

Number of Questions: 32Quiz Deadline: 12.6.2012A* Grade Boundary: 89A Grade Boundary: 79B Grade Boundary: 69C Grade Boundary: 59D Grade Boundary: 50E Grade Boundary: 40

QuizID: 005Name: Quiz 5

Number of Questions: 29Quiz Deadline: 28.6.2012A* Grade Boundary: 91A Grade Boundary: 81B Grade Boundary: 71C Grade Boundary: 61D Grade Boundary: 51E Grade Boundary: 41

Question Difficulty: 3Question Text: Work out the length of the

hypotenuse of the triangle pictured.Correct Answer: 5 cm

Answer Choice 1: 7 cmAnswer Choice 2: 3.7 cmAnswer Choice 3: 12 cm

Question Topic: GeometryQuestion Working: Using Pythagoras’

theorem, A2+b2 = c2 so 32+ 42 = c2. = sqrt(9 + 16) = sqrt(25) = 5 cm

Question Marks: 5Image Path: E:\work\Computing\Triangle.jpg

Question Difficulty: 2Question Text: Factorise (x+2)(x-3)

Correct Answer: x^2 – x – 6Answer Choice 1: 2x - 1

Answer Choice 2: x^2 - 1Answer Choice 3: x^2 – x + 6

Question Topic: AlgebraQuestion Working: By multiplying

out the brackets; (x+2)(x-3) = (x*x)+(x*-3)+(2*x)+(2*-3) = x^2 – x – 6

Question Marks: 3Image Path: None

Question Difficulty: 4Question Text: Simplify Fully (x+10)^5 /

(x+10)^4Correct Answer: (x+10)

Answer Choice 1: (x+10)^9Answer Choice 2: 1

Answer Choice 3: (x+10)^5/4Question Topic: Algebra

Question Working: By subtracting the indices when dividing, we get (x+10)^1 = (x+10)

Question Marks: 4Image Path: None

Page 115: Documentation for a Visual Basic Mathematics Program

115

Students & Student Quiz Results

Teachers

User Type: StudentUserID: 001

Name: Eleanor LongthornStudent Username:

EllieLongthornPassword: elephant

Class Name: 11AQuiz 1: BQuiz 2: BQuiz 3: AQuiz 4: BQuiz 5: A*

User Type: StudentUserID: 002

Name: Abbie WallStudent Username:

AbbieWPassword: umbrella

Class Name: 11BQuiz 1: CQuiz 2: BQuiz 3: BQuiz 4: BQuiz 5: A

User Type: StudentUserID: 003

Name: Sophie ToolStudent Username:

SToolPassword: lettuceClass Name: 11C

Quiz 1: EQuiz 2: DQuiz 3: DQuiz 4: CQuiz 5: C

User Type: StudentUserID: 004

Name: Natalie WalkerStudent Username: NatWalk

Password: computerClass Name: 11B

Quiz 1: BQuiz 2: AQuiz 3: AQuiz 4: A*Quiz 5: B

User Type: StudentUserID: 005

Name: Rebecca ChesterStudent Username:

RChesterPassword: password

Class Name: 11DQuiz 1: DQuiz 2: CQuiz 3: BQuiz 4: AQuiz 5: A*

User Type: StudentUserID: 006

Name: Lorna CarswellStudent Username: LornaC

Password: bubblesClass Name: 11D

Quiz 1: AQuiz 2: AQuiz 3: BQuiz 4: AQuiz 5: A

User Type: StudentUserID: 007

Name: Jessica TrentStudent Username: JTrentPassword: magicdragon

Class Name: 11AQuiz 1: CQuiz 2: CQuiz 3: C

Quiz 4: Not TakenQuiz 5: B

User Type: StudentUserID: 008

Name: Jessica TrentStudent Username:

JessTrentPassword: buttonsClass Name: 11C

Quiz 1: UQuiz 2: UQuiz 3: DQuiz 4: CQuiz 5: C

User Type: StudentUserID: 009

Name: Alex PensonStudent Username:

APensPassword: mrtiggs123

Class Name: 11CQuiz 1: BQuiz 2: BQuiz 3: BQuiz 4: CQuiz 5: B

User Type: StudentUserID: 010

Name: Lauren RangerStudent Username:

CHUCKNORRISPassword: Roundhouse

Class Name: 11BQuiz 1: A*Quiz 2: AQuiz 3: BQuiz 4: AQuiz 5: A

User Type: StudentUserID: 011

Name: Jennifer ClarkStudent Username:

JennyClarkPassword: koolaidClass Name: 11D

Quiz 1: CQuiz 2: CQuiz 3: CQuiz 4: BQuiz 5: B

User Type: StudentUserID: 012

Name: Katie TurnerStudent Username: KTurn

Password: greenClass Name: 11A

Quiz 1: A*Quiz 2: BQuiz 3: AQuiz 4: AQuiz 5: A

User Type: TeacherUserID: 01

Name: Simon WhiteStudent Username: SMWhite

Password: bubblewrapFirst Class Taught: 11A

Second Class Taught: 11B

User Type: TeacherUserID: 02

Name: Simon RoodStudent Username: SJRood

Password: keyboardFirst Class Taught: 11C

Second Class Taught: 11D

User Type: TeacherUserID: 03

Name: Jane BeattieStudent Username:

JBeattiePassword: mathsisfunFirst Class Taught: 11B

Second Class Taught: 11C

Page 116: Documentation for a Visual Basic Mathematics Program

116

Test PlanB = Boundary, E = Erroneous, T = Typical

Test No.

Description Test Data Test

Type

Expected Output Actual Output

Student Login1 Test Username

& Password Textbox

Validation

Username field left empty

Correct Password: “green”

E Message Box with error statement appears, and Username and Password

textboxes are cleared

As Expected

Correct username: “KTurn”

Password field Left empty

E Message Box with error statement appears, and Username and Password

textboxes are cleared

As Expected

Correct username: “KTurn”

Incorrect Password:P: “jelly"

E Message Box with error statement appears, and Username and Password

textboxes are cleared

As Expected

Incorrect username:“KTurner"

Correct Password: “green”

E Message Box with error statement appears, and Username and Password

textboxes are cleared

As Expected

Correct username: “KTurn”

Half of password:“gre”

E Message Box with error statement appears, and Username and Password

textboxes are cleared

Not as expected –

Student Homepage loads. See

Code amendment

Correct username and password

T Student homepage form loads

As Expected

Student Homepage

2 Student Quiz List box

No quizzes have been created

B The list box is hidden from the users view and a label shows telling the user that they must wait until a quiz

has been created.

As Expected

Student User Katie Turner Logged in

T Loads all quizzes and applicable scores and

grades as form loads up

As Expected

3 Student Name Student User Katie Turner Logged in

- Loads student name into label box at top right

corner of page as Student Homepage form loads

As Expected

Alter Student Password

4 Test Old Password, Enter & Re-Enter New password text

boxes

Incorrect Old Password:“yellow”

E Message Box Appears and all text boxes are cleared

As Expected

Correct Old Password:“green”

Different New Passwords: “yellow”

& “blue”

E Message Box Appears and all text boxes are cleared

As Expected

Old Password: field left empty

E Message Box Appears and all text boxes are cleared

As Expected

Page 117: Documentation for a Visual Basic Mathematics Program

117

Correct New Passwords; “yellow”

& “yellow”Correct Old

Password: “green”Both New

Passwords:Field left empty

E Message Box Appears and all text boxes are cleared

As Expected

Correct Old Password: “green”

Correct New Passwords:

“blue” & “blue”

T Old password is deleted and new password is

saved

As Expected

Student Grade Breakdown

5 Test Student Score Graph

No quizzes created by teacher user yet

B Error message box appears and Student

Grade Breakdown is not loaded up

Not as Expected –

Student Grade Breakdown loads. See

Code amendment

No quizzes taken by student yet

B Error message box appears and Student

Grade Breakdown is not loaded up

Not as Expected –

Student Grade Breakdown loads. See

Code amendment

All / Most quizzes have been taken

T Loads graph of scores and current details

As Expected

Take Quiz6 Take Quiz Load Quiz with today’s

date as deadline date

B The quiz name is added to the list of available

quizzes to take

As Expected

Quiz with a previous date as deadline

date

E The quiz name is not added to the list of

available quizzes to take

As Expected

Quiz that has already been taken

E The quiz name is not added to the list of

available quizzes to take

As Expected

No quizzes have been created

E Error message box appears and Take Quiz is

not loaded

As Expected

Quiz with a future deadline date

T The quiz name is added to the list of available

quizzes to take

As Expected

7 Take Quiz Button

No quiz is selected E Error message box appears and the Quiz

Information form is not loaded

As Expected

Any Quiz on the list selected

T Loads Quiz information with correct quiz details

and closes Take Quiz form

As Expected

Quiz Information

8 Quiz Information Form Loads

Quiz 1 is selected in the Take Quiz form

- Loads Correct Quiz Information into form

labels

As Expected

Quiz Question

Page 118: Documentation for a Visual Basic Mathematics Program

118

Page9 Quiz Question

form LoadsQuiz 1 is selected in the Take Quiz form

- Displays the correct quiz question information, and quiz timer starts counting

down

As Expected

10 Quiz Timer User takes over 1:45 to complete

test

T Timer stops counting down once timer reaches

zero

As Expected

11 Next Button The next button is clicked

T Quiz Timer stops when user is looking at question

answer page

As Expected

12 Question Image Button

Image file path was given in question

information

T Question Image button is visible to user on Quiz

Question Page

As Expected

No image file path was given in

question information

T Question Image button is not visible on Quiz

Question Page

As Expected

Question Image Page

13 Question image Question image button is clicked on Quiz Question Page

- Question image shows upon form loading

As Expected

14 Quiz Timer Question Image Page is being

displayed

- Quiz timer still runs whilst user is viewing Question

Image Page

As Expected

Question Answer Page

15 Form Loads The next button is clicked on the Quiz

Question Page

- Correct question information loads, shows

the user whether they answered correctly

As Expected

16 Form Closes Next Button is clicked

- Reloads Question Answer Page or loads End of Quiz

page (Whichever is applicable) and closes Question Answer Page

As Expected

End of Quiz17 Form loads Student achieves 90

in Quiz 1 – A* grade boundary

B Correct finish time, student score and student

grade is calculated and displayed

As Expected

Student achieves 83 Quiz 1 – A grade

T Correct finish time, student score and student

grade is calculated and displayed

As Expected

18 Form Closes Next button is clicked

- Loads Student Homepage with new quiz score and

grade in list box and closes End of Quiz

As Expected

Teacher Login19 Test Username

& Password Textbox

Validation

Username field left empty

Correct Password: “bubblewrap”

E Message Box with error statement appears, and Username and Password

textboxes are cleared

As Expected

Correct username: “SMWhite”

Password field Left empty

E Message Box with error statement appears, and Username and Password

textboxes are cleared

As Expected

Correct username: E Message Box with error As Expected

Page 119: Documentation for a Visual Basic Mathematics Program

119

“SMWhite”Incorrect Password:

P: “purple”

statement appears, and Username and Password

textboxes are clearedIncorrect username:

“SMW”Correct Password:

“bubblewrap”

E Message Box with error statement appears, and Username and Password

textboxes are cleared

As Expected

Correct username: “SMWhite”

Half of password:“bubble”

E Message Box with error statement appears, and Username and Password

textboxes are cleared

Not as expected –

Student Homepage loads. See

Code amendment

Correct username and password

T Teacher homepage form loads

As Expected

Teacher Homepage

20 Teacher Quiz List box

No quizzes have been created

B The list box is hidden from the users view and a label shows telling the user that they must wait until a quiz has been created to view

student results.

As Expected

Teacher User Simon White Logged in

T Each tab Loads all quizzes and applicable grades for each student in each of

the two classes they teach as form loads up

As Expected

21 Teacher Name Teacher User Simon White Logged in

- Loads student name into label box at top right

corner of page as Student Homepage form loads

As Expected

Alter Teacher Password

22 Test Old Password, Enter & Re-Enter New password text

boxes

Incorrect Old Password:

“mrblobby”

E Message Box Appears and all text boxes are cleared

As Expected

Correct Old Password:

“bubblewrap”Different New

Passwords: “white” & “blubber”

E Message Box Appears and all text boxes are cleared

As Expected

Old Password: field left empty

Correct New Passwords; “white”

& “white”

E Message Box Appears and all text boxes are cleared

As Expected

Correct Old Password:

“bubblewrap”Both New

Passwords:Field left empty

E Message Box Appears and all text boxes are cleared

As Expected

Correct Old Password:

“bubblewrap”Correct New Passwords:

T Old password is deleted and new password is

saved

As Expected

Page 120: Documentation for a Visual Basic Mathematics Program

120

“white” & “white”Teacher Grade

Breakdown23 Test Teacher

Grade Breakdown

Load

No quizzes created by teacher user yet

B Error message box appears and Teacher

Grade Breakdown is not loaded up

Not as Expected –

Teacher Grade Breakdown loads. See

Code amendment

24 Test Student Names List box

Student user Katie Turner selected

T Loads graph of current scores, with dynamically labelled axis and a List View of student grades

As Expected

Create Quiz25 Test Quiz Info

Text BoxesQuiz Name text box10 characters long:

“Prob. Quiz”

B Saves quiz information As Expected

Number of Questions text box

0 Questions

E Error message box appears and Quiz

Information is not saved

As Expected

A* Grade Boundary Text Box

Textbox left empty

E Error message box appears and Quiz

Information is not saved

As Expected

A* Grade boundary100

E Error message box appears and Quiz

Information is not saved

As Expected

A Grade boundary text box

Greater than A* grade boundary

E Error message box appears and Quiz

Information is not saved

As Expected

Quiz Name text box“Quiz 1”

T Saves quiz information As Expected

26 Test Deadline Date Picker

Today’s Date B Saves quiz information As ExpectedYesterday’s date E Error message box

appears and Quiz Information is not saved

As Expected

Non-existent date: (36.2.2013)

E User is unable to enter in a non-existent date into

the date/time picker

As Expected

Left empty E User is unable to leave the field empty

As Expected

12.6.2012 T Saves quiz information As ExpectedCreate Question

Information27 Test Question

Information combo boxes

Question DifficultyLeft Empty

E Error message box appears and Question

Information is not saved

As Expected

Question Topic“Calculus”

E User is unable to type the data into the combo box

As Expected

Question Marks“3”

T Saves question information

As Expected

28 Test Question Information text

boxes

Question Text100 Characters

B Saves question information

As Expected

Correct AnswerText box left empty

E Error message box appears and Question

Information is not saved

As Expected

Question Working110 Characters

E Error message box appears and Question

Information is not saved

As Expected

Page 121: Documentation for a Visual Basic Mathematics Program

121

Question Text52 Characters

T Saves question information

As Expected

29 Test Image Path text box

Text box left empty B Saves question information

As Expected

Invalid file path E Error message box appears and Question

Information is not saved

As Expected

Correct file path T Saves question information

As Expected

Create New Class

30 Test Class Name text box

Text box left empty E Error message box appears and Class

Information is not saved

As Expected

“11” E Error message box appears and Question

Information is not saved

As Expected

“11C” T Saves class information As Expected31 Test Class Set

combo boxCombo box left

emptyE Error message box

appears and Class Information is not saved

As Expected

Set 5 E User is unable to type the data into the combo box

As Expected

Typical“Set 2”

T Saves class information As Expected

Search Student Form

32 Test Enter Student Name

text box

Leave text box blank

B Error message box appears and list of

students is not shown

As Expected

Search “bob” E Error message box appears and list of

students is not shown

As Expected

Search “Jessica” T Shows a list of students with name including “Jessica” in list box

As Expected

33 Test Edit Student button

No student selected E Error message box appears and student

information is not shown

As Expected

“Jessica Trent” selected

T Opens Edit Student Info form with student

information in textboxes

As Expected

Edit Student Info

34 Test edit information text

boxes

Leave student information the

same

B Data is unchanged As Expected

Text boxes are left empty

E Error message box appears and Student

Information is not saved

As Expected

Length greater than save length

E Error message box appears and Student

Information is not saved

As Expected

Typical(Change Surname)

T Saves new student name As Expected

Search Teacher Form

35 Test Enter Teacher Name

text box

Leave text box blank

B Error message box appears and list of

teachers is not shown

As Expected

Page 122: Documentation for a Visual Basic Mathematics Program

122

Search “bob” E No teachers are listed in the list box

As Expected

Search “Simon” T Shows a list of teachers with name including “Simon” in list box

As Expected

36 Test Edit Teacher button

No teacher selected E Error message box appears and teacher

information is not shown

As Expected

“Simon White” is selected

T Opens Edit Teacher Info form with teacher

information in textboxes

As Expected

Edit Teacher Info

37 Test edit information text

boxes

Leave teacher information the

same

B Data is unchanged As Expected

Text boxes are left empty

E Error message box appears and Teacher

Information is not saved

As Expected

Length greater than save length

E Error message box appears and Teacher

Information is not saved

As Expected

Typical(Change Surname)

T Saves new teacher name As Expected

Create New User

38 Test Full Name and Username

text boxes

Length same as save length

B Saves user information As Expected

Length greater than save length

E Error message box appears and user is not

saved

As Expected

Text box left empty E Error message box appears and user is not

saved

As Expected

Length smaller than save length

T Saves user information As Expected

39 Test Password text boxes

Both input the same, second with

capital letters

B Error message box appears and user is not

saved

As Expected

Both input the same, with length greater than 15

characters

E Error message box appears and user is not

saved

As Expected

Both inputs different

E Error message box appears and user is not

saved

As Expected

Both saved as (“computer”)

T Saves “computer” as password

As Expected

New Student User

40 Test Class Name combo

box

Combo box Left Empty

E Error message box appears and new student

user is not saved

As Expected

“9” E User is unable to type the data into the combo box

As Expected

“11B” T Saves new student user As ExpectedNew Teacher

User41 Test Security

Word textbox“CIRCLE” B Error message box

appears and new teacher As Expected

Page 123: Documentation for a Visual Basic Mathematics Program

123

user is not savedText box left empty E Error message box

appears and new teacher user is not saved

As Expected

“circle” T Saves new teacher user As Expected42 Test Classes

Taught combo boxes

Combo box Left Empty

E Error message box appears and new teacher

user is not saved

As Expected

“9” E User is unable to type the data into the combo box

As Expected

First Class Taught = Second Class

Taught

E Error message box appears and new teacher

user is not saved

Not as Expected –

Teacher Grade Breakdown loads. See

Code amendment

“11B” T Saves new teacher user As Expected

Hard copy evidence

1.1

1.5

After typing in ‘green’ to

the Password

text box and clicking the

Login button, an

error message

appears as expected.

After typing in ‘KTurn’ into the Username text box and ‘gre’ to the Password text box and clicking the Login button, the system logs the user in and the Student Homepage loads. This

was an unexpected result, and I will amend my code in the next section to fix this.

Page 124: Documentation for a Visual Basic Mathematics Program

124

2.1

4.1

4.4

After typing in ‘yellow’ to the Old Password text box and clicking the Save button, an

error message appears as expected.

After typing in ‘green’ to the Old Password text box and clicking the Save button, an

error message appears as expected.

After logging in

as the user Katie

Turner, as there are no

quizzes created by a teacher the quiz list box

is hidden and a label telling that to the user appears as expected.

Page 125: Documentation for a Visual Basic Mathematics Program

125

5.1

5.2

6.5, 6.3

After logging into the system with a

student account that has not taken any quizzes yet and

clicking the grade breakdown page, an

error message should appear and the form should not load. However, the grade breakdown

form does load and the graph shows.

This was an unexpected result,

and I will amend my code in the next

section to fix this.

After logging into the system with a student account

where there have been no quizzes created yet and

clicking the grade breakdown page, an

error message should appear and the form should not load. However, the grade breakdown

form does load and the graph shows.

This was an unexpected result,

and I will amend my code in the next

section to fix this.

Quiz 1 – Quiz 5 all have

future dates set on them and they all show in the quiz list as expected.

Once Quiz 1- 3 & 5 have been taken, only quiz 4 remains on the list, as

Page 126: Documentation for a Visual Basic Mathematics Program

126

6.4

7.1

9

Not selecting a quiz from the list and clicking Take Quiz brings up an error message as expected.

Logging in as a student user

and clicking the Take Quiz button where a teacher user

has not created any quizzes yet causes an

error message to appear and the Take Quiz form does not

load, as expected.

After selecting Quiz 1 from

the Take Quiz form, the

correct quiz and question information is displayed and

the timer starts counting

down, as expected.

Page 127: Documentation for a Visual Basic Mathematics Program

127

13

17.1

18

19.5

The question image shows upon the form loading, and

the quiz timer stops on the

main question page as

expected.

The student achieves a

score of 90 in Quiz 1, where the A* grade

boundary is 90 marks. The

grade is saved as A*, as expected.

After the student has taken the quiz, their homepage loads up and shows their new

grade into the list box showing them

that they have taken it.

Page 128: Documentation for a Visual Basic Mathematics Program

128

20.1

22.4

After typing in ‘SMWhite’ into the Username text box and ‘bubble’ to the Password text box and clicking the Login button, the system logs the user in and the Teacher Homepage loads. This

was an unexpected result, and I will amend my code in the next section to fix this.

After typing in ‘bubblewrap’ to the Old Password text box and leaving the new password text

boxes empty & clicking the Save button, an error message appears as expected.

After logging in as the user Simon White, as there are no quizzes

created by a teacher the student quiz

list box is hidden and a label telling that to the

user appears as expected.

Page 129: Documentation for a Visual Basic Mathematics Program

129

23

25.1

25.4

After logging in as the user Simon White, and clicking the grade

breakdown button, the

form loads and shows the graph. This

was an unexpected result, and I

will amend my code in the

next section to fix this.

After typing in ‘Prob. Quiz’ to the Quiz Name text box

and clicking create, the Create Question

Information form appears as expected.

After typing ‘100’ into the

A* Grade Boundary

text box and clicking

Create, an error

message appears as expected.

Page 130: Documentation for a Visual Basic Mathematics Program

130

25.5

26.2

27.1

After typing ‘90’ into the

A* Grade Boundary

text box and ‘95’ into the

A Grade Boundary

text box and clicking

Create, an error

message appears as expected.

After selected ‘23rd June

2011’ (a date in the past)

and click Create, an

error message appears as expected.

After leaving the Question

Difficulty combo box empty and

clicking Next, an error message

appears as expected.

Page 131: Documentation for a Visual Basic Mathematics Program

131

28.4

29.2

30.3, 31.3

After entering an invalid file

path into the Image Path

text box and clicking the Next button,

an error message

appears as expected.

After entering text the length of 52 characters into the Question Text

text and clicking the Next button, the question is saved as expected.

After entering ‘11C’ into the Class Name text box and ‘2’ into the Class Set text box and click Create, the new class is saved and the Admin Homepage for

loads as expected.

Page 132: Documentation for a Visual Basic Mathematics Program

132

32.1

32.2

33.1

After leaving the Student

Name text box empty and

clicking Search, an

error message appears as expected.

After entering ‘bob’ into the Student Name text box and

clicking Search, an

error message appears as expected.

After entering ‘J’ into the

Student Name text box and

clicking Search, a list of students names that include ‘J’ show, as expected.

Page 133: Documentation for a Visual Basic Mathematics Program

133

34.3

36.1

37.3

After leaving the Full Name

text box empty and clicking the

Save button, an error message

shows and the name is not saved, as expected.

After searching

‘Simon’ in the Teacher Name text box, and clicking Edit

Teacher without

selecting a teachers

name, an error message

appears as expected.

After entering ‘Simon James

William Nicholas Rood’

in the Full Name text box, and

clicking Save, an error message

appears as expected.

Page 134: Documentation for a Visual Basic Mathematics Program

134

39.1

40.1

42.3

After entering ‘green’ into

the Password text box and ‘Green’ into the Re-Enter

Password text box, and an

error message appears as expected.

After leaving the Class

Name combo box empty and clicking

the Done button, an

error message appears and

the user is not saved as expected.

After selected the same class for both Class Name combo boxes and clicking

Done, the teacher is saved and the Login Selection Screen is loaded. This was an unexpected result, and I will

amend my code in the next section to fix this.

Page 135: Documentation for a Visual Basic Mathematics Program

135

Code AmendmentTest 1.5Original Code; If Password = Student.Password.Substring(0, Len(Password)) Then PasswordsMatch = True Else MsgBox("Incorrect Password, Try again") PasswordsMatch = False StudentPasswordTbx.Clear()

End If

Revised Code;If Password.PadRight(15) = Student.Password Then PasswordsMatch = True Else MsgBox("Incorrect Password, Try again") PasswordsMatch = False StudentPasswordTbx.Clear() End If

Test 5.1Original Code;Private Sub StudentGradeBreakdown_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call ShowDataInTable(QuizList, NoQuizzesLbl)End Sub

Revised Code;Private Sub StudentGradeBreakdown_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If CheckForQuizzes() Then Call ShowDataInTable(QuizList, NoQuizzesLbl) Else StudentHomepage.Show() Me.Close() End If End Sub

Private Function CheckForQuizzes() As Boolean Dim Quiz As QuizRecord FileOpen(1, QuizFile, OpenMode.Random, , , Len(Quiz)) If LOF(1) / Len(Quiz) > 0 Then CheckForQuizzes = True Else CheckForQuizzes = False MsgBox("No quizzes made yet. Please try again later") End If FileClose(1) End Function

Test 5.2Original Code;Private Function CheckForQuizzes() As Boolean Dim Quiz As QuizRecord FileOpen(1, QuizFile, OpenMode.Random, , , Len(Quiz)) If LOF(1) / Len(Quiz) > 0 Then CheckForQuizzes = True Else

Page 136: Documentation for a Visual Basic Mathematics Program

136

CheckForQuizzes = False MsgBox("No quizzes made yet. Please try again later") End If FileClose(1) End Function

Revised Code;Private Function CheckForQuizzes() As Boolean Dim Quiz As QuizRecord Dim StudentQuiz As StudentQuizRecord Dim QuizTaken As Boolean Dim NewQuizId As Integer FileOpen(1, QuizFile, OpenMode.Random, , , Len(Quiz)) FileOpen(2, StudentQuizFile, OpenMode.Random, , , Len(StudentQuiz)) QuizTaken = False For i = 1 To (LOF(1) / Len(Quiz)) FileGet(1, Quiz, i) NewQuizID = Quiz.QuizID For y = 1 To (LOF(2) / Len(StudentQuiz)) FileGet(2, StudentQuiz, y) If StudentID = StudentQuiz.UserID And NewQuizID = StudentQuiz.QuizID Then QuizTaken = True Exit For End If Next Next If LOF(1) / Len(Quiz) > 0 And QuizTaken Then CheckForQuizzes = True Else CheckForQuizzes = False If LOF(1) / Len(Quiz) = 0 Then MsgBox("No quizzes made yet. Please try again later") If QuizTaken = False Then MsgBox("No Quizzes taken yet. Please take a quiz and try again") End If FileClose(1) FileClose(2) End FunctionTest 19.5Original Code;If Password = Teacher.Password.Substring(0, Len(Password)) Then PasswordsMatch = True Else MsgBox("Incorrect Password. Please Try again") PasswordsMatch = False TeacherPasswordTbx.Clear()

End If

Revised Code;If Password.PadRight(15) = Teacher.Password Then PasswordsMatch = True Else MsgBox("Incorrect Password. Please Try again") PasswordsMatch = False TeacherPasswordTbx.Clear() End If

Page 137: Documentation for a Visual Basic Mathematics Program

137

Test 23Original Code;Private Sub GradeBreakdown_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load YAxisGraphLabelPnl.Hide() XAxisGraphLabelPnl.Hide() StudentInfoListView.Hide()

Revised Code;Private Sub GradeBreakdown_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If CheckForQuizzes() Then Call LoadStudents() YAxisGraphLabelPnl.Hide() XAxisGraphLabelPnl.Hide() StudentInfoListView.Hide() Else TeacherHomepage.Show() Me.Close() End If End Sub

Private Function CheckForQuizzes() As Boolean Dim Quiz As QuizRecord FileOpen(1, QuizFile, OpenMode.Random, , , Len(Quiz)) If LOF(1) / Len(Quiz) > 0 Then CheckForQuizzes = True Else CheckForQuizzes = False MsgBox("No quizzes made yet. Please try again later") End If FileClose(1) End Function

Test 42.3Original Code; If SecurityWordTbx.Text.ToUpper = "CIRCLE" And ValidInput Then ValidateTeacherClassInputs = True Else ValidateTeacherClassInputs = False If SecurityWordTbx.Text.ToUpper <> "CIRCLE" Then MsgBox("Invalid security word. Please try again") SecurityWordTbx.Clear() End If

Revised Code;If SecurityWordTbx.Text.ToUpper = "CIRCLE" And ValidInput And FirstClassCbx.SelectedItem <> SecondClassCbx.SelectedItem Then ValidateTeacherClassInputs = True Else ValidateTeacherClassInputs = False If SecurityWordTbx.Text.ToUpper <> "CIRCLE" Then MsgBox("Invalid security word. Please try again")

Page 138: Documentation for a Visual Basic Mathematics Program

138

If FirstClassCbx.SelectedItem = SecondClassCbx.SelectedItem Then MsgBox("Please enter two different classes.") SecurityWordTbx.Clear()

End If

RetestsTest

No.

Description Test Data Test Type

Expected Output Actual Output

Student Login

1.5 Test Username & Password Textbox

Validation

Correct username:

“KTurn”Half of password:

“gre”

E Message Box with error statement appears, and Username and Password

textboxes are cleared

As Expected

Student Grade Breakdown

5.1 Test Student Score Graph

No quizzes created by teacher

user yet

B Error message box appears and Student Grade

Breakdown is not loaded up

As Expected

5.2 Test Student Score Graph

No quizzes taken by student yet

B Error message box appears and Student Grade

Breakdown is not loaded up

As Expected

Teacher Login

19.5

Test Username & Password Textbox

Validation

Correct username:

“SMWhite”Half of password:

“bubble”

E Message Box with error statement appears, and Username and Password

textboxes are cleared

As Expected

Teacher Grade Breakdown

23Test Teacher

Grade Breakdown Load

No quizzes created by

teacher user yet

B Error message box appears and Teacher

Grade Breakdown is not loaded up

As Expected

New Teacher User

42. Test Classes First Class Taught = Second Class

E Error message box appears and new teacher

As Expected

Page 139: Documentation for a Visual Basic Mathematics Program

139

3 Taught combo boxes

Taught user is not saved

Page 140: Documentation for a Visual Basic Mathematics Program

140

Hard Copy Evidence1.5

5.1

5.2

After typing in ‘gre’ which is only half of the correct password

‘green’, the user cannot login to the

student homepage,

as expected.

After clicking on the Grade Breakdown

button on the student

homepage when there have been

no quizzes created, an error

message appears and the Student Grade

Breakdown form does not show, as expected.

After clicking on the Grade Breakdown

button on the student

homepage when the student has not taken any of the quizzes, an error message

appears and the Student Grade

Breakdown form does not show, as expected.

Page 141: Documentation for a Visual Basic Mathematics Program

141

19.5

23

42.3

After typing in ‘bubble’

which is only half of the

correct password

‘bubblewrap’, the user

cannot login to the

teacher homepage,

as expected.

After clicking on the Grade Breakdown

button on the teacher

homepage when there have been

no quizzes created, an error

message appears and the Teacher Grade

Breakdown form does not show, as expected.

After selecting ‘11A’ in both the

Class Name combo boxes and clicking

Done, an error message

appears and the user information is not saved, as

expected.

Page 142: Documentation for a Visual Basic Mathematics Program

142

System Maintenance

System overview

See ‘Overall System Design’ in the Design section

Detailed algorithms

See ‘Description of Modular Structure of System’ in the Design section

Annotated listings

See ‘Program Listing’ in the Implementation section

Variable Lists

See ‘Data Dictionary’ in the Design Section

Procedure/function and variable lists

Name Public Sub FindStudentUser

Location Page 103

Input Parameter

s

Byval Username As String

Output Parameter

s

-

Local Variables

Student as StudentRecord

Description

Finds the student user from the student file by matching the username the user entered whilst logging in, to the saved

usernames in each of the individual student records in the student file. Once the username has found a match, the global variable

RecordLocation will then be changed to equal the location number of this student record.

Name Public Sub FindTeacherUser

Location Page 103

Input Parameter

s

Byval Username As String

Output Parameter

-

Page 143: Documentation for a Visual Basic Mathematics Program

143

s

Local Variables

Teacher as TeacherRecord

Description

Finds the teacher user from the teacher file by matching the username the user entered whilst logging in, to the saved

usernames in each of the individual teacher records in the teacher file. Once the username has found a match, the global variable

RecordLocation will then be changed to equal the location number of this teacher record.

Name Public Sub ListClassesInComboBox

Location Page 104

Input Parameter

s

Byval ComboBox as object

Output Parameter

s

-

Local Variables

ClassR as ClassRecord

Description

This procedure will read the saved classes from the class file, and will list each of the class names into the combo box that has been

passed into the procedure.

Name Public Function ValidateTextBox

Location Page 104

Input Parameter

s

ByVal Text As String, ByVal SaveLength As Integer, ByVal MsgText As String, ByVal RegexPattern As String, ByRef ValidInput As Boolean

Output Parameter

s

ByRef ValidInput As Boolean

Local Variables

MyRegex As New System.Text.RegularExpressions.Regex(RegexPattern)

Description

This function checks that the text entered into a textbox is of the right format using a RegEx pattern that is passed into the function, and checks the text is less than or equal to the save length limit.

The global variable ValidInput is then returned false if the text is not

Page 144: Documentation for a Visual Basic Mathematics Program

144

valid, and will then display an error message if so.

Name Public Function ValidateComboBox

Location Page 104

Input Parameter

s

Byval Text As String, ByVal MsgText As String, ByRef ValidInput As Boolean

Output Parameter

s

ByRef ValidInput As Boolean

Local Variables

-

Description

This function checks that the user has not left the combo box that is being checked has not been left empty, and that one of the choices has been selected. The global variable ValidInput is then returned

false if the and option has not been chosen, and will then display an error message if so.

Name Public Sub ShowDataInTable

Location Page 104

Input Parameter

s

ByVal QuizList As Object, ByVal NoQuizzesLbl As Object

Output Parameter

s

-

Local Variables

StudentQuiz As StudentQuizRecord, Quiz As QuizRecord, y, NewQuizId, Exists, QuizInformation(4), QuizItem As ListViewItem

Description

This procedure is used to fill the quiz information table on the student homepage as well as on the student grade breakdown

form. Columns are created in the list box that is passed in and fills them with the students results for each quiz that has been created in the system, from reading the student quiz file, matching the quiz

ID and the student ID fields.

Name Public Sub DrawScoreGraph

Location Page 105

Page 145: Documentation for a Visual Basic Mathematics Program

145

Input Parameter

s

Byval Scores() As String, Byval k As Integer, Byval GraphPanel As Object

Output Parameter

s

-

Local Variables

X1, Y1, X2, Y2 As Integer, graphic As Graphics, myPen As Pen

Description

This procedure uses the results saved that are passed in using the Scores array to map co-ordinates between each quiz. A line is then

drawn using the graphics tools, which is done for each quiz that have been created in the system. This then creates a full graph that

is then displayed to the user.

Name Public Function ValidateAlterPasswordInputs

Location Page 106

Input Parameter

s

ByVal OldPassword As String, ByVal NewPassword As String, ByVal ReEnteredNewPassword As String

Output Parameter

s

-

Local Variables

-

Description

This function checks to make sure that the passwords entered on both of the Alter Student & Alter Teacher Password forms are valid

before the new password is saved and overwrites the old password. It passes the passwords into the ValidateTextBox function, and if all of the inputs are valid, the function is returned as a Boolean value

of true.

Name Private Sub Quicksort

Location 78

Input Parameter

s

ByRef StudentNames() As String, ByVal First As Integer, ByVal Last As Integer

Output Parameter

ByRef StudentNames() As String

Page 146: Documentation for a Visual Basic Mathematics Program

146

s

Local Variables

LeftPointer, RightPointer As Integer, Temp As String

Description

This sub Sorts the names in the student names array into alphabetical order by first name, using left and right pointers and a

pivot to compare and swap name in the array, and once finished then calls itself recursively to compare names either side of the

pivot

Name Private Function CheckForCorrectAnswer

Location Page 66

Input Parameter

s

ByVal RadioButton As RadioButton, ByVal CorrectAnswer As String, ByVal QuestionMarks As Integer, ByRef CorrectAnswerChosen As

Boolean

Output Parameter

s

ByRef CorrectAnswerChosen As Boolean

Local Variables

-

Description

This function checks for each of the 4 possible answers of the question if the radio button for that answer was selected and if so if that is the correct answer which is passed into the function. If the

answer selected was the correct answer then the function is returned as a Boolean answer of true, else it is returned as false.

Name Private Function ValidateGradeBoundary

Location Page 83

Input Parameter

s

ByVal GradeBoundary As String, Byval HigherGradeBoundary As String, Byval MsgText As String, ByVal RegexPattern As String, ByRef

ValidInput As Boolean

Output Parameter

s

ByRef ValidInput As Boolean

Local Variables

MyRegex As New System.Text.RegularExpressions.Regex(RegexPattern)

Description

This function checks to make sure that the grade boundary that has passed into it is valid or not. It checks to make sure the text if of the

Page 147: Documentation for a Visual Basic Mathematics Program

147

correct format using the RegEx pattern that has been passed in, and is lower than the higher grade boundary. If the input is valid

then ValidInput is returned at true, else it is returned as false.

Name Private Sub New()

Location Page 80

Input Parameter

s

-

Output Parameter

s

-

Local Variables

LblArray(7, 7) As Label, Scores(6) As String, i, j, k As Integer, z As Integer = 100, loc As Point, Quiz As QuizRecord

Description

This procedure is used to dynamically create the X and Y axis labels in the XaxisGraphLabelPnl & YaxisGraphLabelPnl for the student and teacher grade breakdown graphs using 0-100 for the y axis an the

quiz names along the X axis.

Page 148: Documentation for a Visual Basic Mathematics Program

148

User Manual

Contents page

Brief Introduction – Page 2Installation Instructions – Page 2Detailed Description of How to Use the System – Page 3Splash Screen – Page 3Login Selection Screen – Page 3Admin Login – Page 4Administrator Homepage – Page 4Create New Class – Page 5Create New User – Page 5New Student User – Page 6New Teacher User – Page 7Student Login Page – Page 7Student Homepage – Page 8Take Quiz – Page 8Quiz Information – Page 9Quiz Question Page – Page 10Question Image Page – Page 10Question Answer Page – Page 11End of Quiz – Page 12Alter Student Password – Page 12Student Grade Breakdown – Page 13Teacher Login – Page 14Teacher Homepage – Page 15Create Quiz – Page 15Create Quiz Question – Page 16Teacher Grade Breakdown – Page 17Alter Teacher Password – Page 17Search Student User – Page 18Edit Student User – Page 19Search Teacher User – Page 19Edit Teacher User – Page 20

Error Messages & Troubleshooting – Page 22Student Login Page – Page 22Student Homepage – Page 22Take Quiz – Page 22Alter Student Password – Page 23Student Grade Breakdown – Page 23Teacher Login – Page 24Teacher Homepage – Page 24Create Quiz – Page 25Create Quiz Question – Page 25Teacher Grade Breakdown – Page 26Alter Teacher Password – Page 27Administrator Login – Page 27Create New Class – Page 27Search Student User – Page 28Edit Student User – Page 28Search Teacher User – Page 29Edit Teacher User – Page 29Create New User – Page 30New Student User – Page 30New Teacher User – Page 31

Page 149: Documentation for a Visual Basic Mathematics Program

149

A brief introduction

The Maths Quiz Program is a piece of bespoke software designed to allow both GCSE level students and teachers make the most of using past papers to aid the revision for the GCSE examinations. The program allows teachers to create a range of quizzes for students to take, and view student results for each one. This can all be done of one piece of efficiently design and easy to use piece of software, which has been thoroughly tested to meet user needs.

This user manual is a step-by-step guide which will take you through how to use the full system, and help troubleshoot if you are having any problems. The guide has been written with the user in mind to make sure you have the best possible experience

Installation instructions

To begin the installation, start by navigating and opening the CD-Rom on your computer. To install the program, double-click the Setup icon option which you can see below.

Choose the location you would like to save the program when prompted – it is usually recommended that the program is saved on the Hard Drive of the computer, or the C: drive, to get the most out of the program. It is advised that you keep a note of where the program is saved on the computer for future reference, to prevent losing the file. Once the program has been installed, navigate to the location that you saved the Maths Program file to, and the Maths Quiz Program icon can be copied to the desktop for easy access for the next time the program is being used. You are now ready to start using the program!

Page 150: Documentation for a Visual Basic Mathematics Program

150

Detailed description of how to use one section of the system

Splash ScreenOnce the program has been installed, you will need to double click the Maths Quiz Program icon to start up the program. Upon opening, you will momentarily see this splash screen whilst the program loads.

Login Selection ScreenWhen the program has finished loading you will be presented with the login selection screen. The selection you make here determines which part of the program you wish to access. There are four choices; Create New User, Student Login, Teacher Login and Administrator Login.

If you have not used the system before, you will need to select the Create New User option, to create an account for the system before you can log on. If you have used the system before, you have one of three choices; if you are a student user, then you want to select would be the Student Login option. If you are a teacher user and want to view your normal account, you will want to select the Teacher Login option. If you are a teacher user and wish to create a new class, or edit a user’s information, you will want to select the Administrator Login option.

Page 151: Documentation for a Visual Basic Mathematics Program

151

Administrator LoginBefore creating an account for the program, the administrator will have to create a list of the maths classes that currently exists in year 11. To do this they will need to log in as an administrator first, by selecting the Administrator Login option from the Login Selection Screen.

To log in to the administrator’s site, you will need to enter the username and password. These are pre-agreed upon by the teachers, and no student should be able to log in here. Enter the username into the Username text box and enter the password into the Password text box, and then click the Next button. If you entered the username and password correctly, then you should be directed to the administrator homepage.

Administrator HomepageYou will be directed to this form if you correctly entered the username and password fields into the Administrator Login form. Here you have a choice of 3 options; Create Class, Edit Student User and Edit Teacher User.

If you are creating the maths classes so new users can be entered then you will want to select the Create Class option. If you wish to edit a particular user’s information, you will want to select either the Edit Student User or Edit Teacher User option, depending on the type of user they are. We will come back to the Edit Student User and Edit Teacher User options once we have seen how the student and teacher parts of the program operate.

Page 152: Documentation for a Visual Basic Mathematics Program

152

Create New ClassYou will be directed here if you chose the Create Class option on the Administrator homepage. Here you are able to create a new maths class that students can select that they are in, and teachers can select they teach. Firstly you will need to enter the class name – usually the number 11 to signify the year group and a letter to signify the individual maths group. You will then need to enter the class’s set, which is the level of ability of the maths group itself. To select the class set, you will need to select the arrow to the right of the combo box, and select the set from the drop down list. Once you have done this, you should click the Next button, and you will be re-directed to the Administrator homepage, and the new class will be saved into file. You should repeat this process for each maths class in the year group so all users can register at the same time.

Create New UserIf you have not used the Maths Quiz Program before, you will want to create a new account to log in. On this form you will need to; select your user type, enter your full name and choose a username and password.First you will need to select your user type. This determines which part of the program you will have access to, and what you will be doing on the system. Secondly, you will need to enter your full name – Forename and Surname – into the Full Name text box. Secondly, you will need to enter a username that you have chosen, which is what you will use to log in to the system every time you come to use it. It is recommended that you use some form of your name, as it will be easier to remember when you come back to the program. Lastly, you will need to choose a password that you will use alongside the username to login to the system. To make a strong password, you should include a series of capital letters, non-capital letters and digits, over 5 characters long. You will then need to re-enter the password in the second password text box, which ensures that you haven’t spelt your chosen password wrong the first time you entered it.

Page 153: Documentation for a Visual Basic Mathematics Program

153

Once you have completed this, you will need to click the Next button in the top right hand corner, which will direct you to the New Student User form if you selected the user type as Student or to the New Teacher User form if you selected the user type as Teacher

New Student UserYou will have been directed to this form if you chose your user type as Student on the New User form. On this form, you will need to select the maths class that you are currently in. To do this you will need to select the arrow to the right of the combo box, and select your class from the drop down list. Once you have done this, you should click the Next button, and you will be re-directed to the Login Selection Screen where you can then go on to log in to the program.

New Teacher UserYou will have been directed to this form if you chose your user type as Teacher on the New User form. On this form, you will need to enter the security word and select the two maths classes that you currently teacher in year 11. The security word is an already agreed upon word that only the teachers have knowledge of – this prevents students acting as teacher users to gain access to other students marks. To select the two classes you teach you will need to select the arrow to the right of each of the combo boxes, and select each class from the drop down list - It does not matter which way round you enter your classes. Once you have done this, you should click the Next button, and you will be re-directed to the Login Selection Screen where you can then go on to log in to the program.

Page 154: Documentation for a Visual Basic Mathematics Program

154

Student Login PageYou will be directed here if you chose the Student Login option from the Login Selection Screen. Here you will be able to log on to the Student Homepage by entering your username and password. These are the same username and password that you will have entered when registering your account in the program. If you have forgotten your username, ask an administrator to view your account information where they can edit your password if you have forgotten it. Enter your username into the Username text box, and enter your password into the Password text box, and click Login. If you have entered your details correctly, you should be directed to the Student Homepage.

Student Homepage

Page 155: Documentation for a Visual Basic Mathematics Program

155

You will be directed here if you entered your username and password correctly on the Student Login page. This is the student homepage, which has a central table displaying all the vital information about the quizzes. This table shows you all of the quizzes that have been created on the system, whether you have taken them or not, the score and grade you have achieved if you have taken the quiz and finally the quiz deadline. The form also displays the number of days until your November exam and the June exam, as well as your full name in the top right hand corner. You have a number of options to choose from here; Alter Password, Take Quiz, Grade Breakdown and Log Out.

If you wish to change your current password to a different one, then you will want to select the Alter Password option; If you wish to take a quiz then you will want to select the Take Quiz option; if you wish to view your grades visually as a graph then you will want to select the grade breakdown button; if you have finished everything you wish to do on the system then you will want to select the Log bum Out button.

Take QuizYou will be directed here if you selected the Take Quiz option from the Student Homepage. This form will list all of the available quizzes that you are able to currently take. Any quizzes that the user has already taken and received a grade for, or quizzes that have a deadline that has already passed will not show in this list and the student is now not able to take these quizzes. To take one of the quizzes, you should click the quiz that you wish to take to highlight it, and click the Take Quiz button. This will direct you to a page showing the quizzes information, including the quiz name, the quiz time and the number of questions. If you do not wish to take a quiz you should click the Cancel button and you will be directed back to the Student Homepage.

Page 156: Documentation for a Visual Basic Mathematics Program

156

Quiz InformationYou will be directed to this form if you have selected a quiz to take from the Take Quiz form. This form shows you the information about the quiz you have chosen to take, including; Quiz Name, Number of Questions, and Time allowed. Once you have read all of the information, you should click the Take Quiz button which will direct you to the first question of the quiz. If you wish to take another quiz, you want to click the Back button, which will take you back to the Take Quiz form.

Page 157: Documentation for a Visual Basic Mathematics Program

157

Quiz Question PageYou will be directed to this page if you selected the Take Quiz option on the Quiz Information Page. This is the form that will show you the questions that have been created for each quiz, displaying; the question number, the question text, a choice of question answers, and the quiz timer. The View Image button will also be displayed if there is an image to view alongside the question, such as a graph. This button will be hidden from view if there is no image to view with the question. Once you have read the question and worked out what you think the answer should be, you should select the answer on screen by clicking the circular selection button next to the answer. Clicking the next button after selecting your answer will take you to the Question Answer page, which will show you the correct answer.

The quiz timer will begin counting down once the Quiz Question Page loads, and will continue to do so until you click the Next button. When you are viewing the Question Image page, the quiz timer will still be running as you are still working on the question. When you click the Next button, the quiz timer will stop when you are viewing the Question Answer page, so take as long as you need before going on to the next question.

Question Image PageYou will have been directed here if you chose the View Image option on the Quiz Question Page. Here you can view the image that can be viewed alongside the question text that will help you to find an answer to the question. The quiz timer will still be running whilst you view this page so it is advised that you do not spend too long viewing it! Once you have finished viewing the image, you should click the Back button. You are able to view this image as many times as needed whilst you are trying to answer the question, just click on the View Image button on the Quiz Question Page and you will be directed straight to this form.

Page 158: Documentation for a Visual Basic Mathematics Program

158

Question Answer PageYou will be directed here if you selected the Next option on the Quiz Question Page. This form will show you a number of things about the question that you have just answered. It will show you the question number, as well as the question text you saw on the original page. It will then show you the correct answer, and tell you whether you answered correctly or not. You will also be shown how to work out the answer from the question, in case you didn’t reach the right answer. The final piece of information shown will be the amount of marks you gain on this question, out of the amount of marks that were available. Whilst you are viewing this page, the quiz timer will be paused so feel free to make sure you fully understand how to get to the correct answer, and where you went wrong if you did not get it. Once you have read all of the information on the page and are ready to start the next question or finish the quiz, you will want to click the Next button. You will then either be directed back to the Quiz Question Page, or to the End of Quiz form if you have answered all of the questions in the quiz.

Page 159: Documentation for a Visual Basic Mathematics Program

159

End of QuizYou will be directed here if you selected the Next option on the Question Answer page and have answered all of the questions in the quiz. On this page, you will be shown the score and grade you achieved on the quiz. The quiz score is how many marks you achieved out of a total of 100 marks that were available. The quiz grade is the grade you achieved, which could range from A*-E, or a U, and is calculated using the score you achieved and the grade boundaries for the quiz. The quiz completion time is the time you had left remaining on the quiz timer when you finished the quiz. If you did not finish the quiz within the 01:45:00 time limit that the exams usually have, your completion time will simply be 00:00:00. When you have read all of the information on the page, you will want to click the Close button. You will then be directed back to the student homepage where your new quiz score and grade will be added to the main table of quiz information.

Alter Student PasswordYou will be directed to this page if you chose the Alter Password option on the Student Homepage form. This is the form that lets you change your current password to a new one. To do this you must enter your current password into the Old Password text box, and your new password into the New Password and Re-enter New Password text boxes. You must enter your new password twice on this form to make sure you typed it out correctly the first time you entered it, to prevent locking yourself out of the system. If you have changed your mind and do not wish to change your password, then you will want to click the Cancel button, which will direct you back to the Student Homepage. If you have entered your passwords and wish to change it, then you should click the Done button. If you have entered everything correctly, you should be directed back to the Student Homepage and your new password will be saved. If you have ever forgotten your password, you should see your teacher who will be able to log onto the administrators account to reset it.

Page 160: Documentation for a Visual Basic Mathematics Program

160

Student Grade BreakdownYou will be directed to this page if you selected the Grade Breakdown option on the Student Homepage. On this form you can view your results so far in a visual form, using a graph. To view your results, you should click the View Graph button at the left hand side of the page. This will show your table of current results, and a graph that is produced using those results. The graph will show all of the quizzes that have been created along the x-axis, and the score out of 100 along the y-axis. Viewing a graph of your results makes it easier to see how you are progressing, and how well you are improving on your exam grade which is the main aim of this program. If you have not taken a particular quiz, then the score on the graph will be zero – this will change once you have taken the quiz and achieved a score for it. Once you are satisfied, you will want to click the Back button at the bottom of the form, which will direct you back to the student homepage. If you ever want to revisit the graph of your results, you should click on the Grade Breakdown button on the Student Homepage – the graph will update when a new quiz has been added, or a new quiz has been taken.

Page 161: Documentation for a Visual Basic Mathematics Program

161

Teacher LoginYou will be directed here if you selected the Teacher Login option from the Login Selection Screen. Here you will be able to log on to the Teacher Homepage by entering your username and password. These are the same username and password that you will have entered when registering your account in the program. If you have forgotten your username or password, then as a teacher you should be able to log on as an administrator on the Administrator Login Screen to view your account information and reset your details. Otherwise, you should enter your username into the Username text box, and your password into the Password text box, and click Login. If you have entered your details correctly, you should be directed to the Teacher Homepage.

Teacher HomepageYou will be directed here if you entered your username and password correctly on the Teacher Login page. This is the Teacher Homepage, which has a central table displaying all the vital information about the students you teach and the quizzes that have been created for them. This table shows you a list of all the students in each of the two classes you teach, and their result in each of the quizzes that have been taken. Their results will be listed as a grade, which has been calculated using the grade boundaries for each quiz. To switch between the students in your two classes, you can click between the First Class and Second Class tabs. This table will update each time a new quiz has been created or a student has taken a new quiz and achieved a grade for it. If the student has not taken a quiz, then a dash will be shown in that quiz’s column to signify that they have not yet achieved a grade in it.The form also displays your full name in the top right hand corner. You have a number of options to choose from here; Alter Password, Take Quiz, Grade Breakdown and Log Out. If you click the Log Out button, you will be taken back to the Login Selection Screen where you can exit the program, or choose another option.

Page 162: Documentation for a Visual Basic Mathematics Program

162

Create QuizYou will be directed here if you chose the Create Quiz option on the Teacher Homepage. This is the form where you can enter the basic information of a new quiz you wish to create. You should enter a name that is less than 10 characters long for the quiz in the Quiz Name text box, which is the name that will be used the student and teacher sites to identify the quiz by. The number of questions you will wish to have in the quiz should be entered into the Number of Questions text box, which should be a number between 25 and 35. You must also choose a future deadline for the quiz using the Set Dateline date picker, after which students are no longer able to take the quiz. Finally you must enter the grade boundaries for the quiz for the different grades that can be achieved. Each grade boundary should be a lower mark than the higher grade boundary, with the A* grade boundary being lower than 100. Any mark lower than the E grade boundary will be classed as a U. Once you have entered all of the information, you should click the Create button where you will be directed to the Create Question Information page. If you do not wish to create a new quiz, you should click the Cancel button, where you will be directed back to the Teacher Homepage.

Page 163: Documentation for a Visual Basic Mathematics Program

163

Create Quiz QuestionYou will be directed here if you selected the Create option on the Create Quiz page. On this form you will need to enter the individual question information for the number of questions that you indicated should be included in the quiz. Here, you should enter the difficulty of the question which ranked out of 5, the actual question the student should answer, the correct answer to the question, three different incorrect answers that the student could also select, the topic in the syllabus that the question is on, the working of the question to reach the correct answer, the question marks out of 12, and finally the image path if applicable. You will be asked to fill in this information for the number of questions in the quiz. If there is no image to go with the question text, you should leave this text box blank, and no image will show up when the student is taking the quiz. If you do however wish to show an image with the question, you will want to click the Browse button to view your files and select the image. Once you have found the image location in your files, click the Open button on the form and the image path you selected will appear in the Image File text box. Once you are done filling in the information for that question, you should click the Next button, which will clear all of the text and combo boxes for the next question. If you have filled in all of the information for each question in the quiz, a message box indicating the quiz has been saved will appear. Once you click Ok on the message box, you will be directed to the Teacher Homepage, where a new column on the central table will have been created, with a header showing the new quiz name you entered.

Page 164: Documentation for a Visual Basic Mathematics Program

164

Teacher Grade BreakdownYou will be directed to this page if you selected the Grade Breakdown option on the Teacher Homepage. On this form you can view the results of the pupils in the two classes you teach so far in a visual form, using a graph. To view any student’s results, you should click their name in the left box at the left hand side of the page. This will show a table of their current results in each of the quizzes, and a graph that is produced using those results. The graph will show all of the quizzes that have been created along the x-axis, and the score achieved on each

quiz out of 100 along the y-axis. Viewing a graph of the student’s results makes it easier to see how they are progressing, and how well they are improving on their exam grade which is the main aim of this program. If a student has not taken a particular quiz, then the score on the graph will be zero – this will change once they have taken the quiz and achieved a score for it. If you wish to view other student’s results, you can find their name from the list box, which are sorted alphabetically by first name, and click on it. Everything will refresh showing the new student’s information. Once are finished viewing student results, you will want to click the Back button at the bottom of the form, which will direct you back to the Teacher Homepage.

Page 165: Documentation for a Visual Basic Mathematics Program

165

Alter Teacher PasswordYou will be directed to this page if you chose the Alter Password option on the Teacher Homepage form. This is the form that lets you change your current password to a new one. To do this you must enter your current password into the Old Password text box, and your new password into the New Password and Re-enter New Password text boxes. You must enter your new password twice on this form to make sure you typed it out correctly the first time you entered it, to prevent locking yourself out of the system. If you have changed your mind and do not wish to change your password, then you will want to click the Cancel button, which will direct you back to the Teacher Homepage. If you have entered your old and new passwords and wish to change to your new password, then you should click the Done button. If you have entered everything correctly, you should be directed back to the Teacher Homepage and your new password will be saved. If you ever forget your password, as a teacher you should be able to log on as an administrator and be able to reset it.

Search Student UserYou will be directed to this page if you selected the Edit Student User option from the Administrator Homepage. On this form you will be able to search the files for the student whose information you wish to edit. To do this, you must enter their name or any part of their name into the student name text box at the top of the form. Once you have done this, you will want to click the Search button next to the text box. Any student that has created an account whose name included the series of characters you entered into the name box will be listed in the Student List box. If the student you are searching for does not appear on the list, try typing a different part of the name into the name box and repeat until you find the student you are looking for. If you cannot find the student, clicking the Cancel button in the bottom right hand corner of the form will direct you back to the Administrator Homepage. If you have found the student whose information you wish to edit, click their name in the Student List box to highlight it, and then click the Edit Student Button. You will then be directed to the Edit Student User form.

Page 166: Documentation for a Visual Basic Mathematics Program

166

Edit Student UserYou will be directed here if you selected the Edit Student option on the Search Student page. On this form you are able to edit the student’s information, from the name you selected on the previous form. The information from the student file will be displayed in the text boxes, including their full name, username, password and class. You are able to change any of their information, which will then overwrite their old details. If you are changing the pupil’s password then it is advised you completely rewrite it rather than editing it, to make sure it is written correctly. Once you have changed anything you need to, you will want to click the Save button, which will save the student information to file and direct you back to the Administrator Homepage. If you do not wish to change the student’s details you should click the Cancel button which will discard any changes you have made and also direct you back to the Administrator Homepage.

Page 167: Documentation for a Visual Basic Mathematics Program

167

Search Teacher UserYou will be directed to this page if you selected the Edit Teacher User option from the Administrator Homepage. On this form you will be able to search the files for the teacher whose information you wish to edit. To do this, you must enter their name or any part of their name into the teacher name text box at the top of the form. Once you have done this, you will want to click the Search button next to the text box. Any teacher that has created an account whose name included the series of characters you entered into the name box will be listed in the Teacher List box. If the teacher you are searching for does not appear on the list, try typing a different part of the name into the name box and repeat until you find who you are looking for. If you cannot find the teacher, clicking the Cancel button in the bottom right hand corner of the form will direct you back to the Administrator Homepage. If you have found the teacher whose information you wish to edit, click their name in the Teacher List box to highlight it, and then click the Edit Teacher Button. You will then be directed to the Edit Teacher User form.

Edit Teacher UserYou will be directed here if you selected the Edit Teacher option on the Search Teacher page. On this form you are able to edit the teacher’s information, from the name you selected on the previous form. The information from the teacher file will be displayed in the text boxes, including their full name, username, password and the two classes they teach. You are able to change any of their information, which will then overwrite their old details. If you are changing the teacher’s password then it is advised you completely rewrite it rather than editing it, to make sure it is written correctly. Once you have changed anything you need to, you will want to click the Save button, which will save the new details to file and direct you back to the Administrator Homepage. If you do not wish to change the teacher’s details you should click the Cancel button which will discard any changes you have made and also direct you back to the Administrator Homepage.

Page 168: Documentation for a Visual Basic Mathematics Program

168

Page 169: Documentation for a Visual Basic Mathematics Program

169

Samples of error messages and recovery procedures - troubleshooting

Student Login Page

Student Homepage

Take Quiz

If you see this error message appear then you are entering your password incorrectly. This means that the

password that you are entering does not match the password that is saved in the file for this username. Make sure you type out your password carefully, you have not

got caps lock on and you have entered the correct username. If you have forgotten your password then you

should see your teacher who can reset it using the administrator account.

If you see this error message appear then you are entering your username incorrectly. This means that the username that you are entering does not match any of the usernames that are saved in the file. Make sure you type out your username carefully, and you have not got caps lock on. If you have forgotten your username then you should see your teacher who can either change it or

remind you of it using the administrator account.

If you do not see the central table on the student homepage detailing all of the

information about the quizzes, this is because

there have been no quizzes created yet. You will need to wait until a

teacher user has created a quiz before you will see the central table, and be

able to view the Take Quiz and Grade

Breakdown forms

You will see this error message appear if you have clicked the Take Quiz button on the Student

Homepage and there are no quizzes to take. This will either be if there are no quizzes saved in the system yet, or all of the quizzes that have been

created have been taken or have a deadline that has passed. If you click ok you will be redirected back to the Student Homepage. You will need to

wait until a teacher user creates a new quiz before you can view the Take Quiz form.

Page 170: Documentation for a Visual Basic Mathematics Program

170

Alter Student Password

Student Grade Breakdown

You will see this error message appear if you have clicked the Take Quiz button on

the Take Quiz form and you have not there are no quizzes to take yet. If you click ok

you will be able to select a quiz to take on the form before clicking the Take Quiz

button again.

There are two reasons that could mean that a particular quiz is not listed on the

Take Quiz form. This will be that either you have already taken and achieved a result for this quiz, or the deadline for the quiz

has already passed before you have taken it. You are unable to take a quiz more than

once, or one with a deadline that has already passed.

This error message will appear if you have entered an invalid new password. This could be because either you re-entered

your password differently the second time compared to the original, or you left both textboxes blank, or your password was

longer than the maximum of 15 characters. You should click the Ok button, and re-

enter your new passwords.

This error message will appear if you have entered an invalid current password. This

means that the password you have entered does not match the password that is saved for the account you are logged in for. You should

make sure you are typing your password correctly, and are not using caps lock. If you have forgotten your current password then

you should ask teacher to log in as an administrator and reset it for you.

This error message will appear if you clicked the Grade Breakdown button on the Student

Homepage and there have been no quizzes created yet. You should wait until a teacher user

has created a quiz and take at least one quiz before you try again. You will be redirected to the Student Homepage after clicking the Ok button.

This error message will appear if you clicked the Grade Breakdown button on the Student Homepage and you have not taken any of the quizzes that have been created

yet. You should click the Ok button to return to the Student Homepage and take a quiz before you trying clicking the Grade

Breakdown button again.

Page 171: Documentation for a Visual Basic Mathematics Program

171

Teacher Login

Teacher Homepage

If you see this error message appear then you are entering your password incorrectly. This means that the

password that you are entering does not match the password that is saved in the file for this username. Make sure you type out your password carefully, you have not

got caps lock on and you have entered the correct username. If you have forgotten your password then you

should see your teacher who can reset it using the administrator account.

If you see this error message appear then you are entering your username incorrectly. This means that the username that you are entering does not match any of the usernames that are saved in the file. Make sure you type out your username carefully, and you have not got caps lock on. If you have forgotten your username then

you be able to change it or remind yourself of it using the administrator account.

If you do not see the central table on the Teacher Homepage detailing all of the

information about the student and quizzes, this

is because there have been no quizzes created yet. You should create a quiz to see the central table on this form, and you will also be able to

then view the Grade Breakdown form.

Page 172: Documentation for a Visual Basic Mathematics Program

172

Create Quiz

Create Quiz Question

This error message could appear for several reasons; you may have left the Quiz Name text

box empty, entered a Quiz Name longer than the maximum of 10 characters, or entered an invalid format for the quiz name. The name should only

include letters and numbers – no punctuation marks are permitted. Click the Ok button and

rectify this before trying again.

This error message could appear for several reasons; you may have left the Number of

Question text box empty, entered a number less than 25 or greater than 35, or entered an

invalid format for the quiz name. The number of questions should be written in numbers only – no letters are permitted. Click the Ok button

and rectify this before trying again.

This error message will appear if you set the quiz deadline as a past date. The deadline should be a

future date; else no students would be able to take the quiz! Click the Ok button and rectify this

before trying again.

This error message could appear for several reasons; you may have left the A* grade boundary text box empty,

entered an integer greater than 100, or entered an invalid format for the grade boundary. The name should only be

written in numbers – no letters are permitted. Click the Ok button and rectify this before trying again.

This will appear for each of the grade boundary text boxes if they are left empty, greater than the higher grade

boundary (such as the B grade boundary larger than the A grade boundary) or written in the wrong format.

This error message will appear if you have left the Question Difficulty combo box empty. Click

the Ok button to return to the form and choose a difficulty ranking for the question before trying

again.

Page 173: Documentation for a Visual Basic Mathematics Program

173

Teacher Grade Breakdown

Alter Teacher Password

This error message will appear if you clicked the Grade Breakdown button on the Teacher

Homepage and there have been no quizzes created yet. You should create a quiz for the

students to take before you try again. You will be redirected to the Teacher Homepage after clicking

the Ok button.

This error message will appear if you have entered an invalid new password. This could be because either you re-entered

your password differently the second time compared to the original, or you left both textboxes blank, or your password was

longer than the maximum of 15 characters. You should click the Ok button, and re-

enter your new passwords.

This error message will appear if you have left the Question Topic combo box empty. Click the Ok button to return to the form and choose a

topic for the question before trying again.

This error message will appear if you have left the Question Marks combo box empty. Click the Ok button to return to the form and choose how

many marks the question should be worth before trying again.

This error message could appear for one of two reasons; you may have left the Question Text

textbox empty or entered a text longer than the maximum of 100 characters. Click the Ok button

and rectify this before trying again.

This error message could appear for several reasons; you may have left one of the Answer Choice text boxes empty, entered an answer

longer than the maximum of 20 characters, or entered two of the same answer choices. Each choice should be unique, and no two of the 4

possible answers can be the same. Click the Ok button and rectify this before trying again.

This error message could appear for one of two reasons; you may have left the Quiz Working text box empty or entered the working out text longer than the maximum of 100 characters. Click the Ok

button and rectify this before trying again.

This error message will appear if the file path you have chosen is invalid. This could be because the image you selected earlier has moved location or has been deleted, or renamed. Click the Ok button

and rectify this before trying again.

Page 174: Documentation for a Visual Basic Mathematics Program

174

Administrator Login

Create New Class

This error message will appear if you have entered an invalid current password. This means

that the password you have entered does not match the password that is saved for the account you are logged in for. You should make sure you are typing your password correctly, and are not

using caps lock. If you have forgotten your current password then you should log in as an

administrator and reset your password that way.

If you see this error message appear then you are entering the password incorrectly. This means that the

password that you are entering does not match the administrator password. Make sure you type out your password carefully, you have not got caps lock on and you have entered the correct username. If you have

forgotten the password then you should refer to another teacher who does.

If you see this error message appear then you are entering the admin username incorrectly. This means

that the username that you are entering does not match the correct administrator username. Make sure you type out the username carefully, and you have not got caps lock on. If you have forgotten the username then you

should refer to another teacher who does.

This error message will appear for one of several reasons; you may have left the Class Name text box empty, entered a name longer

than the 3 character limit, or entered a name in the wrong format. The name should be two

number ones followed by a capital letter – 11C for example. Click ok to rectify this before trying

again.

This error message will appear if you have left the Class Set combo box empty. Click the Ok button to return to the form and choose the

set of the class you are creating before trying again.

Page 175: Documentation for a Visual Basic Mathematics Program

175

Search Student User

Edit Student User

This error message will appear you have left the Student Name text box empty before

clicking the Search Student button. Click the Ok button to type in a user into the text box

before trying again.

This error message will appear if the name or series of character you have entered does not

match any of the names in the student file. Click Ok to try another name, or try using a smaller number of characters to widen your search.

This error message will appear you have not selected a student from the Student List box

before clicking the Edit Student button. Click the Ok button and select a user by clicking on their

name before trying again.

This error message could appear for several reasons; you may have left the Full Name text box empty, entered a name longer than the maximum of 30 characters, or entered an invalid format for the student name. The name should only include

letters, spaces or dashes for double barrelled surnames– no other punctuation marks are

permitted. Click the Ok button and rectify this before trying again.

This error message could appear for several reasons; you may have left the Username text

box empty, entered a username longer than the maximum of 15 characters, or entered an invalid format for the username. The username should only include letters, numbers, underscores or

dashes – no other punctuation marks are permitted. Click the Ok button and rectify this

before trying again.This error message could appear for several reasons; you may have left the Password text

box empty, entered a password longer than the maximum of 15 characters, or entered an invalid

format for the password. The password should only include letters, numbers, underscores or

dashes – no other punctuation marks are permitted. Click the Ok button and rectify this

before trying again.

Page 176: Documentation for a Visual Basic Mathematics Program

176

Search Teacher User

Edit Teacher User

This error message will appear you have left the Teacher Name text box empty

before clicking the Search Teacher button. Click the Ok button to type in a

user into the text box before trying again.

This error message will appear if the name or series of character you have entered does not

match any of the names in the teacher file. Click Ok to try another name, or try using a smaller number of characters to widen your search.

This error message will appear you have not selected a teacher from the Teacher List box

before clicking the Edit Teacher button. Click the Ok button and select a user by clicking on their

name before trying again.

This error message could appear for several reasons; you may have left the Full Name text box empty, entered a name longer than the maximum of 30 characters, or entered an invalid format for the teacher name. The name should only include

letters, spaces or dashes for double barrelled surnames– no other punctuation marks are

permitted. Click the Ok button and rectify this before trying again.

This error message could appear for several reasons; you may have left the Username text

box empty, entered a username longer than the maximum of 15 characters, or entered an invalid format for the username. The username should only include letters, numbers, underscores or

dashes – no other punctuation marks are permitted. Click the Ok button and rectify this

before trying again.

This error message could appear for several reasons; you may have left the Password text

box empty, entered a password longer than the maximum of 15 characters, or entered an invalid

format for the password. The password should only include letters, numbers, underscores or

dashes – no other punctuation marks are permitted. Click the Ok button and rectify this

before trying again.

This error message will appear if you have selected the same class in both the First Class

and Second Class Taught combo boxes. Click the Ok button to return to the form and choose the other maths class that is taught in either one of

the combo boxes before trying again.

Page 177: Documentation for a Visual Basic Mathematics Program

177

Create New User

New Student User

New Teacher User

This error message could appear for several reasons; you may have left the Full Name text box empty, entered a name longer than the maximum of 30 characters, or entered an invalid format for the student name. The name should only include

letters, spaces or dashes for double barrelled surnames– no other punctuation marks are

permitted. Click the Ok button and rectify this before trying again.

This error message could appear for several reasons; you may have left the Username text

box empty, entered a username longer than the maximum of 15 characters, or entered an invalid format for the username. The username should only include letters, numbers, underscores or

dashes – no other punctuation marks are permitted. Click the Ok button and rectify this

before trying again.

This error message will appear if you have left one

or both of the Password text boxes empty. Click the Ok

button and rectify this before trying again.

This error message will appear if you have mistyped one of the password entries in the text boxes. Both of

these inputs should match, so you should click the Ok

button and rectify this before trying again.

This error message will appear if you have left the Class Name combo box empty. Click the Ok

button to return to the form and choose the maths class you are in before trying again.

Page 178: Documentation for a Visual Basic Mathematics Program

178

This error message will appear if you have left the First Class Taught combo box empty. Click the Ok button to return to the form and choose

one of the maths classes you teach before trying again.

This error message will appear if you have left the Second Class Taught combo box empty. Click the Ok button to return to the form and choose

one of the maths classes you teach before trying again.

This error message will appear if you have selected the same class in both the First Class

and Second Class Taught combo boxes. Click the Ok button to return to the form and choose the other maths class you teach in either one of the

combo boxes before trying again.

This error message will appear if you have not entered the teacher security word correctly. Click the Ok button to return to the form try again. If you have forgotten the security word then you

should refer to a colleague.

Page 179: Documentation for a Visual Basic Mathematics Program

179

Appraisal

Comparison of project performance against objectives

Key;Requirement MetRequirement Not Met

Students must be able to register to use the program from the start menuThe user can click the Create New User to create an account on the Login Selection screen, which is the first screen the user will se when using the program.

There must be a secure login page so the students and teachers can log in separatelyStudents log in using the Student Login Screen, and teachers log in using the Teacher Login Screen, and therefore both log in separately.

Each student must have their own username and password to log in to their user spaceThe students each have a username and password which they must enter on the Student Login Screen to get access to the main part of the program.

Students must be able to change their password when they are logged inThe Alter Student Password form allows the student to change their password, by entering their current password and creating a new one.

The program must display a list of quizzes to that are available to be taken by the studentOn the Student Homepage form the central table displays a list of quizzes that have been created by the teacher user for the students to take.

The program should display whether the user has taken a quiz or not for each of the available quizzes, and the grades achieved for the quizzes that have been takenThe central table on the Student Homepage lists each quiz, whether it has been taken, and if so will display a score and grade the student achieved.

The deadline of each quiz must be shown on the list of quizzesThe central table on the Student Homepage shows the deadline of each quiz that has been created.

There must be a countdown until the final exams on the student homepageThere is a countdown in number of days left for each of the November and June exams beneath the central table on the Student Homepage.

The program should allow the students to take quizzes created by the teacher userThis is the core function of the program, and is the most important part. A list of quizzes available to be taken is shown on the Take Quiz form, one of which the student can select to take and answer the questions for. They will then receive a score and grade once they have completed the quiz.

The program must not allow the student to take quizzes that have already been taken once by the student, or where the deadline has already passedWhen the quizzes are being read in to the program, the deadline is checked to see if it has passed, and the student quiz file is checked to see if the quiz id & student id appear together – meaning the quiz has been taken. If either of these are true then the quiz will not appear in the list on the Take Quiz form, and therefore cannot be taken.

Page 180: Documentation for a Visual Basic Mathematics Program

180

Each question should have a choice of four answers to choose from, with one being the correct answerWhen the teacher enters the quiz information on the Create Question Information page, they enter one correct answer, and 3 incorrect answers. The student will gain marks if they select the right answer, but gain nothing if they select one of the other 3.

The program should only display one question at one timeThe quiz question page appears once for each of the total number of questions, which is a number that is determined by the teacher when they create the quiz.

After a student has answered a question, the correct answer should be shown to themWhen the student clicks the Next button on the Quiz Question page, they are directed to the Question Answer page. This page shows information that includes; the question number, question text, whether the student answered correctly, the correct answer, the question working, the marks the student gained and the total number of marks the question was worth.

There should be a timer that counts down from 1 hour and 45 minutes displayed to the student whilst they are taking the quizA quiz timer starting at 01:45:00 works its way down towards 00:00:00 is displayed in the top right hand corner of the Quiz Question page as soon as the quiz is started and carries on doing so until it reaches 00:00:00

The timer reaching 00:00 should not impede the student’s progress if they have not finished answering the questions after this timeOnce the timer reaches zero, it will just stop counting any further, but the student can carry on answering the questions in the quiz until they reach the end.

The quiz timer should pause whilst the user is viewing the answer to the questionWhen the student clicks the Next button on the Quiz Question page, the timer pauses whilst the student views the answer. When the student then clicks the Next button on the Question Answer page, the timer resumes from where it left off until the student clicks the Next button again.

At the end of the quiz the student should see the score they achieved & the corresponding gradeThe End of Quiz page shows the number of marks out of 100 the student achieved, and the corresponding grade, which is worked out by comparing their score to the grade boundaries of the quiz.

The time the student has completed the quiz in should be listed on the end screen of each quizThe remaining time the student has left is also displayed on the End of Quiz page, below the quiz score and grade. If the user took longer than the 01:45:00 time limit, then the remaining time would simple be 00:00:00.

The student should be able to see which topic areas they have scored best and worst inUnfortunately time constraints meant that I was unable to complete this part of the program. I started to put elements of this in to the program, such as the teacher having to enter the topic that the question falls under in the syllabus, but did not manage to fully implement the topic area part of the program. This could be a future extension to the project, and could be implemented by finding the questions in each topic, and tallying up the total marks available. The individual question answers would then need to be stored for each student for each quiz, and find the number of marks earned, and compare the two values.

Page 181: Documentation for a Visual Basic Mathematics Program

181

More complex questions, and questions from topics not taught to them should be filtered in quizzes taken by set 4 studentsDue to time constraints I was unable to complete this part of the program. During the implementation I managed to put the foundations of this into my program – such as making the teacher enter the topic and difficulty of the question, and the set of the classes. As a future extension, I could implement this fully by checking the class set of the student taking the quiz against the topic and difficulty of the question, and skipping past some of those questions. The program could then possibly even make the teacher create extra questions in place of the harder questions that are more suitable for set 4 students.

The teacher should be able to create new quizzes for the students to take, including the quiz name, deadline and number of questionsThis is the core function of the program, and is the most important part. On the Create Quiz page the teacher must enter information about the quiz including the quiz name, number of questions, quiz deadline and grade boundaries. The teacher then goes on to create a number of questions for the quiz that the student must answer when they are taking the quiz.

Teachers should be allowed to enter different grade boundaries for each paper when creating a new quizOn the Create Quiz page the teacher must enter the A* - E grade boundaries for the quiz. Each grade boundary is checked to make sure it is lower than the one before, and A* grade boundary is checked to make sure it is lower than 100.

Each quiz should be worth 100 marks, and have a time of 1:45When the teacher creates the quiz the question marks must tally up to exactly 100 marks, and each quiz always has a timer that counts down from 01:45:00 to 00:00:00.

The user must have a list of pupils in each of the classes they teach showing who has and has not completed each quiz that has been createdOn the teacher homepage, the central table shows a list of students in each of the two classes they teach, showing their result for each quiz that has been created.

The user should be able to create a number of questions for each quiz, including the question text, choice of answers, correct answer, question topic, question marks, question difficulty and question workingOn the Create Question Information page the teacher user enters information including; question difficulty, text, topic, image file path, working, marks, correct answer & answer choices.

There should be an option to upload images for each questionOn the Create Question information page the teacher user can opt to leave the image file path text box empty meaning the View Image button will not show up when the student is taking the quiz. If the teacher decides to put an image with the question text, the user can brose their files and select an image, whose path will then be copied into the question image path text box. Before the question is saved, the file path is checked to make sure it is valid. The View Image button will then show up when the student is viewing this question in the quiz, and they can view the image.

There should be between 25 and 35 questions in each quizThe question number is entered and checked on the Create Question Information page, to make sure it is greater than or equal to 25 and less or equal to 35.

Each question in each quiz must be grouped into one of the six topic areas in the GCSE maths syllabusThe teacher must enter a question topic when they are creating the question

Page 182: Documentation for a Visual Basic Mathematics Program

182

Questions should be ranked by difficulty, with questions starting the quiz being simple and becoming more complexThe teacher must enter a question difficulty when they are creating the question

The teacher should be able to set a deadline for each quiz, after which the student is unable to take itOn the Create Quiz page the teacher enters a future date as a deadline for the quiz. This is checked to make sure it is a valid date and is a date that is in the future, not one that has already passed. When the quizzes are read in to the Take Quiz form viewed by the student users, the quizzes with deadlines that have already passed are not listed for the students to take.

The program should show visually how well their students are scoring in each of the topic areas as a whole, as well as individuallyAs mentioned before, due to time constraints I was unable to implement any of the topic parts of the program. This could be included in a future extension to the program, as the foundation for it is already there.

Teachers should be able to access data which visually shows the grades attained by each student.The teacher can view the Grade Breakdown form which shows a graph of each student’s results in each of the two classes the user teaches.

The administrator should have a completely separate log in space from the teacher and student usersThe Administrator Login Screen can be access from the Login Selection Screen, and is separate from the teacher and student login screens.

The administrator should have a secure username and password log in to the programFor the purposes of this program, the username was ‘admin1’ and the password was ‘equation’. A user would not be able to gain access to the admin area of the program without this username and password.

The administrator should be able to create new classes setting the class name and setThe administrator can access the Create New Class form from the Administrator Homepage, on which they can create a class name and choose a set for the new class.

There should be an editing function for the admin to search for a user and edit their details to make sure the data is correct and up to dateThe administrator can search for a student or teacher user and edit any of the information that they entered upon creating their account.

The admin should be able to delete users that no longer use the programThis is something that I simply forgot to add into the program due to time constraints. If I were to go back and improve the program this would be the first issue I would tackle.

The interface of the program should be simple to use and easy to understandThe program is laid out very clearly, and simply for a user who is new to the system to understand and use

The program must be simple to navigate throughEach button on each form is self explanatory, and lets the user know what will happen if they were to press that button. It is obvious to a new user what they must to do access a certain part of the program

Page 183: Documentation for a Visual Basic Mathematics Program

183

The text on screen should be large enough for easy reading, and in a readable fontAll of the text in the program is written in a large and clear font, and so is easy to read and understand

The program needs to sort data quickly and efficiently due to updates of the information on a regular basisThe program can fully accommodate large volumes of data, and the use of random access to store the data makes it quick and easy to find a certain piece of data in very long files.

The program should be professional and efficient to useEach form in the program loads instantly, and the code is as minimal as possible making the program very efficient. The form design is consistent throughout the program, and is clearly set out and styled.

Possible extensions

The first two extensions I would make In the future are the topic analysis tools and the Set 4 question filters. As seen in the comparison of projects performance against the final user requirements, I did not manage to meet the goals in relation to these two elements of the program due to time constraints. Although I managed to put the foundations of these elements into the project, such as entering a set number for classes and the question difficulty and topic area when creating questions, completing these objectives would have taken a lot more time.

I believe there are several things that I could do to extend the security that is already in place in the program. First of all, to make sure users were keeping their password safe and secure, I could implement a notification to show up on a regular basis – such as weekly or monthly – for the user to change their password. This makes sure that any users who have accidentally revealed their password to friends can keep their account safe and prevent others logging in as them. I could also use and encryption technique such as MD5 encryption to keep the passwords of users safe when they are being saved. The passwords of both the teacher and student users are currently saved as plain text in the respective files. Encrypting the password protects it and prevents others accessing the saved files and finding the passwords and logging in as other users.

Another extension I could add to the program would be to change the current username and password creation for logging in to the program. At the moment users can enter their own username and password for the system. To cut down on the amount of user inputs, I could have these generated randomly by the program, by using the students name. For example – using the year the user first entered the school, the student surname and several letters of the first name (to make sure each username is unique) the program could automatically generate a username e.g. 06mcgreevyrac. The password could be generated from randomly selected a word from the dictionary, and adding on a series of numbers e.g. elelphant291. Adding the digits on the end would make the number of possible password combinations larger, and therefore making it harder for someone to guess the password.

Another extension, as suggested in the feedback from the students who were trying out the system was to have several tools available to the student whilst they are answering the quiz questions. The first would be an on-screen calculator, which the student could use instead of a normal calculator or having to use the windows on screen calculator. This would be very be very easy to implement, and could be opened at any point in the quiz when the student is trying to answer the question. The second tool would be a pop up page showing the formula that is usually shown on the formula sheet on the inside of the first page of the exam

Page 184: Documentation for a Visual Basic Mathematics Program

184

paper. Instead of printing off and referring to the formula sheet on paper, which the student could easily misplace, a pop up form could be shown on the Quiz Question page to aid the student straight away.

One big message from the user feedback which is seen in the section below is that the teacher was unable to change any quiz or question information once the user had created them. This meant they could not go back and change any errors in the information they entered, such as a spelling mistake or even adding an image to a certain question. I would add in a facility similar to the student and teacher editing capability onto the administrator homepage, where the user can search for the quiz they wish to change, have the chance to edit the quiz information and then go through each question and change any of the information when needed.

One final extension that could be useful would be the choice to have images for a question answer, as well as just plain text. This would mean that questions on graph drawing and shape transformations would become possible, as the student would be able to choose the correct image as an answer. This gives a wider choice of questions that the teacher can create, and so can make the quiz more like the real exam, helping the students to further improve their exam technique, and therefore aim to improve the overall grade that the student can attain.

User feedback

User Feedback Feedback Location

Feedback Page Number

Description

Analysis User Requirements

13-15 The user and I had a question and answer session about what I should include in the program

Program Prototype

24-34 The user gave feedback on how to improve the look and

implementation of the program, including anything I should add

Final User Requirements

34-35 The user helped to form the final list of user requirements

from feedback from the prototype

Implementation & Testing

Appraisal 183-184 The user gave feedback on both the initial and final

implementation of the program, including testing the initial code

to help refine itFinal Review Appraisal 184 The user gave an overview of

what they thought of the program and whether they would use it in the future

Testing stage

R: First of all, now I have finished the system and you have had a chance to finish the system, what do you think?T: Well I have to be honest, it’s a lot better than I expected it to be! I think the whole thing is laid out very well, and the best quality of the program is that it’s very easy to understand what to do, I didn’t need an instruction booklet or anything whilst I was trying to use it. The core functions work very well, and I’m quite pleased with the program.

R: What did you think of the layout and style of the program?T: Well as I just mentioned, everything is clear and easy to understand, and the style and font of the program is quite nice. Although consistent throughout your program, the colour scheme you have chosen might be a little bit dull – an

Page 185: Documentation for a Visual Basic Mathematics Program

185

improvement could be a change in the colours to make the quiz appeal more to the students and perhaps make it seem more fun to be using.

R: How did you test it?T: Well I managed to find a pupil who had some free time – in other words a detention – to help me test it. First of all we had some fun testing all of the input forms to see if the program would break if we left the text boxes empty or entered the wrong kind of data into the boxes – like putting letters into the number boxes and such. After that we used the system properly and I created a quiz on a teacher account I created and my pupil took it on a student account they created. It all seemed to work very nicely, and I especially like the graph screen – it really helps to determine if the student Is actually progressing using the system or not.

R: What did the student think of the system?T: They thought the same as me really – it’s quite a good system, but the colours and the font make it a bit boring to look at and you could style it up a bit more. I do remember her also mentioning that the countdown timer on the form was a bit big and therefore a little bit distracting from the actual question, which is something you could change later.R: Could you or your pupil find anything wrong with the system that I could improve, or anything that would be useful to add?T: First thing was the clock face that I’ve just mentioned, the second was the colour scheme as I’ve already said. Then obviously you could add the stuff you never got round to like the topic analysis which would be very useful, as well as the question filtering for set 4 students. It would be better for set 4 classes to practice the questions that they are able to answer instead of trying to answer questions that they are not taught how to answer.

R: Do you think you will ever use the system?T: Although I think the system would be useful, I do not think it is ready for classroom use yet. I think the system would be most useful with the topic analysis included as that is the part that the students as well as the teachers struggle to realise – what part of which topic are people struggling on? Students don’t tend to communicate this very well to their teachers but this tool on the program would show the teacher in black and white what they need to revise with the students to make sure they understand how to do everything. Once the program was working fully with these tools, and was as robust and possible then I think the whole maths department would be very grateful for a program like this – and I think if you keep going with it you will be able to achieve this.

R: Thank you for your input

Final ReviewI am thoroughly impressed by the program that Rachel has produced, and is far better than I was expecting. The program has great functionality & usability, and is a very robust system. I think in the future her program could come in very useful to both the students and the teachers in general and I think the format of program she has created could even be extrapolated into other departments – especially for the science subjects at GCSE level as I believe their exams are currently multiple choice. The main improvement to the program would be to have a more user friendly style – a bright colour scheme perhaps to appeal to the user.I hope that Rachel can continue to develop this program further for the department, as it would be a very useful resource for the students to help improve their grade, which overall is the most important aspect of this program.

Page 186: Documentation for a Visual Basic Mathematics Program

186

Signed by Jane Beattie – Maths Teacher at Parkstone Grammar School