You are on page 1of 128

UNIVERSITY OF HERTFORDSHIRE

Module Code: 6COM1006/6COM1007


E-learning Applications Design & Development

(Semester B 2010/11)
Project Report
Teachers CBT Testing Centre Application

Rennie Ramlochan
09280653

25-09-2011

Abstract
The main objective of the project recorded by this report was to produce a computer based
objective test capable of satisfying a set of pre- identified advanced objectives relating to eassessment. As a result of the literature review, a set of advanced objectives for a computer
based test are identified. These are focused around the principles of the Formative Assessment
Module of the Web-Based Assessment and Test Analysis system (FAM-WATA) and designed to
make the objective test a more active experience for the student.
The report continues by detailing how these advanced objectives were combined with a set of
functional and non-functional requirements. The report made subject of the analysis and design
process, using persona and use case techniques, before being designed, built and deployed as a
computer based test application; utilizing ASP.net, Vb.net scripting and a Microsoft Access
relational database.
The conclusion of this report shows to what extent the advanced objectives were met by the
deployed application, lessons learnt from the research and areas where the deployed
application could be improved.

Acknowledgements
This project could not be completed without the support of a number of persons. I wish to take
this opportunity to thank:
Almighty God for keeping me going for the duration of this project.
MyParents Cynthia Ramlochan and Gandhi Ramlochan.
CTS CBCS for providing the right environment to support learning.
Our ASP.NET tutor, Vijay Ramkissoon for his guidance.
My girlfriend Jaya Singh for her understanding and patience during the duration of the
project.

Table Of Contents
Abstract

Acknowledgements

Introduction
Background
Proposed Solution
Project Objectives

7
7
7
8,9

Literature Review

10

E-assessment overview
Advantages of E-assessment
Criticism of E-assessment

10
11
12

E-assessment categories
Question type categories
Focus on Objective testing
Advantages of Objective testing
Disadvantages of Objective testing
Formative feedback
Summary Of Chapters
Analysis
Layout Overview
Key Characteristics of the Intended UserGroup
Assumptions and Constraints
General Requirements
Functional Requirements
Non-functional Requirements
Personas
Use Case (Administration Section Of the
Application)
Use Case (Scope Of the Teachers CBT Testing
Application)

12
13
14
14
15
15-16
17
18
18
18
19
20
21-22
23
24
24
26-30
4

Design
Project Plan
User Interface Design
Database Design
Logical Design
Low-Fidelity Prototype
Architectural Design
Coding Design

31
31
31
31
31
31
32
32

Software Development and Implementation


Implementation
Development environment
Database connection
Code-behind model
Design and development approach
User Interface Implementation
Security And Validation
Source code

33
33
33
34
34
34
35
35
35

Software testing
Configuration Management and Testing
Strategy
Black Box Testing
White-Box Testing
Link Testing
Security Testing
Analysis Of Test Results
Technical Areas For Improvement And known
Errors

36
36

Evaluation, Conclusion And Reflection


Lessons Learnt, Conclusion And Reflection
Project Objectives Met
Lessons Learnt
Challenges
Future Enhancements
Final Reflection

40
40
40
40
40
41
41

Bibliography
Appendices

37
37
38
38
38
39

42-47
48
5

Appendix A:Project Plan


Appendix B:User Interface Design
Appendix B:Database Design
Appendix C:Logical Design
Appendix D:Low Fidelity Protoyping
Appendix E:Architectural Design
Appendix F:Coding Design
Appendix G:Black Box Testing
Appendix H:White Box Testing
Appendix I:Analysis Of Test Results
Appendix J:Protocol Number

48
50
55
55
56
60
66
118
122
123
127

1. Introduction
Background Information
The whole process of assigning test and evaluating their scores after the test, was done
manually till date. Processing the test paper that is checking and distributing respective scores
took a lot of time. Results were not precise as calculations and evaluations were done manually
and there were little or no feedback provided to students because result processing took a long
time as it was done manually.
In addition helping students to recognize clearly the desired goal (understand what is required),
and to appreciate what high quality work looks like was not possible.
Additionally providing students with evidence about how well their work matches that goal,
and helping them to develop an evaluate skills to compare with some objectivity the work they
are producing in relation to the desired goal was not possible.

Proposed Solution
I believe a more effective approach is needed that will allow applicants to not only learn about
the questions/answers that may be asked during a test, but also:
Ensure applicants are confident in their knowledge and not simply guessing.
Allow applicants to know immediately if they have passed the exam.
Allow applicants to measure their performance over time.
Ensure applicants have their misconceptions corrected instantly, especially where they
answer a question confidently, yet incorrectly.
Allow teachers to create tests that are interesting and challenging and that make the
test a part of the learning process.
Allow teachers to create tests that are motivational and interactive.
Allow teachers to create tests that provide non directive and directive immediate
feedback in order to promote self study with concentration on the following areas
(Pyper et al; 2009)
1. Suggestions for further reading.
2. Suggestions for areas of further research.
3. Suggestions for areas to practice.
Provides specific structured information to the teacher in order that they can
understand individual areas of strengths and weakness for both individual students and
a collection of students.
7

To achieve this, the creation of the Teachers CBT Testing Centre Application was concepted.An
online formative e-assessment application that utilizes computerized objective testing to
display randomly selected questions in various formats, such as multiple choice and multiple
responses and that provides feedback which will allow students to view feedback, historic
progress, overall performance over time. It also provides specific structured information to the
teacher in order that they can understand individual areas of strengths and weakness of
students.

Project Objectives
Project objectives were categorized as core and enhanced functionality. The core functionality
highlights the main features that the application is expected to contain. The advanced
functionality includes additional features that improve the usability of the application.

Core Objectives
Users able to register
as students
Users able to sign in
using email and
password

Users able to take a


test
Users able to take
tests many times

Users able to set


background color and
font preferences

Users able to view


their test history

Users able to modify


first name ,last name,
email address and
password

The Student can


request hints and tips
on specific questions
during the test

Users able to give


Feedback by at the
end of the test

Users able to view


Feedback
From the application

Advance Objectives
Allowing the
student to
influence the
nature of the test
based on subject
selection
Providing an end
of assessment
summation of
results

Identifying
weaknesses

Making automated
suggestions as to test
content based on past
performance in specific
areas
Allowing the student
themselves to suggest
questions that can be
added to the question
bank, after Teacher
approval, for use by
other students
Pinpointing strengths

2.Literature Review
The literature review examines the topic on E-Assessment, with special focus on Computerized
Objective Testing. Some of the benefits, limitations and problems associated with both eassessment and computerized objective testing is discussed.
E-assessment is a wide ranging term which covers the use of computer and network
technologies in student assessment. Rust et al (2005) describe it as the single biggest influence
on how students approach their learning.
E-assessment is a computerized form of evaluation whereby various formats of data and testing
documents are digitally transformed. It may pertain to any use of computers in the formulation,
execution, grading and feed back of assessments including, for instance, personal response
systems and e-portfolios (www.elearning.ac.uk, Nov, 2009). Computerized format not only
means the use of computers to perform assessments but also any use of digital media. This may
range from creating a word document to simulating the performance of a task (Helen Ashton,
JISC CETIS).
The popularity of E-assessment in Higher Education has risen over the years, so much that it is
common to know of someone who has ventured into this exciting new world of learning
opportunities (Helen Ashton, JISC CETIS). Virtual Learning Environments (VLE) have become of
great importance to many lecturers and with e-assessment systems being built into the VLE,
many have found that they can easily generate assessments, make these accessible to their
students, and subsequent evaluate students and their grades (elearning.ac.uk, Nov, 2009). This
has become the standard meeting ground for lecturers and students.
The sophistication of E-assessment systems now makes it easy to implement e-testing as a
component of assessment. However even though it is now easier to use these systems and the
demands to adopt e-assessment rise, it is vital to appreciate that these tools do not provide an
instantaneous solution to resolve all assessment dilemmas. It is essential to have the expertise
to recognize in what capacity these systems can be efficiently used to enhance education
(Daniel Pead, University of Nottingham).
Bull and Mckenna (2003:1) attempt to differentiate between two types of e assessment. They
define computer assisted assessment (CAA) as encompassing the use of computers to deliver,
mark and analyze assignments or examinations, while Canole et al (2004:149) define computer
based assessment (CBA) as a further development of CAA where the assessment is carried out
entirely on the computer.
The distinction here is how much the computer and network are involved. Computer assisted
assessment (CAA) has a higher administrative overhead in terms of the delivery and marking of
a test, possibly using an optical markup reader (OMR). There is also a lag and still further
10

administrative effort in terms of providing feedback to the student. However, a Computer


assisted assessment (CAA) does not necessarily impose the need on each candidate to either
own a computer or to be computer literate. Computer assisted assessment (CAA) can be seen
as bridging the gap between the digital and non-digital worlds.
Computer based assessment (CBA) on the other hand uses the computer and network to both
deliver the question and receive the answer and as a term has now become synonymous with
e-assessment. Conole et al (2006:149) points out that e-assessment:
is not just sitting of the test, it also incorporates (i) the creation, storage and delivery of
assessments, (ii) the capture, marking, storage and analysis of candidates responses and (iii)
the collation, return and analysis of the result.
It is the execution of all these tasks by exploiting computer and network technology which
really delivers most of the major advantages of e learning; both in the ability to provide a fully
interactive multimedia learning experience and also in the administrative efficiencies to be
gained in delivery and marking of tests and the feedback process.

Advantages of E-yAssessment
E-assessment is widely used, as a positive tool in assessing students and their work. There are
many advantages to consider despite those who believe that e-assessment is far from achieving
certain goals (www.jiscinfonet.ac.uk). Some of the main benefits of e-assessment over
traditional pen-and-paper assessments are:
[1] Students are able to do online computer test and receive an accurate calculation of
their grades as immediate feedback.
[2] Computer applications allow the same content to be displayed over and over again
hence allowing constant revision of topics in an exciting way.
[3] Teachers, lecturers and staff that set exams get an immediate feedback per student
after an exam. This reduces the time taken for lecturers to correct and evaluate students paper
based tests. It also provides lecturers with an efficient understanding of topics that students are
weak in and alerts them of work that needs to be done or revised.
[4] The ability to quickly know the strengths and weaknesses of students topic areas by
evaluating their exams put the direction of teaching in a more efficient manner. The time saved
in deducing a students knowledge level and speed taken to evaluate a test is revolutionary and
with smarter tests being developed, personal evaluation of tests may become more prominent.
[5] The way in which computers can interact with each other is changing the way in
which we can be assessed, For example by completing an exam; a student may be given
feedback and depending on what needs to be assessed, the computer may automatically re11

direct students to related material online with a goal of educating the student more about a
weaker topic.
With the information gathered from e-assessments, teachers can quickly tailor the material and
timeline of a planned curriculum to the abilities of their students, as well as assist individual
students that may be falling behind in certain areas. Assessments also serve as an early
opportunity to correct misconceptions. This is crucial as students that believe strongly in
something will not progress if that belief is in fact incorrect [10].

Speculation, assumptions and criticism are always topics raised when the topic
of E-assessment is raised. Some questions proposed are:
[1] Will assessment be objective? Subjective judgment is always considered where by a
lecturer puts forth an exam with their personal understanding and nature of the material so
that the so called correct answers are predefined. (jiscinfo.net.uk)
[2]Will assessment questions itself be restricted to only fill in the blanks or multiple
choices? There are many ways in which assessment questions can be given to students due to
the ability of computers and technology to do so. Students involved in interactions with
computer based simulations and are able to submit the results and analyze these results for
assessment. Students can create wikis and websites that can be assessed by their peers. Voice
recognition software are widely used these days together with student whose are required to
replicate sound and words based on what the computer has played for them. (jiscinfo.net.uk)
this type of training can help in teaching of languages, pronunciation, and may also help in
students who stutter or who are similarly challenged.
[3] Will assessment only test recall or low level learning outcomes? Even straightforward
multiple-choice questions can, if carefully constructed, test higher order skills. (jiscinfo.net.uk)
the issue here isn't so much that of technology as creativity. For instance, if you are looking at
the application of knowledge (a higher order skill according to Blooms taxonomy
http://www.le.ac.uk/cc/rjm1/etutor/resources/learningtheories/bloom.html), it is possible to
create an ordering question which might appear easy to a student who has comprehended the
topic, whereas one who has not will struggle.

Types of E-Assessment
Assessments may come in the form of in-course assignments and quizzes or end of course
examination; the evaluator may range from tutors, peers or the student themselves. The
assessment may be in three types:
Formative
Diagnostic
Summative.
12

Diagnostic Assessment - is by and large used at the start of course units for instructors to
ascertain the level at which they should plan their lessons as well as to help clarify the level of
support that may be necessary in order to successfully impart knowledge to the students in an
efficient manner (Bradford, 2003). Diagnostic assessment may be used at the conclusion of a
lecture, or a lecture series to establish whether students have sufficiently grasped the course
objectives. This creates checkpoints whereby lecturers and students monitor progress of what
was learnt, which is indeed valued by both parties. It should be noted that diagnostic
assessment does not augment learning due to the absence of feedback after a test. However a
formative assessment provides feedback in two ways, these are after each question or after the
entire test (William Horton, 2006). Either way may be equally effective and is contingent upon
the preference of the lecturer setting the test.
Formative Assessment - assessment is a means of administering a test to students at intervals
during a course and that is formative occurs during a course, and instant feedback is then given
to the student and the lecturer (Bradford, 2003). No marks are recorded for such a test the
lecturer may then use the results to pinpoint weak areas which the student may work on to
boost their understanding of the topic. This may help to significantly reduce failure rates. The
feedback may not only come from the assessment test but from the lecturer or from other
students feedback. It is obvious that the feedback must be related to the material being tested.
Summative Assessment - differs from formative assessment in that scores are given which are
used to compare the level of learning the student has attained against the criterion required for
passing the course. Feedback is optional and this form of assessment may be administered
either during the module as an in-course assessment or at the conclusion of the module. (Boud
2000:160) says that assessment activities 'have to encompass formative assessment for
learning and summative for certification'. Since summative assessments should not be solely
used in assessing students for learning purposes but more for determining whether a student is
deserving of official qualification status.

Question type categories


In an e-assessment, a teacher can ask either:
Objective test questions and/or
Subjective test questions
Objective testing refers to tests that contain closed questions where the correct answer has to
be the same as, or at least very close to, a predetermined answer that the designer of the test
deems correct [17].
Subjective testing on the other hand allows for open ended answers, such as the writing of an
essay. While this approach is standard in traditional pen-and-paper assessments, subjective test
13

questions do not lend themselves to e-assessment as answers need human appraisal for
effective evaluation, therefore they will take longer to grade [17].
For this reason, objective testing lends itself to traditional pen-and-paper assessments and to eassessments, far more so than subjective testing. When objective testing is held as part of an eassessment, this is referred to as computerized objective testing.

Computerized Objective testing


This type of test requires a user to choose or provide a response to a question whose answer
predetermined (Colleen McKenna et al, 2003). Such question might require a student to:
[1] Select an answer from a given set of choices.
[2] Identify an object or position.
[3] Supply brief numerical or text responses.
[4] Input a mathematical expression for evaluation.
Therefore if no judgment has to be made on the accuracy then the marking of the responses
are said to be non-subjective. Many test makers may base an objective test on their own
personal decisions and bias (Colleen McKenna et al, 2003).
Objective testing is rapidly increasing in todays society; it has been used by American colleges
for SATs and Law Society Admissions. Most of the time, these assessments are used to allow
students a chance to gain entry into a University. (Colleen McKenna et al, 2003) Similarly, in the
UK, objective testing for formative and summative assessment is rapidly growing, Surveys done
not only conclude that objective test are done for computers but a wide range of topics
including math, social studies and science.

Advantages of Computerized Objective testing


There are many great advantages of objective testing but according to (Colleen
McKenna et al, 2003) here are a few:
[1] The time taken to mark a test, using CAA is greatly reduced.
[2] Due to the efficient way in which a computer can calculate and pull questions from a
pool, makes the speed of assessment higher than an the average test.
[3] The entire scope of the exam is expanded, allowing students to answer questions
since essay type questions are converted to multiple choice and Multiple Response.
[4] Each individual question can be analyzed.
[5] CBA allows an immediate feedback to students compared to the OMR.
[6] Computers are able to provide a frequent assessment.
[7] Levels of difficulty and evaluation of questions are pre-tested.
14

Defined by (Bloom et al 1965), objective test can be divided into three to four levels of learning.
Blooms Taxonomy shows areas where skills can be demonstrated including: Knowledge,
comprehension, application, analysis, synthesis and evaluation. This excerpt was taken from the
(Blueprint for Computer-Assisted Assessment, 2003 by Joanna Bull and Colleen McKenna

There are only a few disadvantages of objective testing and they are as
follows (Colleen McKenna et al, 2003):
[1] a lot of time is needed to created an objective test and its questions.
[2] Creating questions for higher levels are more tedious and require greater skills.
[3] Difficult to assess written expressions or creativity.
Gardner-Medwin [19] also highlights another problem, which is in itself the main reason why a
substantial number of teachers do not consider computerized objective tests. Namely, whereby
it is potentially feasible for students to do quite well and be given a good grade or marks with a
combination of partial knowledge and guesswork?
. There is a significant amount of evidence
and research to support this claim, including by Conole et al [20] in Perspectives in E-Learning
Research. It is, therefore, a concern held by many educators and test-designers alike.

Formative feedback
Following on from our solution above, which will correct a substantial number of the problems
associated with computerized objective test-based e-assessments, a student should also be
offered formative feedback after each question is answered. This, unfortunately, is an area that
at present tends to be weak in the area of e-assessment, as while feedback is offered, it is
mainly in the form of grades or marks. This approach simply inflates egos, it does not allow
students to learn where they went wrong, or to encourage them to learn more or to perform
better in future assessments [16].
Formative feedback, however, goes beyond just giving a grade or marks as it is designed to
improve learning [26]. This approach is far more beneficial to the student. Formative feedback
can be offered to a student immediately after they answer a question or at the end of a test,
although it needs to be noted that there are advantages and disadvantages to both approaches.
For instance, when offering feedback immediately after each question is answered, a student is
shown where their answer is correct or incorrect, however this makes a test longer. On the
other hand, offering feedback at the end of a test ensures the test is shorter in duration,
however students could answer several questions incorrectly if they misinterpret just one
question [22].

15

Additionally feedback can be supplied almost instantly and in doing so correct misconceptions
before they become resident in the learners brain (Horton: 226)
Taking into account the research conducted in this literature review, my E-Learning application
will focus on objective testing and Feedback. E assessment is a fundamental piece of the e
learning experience and it is best conducted through the objective test. It is easy to mark a
multiple choice test, for example, for the correct or incorrect answer by computer and to
provide feedback using a network. This in turn helps to form better relationships between
teachers and students which support enhanced learning.

16

Summary of Chapters
Chapter 3- Involves the Requirement Analysis stage which entails the physical characteristics of
the environment under study, logically abstracting into a model of a system in terms of new
and /or amended information processing (i.e. to meet the members satisfaction). It also
provides details on the functional and non-u
functional requirements as well as the user group
for the Teachers Cbt Teaching Application.
Chapter 4- Involves the Design stage of the database displaying a graphical representation of an
ERD diagram, logical model showing data being process and tables being formulated.
Chapter 5- Involves the Implementation stage. The most critical period of the project involving:
the choice of software tool, development of web-based system of details of teachers and
students, development of a web-based system to enter and retrieve data and development of a
web-based system for security.
Chapter 6- Involves the testing stage ensuring that the program is in a good working condition.
It also tests how the program responds to different types of data. Testing the application
ensures that it behaves as specified.
Chapter7- Involves the Evaluation stage where it is important that the new system is reviewed
or evaluation of the usability of the system and to detect errors, to ensure that it is performing
as expected or are meeting users needs.
Chapter 8- Involves the overall experienced gain, Challenges, Future Enhancements, Lessons
Learnt, and Self Reflection.

17

3.Requirement Analysis
LAYOUT OVERVIEW
This document contains a preliminary analysis of the requirements of the Teachers CBT Testing
Centre application. They are presented using English based statements and are headed by the
following:
Key Characteristics of the Intended User Group
Assumptions and Constraints
Requirements
General Requirements
Functional User Administration Requirements
Functional System Requirements
Functional Student Requirements
Functional Teacher Requirements
Non-functional Requirements
Use Cases

Key Characteristics of the Intended User Group


The Analysis chapter lists the functional and non-functional requirements for the proposed
application, as well as the key characteristics of the intended user group. The primary source of
information gathered about the key characteristics of the intended user group were through
questionnaires, the course notes, class and lecture discussion boards, general research and
personal experience. This questionnaire is being conducted under the Facultys protocol
number 1011/314 and is valid from 14 August 2011 to 30th October 2011. See Appendic J
Based on the questionnaires and my research, I have found that the vast majority have a good
education, with the minimum education being the completion of High School. The vast
majorities of applicants are familiar with the Internet and are experienced in the use of
technology in general terms, such as the use of computers and mobile phones.
However, all will of course be unfamiliar with the proposed Teachers CBT Testing Centre
application. Therefore, a clear set of instructions is required prior to allowing an applicant to
take a test. An online help system is also recommended.

18

The vast majority of applicants were generally in the age group 18-30. Although there are a
minimal amount of physical and mental disabilities, it is still recommended that the Web
Content Accessibility Guidelines [1] be followed as much as possible.

ASSUMPTIONS AND CONSTRAINTS


Constraint- Time
The time allotted to the completion of all documentation and web application prototype design
is 3 months. With such a limited time frame, and with the unpredictable deadlines for project
deliverables, the development team assumes that the project will result in the production of a
satisfactory product design at the required date.

Assumption- Users Computer Skill


The development team has gathered from questionnaires that the target audience for the
Teachers CBT Testing Centre application already posses the necessary computer skills that will
be needed to manipulate and navigate though the web application. As such the design team
assume that in its simplicity in design, the Teachers CBT Testing Centre application will be easily
operable by users who posses even the most basic of computer literacy skills.

Assumption- Advanced Theme


The advanced theme of this project is encapsulated within the principles of FAM-WATA, which
is a multiple- choice Web-based formative assessment module containing six formative
strategies (Dunn et al, 2009). Research has indicated (Li-Ling Chao et al, 2009) that students
achieved better results when these principles are adopted and in this way the application test
itself becomes part of the ongoing learning experience.

Requirements
General Requirements serve as a basis for functional requirements specification. The general
requirements must first be identified, before the functional requirements are specified. General
requirements describe the different attributes of the system rather than the functional
features.
19

Functional Requirements outline the services that the system must provide and exactly how it
should perform in particular situations.
Non-Functional Requirements outline the constraints that must be taken into consideration
when building the system. These requirements may specify that the system must be reliable
and efficient or that the system must be built with a certain programming language in order to
inter-operate with another system.

General Requirements
1. Build an objective computer based test that makes the test interesting and challenging.
2. Build an objective computer based test that makes the test a part of the learning
process.
3. Build an objective computer based test that makes the test motivational and interactive.
4. Build an objective computer based test that takes into account as far as possible those
with disabilities and individual preferences such as color, theme and layout.
5. Build an objective computer based test that provide non directive and directive
immediate feedback in order to promote self study with concentration on the following
areas ( Pyper et al; 2009)
1. Suggestions for further reading.
2. Suggestions for areas of further research.
3. Suggestions for areas to practice.
6. Build an objective computer based test that provides feedback which will allow students
to view feedback, historic progress and overall performance overtime.
Build an objective computer based test that provides specific structured information to the
teacher in order that they can understand individual areas of strengths and weakness for both
individual students and a collection of students.

20

2.1 FUNCTIONAL USER ADMINISTRATION REQUIREMENTS


Number
2.1.1

Requirement
The application must allow new users to be able to register.

2.1.2

The application must allow existing users to be able to login using their email
address and password.

2.1.3

The application must be able to send a forgotten password to a registered user via
their email.

2.1.4

The application must allow users to be able to edit their personal details and
personalize aspects of the presentation (e.g. background color, font and theme).

2.2 FUNCTIONAL SYSTEM REQUIREMENTS


Number
2.2.1

2.2.2

Requirement
The application should take the 9 heuristics of interface design into special
consideration to enable users to easily navigate through the application, as well as
easily understands its content.
The application must be developed using the code-behind model.

2.2.3

The application must display a progress bar, so users know how far in the test they
are (e.g. item 7 out of 40).

2.2.4

The application must be able to inform users about how much time they have left on
a test they are doing.

2.2.5

The application must be able to randomize the order in which item key(s) and
distractor(s) are presented.

2.2.6

The application must be able to use cascading style sheets in order to support the
separation between presentation and content.

2.2.7

The application must be able to provide hints and tips on specific questions during
the test which is requested by students.

2.2.8

The application must be able to provide the scores at the end of the test.

2.2.9

The application must be able to provide Feedback that is both directive and non-directive
and will contain suggestions for further reading; research; practice or discussion based on
level of results.

2.2.10

The application should take the 9 heuristics of interface design into special
consideration to enable users to easily navigate through the application, as well as
easily understands its content.

21

2.3 FUNCTIONAL STUDENT REQUIREMENTS


Number
2.3.1

Requirement
The application must allow new users to be able to register as students.

2.3.2

The application must allow existing students to be able to login using their email
address and password.

2.3.3

The application must be able to send a forgotten password to a registered student via
their email.

2.3.4

The application must allow students to be able to edit their personal details and
personalize aspects of the presentation (e.g. background color, font and theme).

2.3.6

The application should permit students to take a test.

2.3.7

The application should permit students to view their test history.

2.3.8

The application should permit students to choose a test from a list of available tests.

2.3.9

The application should permit students to view and modify previous responses.

2.3.10

The application should permit students to view the correct responses at the end of
the test.
The application should permit students to submit their own question to the database.
Including hints and objectives.

2.3.11

2.4 FUNCTIONAL TEACHER REQUIREMENTS


Number
2.4.1

Requirement
The application should permit teachers to view student results.

2.4.2
2.4.3

The application should permit teachers to manage student records (e.g. add
students).
The application should permit teachers to view test items.

24.4

The application should permit teachers to modify test items.

2.4.5

The application should permit teachers to add test items.

2.4.6

The application should permit teachers to delete test items.

2.4.7
2.4.8

The application should permit teachers to configure tests. Features to be configured


can include: list of topics covered, number of per items per topic, time per item.
The application should permit teachers to add tests.

2.4.9

The application should permit teachers to modify tests.

2.4.10

The application should permit teachers to delete tests.

22

2.5 NON-FUNCTIONAL REQUIREMENTS


Number
2.5.1

Requirement
The application should be easy to learn, intuitive and appropriate to the users
ability.

2.5.2

The application should be deployed from the Universitys Eric server, where the
landing page is named index.aspx.

2.5.3

The programming language used in developing the application should be Visual


Basic.NET (ASP.NET).

2.5.4

The database used in developing the application should be relational.

2.5.5

The application should have an online help system accessible anywhere within the
application.

2.5.6

The application should have clear and unambiguous instructions in how to use the
application and take a test.

2.5.7

The application should follow Web Content Accessibility Guidelines as much as


possible.

2.5.8

The applications interface should be consistent throughout the application.

2.5.9

The application should allow for different levels of access for different users of the
system.

2.5.10

The application should make provision for the prevention of sensitive users
information from being disclosed.

2.5.11

Information and feedback should be given to the user whenever there may be
uncertainty for the user while navigating the system.

2.5.12

The applications speed and response to commands and instructions should be


immediate and the application must have a lag time that does not exceed10 seconds.

2.5.13

For future development and expansions, the application should be built with
facilities to allow for upgrades and added functionality.

23

Personas
A typical Student persona would be Kevin:
Kevin is 20, has a full time job in IT and has at least some exposure to CCNA work. He is not
CCNA certified, but wants to further his career and be CCNA certified. With his current
commitment, the only way he has of achieving this is by taking an e learning course and
studying in his own time. He eventually wants to take the CCNA exam, but knows he must first
sit the foundation exam. He needs to maximize his study time and wants to ensure the time he
invests in the foundation exam maximizes his effort for retaining and understanding
information, which would help him to passing the CCNA exam.
A typical Teacher persona would be Lisa:
Lisa is a CCNA certified Manager and teacher with over 15 years CCNA experience. She needs to
keep a check on individual progress of students in order to head off any potential problems
with students who are not performing well or having problems assimilating and understanding
the course. She also needs to provide feedback to the CCNA certification authority on how
students are progressing and which areas of the course are proving too difficult to assimilate or
which areas of the course are easiest to assimilate.

Use Case (Administration Section Of The Application)


The Use case below defines the scope of the Administration Section of the Teachers CBT Testing
Centre application. The primary actors are the Student and the Teacher. The diagram shows
how at a high level the actors (Student and Tutor) will interface with the Administration Section
of the application.

24

General Administration For Students/Users


Description
Users able to register
as students
Users able to sign in
using email and
password
Users able to set
background color and
font preferences

Users able to modify


first name ,last name,
email address and
password

Method
Go to login page and
enter the required details
to create an account
Sign in using the account
created above
Sign in and go to Modify My Profile
hyperlink and amend color and font
size field.
Logout and login back to see the
changes.
Sign in and go to Modify My Profile
hyperlink and amend first name, last
name, email address and password.
Logout and login back to see the
changes.

General Administration For Administrators/Tutors


Description
Tutors able to sign in
using email and
password

Method
Sign in using the account
created above

Tutors able to set


background color and
font preferences

Sign in and go to Modify My Profile


hyperlink and amend color and font
size field.
Logout and login back to see the
changes.
Tutors able to modify
Sign in and go to Modify My Profile
first name ,last name, hyperlink and amend first name, last
email address and
name, email address and password.
password
Logout and login back to see the
changes.
Tutors able to View all Sign in and go to View All Student
Student records in the records hyperlink.
database
You can see Students fullname, Email
address, Profile settings, and
Registration date and user type.
Tutors are able to Add Sign in using the account created
a test
above.
Go to Add Tests hyperlink.
Choose a name for the test.
25

Enter questions to add.


Choose type of test (multiple choice or
true/false).
Add questions
Save and Finalize test.
Tutors are able to
Manage a test

Sign in using the account created


above.
Go to the Manage A Test hyperlink and
choose a test to modify.

Use Case (The Scope Of The Teachers CBT Testing Center


Application)
The Use case below defines the scope of the Teachers CBT Testing Centre application. The
primary actors are the Student and the Teacher. The diagram shows how at a high level the
actors (Student and Teacher) will interface with the system.

26

STUDENTS
General Administration For Students/Users
Process in Use
Case/Description

Method/Action

Final State

Users able to register


as students

Go to login page and


enter the required details
to create an account
Sign in using the account
created above

The user registers as a Student.

Sign in and go to Modify My Profile


hyperlink and amend color and font
size field.
Logout and login back to see the
changes.
Sign in and go to Modify My Profile
hyperlink and amend first name, last
name, email address and password.
Logout and login back to see the
changes.

Students able to set background color


and font preferences

Users able to sign in


using email and
password
Users able to set
background color and
font preferences

Users able to modify


first name ,last name,
email address and
password

Students able to sign in using email and


password

Students able to modify first name ,last


name, email address and password

Students Test
Process in Use
Case/Description

Method/Action

Final State

Users able to take a


test

Sign in using the account created


above.
Go to the Select And Take A Test
hyperlink and choose a test to take.
Sign in using the account created
above.
Go to the Select And Take A Test
hyperlink and choose a test to take.

Students able to take a test

Students able to take tests many


times

Users able to view


their test history

Sign in using the account created


above. Go to the Select And Take A
Test hyperlink and choose a test to
take.
Sign in and go to View Test History
hyperlink to View your Test History

The Student can


request hints and tips
on specific questions

Sign in using the account created


above.
Go to the Select And Take A Test

The Student can request hints and


tips

Test questions are


generated randomly
from an
existing database
Users able to take
tests many times

Application generates random


questions for a test

Students able to view their test


history

27

during the test

hyperlink and choose a test to take.

Students Test History And Feedback


Process in Use
Case/Description

Method/Action

Final State

Students will be able


to review their own
history and
progress over time
Feedback by student
will be given at the
end of the test

Sign in and Take a test and then go


to View Test History hyperlink to
View your Test Score.

Students able to review their own


history

Sign in using the account created


above.
Go to the Feedback hyperlink and
give your feedback.

Students able to give Feedback

28

TEACHERS
General Administration For Administrators/Tutors
Process in Use
Case/Description

Method/Action

Final State

Tutors able to sign in


using email and
password

Sign in using the account


created above

Tutors able to sign in using email

Tutors able to set


background color and
font preferences

Sign in and go to Modify My Profile


hyperlink and amend color and font
size field.
Logout and login back to see the
changes.
Sign in and go to Modify My Profile
hyperlink and amend first name,
last name, email address and
password.
Logout and login back to see the
changes.
Sign in and go to View All Student
records hyperlink.
You can see Students fullname,
Email address, Profile settings, and
Registration date and user type.
Sign in and go to View All Student
records hyperlink.
Click the Modify hyperlink and
amend first name, last name, email
address, profile color, fonts and
password.
Logout and login back to see the
changes.

Tutors able to set background color


and font preferences

Tutors able to modify


first name ,last name,
email address and
password

Tutors able to View all


Student records in the
database

Tutors able to Modify


all Student records in
the database

Tutors able to modify first name


,last name, email address and
password

Tutors able to View all Student


records in the database

Tutors able to Modify all Student


records in the database

29

The Test From Administrators/Tutors


Process in Use
Case/Description

Method/Action

Final State

Tutors are able to


view and review
students history and
progress over time

Sign in and go to View All Student


Results hyperlink to View all
Students in the database
username, the name of the Test
taken, the Test date, the total
questions in the test, and the total
question the student got correct
together with the Student Score.
Sign in using the account created
above.
Go to Add Tests hyperlink.
Choose a name for the test.
Enter questions to add.
Choose type of test (multiple choice
or true/false).
Add questions
Save and Finalize test.

Tutors are able to view and review


students history

Tutors are able to


Modify a test

Sign in using the account created


above.
Go to the Modify A Test hyperlink
and choose a test to modify.

Tutors are able to Modify a test

Tutors are able to


View student
feedback.

Users have to sign into an external


website using a specified email
address using their username and
password to see student feedback.

Tutors are able to View student


feedback.

Tutors are able to


Create a test

Tutors are able to Create a test

Objective Method Pass

30

4.Design
This chapter of the paper explains how applicants are expected to use the proposed
application.

Project Plan
The preparation of a project plan was the first step in developing the application design. The
project plan outlined the proposed functionality and features necessary to meet the user
requirements.

See Appendix A

User Interface Design


See Appendix B

Database Design
See Appendix C

The Logical Design


A logical data model is a graphical representation of the information requirements of a
Business area, it is not a database. The logical model was produced for the entities (tables)
outlined above. Primary keys are underlined and foreign keys include an asterisk.

See Appendix C

Low Fidelity Prototyping

Low Fidelity prototyping was used as a method of quickly outlining the user requirements and
functionality. The low fidelity prototype is based on the use case diagram in

See Appendix D

31

Architectural Design
The architectural design that best represent the system, being developed for the Teachers CBT
Testing Centre Application, is a Three Tier Client-Server Architecture.

See Appendix E

Coding Design
See Appendix F

32

5.Software Development and Implementation


Implementation
The implementation phase involved the use of Microsoft Access database software (for the
creation of tables and storing of data) and Microsoft Visual Studio 2010 software which
facilitated the interaction between the Teachers CBT Testing Centre Application and Microsoft
Access database.

Technology Framework and Programming


Language Used
Development Environment
Microsoft Visual Studio 2010 was selected as the development environment based on the
following reasons:
It is free and widely used by applications and application developers.
There are many tutorial, forums and support sites available to help with development
issues like http://msdn.microsoft.com.
Microsoft Visual Studio 2010 allows ASP.net websites to be developed in a selfcontained environment containing functionality to:
Create and manage code behind files;
Create and edit VB.net and HTML code;
Create and manage cascading style sheet files;
Create and design screen Layout visually;
Create and design SQL Server database;
Supports Microsoft.Net framework 3.5,4.0

Relational Database (RDBMS)


A prerequisite for the Teachers CBT Testing Centre Application was that the underlying data
would be stored and managed in a relational database. Microsoft Access was chosen based on
the following reasons:
Microsoft Access is easy to use and integrates well with Microsoft Visual Studio 2010.
There are many tutorial, forums and support sites available to help with development
issues like http://msdn.microsoft.com.
33

Database Connection
Instead of hard coding the database connection information in each page that needed to call,
read or write information to the database. A connection string with the name and the database
location was placed into the web.config file. The web.config file was then placed into the root
directory of the application. This was done to implement a global change variable, which
allowed the user to make changes only once should the database be renamed or moved in the
future. (See sample code behind, highlighting the connection string at Appendix F)

Code-Behind Model
The code-behind model was chosen based on the following reasons:
Code-behind pages offer a clean separation of the markup (user interface) and code. It
encourages developers to build applications with separation of presentation and
content in mind. This allowed me a web designer, for example, to focus on the design
markup with less potential for disturbing the programming code that drives it.
Subroutines and functions created and used in Code-behind pages can be reused for
multiple pages (reusability of code).

Design And Development Approach


The approach I followed was to initially list the application requirements, potential users and
the objectives that the application should achieve and then writing content for those pages in a
Word document. Having established the design elements such as ASP.NET, HTML, Cascading
style sheets and Microsoft Access database. The application pages were established and web
content was prepared.
o Using the base design suggested by the University, the Microsoft Access database and
its tables were modified to facilitate linking to the web application, which suited my
project requirements.
o Master pages contained the general layout and were created to call content from all
other pages, those being the page heading and the page content. All other information
was placed on the master page, like the main menu, footer and submenus.
o Presentation layouts were separated from the content via the use of Cascading Style
Sheets. The use of a low fidelity prototype helped in terms of visualizing how the
application pages should look and feel. The biggest challenge faced was how the pages
would interact, not how they would be designed.
o As each page was fully designed and developed, they were compiled and tested locally
using the built-in server in Visual Studio 2010.The pages were then copied to the Eric
server folder and tested there to ensure it worked correctly.
o Tests were done by deliberately making mistakes by entering invalid data, omitting data
and using incorrect data types. For example, not completing mandatory fields such as
34

email address or password in the sign up page or trying to log in without first signing up
as a registered user. To ensure that pages were working properly and correctly linked
via the database, valid data was entered and pages were tested to see whether users
would be directed to the correct home pages.
o Once it was deemed that all pages worked correctly and that the content was displayed
as it should be, several walkthroughs were carried out on the application and alterations
made as required.

User Interface Implementation


The design of the Teachers CBT Testing Centre Application was done with two (2) main goals in
mind:
Simple interface with ease of navigation. For example using warm web safe
colors and easily recognizable graphics i.e. use of icons that are readily
understandable.
Consistent layout throughout the application will aid users in navigation
(Consistency principle) .For example the menu bar, category listings; color, fonts,
and main content area were placed in the same location in all web pages.
Navigation The user can navigate through the website by using menus, sub menus and
hyperlinks. The menus are consistent and located at the top of the page on all master pages.
Interface The user interface is simple as it uses hyperlinks. The menus are consistent and use
warm web safe colors that are easily recognizable and located on all master pages.

Security And Validation


Validation Error messages appear on the screen when users enter omits data or enter invalid
data. Bright red fonts were used for error messages. (See sample code at Appendix F pg94).
Authentication -?Users are required to enter their username and password to access the
application. This feature was implemented to prevent unauthorized users from accessing the
application. (See sample code at Appendix F pg94).
Sessions -_A new login session is created at each login. If the user logouts the session is
terminated. User logins are facilitated by sessions which are valid for the life of that login.

Source Code
(See sample code at Appendix F).
35

6.Software Testing
Software testing is the process of validating and verifying that a software program/application: Meets the business and technical requirements that guided its design and development;
Works as expected and can be implemented with the same characteristics.
Validation and Verification encompasses many of the activities of Software Quality Assurance.
Verification is asking the question: Are we building the product right?".
Validation is asking the question: Are we building the right product?
Its the process of evaluating software to determine compliance with requirements.
The objectives of the validation and verification process are to have a system that has the
following characteristics:
Correctness product without errors.
Consistency consistent with itself and other products.
Necessity extent to which everything in the product is necessary.
Sufficiency product that is complete.
Performance product satisfies its performance requirements.

Configuration Management and Testing Strategy


Code was developed in Microsoft Visual Studio 2010 environment and Unit Testing was done
locally using the View in Browser functionality of Microsoft Visual Studio 2010.
Unit testing was conducted against the functional requirements described in the Design stage
of this document.
Once all releases had been tested locally, the entire application was copied to the Final folder in
the assigned area of the Eric environment and retested against the use cases.
This can be illustrated as:
Microsoft Visual Studio 2010 EnvironmentTest environment
Local host Staging environment
Eric server Production environment

36

Black Box Testing


Black-box testing is your primary weapon in the war against errors. The results of sound blackbox testing are robust and reliable modules. With this approach, you do not need internal
knowledge of the technology. All you need to know is how to activate the system and what are
the expected outcomes. We want to test the function of the module. We are only concerned
with the functional performance as it converts input into output. The philosophy is that, for the
module to work error-free, we enter all the test case inputs which produce correct outputs, and
we don't care how it is done.
Our process looks something like this:
We determine all possible classes of data values.
We select representative data from each class.
We select data at the boundaries of these classes
The Objectives of Module Testing are to:
Design test cases to expose faults and weaknesses of the code.
Select test cases that have a high probability of finding faults due to errors of
omission.
Cover the full spectrum of module inputs and module environments under
combinations that tend to uncover hidden faults.
Use stress tests and overload the module in ways that will force failure.
See Appendix G for test scripts and results.

White-Box Testing
This testing approach is concerned with the internal mechanism of the component. It is done by
examining the programming code to devise sample data which should exercise all parts of the
program being tested. For example, when a program has an if-statement, we want to create
data which will follow both branches, and when a program has a loop, create data which checks
the loop 0, 1 and more times. Our testing is especially concerned with branch testing, path
testing, and statement testing.
See Appendix G for test scripts and results.

37

Link Testing
Link testing was done to make sure all links worked, and that no link pointed to a
nonexistent page. Checks were also done to resolve any isolated pages which the
application could not navigate to.

Security Testing
The security tests that were done involved the following:
Testing performed for unique username.
Validation check for username and password.
Validation check of fields for instance confirming username and password.
Invalid logins as illustrated in previous section.
Users with different access rights have access to screens that are consistent with their
roles.

Analysis Of Test Results


See Appendix I for test scripts and results.

38

Technical Areas For Improvement And known Errors

Areas

Description

Problems

Solutions

Look and feel.

Would like to offer more


flexibility in terms of users
look and feel, in order to
get the correct look and
feel a skilled designer is
required

The application does not


look like a professionally
designed site and options
available presently might
not be flexible enough .

Better use of CSS.


Would also like to
explore what the
possibilities are

Modify a test.

Did not achieve the


functionality of Users
being able to Modify a
test

Generation of
Random
questions for a
test.

Test questions werent


generated randomly from
an
Existing pool.

Feedback By
application.

Did not achieve the


functionality of the
application being able to
give Feedback at the end
of the test or The Student
being able to request
hints and tips on specific
questions during the test

Students should
be presented
with a timer
showing how far
through the test
they are.

Did not achieve the


functionality of the
application being able to
display a timer.

Because if a student took


the test already and you
then go and modify a test
(add/delete questions), his
grades would be affected.
Couldnt find a solution to
this in this short timeframe.
Test questions werent
generated randomly from
an
Existing pool.

Did not achieve the


functionality of the
application being able to
give Feedback at the end
of the test

Only Partially Implemented


As a timer is shown for
each question only.

More research and


testing have to be
done to solve this
problem. May have to
redesign my database
to solve this problem
in the future.
More research and
testing have to be
done to solve this
problem. May have to
reexamine and
redesign my database
to solve this problem
in the future.
More research and
testing have to be
done to solve this
problem. May have to
reexamine and
redesign my database
to solve this problem
in the future.
More research and
testing have to be
done to solve this
problem. May have to
reexamine and
redesign my database
to solve this problem
in the future.

39

7.Evaluation, Conclusion And Reflection


Lessons Learnt, Conclusion And Reflection
The Conclusion and reflection chapter is where I review the entire completed project, deciding
if my intended objectives were met, how the project was managed, what I have learnt and how
it would affect my future practice.

Project Objectives Met


The overall project objectives were to design and develop an E-learning Application. The
application should allow students to register and login to the application. Students could then
log in the E-Learning application and modify their profile and choose tests they would like to
take, while getting feedback on their results at the end of the test. Administrators/tutors could
login and view student performances and create and assign tests. (See the Analysis Chapter for
The requirements).
Some of these objectives were met successfully with further development and testing required
in other areas. (See the Objectives Met in Appendix I pg39,pg123 ).

Lessons Learnt
I learnt a great deal during the project. Not only on the technical side of creating an eassessment application (ASP.NET, CSS, HTML, database interaction), but also how have people
assimilated information.
The project also gave me a greater appreciation and understanding of the responsibility placed
on web developers to ensure proper web design that incorporates usability, accessibility,
correctness and strong cohesion and development techniques used when creating an
application.
Finally this project also gave me the opportunity to enhance my writing skills, opening the gap
wider in researching, reading a lot of materials and critical evaluating skills which will all be put
forward towards the future.

Challenges
Understanding the code, creating correct functions and troubleshooting the application posed a
challenge to me as I possessed limited programming skills.Inaddition I underestimated how
much of my time would be spent in the development/implementation phase.
40

Evaluation
Whatever method is chosen for evaluation, it will consist of collecting data over time and then
interpreting it. In the context of this type of project, this is naturally difficult to achieve. Therefore this
evaluation piece is both reflective and subjective.

Future Enhancements
Future versions of this online E-Learning application could be enhanced as follows:
Adding video and audio functionality or Instant messenger functionality, so a dialogue is
in process throughout the test, either with a teacher or other class members.
Ensuring the application conforms to usability and accessibility standards.
Adding a blog page that allows users to post comments.
Integrating and implementing a Feedback application that provides feedback to
students on a real-time basis.
Integrating and implementing a working timer showing how much time is left and how
long they took on each question.
Fixing the problem experienced currently when a Tutor/Administrator modifies a test
(add/delete questions in a test).An anomaly occurs where students who already took
the test, there scores are now affected negatively or positively due to the number of
questions added or deleted.

Final Reflection
Overall, I found the e-Learning module to be very challenging, particularly for first time
students like myself who were new to ASP.NET and had to get familiarized with the language
while simultaneously focusing on building the application. Students had a lot to learn, with
ASP.NET units run concurrently with e-Learning units. All the academic research and reports
required were very difficult and time-consuming. While there are still issues that need to be
rectified, and a bit of future work that could enhance the application, I feel the application met
all the objectives set at the beginning of the project.
Even though I did have a lot of difficulty with this course I did enjoy the challenge the course
gave me. I take great satisfaction in knowing that a great deal of time and effort went into
designing, developing and ensuring consistency and functionality requirements were met.
In the end if I had more time to redo this project I think I could have done much better in some
areas to improve quality work. And if offered another project which entails web application I
would consider learning another language like PHP to widen the skills and knowledge in other
areas of learning.
41

References:
Anderson, C (2006): The Long Tail. England: Random House
Aranda, N (2009): A Brief History of E-learning and Distance Education.
http://ezinearticles.com
Atherton J.S (2009): Learning and Teaching; Assessment (Online) Available at
htto://www.learningandteachine.info/teachinglassessment.htm
Bloom, B. S. (1971): Handbook on Formative and Summative Evaluation of Student Learning.
New York: McGrawHill Bradley, K (2002): Passing the PRINCE2 Examinations. London.
Bull, i. & McKenna, C. (Eds.) (2003): Blueprint for Computer-assisted Assessment. London:
Routledge Falmer [Online) Available at http,://www.herts.eblib.com/EBLWeb/oatron/
Bush, M (Undated): Alternative Marking Schemes for On-Line Multiple Choice Tests. [Online].
Available at http://www.caacentre.ac.uk/dldocs/BUSHMARK.PDF
Castells, M (2010, 2nd edition) The Rise of the Network Society. London. Blackwell
Chartered Institute of Educational Assessors (2009):
http://www.ciea.ore.uk/knowledge centre/articles soeeches/general articles/assessment
vatdity asp*
Chao, Wang i, Wang W, Yen, Wang T (2009): http://120.107.180.177/1832/980119801l2pa.pdf
Conole, Grainne, Oliver, Martin (2006): Contemporary Perspectives in Elearning Research:
Taylor & Francis Ltd. [Online). http://www.herts.eblib.com/EBLWeb/oatron/
Dunn K, Mulvenon (2009): Practical Assessment Research and Evaluation
http://pareonline.net/pdf/v14n7.pdf
e-Learning Course Notes
http://www.studynetl.herts.ac.ukJweb/crs/6COM02460909/EAP Site/3 EAP 03 06.html
European Commission, Eurostat Web Site [Online), available
athttp://epp.eurostat.ec.europa.eu/
Harlen, W (2005): Formative and summative assessment a harmonious relationship? [Online),
available at
http://www.assessmentr eformxroup.org/images/ASF%2oReport%204%2oAppendix%20E.pdf
42

Hoare, S (2004): Assessment: the secret weapon of flexibility. Guardian Educational


Supplement. [Online), available at
http://www.uardian.co.uk/educationJ2004/mar/09/e4earning.technoloKy1S
Kolsgrove, 6 (2001): The Times Higher Education supplement, [Online] available at
http://www.timeshighereducation.co. uk/story.asp?storyCode=159581&sectioncode=26
Horton, W (2006): Elearning by Design. San Francisco: Pfieffer
Jackson, P (1999): Introduction to Expert Systems: England. Addison Wesley Longman Ltd.
Korper and Ellis (200): The E-Commerce Book, Building the E-Empire. Academic Press
Karadikar, R (2006): Multiple-choice tests, negative marks and an alternative, Resonance
Journal Vii No 3, 2006, [online) available at http:J/www.sprinerlink.com/content/f7571
3046617278S
Keppell, Au, Ma, Chan (2006): Peer learning and learning-oriented assessment in technologyenhanced environments, The Hong Kong Institute of Education, Hong kong. 31:4. (Online).
Available at http://eneaxe.wisc.edu/collaboration/documents/1rng Orientd Assmnt.pdf
Lee-Post, A (2009): e-Leaming Success Model: an Information Systems Perspective [Online] at
http://www.eiel.ore/volume-7/v7-il/lee- post.pdf
Lewis, C (2007): Introduction to Objective Testing and CAA at Warwick University, (Online)
available at
http://wwwl.warwick,pc.uk/seryices/ldc/resource/esuides
Li-Ung et al, (2009): An Analysis of the Benefits Using different forms of Formative Assessment
Strategies: Department of Industrial Education and Technology. National Changhua University
of Education, Taiwan
Lilley and Barker (2007): Students Perceived Usefulness of Formative Feedback for a Computeradaptive Test. [Online). Available at http://www.ejel,org/volume-S/vS.il/Lilleya ndBarker.
Tsai, Sand Machado, p (2004): Elearning : Online Learning, Web-based Learning, or Distance
Learning: Unveiling the Ambiguity in Current Terminology. [Online). Available at
http://elearning.ors
Wang, T (2007): What strategies are effective for formative assessment in an c-learning
environment?: Journal of Computer Assisted Learning, Volume 23, Number 3, June 2007, pp. lfl186(16)
Zimmaro, D Ph.D (2004): Writing Good Multiple-Choice Exams,[Onlinej. Available at
http:J/www.utexas.edujacademic/mec/research/pdf/writingmcexamshandout.pdf
43

10. Race, P.; Brown, S.; Smith, B., 2005. 500 Tips on Assessment, 2nd Edition. RoutledgeFalmer.
11. McMillan, J. H., 2008. Assessment Essentials for Standards-Based Education. Corwin Press.
12. Orton, A.; Frobisher, L., 2005. Insights into teaching mathematics. Continuum.
13. Earl, L. M., 2003. Assessment as learning. Corwin Press.
14. Howell, S.L.; Hricko, M., 2006. Online Assessment and Measurement. Idea Group Inc,.
15. Scott, D., 2001. Curriculum and Assessment. Ablex Publishing
16. Butler, R., 1987. Task-involving and ego-involving properties of evaluation: effects of
different feedback conditions on motivational perceptions, interest and performance. Journal
of Educational Psychology. Available at: http://psycnet.apa.org/journals/edu/79/4/474.pdf
17. Parsons, J.; Fenwick, T., 1999. Using objective tests to evaluate. Available at:
http://www.eric.ed.gov/ERICDocs/data/ericdocs2sql/content_storage_01/0000019b/80/17/97
/f5.pdf
18. Joint Information Systems Committee. 2007. Effective Practice with e-Assessment. Available
at: http://www.jisc.ac.uk/media/documents/themes/elearning/effpraceassess.pdf
19. Gardner-Medwin, A.R., 1995. Confidence assessment in the teaching of basic science.
University College London. Available at: http://www.ucl.ac.uk/~ucgbarg/tea/altj.htm
20. Conole, G.; Oliver, M. 2006. Contemporary Perspectives in E-Learning Research. Taylor &
Francis Ltd.
21. McKenna, C.; Bull, J., 1999. Designing effective objective test questions. Loughborough
University. Available at: http://www.caacentre.ac.uk/dldocs/otghdout.pdf
22. Horton, W., 2006. E-learning by design. Pfeiffer.
23. Davies, P., 2002. There's no confidence in multiple choice testing. Loughborough University.
Available at: https://dspace.lboro.ac.uk/dspace-jspui/handle/2134/1875
24. Bull, J.; McKenna, C., 2004. Blueprint for Computer Assisted Assessment. RoutledgeFalmer.
25. Gardner-Medwin, A.R.; Gahan, M., 2003. Formative and Summative Confidence-Based
Assessment. University College London. Available at: www.ucl.ac.uk/~ucgbarg/tea/caa03.doc
44

26. Shute, V. J., 2007. Focus on Formative Feedback. ETS. Available at:
http://www.ets.org/Media/Research/pdf/RR-07-11.pdf
28. Cohen, L,. 2005. A Guide to Teaching Practice. RoutledgeFalmer.
29. Web Content Accessibility Guidelines. Available at: http://www.w3.org/TR/WCAG10/
30. Saffer, D., 2006. Designing for Interaction: Creating Smart Applications and Clever Devices.
Peachpit Press.
31. Windle, D.; Abreo, L., 2002. Software Requirements Using the Unified Process: A Practical
Approach. Prentice Hall.
32. Nielsen, J. 1993. Usability Engineering. Academic Press.

BOOKS
- Pearson, Prentice Hall: The BCS Glossary of ICT and Computing Terms
-Joanna Bull; Colleen McKenna 2003 - A Blueprint for Computer-Assisted Assessment.
-E-learning by Design By William Horton
-Drasgow, F., & Olson-Buchanan, J. B. (Eds.). (1999). Innovations in computerized assessment.
Hillsdale, NJ: Erlbaum.
-Van der Linden, W. J., & Glas, C.A.W. (Eds.). (2000). Computerized adaptive testing: Theory and
practice. Boston, MA: Kluwer.
-Wainer, H. (Ed.). (2000). Computerized adaptive testing: A Primer (2nd Edition). Mahwah, NJ:
ELawrence Erlbaum Associates.
-Weiss, D.J. (Ed.). (1983). New horizons in testing: Latent trait theory and computerized
adaptive testing (pp. 237-254). New York: Academic Press
-Bejar, Isaac I. "Educational Diagnostic Assessment."Journal of Educational Measurement
21 (1984): 175-189.
-Coombs, C. H., J. E. Millholland, and F. B. Womer."The Assessment of Partial
Knowledge."Educational and Psychological Measurement 16 (1956): 13-37.
45

-(Quotes by , W. J., & Glas, C.A.W. (Eds.). Computerized adaptive testing: Theory and practice.
Boston, MA: Kluwer).
-(Quotes by Wainer, H. (Ed.). (2000). Computerized adaptive testing: A Primer (2nd Edition).
Mahwah, NJ: ELawrence Erlbaum Associates).
Contemporary Perspectives in E-Learning Research: Themes, Methods and Impact on Practice
(Conole & Oliver)
International Journal of Computers, Communications & Control (IJCCC, 2009)
[INT J COMPUT COMMUN CONTROL] With Emphasis on the Integration of Three Technologies

Websites
https://docushare.sunderland.ac.uk/docushare/dsweb/Get/Document-2989/AQH-F6
7+Guidance+on+e+assessment.pdf
http://en.wikipedia.org/wiki/Computerized_adaptive_testing
http://www.cs.ucla.edu/honors/UPLOADS/yajie/thesis.pdf
http://www.alt.ac.uk
http://www.caaconference.com/
http://www.jisc.ac.uk/elearning
http://www.heacademy.ac.uk
http://www.techdis.ac.uk
http://www.elearning.ac.uk/features/eassessment
http://www.elearning.ac.uk/subjects/AAoverview
http://hal.archives-ouvertes.fr/docs/00/19/04/40/PDF/ridgway-j-2004-r10.pdf
http://www.ttrb.ac.uk/ViewArticle2.aspx?anchorId=17790&selectedId=17980&ContentId=1310
http://dro.dur.ac.uk/1929/
http://feasst.wlecentre.ac.uk/tag/literature-review/
http://www.downes.ca/post/33413
http://www.e-skills.com/cgi-bin/go.pl/wbel/practice/details.html?uid=471
http://www.jisc.ac.uk/assessment.html#
http://www.warwick.ac.uk/ETS/Publications/Guides/Assessment/introduction.htm
http://scholar.google.co.uk/
http://www.acm.org/
http://www.computer.org/
http://www.springer.com/computer/lncs/
http://www.ingentaconnect.com/
http://www.jstor.org/

46

http://www.elearnspace.org/Articles/InstructionalDesign.htm
http://www.dokeos.com/doc/DokeosElearningProjectManagementGuide.pdf
http://dlwww.dl.saga-u.ac.jp/contents/mgzn/ZR00005462/ZR00005462.pdf
http://www.resourcebridge.net/Articles/eLearn_Objectives.html
http://www.elearnspace.org/resources/research.htm
http://www.alts.com/workshops.html
http://www.trainingplace.com/about/services.html
http://www.jiscinfonet.ac.uk/InfoKits/effective-use-of-VLEs/e-assessment
http://tests-builder.com/CAT.html 2009
http://www.elearning.ac.uk
www.journal.univagora.ro/download/pdf/71.pdf

47

Appendix A-Project Plan


Activity

Action Required

Brainstorming

Review ideas for the project.

Target Date

Document ideas
Prepare a mind map

06/06/11

Person(s)
Assigned To
Task

Rennie
Ramlochan

Milestones

Completed

Review mind map to ensure


that all ideas are captured.
Introduction

01/07/11

Project Organization

01/07/11

Work Breakdown

01/07/11

Project Schedule

01/07/11

Software
Requirements

Requirements Analysis

08/08/11

Requirement Specification

08/08/11

Design

Architectural Design

19/08/11

User Interface Design

19/08/11

Report Design

19/08/11

Process Design

19/08/11

Coding

04/09/11

Testing

08/09/11

Installation

11/09/11

Planning

Implementation

Rennie
Ramlochan

Rennie
Ramlochan

Rennie
Ramlochan

Rennie

Completed

Completed

Completed

Coding, Testing and


Installation were completed
on 16/09/11 Reason:
Trouble implementing
48 and
certain functionalities

Documentation

Final Report

Submission of Application

Continuous

Ramlochan

18/09/11

Submission of Application
was completed on 19/09/11
Rennie
Ramlochan

Project Demo

Submission of Report

25/09/11

A Demonstration of the
functionalities of the finished
application to a panel of
lecturers.

29/09/11

errors experienced in
configuring and uploading to
the Eric Server.

Reason: Errors experienced


in configuring and uploading
to the Eric Server.

Completed and Submitted


on time.

Rennie
Ramlochan

Demo

49

Appendix B- User Interface Design

50

STUDENTS
General Administration For Students/Users
Process in Use
Case/Description

Method/Action

Final State

Users able to register


as students

Go to login page and


enter the required details
to create an account
Sign in using the account
created above

The user registers as a Student.

Sign in and go to Modify My Profile


hyperlink and amend color and font
size field.
Logout and login back to see the
changes.
Sign in and go to Modify My Profile
hyperlink and amend first name, last
name, email address and password.
Logout and login back to see the
changes.

Students able to set background color


and font preferences

Users able to sign in


using email and
password
Users able to set
background color and
font preferences

Users able to modify


first name ,last name,
email address and
password

Students able to sign in using email and


password

Students able to modify first name ,last


name, email address and password

Students Test
Process in Use
Case/Description

Method/Action

Final State

Users able to take a


test

Sign in using the account created


above.
Go to the Select And Take A Test
hyperlink and choose a test to take.
Sign in using the account created
above.
Go to the Select And Take A Test
hyperlink and choose a test to take.

Students able to take a test

Students able to take tests many


times

Users able to view


their test history

Sign in using the account created


above. Go to the Select And Take A
Test hyperlink and choose a test to
take.
Sign in and go to View Test History
hyperlink to View your Test History

The Student can


request hints and tips
on specific questions

Sign in using the account created


above.
Go to the Select And Take A Test

The Student can request hints and


tips

Test questions are


generated randomly
from an
existing database
Users able to take
tests many times

Application generates random


questions for a test

Students able to view their test


history

51

during the test

hyperlink and choose a test to take.

Students Test History And Feedback


Process in Use
Case/Description

Method/Action

Final State

Students will be able


to review their own
history and
progress over time
Feedback by student
will be given at the
end of the test

Sign in and Take a test and then go


to View Test History hyperlink to
View your Test Score.

Students able to review their own


history

Sign in using the account created


above.
Go to the Feedback hyperlink and
give your feedback.

Students able to give Feedback

52

TEACHERS
General Administration For Administrators/Tutors
Process in Use
Case/Description

Method/Action

Final State

Tutors able to sign in


using email and
password

Sign in using the account


created above

Tutors able to sign in using email

Tutors able to set


background color and
font preferences

Sign in and go to Modify My Profile


hyperlink and amend color and font
size field.
Logout and login back to see the
changes.
Sign in and go to Modify My Profile
hyperlink and amend first name,
last name, email address and
password.
Logout and login back to see the
changes.
Sign in and go to View All Student
records hyperlink.
You can see Students fullname,
Email address, Profile settings, and
Registration date and user type.
Sign in and go to View All Student
records hyperlink.
Click the Modify hyperlink and
amend first name, last name, email
address, profile color, fonts and
password.
Logout and login back to see the
changes.

Tutors able to set background color


and font preferences

Tutors able to modify


first name ,last name,
email address and
password

Tutors able to View all


Student records in the
database

Tutors able to Modify


all Student records in
the database

Tutors able to modify first name


,last name, email address and
password

Tutors able to View all Student


records in the database

Tutors able to Modify all Student


records in the database

53

The Test From Administrators/Tutors


Process in Use
Case/Description

Method/Action

Final State

Tutors are able to


view and review
students history and
progress over time

Sign in and go to View All Student


Results hyperlink to View all
Students in the database
username, the name of the Test
taken, the Test date, the total
questions in the test, and the total
question the student got correct
together with the Student Score.
Sign in using the account created
above.
Go to Add Tests hyperlink.
Choose a name for the test.
Enter questions to add.
Choose type of test (multiple choice
or true/false).
Add questions
Save and Finalize test.

Tutors are able to view and review


students history

Tutors are able to


Modify a test

Sign in using the account created


above.
Go to the Modify A Test hyperlink
and choose a test to modify.

Tutors are able to Modify a test

Tutors are able to


View student
feedback.

Users have to sign into an external


website using a specified email
address using their username and
password to see student feedback.

Tutors are able to View student


feedback.

Tutors are able to


Create a test

Tutors are able to Create a test

54

Appendix C- Database Design

Appendix C- The Logical Design


ExaminationQuestionChoices (ExaminationId*, QuestionId*, ChoiceId, ChoiceTest, IsCorrect)
Examinations (ExaminationId, ExaminationName, CreateUesrId*, Timestamp)
ExaminationQuestions (ExaminationId*, QuestionId*, QuestionTypeCd*, SubjectCd*, QuestionText)
ExaminationQuestionTypes (QuestionTypeCd, QuestionTypeDesc)
ExaminationQuestionSubjects (SubjectCd, SubjectDesc)
Users (UserID, UserTypeCd*, Lastname, FirstName, Emailaddress*, Style, timestamp)
UserType (UserTypeCd, UserTypeDesc,)
UserSecurity (EmailAddress, Password)
UserExaminationSessions (SessionId, ExaminationUserId, ExaminationId*, QuestionId*, ChoiceId*,
Timestamp)

55

Appendix D- Low Fidelity Prototyping

56

57

58

59

Appendix E- Architectural Design

Three-Tier Architecture
A Three-Tier Architecture provides greater application scalability, lower maintenance, and
increased reuse of components. Three-tier architecture offers a neutral method of building
Client/Server applications with vendors who employ standard interfaces which provide services
for each logical tier. Apart from the well defined interface of modular software, the three-tier
architecture allows any of the three tiers to be upgraded or replaced independently because of
technology change.
A Three-Tier Architecture is a client-server architecture in which the user interfaces functional
process logic (business rules), data storage and data access are developed and maintained as
independent modules, most often on separate platforms. The three-tier model is considered to be
software architecture and a software design pattern.
The 3-Tier architecture has the following 3-tiers:
Presentation Tier
Application Tier/Logic Tier/Business Logic Tier
Data Tier

Three-tier Client/Server Architecture Diagram

60

First Tier / User Interface Tier: First-tier components are responsible for presentation and user
interaction. These client components enable the user to interact with the second-tier processes in a secure

and intuitive manner. Application Server supports several client types. Clients do not access the
third-tier services directly.
This tier manages the input/output data and their display. With the intention of offering greater
convenience to the user, the system is prototyped on the Internet. The users are allowed to access
the system by using any existing web browser software. The user interface tier contains
Asp.net,Vb.net,HTML components needed to collect incoming information and to display
information received from the application logic tiers. The Students/Users/Tutors communicate
with the web server via application protocols, such as HTTP and SSL, sending requests and
receiving replies. In our system, the major web-scripting language exploited in designing the
presentation layer is Asp.net, Vb.net, HTML, Cascading Style Sheets PHP, Java, JavaScript and
Java Server Pages (JSP).
Second Tier / Application Logic Tier: The second-tier commonly referred to as the application logic
layer, manages the business logic of the application and has access to the third-tier services. The
application logic layer is where most of the processing work occurs. Multiple client components can
access the second-tier processes simultaneously, so this application logic layer must manage its own
transactions.
The application logic tier is the middle tier, which bridges the gap between the user interfaces and the
underlying database, hiding technical details from the users. An SQL Application Server is deployed. Its
OC4J container embeds a web server, which responds to events, such as data receiving, translating,
dispatching and feed-backing jobs. Components in this tier receive requests coming from the interface tier
and interpret the requests into propose actions controlled by the defined work flow in accordance with
certain pre-defined rules.
Third Tier: Here information is stored and retrieved from a database or file system. The information is
then passed back to the application tier for processing, and then eventually back to the user. The third-tier
services are protected from direct access by the client components residing within a secure network.
Interaction must occur through the second-tier processes.
The database tier is responsible for modeling and storing information needed for the system and for
optimizing the data access. Data needed by the application logic layer are retrieved from the database, and
then the computation results produced by the application logic layer are stored back in the database. Since
data are one of the most complex aspects of many existing information systems, it is essential in
61

structuring the system. Both the facts and rules captured during data modeling and processing are
important to ensure the data integrity.

An Example

As an example of how this works, we created an Asp.net web page that allows the students to
take a test and to enter information which would then be stored into a database.
1. First Tier / User Interface Tier:

This layer will mainly consist of the user interface of the website i.e. the visible part of
the website. You create a web form, which allows the user to input the data into the web
form which is coded with Vb.net and Asp.net and HTML code. So when users are
entering their information in the form, the Vb.net script should make sure each field is
entered properly before sending the data to the database.
2. Second Tier / Application Logic Tier:

In the code behind web form, you handle the submit button click event, and send the data
from the form to your class, which sends the information to the database using the table
adapter that allows the data to be inserted into the table, either by a query or stored
procedure. This is basically the Vb.net script logic part of the website. It gets the data
from the 1st tier, does the logic and calls the data it needs from the 3rd tier. This layer
will have the business logic implementations and it transfers the data between the two
layers.
3. Third Tier:

This is your Data Access Layer. This is the part of application that has direct access to the
database. It has functions that access the Microsoft Access database correctly. You then
create a class, which retrieves the information from the form, checks for field validations
and then uses the table adapter to send the data to the database which then manages and
provides access to the data.

62

The Client tier:


The Client tier which is usually a web browser processes and displays Asp.net, HTML
resources, issues HTML requests and processes the responses. These web browsers are
HTTP clients that interact with the Web servers using standard protocols. The client is
often referred to as a thin client as very little application logic resides in the client tier. It
does have built in features to do more than just display html pages, but they too are
confined only to displaying data of various kinds. Some application logic in the form of
Vb.Net Script is executed by browsers, but its applications are limited in scope and
nature. The advantage of this 3 tier model means that the thin client does not have to be
configured and it does not have to depend on any operating platform or additional
software. While there are subtle differences between the capabilities of different
browsers, more or less they perform similarly.

63

The Middle Tier:


The Middle Tier consists most of the application logic. It brings together the other layers
of the 3 tier. It processes the inputs it receives from the clients and interacts with the
database. This consists of the web server, web scripting language and the scripting
language engine. While the Web server will process the HTTP requests and formulate
responses, the calculation is done by the scripting language which runs on the scripting
engine. The Web Server or the HTTP server listens for the HTTP requests on a network
and return the responses that contain the requested resources. In cases where the request
requires the output after running the program and interacting with the databases, the web
server invokes the scripting engine to perform those tasks. The scripts that are executed
by the scripting engine can be embedded into static Asp.Net and HTML pages making
client-tier integration easy. It allows for serving dynamic content and has built in libraries
for fast access to the database tier.
The Database tier:
The Database tier consists of the DBMS or the database management system and the
database. The complex application layer consists of the application logic and exchanges
data between the different layers. The top layer is usually a thin client or a browser.
The Bottom layer:
The Bottom layer or the database layer consists of the Database Management System or
the DBMS and the database itself. This database management layer manages the storage,
retrieval of data as well as allows simultaneous access, provides security, data integrity
and support applications. While a database is a collection of related data, a DBMS is a set
of components for defining, constructing and manipulating the database.
The DBMS consists of several components:a) Applications Interface or the libraries to communicate with the DBMS.
b) SQL Interpreter which is a parser to check the syntax of incoming statements and
translates them into the internal format.

64

c) Query Evaluator that generates different plans for evaluating a query by considering
database statistics and properties, selects one of these plans and translates it into low level
actions that are then executed.
d) Data Access: These are the modules that manage access to the data stored on disk,
including a transactions manager, a recovery manager, the main memory buffer manager,
data security manager and the file and access method manager.

65

Appendix F- Coding Design


Webconfig File
<?xml version="1.0"?>
<!-For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" strict="false" explicit="true"
targetFramework="4.0"/>
<customErrors mode="RemoteOnly"></customErrors>
</system.web>
<appSettings>
<add key="DB" value="~/db/OnlineExamination.mdb" />
</appSettings>
</configuration>

TestHistory.aspx

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TestHistory.aspx.vb"


Inherits="TestHistory" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Test History</title>
<link id="css" type="text/css" rel="Stylesheet" runat="server" />
</head>
<body>
<form id="form1" runat="server">
<div id="header">
<img src="header.png" alt="Rennet's Testing" />
</div>
<div id="idtag" runat="server"></div>
<div id="body">
<div id="displaytable" runat="server"></div>
</div>
</form>
</body>
</html>

66

TestHistory.aspx.vb
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="CreateTest.aspx.vb"
Inherits="CreateTest" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Create Test</title>
<link id="css" type="text/css" rel="Stylesheet" runat="server" />
</head>
<body>
<form id="form1" runat="server">
<div id="header">
<img src="header.png" alt="Rennet's Testing" />
</div>
<div id="idtag" runat="server"></div>
<div id="body">
<table class="grid">
<tr>
<td>Enter name of test:</td>
<td><asp:TextBox ID="txtexaminationname" runat="server"
Width="600"></asp:TextBox></td>
<td><asp:Label ID="lblmessage" runat="server"></asp:Label></td>
</tr>
</table>
<br />
<table class="grid">
<tr>
<td rowspan="5">Question</td>
<td colspan="2">Enter question text:</td>
<td colspan="8"><asp:TextBox ID="txtquestion_text" runat="server"
TextMode="MultiLine" Width="500"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2">Select question subject:</td>
<td colspan="4">
<asp:DropDownList ID="ddlsubjects" runat="server"></asp:DropDownList>
</td>
<td colspan="2">Select question type:</td>
<td colspan="2">
<asp:RadioButton ID="rbquestion_type_multi" runat="server"
GroupName="questiontype" />Multiple Choice
<br />
<asp:RadioButton ID="rbquestion_type_tf" runat="server"
GroupName="questiontype" />True/False
</td>
</tr>
<tr>
<td>A</td>
<td><asp:TextBox ID="txtquestion_choice1" TextMode="MultiLine"
runat="server"></asp:TextBox></td>

67

<td>B</td>
<td><asp:TextBox ID="txtquestion_choice2" TextMode="MultiLine"
runat="server"></asp:TextBox></td>
<td>C</td>
<td><asp:TextBox ID="txtquestion_choice3" TextMode="MultiLine"
runat="server"></asp:TextBox></td>
<td>D</td>
<td><asp:TextBox ID="txtquestion_choice4" TextMode="MultiLine"
runat="server"></asp:TextBox></td>
<td>E</td>
<td><asp:TextBox ID="txtquestion_choice5" TextMode="MultiLine"
runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><asp:RadioButton ID="rbquestioncorrect_choice1" runat="server"
GroupName="questioncorrectchoice" />Correct/True</td>
<td>&nbsp;</td>
<td><asp:RadioButton ID="rbquestioncorrect_choice2" runat="server"
GroupName="questioncorrectchoice" />Correct/False</td>
<td>&nbsp;</td>
<td><asp:RadioButton ID="rbquestioncorrect_choice3" runat="server"
GroupName="questioncorrectchoice" />Correct</td>
<td>&nbsp;</td>
<td><asp:RadioButton ID="rbquestioncorrect_choice4" runat="server"
GroupName="questioncorrectchoice" />Correct</td>
<td>&nbsp;</td>
<td><asp:RadioButton ID="rbquestioncorrect_choice5" runat="server"
GroupName="questioncorrectchoice" />Correct</td>
</tr>
<tr>
<td colspan="10">
<asp:Button ID="btnaddtolist" Text="Add Question" runat="server"
CssClass="buttons" />
&nbsp;
<asp:Button ID="btnsavetest" Text="Save &amp; Finalize Test"
runat="server" CssClass="buttons" />
</td>
</tr>
</table>
<br />
<div id="questionlistdisplaytable" runat="server"></div>
</div>
</form>
</body>
</html>

68

Take test.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TakeTest.aspx.vb"
Inherits="TakeTest" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Take Test</title>
<link id="css" type="text/css" rel="Stylesheet" runat="server" />
<style type="text/css">
#timer
{
font-family: 'Courier New';
font-weight: bold;
font-size: 22px;
}
</style>
<script type="text/javascript" language="javascript">
var secs;
var timerid = null;
var timerrunning = false;
var delay = 1000;
function initializetimer() {
secs = 20;
stoptheclock();
startthetimer();
}
function stoptheclock() {
if (timerrunning)
clearTimeout(timerid);
timerrunning = false;
}
function startthetimer() {
if (secs == 0) {
stoptheclock();
}
else {
self.status = secs;
secs = secs - 1;
timerrunning = true;
timerid = self.setTimeout("startthetimer()", delay);
}
document.getElementById("timer").innerHTML = "Time Remaining: " + secs + "
seconds";
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="header">

69

<img src="header.png" alt="Rennet's Testing" />


</div>
<div id="idtag" runat="server"></div>
<div id="body">
<div id="navigation">
<table>
<tr>
<td>
<asp:Button ID="btnfirst" Text="First" runat="server"
CssClass="buttons" />
</td>
<td>
<asp:Button ID="btnprevious" Text="Previous" runat="server"
CssClass="buttons" />
</td>
<td>
<asp:Button ID="btnnext" Text="Next" runat="server"
CssClass="buttons" />
</td>
<td>
<asp:Button ID="btnlast" Text="Last" runat="server"
CssClass="buttons" />
</td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>
<asp:Button ID="btnfinalize" Text="End Test" runat="server"
CssClass="buttons" />
</td>
</tr>
</table>
</div>
<div id="examinationheader" runat="server">
</div>
<table>
<tr>
<td colspan="2" style="vertical-align: top;">
<div id="timer"></div>
</td>
</tr>
<tr>
<td colspan="2" style="vertical-align: top; text-align: right;">
<div id="pageindex" runat="server"></div>
</td>
</tr>
<tr>
<td style="vertical-align: top;">
<div style="width: 300px; border: solid 1px #CCCCCC; padding: 5px;
font-size: 3.2em;
font-family: Georgia;" id="questionsection" runat="server">
</div>
</td>
<td style="vertical-align: top;">
<div style="width: 300px; border: solid 1px #CCCCCC; padding: 5px;"
id="answersection">
<table class="grid">
<tr>

70

<td>
<asp:RadioButton ID="rbquestionchoice1"
GroupName="questionchoices" runat="server" />
</td>
<td>
<div style="padding: 5px; font-size: 2em;
family: 'Courier New';" id="questionchoice1_text"
runat="server">
</div>
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="rbquestionchoice2"
GroupName="questionchoices" runat="server" />
</td>
<td>
<div style="padding: 5px; font-size: 2em;
family: 'Courier New';" id="questionchoice2_text"
runat="server">
</div>
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="rbquestionchoice3"
GroupName="questionchoices" runat="server" />
</td>
<td>
<div style="padding: 5px; font-size: 2em;
family: 'Courier New';" id="questionchoice3_text"
runat="server">
</div>
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="rbquestionchoice4"
GroupName="questionchoices" runat="server" />
</td>
<td>
<div style="padding: 5px; font-size: 2em;
family: 'Courier New';" id="questionchoice4_text"
runat="server">
</div>
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="rbquestionchoice5"
GroupName="questionchoices" runat="server" />
</td>
<td>
<div style="padding: 5px; font-size: 2em;
family: 'Courier New';" id="questionchoice5_text"
runat="server">

font-

font-

font-

font-

font-

71

</div>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
<script type="text/javascript" language="javascript">
window.onload = function () {
initializetimer();
}
</script>

Take test.aspx.vb
Imports System.Data
Imports System.Data.OleDb
Partial Class TakeTest
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
If Session("UserId") Is Nothing Then
Response.Redirect("Default.aspx")
End If
Me.css.Href = Session("Style")
Me.idtag.InnerHtml = String.Format("<a
href='RegisteredUsers.aspx'>Home</a>&nbsp;|&nbsp;Hello {0} ({1}), Logged in as
{2}.&nbsp;|&nbsp;<a href='ModifyUser.aspx'>Modify My Profile</a>&nbsp;|&nbsp;<a
href='Logout.aspx'>Logout</a>",
Session("FirstName"),
Session("EmailAddress"),
Session("UserTypeDesc"))
If String.IsNullOrEmpty(Request("sessionid")) Or
String.IsNullOrEmpty(Request("examinationid")) Then
Response.Redirect("SelectTest.aspx")
End If
Dim sessionid As String = Request("sessionid")
Dim examinationid As String = Request("examinationid")

72

Dim sessionexaminationquestionlist As List(Of Question) = Nothing


If Not IsPostBack Then
If Session("sessionexaminationquestionlist") Is Nothing Then
sessionexaminationquestionlist = New List(Of Question)()
Else
sessionexaminationquestionlist =
DirectCast(Session("sessionexaminationquestionlist"), List(Of Question))
End If
Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source={0}; User Id=admin; Password=;"
Dim connection As New OleDbConnection
connection.ConnectionString = String.Format(connectionstring,
Server.MapPath(ConfigurationManager.AppSettings("DB")))
connection.Open()
Dim sql As String
sql = "SELECT * FROM [ExaminationQuestions] WHERE ExaminationId='{0}'"
sql = String.Format(sql, examinationid)
Dim reader As OleDbDataReader
reader = New OleDbCommand(sql, connection).ExecuteReader()
While reader.Read()
Dim _question As New Question()
_question.ID = reader("QuestionId")
_question.Text = reader("QuestionText")
_question.Type = reader("QuestionTypeCd")
sql = "SELECT * FROM ExaminationQuestionChoices WHERE ExaminationId='{0}'
AND QuestionId='{1}'"
sql = String.Format(sql, examinationid, _question.ID)
Dim reader1 As OleDbDataReader
reader1 = New OleDbCommand(sql, connection).ExecuteReader()
While reader1.Read
Dim _choice As New Choice()
_choice.ID = reader1("ChoiceId")
_choice.Text = reader1("ChoiceText")
_question.Choices.Add(_choice)
End While
reader1.Close()
sessionexaminationquestionlist.Add(_question)
End While
reader.Close()
connection.Close()
Session("sessionexaminationquestionlist") = sessionexaminationquestionlist
End If

73

If String.IsNullOrEmpty(ViewState("currentquestionindex")) Then
ViewState("currentquestionindex") = 0
End If
If Not sessionexaminationquestionlist Is Nothing Then
If sessionexaminationquestionlist.Count > 0 Then
Me.questionsection.InnerHtml =
sessionexaminationquestionlist(Integer.Parse(ViewState("currentquestionindex"))).Text
Dim _question As Question =
sessionexaminationquestionlist(Integer.Parse(ViewState("currentquestionindex")))
If Not _question.Choices(0) Is Nothing Then
Me.rbquestionchoice1.Enabled = True
Me.questionchoice1_text.InnerHtml = _question.Choices(0).Text
End If
If Not _question.Choices(1) Is Nothing Then
Me.rbquestionchoice2.Enabled = True
Me.questionchoice2_text.InnerHtml = _question.Choices(1).Text
End If
If _question.Choices.Count > 2 Then
If Not _question.Choices(2) Is Nothing Then
Me.rbquestionchoice3.Enabled = True
Me.questionchoice3_text.InnerHtml = _question.Choices(2).Text
End If
If Not _question.Choices(3) Is Nothing Then
Me.rbquestionchoice4.Enabled = True
Me.questionchoice4_text.InnerHtml = _question.Choices(3).Text
End If
If Not _question.Choices(4) Is Nothing Then
Me.rbquestionchoice5.Enabled = True
Me.questionchoice5_text.InnerHtml = _question.Choices(4).Text
End If
End If
End If
End If
Me.SetPageIndex()
End Sub
Protected Sub btnfirst_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles btnfirst.Click
Me.SaveResponses()
Me.ClearChoices()
If Not Session("sessionexaminationquestionlist") Is Nothing Then
Dim sessionexaminationquestionlist As List(Of Question) = Nothing
sessionexaminationquestionlist =
DirectCast(Session("sessionexaminationquestionlist"), List(Of Question))
ViewState("currentquestionindex") = 0
Me.SetPageIndex()
Me.questionsection.InnerHtml =
sessionexaminationquestionlist(Integer.Parse(ViewState("currentquestionindex"))).Text
Dim _question As Question =
sessionexaminationquestionlist(Integer.Parse(ViewState("currentquestionindex")))
If Not _question.Choices(0) Is Nothing Then
Me.rbquestionchoice1.Enabled = True

74

Me.questionchoice1_text.InnerHtml = _question.Choices(0).Text
End If
If Not _question.Choices(1) Is Nothing Then
Me.rbquestionchoice2.Enabled = True
Me.questionchoice2_text.InnerHtml = _question.Choices(1).Text
End If
If _question.Choices.Count > 2 Then
If Not _question.Choices(2) Is Nothing Then
Me.rbquestionchoice3.Enabled = True
Me.questionchoice3_text.InnerHtml = _question.Choices(2).Text
End If
If Not _question.Choices(3) Is Nothing Then
Me.rbquestionchoice4.Enabled = True
Me.questionchoice4_text.InnerHtml = _question.Choices(3).Text
End If
If Not _question.Choices(4) Is Nothing Then
Me.rbquestionchoice5.Enabled = True
Me.questionchoice5_text.InnerHtml = _question.Choices(4).Text
End If
End If
Me.SyncChoices(_question)
End If
End Sub
Protected Sub btnprevious_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles btnprevious.Click
Me.SaveResponses()
Me.ClearChoices()
If Not Session("sessionexaminationquestionlist") Is Nothing Then
Dim sessionexaminationquestionlist As List(Of Question) = Nothing
sessionexaminationquestionlist =
DirectCast(Session("sessionexaminationquestionlist"), List(Of Question))
Dim currentindex As Integer =
Integer.Parse(ViewState("currentquestionindex"))
If currentindex > 0 Then
ViewState("currentquestionindex") = currentindex - 1
End If
Me.SetPageIndex()
Me.questionsection.InnerHtml =
sessionexaminationquestionlist(Integer.Parse(ViewState("currentquestionindex"))).Text
Dim _question As Question =
sessionexaminationquestionlist(Integer.Parse(ViewState("currentquestionindex")))
If Not _question.Choices(0) Is Nothing Then
Me.rbquestionchoice1.Enabled = True
Me.questionchoice1_text.InnerHtml = _question.Choices(0).Text
End If
If Not _question.Choices(1) Is Nothing Then
Me.rbquestionchoice2.Enabled = True
Me.questionchoice2_text.InnerHtml = _question.Choices(1).Text
End If
If _question.Choices.Count > 2 Then
If Not _question.Choices(2) Is Nothing Then
Me.rbquestionchoice3.Enabled = True
Me.questionchoice3_text.InnerHtml = _question.Choices(2).Text

75

End If
If Not _question.Choices(3) Is Nothing Then
Me.rbquestionchoice4.Enabled = True
Me.questionchoice4_text.InnerHtml = _question.Choices(3).Text
End If
If Not _question.Choices(4) Is Nothing Then
Me.rbquestionchoice5.Enabled = True
Me.questionchoice5_text.InnerHtml = _question.Choices(4).Text
End If
End If
Me.SyncChoices(_question)
End If
End Sub
Protected Sub btnnext_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles btnnext.Click
Me.SaveResponses()
Me.ClearChoices()
If Not Session("sessionexaminationquestionlist") Is Nothing Then
Dim sessionexaminationquestionlist As List(Of Question) = Nothing
sessionexaminationquestionlist =
DirectCast(Session("sessionexaminationquestionlist"), List(Of Question))
Dim currentindex As Integer =
Integer.Parse(ViewState("currentquestionindex"))
If currentindex < sessionexaminationquestionlist.Count - 1 Then
ViewState("currentquestionindex") = currentindex + 1
End If
Me.SetPageIndex()
Me.questionsection.InnerHtml =
sessionexaminationquestionlist(Integer.Parse(ViewState("currentquestionindex"))).Text
Dim _question As Question =
sessionexaminationquestionlist(Integer.Parse(ViewState("currentquestionindex")))
If Not _question.Choices(0) Is Nothing Then
Me.rbquestionchoice1.Enabled = True
Me.questionchoice1_text.InnerHtml = _question.Choices(0).Text
End If
If Not _question.Choices(1) Is Nothing Then
Me.rbquestionchoice2.Enabled = True
Me.questionchoice2_text.InnerHtml = _question.Choices(1).Text
End If
If _question.Choices.Count > 2 Then
If Not _question.Choices(2) Is Nothing Then
Me.rbquestionchoice3.Enabled = True
Me.questionchoice3_text.InnerHtml = _question.Choices(2).Text
End If
If Not _question.Choices(3) Is Nothing Then
Me.rbquestionchoice4.Enabled = True
Me.questionchoice4_text.InnerHtml = _question.Choices(3).Text
End If
If Not _question.Choices(4) Is Nothing Then
Me.rbquestionchoice5.Enabled = True
Me.questionchoice5_text.InnerHtml = _question.Choices(4).Text
End If
End If
Me.SyncChoices(_question)

76

End If
End Sub
Protected Sub btnlast_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles btnlast.Click
Me.SaveResponses()
Me.ClearChoices()
If Not Session("sessionexaminationquestionlist") Is Nothing Then
Dim sessionexaminationquestionlist As List(Of Question) = Nothing
sessionexaminationquestionlist =
DirectCast(Session("sessionexaminationquestionlist"), List(Of Question))
ViewState("currentquestionindex") = sessionexaminationquestionlist.Count - 1
Me.SetPageIndex()
Me.questionsection.InnerHtml =
sessionexaminationquestionlist(Integer.Parse(ViewState("currentquestionindex"))).Text
Dim _question As Question =
sessionexaminationquestionlist(Integer.Parse(ViewState("currentquestionindex")))
If Not _question.Choices(0) Is Nothing Then
Me.rbquestionchoice1.Enabled = True
Me.questionchoice1_text.InnerHtml = _question.Choices(0).Text
End If
If Not _question.Choices(1) Is Nothing Then
Me.rbquestionchoice2.Enabled = True
Me.questionchoice2_text.InnerHtml = _question.Choices(1).Text
End If
If _question.Choices.Count > 2 Then
If Not _question.Choices(2) Is Nothing Then
Me.rbquestionchoice3.Enabled = True
Me.questionchoice3_text.InnerHtml = _question.Choices(2).Text
End If
If Not _question.Choices(3) Is Nothing Then
Me.rbquestionchoice4.Enabled = True
Me.questionchoice4_text.InnerHtml = _question.Choices(3).Text
End If
If Not _question.Choices(4) Is Nothing Then
Me.rbquestionchoice5.Enabled = True
Me.questionchoice5_text.InnerHtml = _question.Choices(4).Text
End If
End If
Me.SyncChoices(_question)
End If
End Sub
Private Sub SyncChoices(ByVal _question As Question)
Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source={0}; User Id=admin; Password=;"
Dim connection As New OleDbConnection
connection.ConnectionString = String.Format(connectionstring,
Server.MapPath(ConfigurationManager.AppSettings("DB")))
connection.Open()
Dim sql As String
sql = "SELECT ChoiceId FROM [UserExaminationSessions] WHERE SessionId='{0}' AND
ExamineeUserId='{1}' AND ExaminationId='{2}' AND QuestionId='{3}'"
sql = String.Format(sql,
Request("sessionid"),

77

Session("UserId"),
Request("examinationid"),
_question.ID)
Dim obj As Object = New OleDbCommand(sql, connection).ExecuteScalar()
If obj Is DBNull.Value Or IsNothing(obj) Then
Me.rbquestionchoice1.Checked = True
Else
Dim choice As String = DirectCast(obj, String)
If choice.Trim().Equals("1") Or choice.Trim().Equals("T") Then
rbquestionchoice1.Checked = True
End If
If choice.Trim().Equals("2") Or choice.Trim().Equals("F") Then
rbquestionchoice2.Checked = True
End If
If choice.Trim().Equals("3") Then rbquestionchoice3.Checked = True
If choice.Trim().Equals("4") Then rbquestionchoice4.Checked = True
If choice.Trim().Equals("4") Then rbquestionchoice5.Checked = True
End If
connection.Close()
End Sub
Private Sub SaveResponses()
If Session("sessionexaminationquestionlist") Is Nothing Then
Exit Sub
End If
Dim sessionexaminationquestionlist As List(Of Question) = Nothing
sessionexaminationquestionlist =
DirectCast(Session("sessionexaminationquestionlist"), List(Of Question))
Dim currentindex = Integer.Parse(ViewState("currentquestionindex"))
Dim _question As Question =
sessionexaminationquestionlist(Integer.Parse(ViewState("currentquestionindex")))
Dim choice As String = "1"
If Me.rbquestionchoice1.Checked Then
choice = IIf(_question.Type.Equals("MULTI"), "1", "T")
End If
If Me.rbquestionchoice2.Checked Then
choice = IIf(_question.Type.Equals("MULTI"), "2", "F")
End If
If Me.rbquestionchoice3.Checked Then
choice = "3"
End If
If Me.rbquestionchoice4.Checked Then
choice = "4"
End If
If Me.rbquestionchoice5.Checked Then
choice = "5"
End If
Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source={0}; User Id=admin; Password=;"
Dim connection As New OleDbConnection

78

connection.ConnectionString = String.Format(connectionstring,
Server.MapPath(ConfigurationManager.AppSettings("DB")))
connection.Open()
Dim sql As String
sql = "SELECT COUNT(ChoiceId) AS ChoiceCount FROM [UserExaminationSessions] WHERE
SessionId='{0}' AND ExamineeUserId='{1}' AND ExaminationId='{2}' AND QuestionId='{3}'"
sql = String.Format(sql,
Request("sessionid"),
Session("UserId"),
Request("examinationid"),
_question.ID)
Dim obj As Object = New OleDbCommand(sql, connection).ExecuteScalar()
If obj Is DBNull.Value Or CInt(obj) = 0 Then
sql = "INSERT INTO [UserExaminationSessions](SessionId, ExamineeUserId,
ExaminationId, QuestionId, ChoiceId, [Timestamp]) VALUES
('{0}','{1}','{2}','{3}','{4}',Now())"
sql = String.Format(sql,
Request("sessionid"),
Session("UserId"),
Request("examinationid"),
_question.ID,
choice)
Dim command As New OleDbCommand(sql, connection)
command.ExecuteNonQuery()
Else
sql = "UPDATE [UserExaminationSessions] SET ChoiceId='{4}', [Timestamp]=Now()
WHERE SessionId='{0}' AND ExamineeUserId='{1}' AND ExaminationId='{2}' AND
QuestionId='{3}'"
sql = String.Format(sql,
Request("sessionid"),
Session("UserId"),
Request("examinationid"),
_question.ID,
choice)
Dim command As New OleDbCommand(sql, connection)
command.ExecuteNonQuery()
End If
connection.Close()
End Sub
Private Sub ClearChoices()
Me.rbquestionchoice1.Enabled = True
Me.questionchoice1_text.InnerHtml =
Me.rbquestionchoice2.Enabled = True
Me.questionchoice2_text.InnerHtml =
Me.rbquestionchoice3.Enabled = True
Me.questionchoice3_text.InnerHtml =
Me.rbquestionchoice4.Enabled = True
Me.questionchoice4_text.InnerHtml =
Me.rbquestionchoice5.Enabled = True
Me.questionchoice5_text.InnerHtml =
End Sub

"&nbsp;"
"&nbsp;"
"&nbsp;"
"&nbsp;"
"&nbsp;"

79

Private Sub SetPageIndex()


Dim sessionexaminationquestionlist As List(Of Question) = Nothing
sessionexaminationquestionlist =
DirectCast(Session("sessionexaminationquestionlist"), List(Of Question))
Dim currentindex = Integer.Parse(ViewState("currentquestionindex"))
currentindex = currentindex + 1
Me.pageindex.InnerHtml = String.Format("Question {0} of {1}", currentindex,
sessionexaminationquestionlist.Count)
End Sub
Protected Sub btnfinalize_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles btnfinalize.Click
btnlast_Click(sender, e)
Me.SaveResponses()
Response.Redirect("RegisteredUsers.aspx")
End Sub
End Class

80

Student Results.aspx

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="StudentResults.aspx.vb"


Inherits="StudentResults" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Student Results</title>
<link id="css" type="text/css" rel="Stylesheet" runat="server" />
</head>
<body>
<form id="form1" runat="server">
<div id="header">
<img src="header.png" alt="Rennet's Testing" />
</div>
<div id="idtag" runat="server"></div>
<div id="body">
<div id="displaytable" runat="server"></div>
</div>
</form>
</body>
</html>

Student Results.aspx.vb

Imports System.Data
Imports System.Data.OleDb
Partial Class StudentResults
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
If Session("UserId") Is Nothing Then
Response.Redirect("Default.aspx")
End If
If Not Session("UserTypeCd").Equals("TUT") Then
Response.Redirect("RegisteredUsers.aspx")

81

End If
Me.css.Href = Session("Style")
Me.idtag.InnerHtml = String.Format("<a
href='RegisteredUsers.aspx'>Home</a>&nbsp;|&nbsp;Hello {0} ({1}), Logged in as
{2}.&nbsp;|&nbsp;<a href='ModifyUser.aspx'>Modify My Profile</a>&nbsp;|&nbsp;<a
href='Logout.aspx'>Logout</a>",
Session("FirstName"),
Session("EmailAddress"),
Session("UserTypeDesc"))
Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source={0}; User Id=admin; Password=;"
Dim connection As New OleDbConnection
connection.ConnectionString = String.Format(connectionstring,
Server.MapPath(ConfigurationManager.AppSettings("DB")))
connection.Open()
Dim sql As String
sql = "SELECT DISTINCT SessionId, ExamineeUserId, ExaminationId,
MIN(Format(CDate([UserExaminationSessions.Timestamp]), ""yyyy/mm/dd HH:mm"")) AS TestDate
"
sql &= "FROM UserExaminationSessions "
sql &= "GROUP BY SessionId, ExamineeUserId, ExaminationId "
sql &= "ORDER BY 4, 2 "
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml

= "<table class='grid'>"
&= "<tr>"
&= String.Format("<th>{0}</th>",
&= String.Format("<th>{0}</th>",
&= String.Format("<th>{0}</th>",
&= String.Format("<th>{0}</th>",
&= String.Format("<th>{0}</th>",
&= String.Format("<th>{0}</th>",
&= "</tr>"

"User Name")
"Test Name")
"Test Date")
"Total Questions")
"Total Correct")
"Score")

Dim reader As OleDbDataReader


reader = New OleDbCommand(sql, connection).ExecuteReader()
While reader.Read
Me.displaytable.InnerHtml &= "<tr>"
sql = "SELECT * FROM [Users] WHERE UserId='{0}'"
sql = String.Format(sql, reader("ExamineeUserId"))
Dim reader1 As OleDbDataReader
reader1 = New OleDbCommand(sql, connection).ExecuteReader()
While reader1.Read
Me.displaytable.InnerHtml &= String.Format("<td>{0}&nbsp;{1}</td>",
reader1("FirstName"), reader1("LastName"))
End While
reader1.Close()
sql = "SELECT ExaminationName FROM Examinations WHERE ExaminationId='{0}'"
sql = String.Format(sql, reader("ExaminationId"))
reader1 = New OleDbCommand(sql, connection).ExecuteReader()

82

While reader1.Read
Me.displaytable.InnerHtml &= String.Format("<td>{0}</td>",
reader1("ExaminationName"))
End While
reader1.Close()
Me.displaytable.InnerHtml &= String.Format("<td>{0}</td>",
reader("TestDate"))
sql = "SELECT COUNT(QuestionId) AS QuestionCount FROM ExaminationQuestions
WHERE ExaminationId='{0}'"
sql = String.Format(sql, reader("ExaminationId"))
reader1 = New OleDbCommand(sql, connection).ExecuteReader()
While reader1.Read
Me.displaytable.InnerHtml &= String.Format("<td>{0}</td>",
reader1("QuestionCount"))
End While
reader1.Close()
Dim _correctchoices As New List(Of Choice)()
sql = "SELECT QuestionId, ChoiceId FROM ExaminationQuestionChoices WHERE
ExaminationId='{0}' AND IsCorrect='Y'"
sql = String.Format(sql, reader("ExaminationId"))
reader1 = New OleDbCommand(sql, connection).ExecuteReader()
While reader1.Read
Dim _choice As New Choice()
_choice.Text = reader1("QuestionId")
_choice.ID = reader1("ChoiceId")
_correctchoices.Add(_choice)
End While
reader1.Close()
Dim _userchoices As New List(Of Choice)()
sql = "SELECT QuestionId, ChoiceId FROM UserExaminationSessions "
sql &= "WHERE SessionId='{0}' AND ExaminationId='{1}' AND
ExamineeUserId='{2}' "
sql = String.Format(sql,
reader("SessionId"),
reader("ExaminationId"),
reader("ExamineeUserId"))
reader1 = New OleDbCommand(sql, connection).ExecuteReader()
While reader1.Read
Dim _choice As New Choice()
_choice.Text = reader1("QuestionId")
_choice.ID = reader1("ChoiceId")
_userchoices.Add(_choice)
End While
reader1.Close()
Dim correct As Integer = 0
For Each uc As Choice In _userchoices
For Each cc As Choice In _correctchoices
If cc.Text.Equals(uc.Text) And cc.ID.Equals(uc.ID) Then
correct = correct + 1
Exit For
End If

83

Next

Next

Me.displaytable.InnerHtml &= String.Format("<td>{0}</td>", correct)


Dim score As Double = CDbl(correct) / CDbl(_correctchoices.Count)
Me.displaytable.InnerHtml &= String.Format("<td>{0}</td>",
score.ToString("p"))
Me.displaytable.InnerHtml &= "</tr>"
End While
reader.Close()
If Me.displaytable.InnerHtml.IndexOf("<td>") < 0 Then
Me.displaytable.InnerHtml = "There are no examinations on file."
Else
Me.displaytable.InnerHtml &= "</table>"
End If
connection.Close()
End Sub
End Class

84

Students Records.aspx

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="StudentRecords.aspx.vb"


Inherits="StudentRecords" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Student Records</title>
<link id="css" type="text/css" rel="Stylesheet" runat="server" />
</head>
<body>
<form id="form1" runat="server">
<div id="header">
<img src="header.png" alt="Rennet's Testing" />
</div>
<div id="idtag" runat="server"></div>
<div id="body">
<div id="displaytable" runat="server"></div>
</div>
</form>
</body>
</html>

Students Records.aspx.vb
Imports System.Data
Imports System.Data.OleDb
Partial Class StudentRecords
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
If Session("UserId") Is Nothing Then
Response.Redirect("Default.aspx")
End If
If Not Session("UserTypeCd").Equals("TUT") Then
Response.Redirect("RegisteredUsers.aspx")
End If
Me.css.Href = Session("Style")
Me.idtag.InnerHtml = String.Format("<a
href='RegisteredUsers.aspx'>Home</a>&nbsp;|&nbsp;Hello {0} ({1}), Logged in as

85

{2}.&nbsp;|&nbsp;<a href='ModifyUser.aspx'>Modify My Profile</a>&nbsp;|&nbsp;<a


href='Logout.aspx'>Logout</a>",
Session("FirstName"),
Session("EmailAddress"),
Session("UserTypeDesc"))
Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source={0}; User Id=admin; Password=;"
Dim connection As New OleDbConnection
connection.ConnectionString = String.Format(connectionstring,
Server.MapPath(ConfigurationManager.AppSettings("DB")))
connection.Open()
Dim sql As String = "SELECT Users.LastName, Users.FirstName, Users.EmailAddress,
Users.Style, UserTypes.UserTypeDesc, Format(CDate([Users.Timestamp]), ""yyyy/mm/dd
HH:mm"") AS RegistrationDate, [Users].[UserId] "
sql &= "FROM UserTypes INNER JOIN Users ON UserTypes.UserTypeCd =
Users.UserTypeCd WHERE Users.UserTypeCd='USR' ORDER BY 1, 2"
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml

= "<table class='grid'>"
&= "<tr>"
&= String.Format("<th>{0}</th>",
&= String.Format("<th>{0}</th>",
&= String.Format("<th>{0}</th>",
&= String.Format("<th>{0}</th>",
&= String.Format("<th>{0}</th>",
&= String.Format("<th>{0}</th>",
&= "</tr>"

"Modify")
"Full Name")
"Email Address")
"Profile Color Style")
"Registered As")
"Registration Date")

Dim reader As OleDbDataReader


reader = New OleDbCommand(sql, connection).ExecuteReader()
While reader.Read
Me.displaytable.InnerHtml &= "<tr>"
Me.displaytable.InnerHtml &= String.Format("<td><a
href=ModifyUser.aspx?userid={0}>Modify</a></td>", reader("UserId"))
Me.displaytable.InnerHtml &= String.Format("<td>{0}&nbsp;{1}</td>",
reader("FirstName"), reader("LastName"))
Me.displaytable.InnerHtml &= String.Format("<td>{0}</td>",
reader("EmailAddress"))
Me.displaytable.InnerHtml &= String.Format("<td>{0}</td>", reader("Style"))
Me.displaytable.InnerHtml &= String.Format("<td>{0}</td>",
reader("UserTypeDesc"))
Me.displaytable.InnerHtml &= String.Format("<td>{0}</td>",
reader("RegistrationDate"))
Me.displaytable.InnerHtml &= "</tr>"
End While
reader.Close()
Me.displaytable.InnerHtml &= "</table>"
connection.Close()
End Sub
End Class

86

SelectTest.aspx

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="SelectTest.aspx.vb"


Inherits="SelectTest" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Select Test</title>
<link id="css" type="text/css" rel="Stylesheet" runat="server" />
</head>
<body>
<form id="form1" runat="server">
<div id="header">
<img src="header.png" alt="Rennet's Testing" />
</div>
<div id="idtag" runat="server"></div>
<div id="body">
<div id="displaytable" runat="server"></div>
</div>
</form>
</body>
</html>

SelectTest.aspx.vb
Imports System.Data
Imports System.Data.OleDb
Partial Class SelectTest
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
If Session("UserId") Is Nothing Then
Response.Redirect("Default.aspx")
End If
Me.css.Href = Session("Style")
Me.idtag.InnerHtml = String.Format("<a
href='RegisteredUsers.aspx'>Home</a>&nbsp;|&nbsp;Hello {0} ({1}), Logged in as
{2}.&nbsp;|&nbsp;<a href='ModifyUser.aspx'>Modify My Profile</a>&nbsp;|&nbsp;<a
href='Logout.aspx'>Logout</a>",
Session("FirstName"),

87

Session("EmailAddress"),
Session("UserTypeDesc"))
Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source={0}; User Id=admin; Password=;"
Dim connection As New OleDbConnection
connection.ConnectionString = String.Format(connectionstring,
Server.MapPath(ConfigurationManager.AppSettings("DB")))
connection.Open()
Dim manage As String = Request("manage")
Dim sql As String = "SELECT Examinations.ExaminationId,
Examinations.ExaminationName, Examinations.CreateUserId, Examinations.Timestamp,
[Users].LastName, [Users].FirstName, Format(CDate([Examinations.Timestamp]), ""yyyy/mm/dd
HH:mm"") AS [FormattedDate], COUNT(ExaminationQuestions.QuestionId) AS [QuestionCount] "
sql &= "FROM Examinations, [Users], ExaminationQuestions "
sql &= "WHERE Examinations.CreateUserId = [Users].UserId And
Examinations.ExaminationId = ExaminationQuestions.ExaminationId "
sql &= "GROUP BY Examinations.ExaminationId, Examinations.ExaminationName,
Examinations.CreateUserId, Examinations.Timestamp, [Users].LastName, [Users].FirstName,
Format(CDate([Examinations.Timestamp]), ""yyyy/mm/dd HH:mm"") "
sql &= "ORDER BY Format(CDate([Examinations.Timestamp]), ""yyyy/mm/dd HH:mm"")
DESC"
Dim reader As OleDbDataReader
reader = New OleDbCommand(sql, connection).ExecuteReader()
Dim b As Boolean = reader.Read
reader.Close()
If b Then

Questions")

Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml
Me.displaytable.InnerHtml

= "<table class='grid'>"
&= "<tr>"
&= String.Format("<th>{0}</th>",
&= String.Format("<th>{0}</th>",
&= String.Format("<th>{0}</th>",
&= String.Format("<th>{0}</th>",
&= String.Format("<th>{0}</th>",

"Take")
"Examination")
"Tutor")
"Created")
"No. of

Me.displaytable.InnerHtml &= "</tr>"


reader = New OleDbCommand(sql, connection).ExecuteReader()
While reader.Read

Me.displaytable.InnerHtml &= "<tr>"


Me.displaytable.InnerHtml &= String.Format("<td><a
href=TakeTest.aspx?sessionid={0}&examinationid={1}>Take</a></td>",
Guid.NewGuid().ToString(),
reader("ExaminationId"))
Me.displaytable.InnerHtml &= String.Format("<td>{0}</td>",
reader("ExaminationName"))
Me.displaytable.InnerHtml &= String.Format("<td>{0}&nbsp;{1}</td>",
reader("FirstName"), reader("LastName"))
Me.displaytable.InnerHtml &= String.Format("<td>{0}</td>",
reader("FormattedDate"))

88

Me.displaytable.InnerHtml &= String.Format("<td>{0}</td>",


reader("QuestionCount"))
Me.displaytable.InnerHtml &= "</tr>"
End While
reader.Close()
Me.displaytable.InnerHtml &= "</table>"
End If
connection.Close()
End Sub
End Class

89

Registeredusers.aspx

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="RegisteredUsers.aspx.vb"


Inherits="RegisteredUsers" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Registered Users</title>
<link id="css" type="text/css" rel="Stylesheet" runat="server" />
</head>
<body>
<form id="form1" runat="server">
<div id="header">
<img src="header.png" alt="Rennet's Testing" />
</div>
<div id="idtag" runat="server"></div>
<div id="body">
<div id="selections" runat="server"></div>
</div>
</form>
</body>
</html>

Registeredusers.aspx.vb
Partial Class RegisteredUsers
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
If Session("UserId") Is Nothing Then
Response.Redirect("Default.aspx")
End If
Me.css.Href = Session("Style")
Me.idtag.InnerHtml = String.Format("<a
href='RegisteredUsers.aspx'>Home</a>&nbsp;|&nbsp;Hello {0} ({1}), Logged in as
{2}.&nbsp;|&nbsp;<a href='ModifyUser.aspx'>Modify My Profile</a>&nbsp;|&nbsp;<a
href='Logout.aspx'>Logout</a>",
Session("FirstName"),

90

Session("EmailAddress"),
Session("UserTypeDesc"))
If Session("UserTypeCd").Equals("TUT") Then
Me.selections.InnerHtml
Me.selections.InnerHtml
Student Records</a></li>"
Me.selections.InnerHtml
Student Results</a></li>"
Me.selections.InnerHtml
Me.selections.InnerHtml
Tests</a></li>"
Me.selections.InnerHtml

= "<ul>"
&= "<li><a href='StudentRecords.aspx'>View all
&= "<li><a href='StudentResults.aspx'>View all
&= "<li><a href='CreateTest.aspx'>Add Tests</a></li>"
&= "<li><a href='ManageTests.aspx'>Manage
&= "</ul>"

Else
Me.selections.InnerHtml
Me.selections.InnerHtml
Test</a></li>"
Me.selections.InnerHtml
History</a></li>"
Me.selections.InnerHtml
Profile</a></li>"
Me.selections.InnerHtml
End If

= "<ul>"
&= "<li><a href='SelectTest.aspx'>Select and Take a
&= "<li><a href='TestHistory.aspx'>View Test
&= "<li><a href='ModifyUser.aspx'>Modify My
&= "</ul>"

End Sub
End Class

91

Register.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Register.aspx.vb"
Inherits="Register" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Register</title>
<link id="css" type="text/css" rel="Stylesheet" runat="server" />
</head>
<body>
<form id="form1" runat="server">
<div id="header">
<img src="header.png" alt="Rennet's Testing" />
</div>
<div id="body">
<table>
<tr>
<th colspan="2" style="text-align: left; border-bottom: solid 1px
#000000;">General</th>
</tr>
<tr>
<td>Please enter your last name:</td>
<td><asp:TextBox ID="txtlastname" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Please enter your first name:</td>
<td><asp:TextBox ID="txtfirstname" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Please enter your email address:</td>
<td><asp:TextBox ID="txtemailaddress" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2">
<table>
<tr>
<td colspan="2" style="background-image:
url('ribbon794760625.gif'); width: 150px;">&nbsp;</td>
<td colspan="2" style="background-image:
url('ribbon1041435991.gif'); width: 150px;">&nbsp;</td>
<td colspan="2" style="background-image:
url('ribbon262954110.gif'); width: 150px;">&nbsp;</td>
</tr>
<tr>
<td><asp:RadioButton ID="rbblacktyle" GroupName="Style"
runat="server" /></td>
<td>Black background with Tahoma font.</td>
<td><asp:RadioButton ID="rbgreenstyle" GroupName="Style"
runat="server" /></td>
<td>Green background with Trebuchet MS font.</td>

92

runat="server" /></td>

<td><asp:RadioButton ID="rbbluestyle" GroupName="Style"

<td>Blue background with Verdana font.</td>


</tr>
</table>
</td>
</tr>
<tr>
<th colspan="2" style="text-align: left; border-bottom: solid 1px
#000000;"">Security</th>
</tr>
<tr>
<td>Enter your password:</td>
<td><asp:TextBox ID="txtpassword" TextMode="Password"
runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Re-Enter your password:</td>
<td><asp:TextBox ID="txtpasswordconfirm" TextMode="Password"
runat="server"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2" style="border-top: solid 1px #000000;">
<asp:Button ID="btnsubmit" Text="Register" runat="server"
CssClass="buttons" />
&nbsp;
<asp:Button ID="btncancel" Text="Cancel" runat="server"
CssClass="buttons" />
</td>
</tr>
<tr>
<td colspan="2">
<asp:Label ID="lblmessage" runat="server"></asp:Label>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>

Register.aspx.vb
Imports System.Data
Imports System.Data.OleDb
Partial Class Register
Inherits System.Web.UI.Page

93

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
Me.css.Href = "~/Styles/DefaultStyleSheet.css"
If Not IsPostBack Then
Me.rbblacktyle.Checked = True
End If
End Sub
Protected Sub btnsubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles btnsubmit.Click
If String.IsNullOrEmpty(Me.txtlastname.Text.Trim()) Then
Me.lblmessage.Text = "<div class='error'>Last name is required.</div>"
Exit Sub
End If
If String.IsNullOrEmpty(Me.txtfirstname.Text.Trim()) Then
Me.lblmessage.Text = "<div class='error'>First name is required.</div>"
Exit Sub
End If
If String.IsNullOrEmpty(Me.txtemailaddress.Text.Trim()) Then
Me.lblmessage.Text = "<div class='error'>Email address is required.</div>"
Exit Sub
End If
If String.IsNullOrEmpty(Me.txtpassword.Text.Trim()) Then
Me.lblmessage.Text = "<div class='error'>Password is required.</div>"
Exit Sub
End If
If Not Me.txtpassword.Text.Trim().Equals(Me.txtpasswordconfirm.Text.Trim()) Then
Me.lblmessage.Text = "<div class='error'>Passwords do not match.</div>"
Exit Sub
End If
Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source={0}; User Id=admin; Password=;"
Dim connection As New OleDbConnection
connection.ConnectionString = String.Format(connectionstring,
Server.MapPath(ConfigurationManager.AppSettings("DB")))
connection.Open()
Dim sql As String
Dim style As String
style = "~/Styles/DefaultStyleSheet.css"
If rbblacktyle.Checked Then
style = "~/Styles/BlackStyleSheet.css"
ElseIf rbbluestyle.Checked Then
style = "~/Styles/BlueStyleSheet.css"
ElseIf rbgreenstyle.Checked Then
style = "~/Styles/GreenStyleSheet.css"
End If

94

Dim emailinuse As Boolean = False


sql = "SELECT * FROM [Users] WHERE [EmailAddress]='{0}'"
sql = String.Format(sql, Me.txtemailaddress.Text)
Dim reader As OleDbDataReader
reader = New OleDbCommand(sql, connection).ExecuteReader()
emailinuse = reader.Read
reader.Close()
If emailinuse = True Then
Me.lblmessage.Text = "<div class='error'>The email address " &
Me.txtemailaddress.Text.Trim() & " is in use. Please try another email address.</div>"
Else

sql = "INSERT INTO [Users]


([UserId],[UserTypeCd],[LastName],[FirstName],[EmailAddress],[Style], [Timestamp]) VALUES
('{0}','USR','{1}','{2}','{3}', '{4}', Now())"
sql = String.Format(sql, Guid.NewGuid.ToString(),
Me.txtlastname.Text.Trim(),
Me.txtfirstname.Text.Trim(),
Me.txtemailaddress.Text.Trim(),
style)
Dim command As New OleDbCommand(sql, connection)
command.ExecuteNonQuery()
'{1}')"

sql = "INSERT INTO [UserSecurity] ([EmailAddress], [Password]) VALUES ('{0}',


sql = String.Format(sql, Me.txtemailaddress.Text.Trim(),
Me.txtpassword.Text.Trim())
command = New OleDbCommand(sql, connection)
command.ExecuteNonQuery()

Me.lblmessage.Text = "<div class='notify'>Your registration is complete.


Please <a href=RegisteredUsers.aspx>login</a> to access to registered users area.</div>"
End If
connection.Close()
End Sub
Protected Sub btncancel_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles btncancel.Click
Me.txtlastname.Text = String.Empty
Me.txtfirstname.Text = String.Empty
Me.txtemailaddress.Text = String.Empty
Me.rbblacktyle.Checked = True
Me.txtpassword.Text = String.Empty
Me.txtpasswordconfirm.Text = String.Empty
End Sub
End Class

95

Modifyuser.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ModifyUser.aspx.vb"
Inherits="EditUser" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Modify User</title>
<link id="css" type="text/css" rel="Stylesheet" runat="server" />
<style type="text/css">
.buttons
{
height: 26px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div id="header">
<img src="header.png" alt="Rennet's Testing" />
</div>
<div id="idtag" runat="server"></div>
<div id="body">
<table>
<tr>
<th colspan="2" style="text-align: left; border-bottom: solid 1px
#000000;">General</th>
</tr>
<tr>
<td>Modify your last name:</td>
<td><asp:TextBox ID="txtlastname" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Modify enter your first name:</td>
<td><asp:TextBox ID="txtfirstname" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Modify enter your email address:</td>
<td><asp:TextBox ID="txtemailaddress" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2">
<table>
<tr>
<td colspan="2" style="background-image:
url('ribbon794760625.gif'); width: 150px;">&nbsp;</td>
<td colspan="2" style="background-image:
url('ribbon1041435991.gif'); width: 150px;">&nbsp;</td>
<td colspan="2" style="background-image:
url('ribbon262954110.gif'); width: 150px;">&nbsp;</td>
</tr>
<tr>

96

runat="server" /></td>
runat="server" /></td>
runat="server" /></td>

<td><asp:RadioButton ID="rbblacktyle" GroupName="Style"


<td>Black background with Tahoma font.</td>
<td><asp:RadioButton ID="rbgreenstyle" GroupName="Style"
<td>Green background with Trebuchet MS font.</td>
<td><asp:RadioButton ID="rbbluestyle" GroupName="Style"

<td>Blue background with Verdana font.</td>


</tr>
</table>
</td>
</tr>
<tr>
<th colspan="2" style="text-align: left; border-bottom: solid 1px
#000000;"">Security</th>
</tr>
<tr>
<td>Modify your password:</td>
<td><asp:TextBox ID="txtpassword" TextMode="Password"
runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Re-Enter your modified password:</td>
<td><asp:TextBox ID="txtpasswordconfirm" TextMode="Password"
runat="server"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2" style="border-top: solid 1px #000000;">
<asp:Button ID="btnsubmit" Text="Save Changes" runat="server"
CssClass="buttons" />
&nbsp;
<asp:Button ID="btncancel" Text="Cancel" runat="server"
CssClass="buttons" />
</td>
</tr>
<tr>
<td colspan="2">
<asp:Label ID="lblmessage" runat="server"></asp:Label>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>

Modifyuser.aspx.vb
Imports System.Data
Imports System.Data.OleDb
Partial Class EditUser

97

Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
If Session("UserId") Is Nothing Then
Response.Redirect("Default.aspx")
End If
Dim userid As String = Request("userid")
If String.IsNullOrEmpty(userid) Then
userid = Session("UserId")
End If
Me.css.Href = Session("Style")
Me.idtag.InnerHtml = String.Format("<a
href='RegisteredUsers.aspx'>Home</a>&nbsp;|&nbsp;Hello {0} ({1}), Logged in as
{2}.&nbsp;|&nbsp;<a href='Logout.aspx'>Logout</a>",
Session("FirstName"),
Session("EmailAddress"),
Session("UserTypeDesc"))
If Not IsPostBack Then
Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source={0}; User Id=admin; Password=;"
Dim connection As New OleDbConnection
connection.ConnectionString = String.Format(connectionstring,
Server.MapPath(ConfigurationManager.AppSettings("DB")))
connection.Open()
Dim sql As String
sql = "SELECT Users.LastName, Users.FirstName, Users.EmailAddress,
Users.[Style], UserSecurity.[Password] "
sql &= "FROM Users INNER JOIN UserSecurity ON Users.EmailAddress =
UserSecurity.EmailAddress "
sql &= "WHERE Users.UserId='{0}' "
sql = String.Format(sql, userid)
Dim reader As OleDbDataReader
reader = New OleDbCommand(sql, connection).ExecuteReader()
While reader.Read()
Me.txtlastname.Text = reader("LastName")
Me.txtfirstname.Text = reader("FirstName")
Me.txtemailaddress.Text = reader("EmailAddress")
If reader("Style").ToString().Contains("Blue") Then
Me.rbbluestyle.Checked = True
End If
If reader("Style").ToString().Contains("Green") Then
Me.rbgreenstyle.Checked = True
End If
If reader("Style").ToString().Contains("Black") Then
Me.rbblacktyle.Checked = True
End If
Me.txtpassword.Text = reader("Password")

98

Me.txtpasswordconfirm.Text = reader("Password")
End While
reader.Close()
connection.Close()
End If
End Sub
Protected Sub btnsubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles btnsubmit.Click
Dim userid As String = Request("userid")
If String.IsNullOrEmpty(userid) Then
userid = Session("UserId")
End If
If String.IsNullOrEmpty(Me.txtlastname.Text.Trim()) Then
Me.lblmessage.Text = "<div class='error'>Last name is required.</div>"
Exit Sub
End If
If String.IsNullOrEmpty(Me.txtfirstname.Text.Trim()) Then
Me.lblmessage.Text = "<div class='error'>First name is required.</div>"
Exit Sub
End If
If String.IsNullOrEmpty(Me.txtemailaddress.Text.Trim()) Then
Me.lblmessage.Text = "<div class='error'>Email address is required.</div>"
Exit Sub
End If
If Not Me.txtpassword.Text.Trim().Equals(Me.txtpasswordconfirm.Text.Trim()) Then
Me.lblmessage.Text = "<div class='error'>Passwords do not match.</div>"
Exit Sub
End If
Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source={0}; User Id=admin; Password=;"
Dim connection As New OleDbConnection
connection.ConnectionString = String.Format(connectionstring,
Server.MapPath(ConfigurationManager.AppSettings("DB")))
connection.Open()
Dim sql As String
Dim style As String
style = "~/Styles/DefaultStyleSheet.css"
If rbblacktyle.Checked Then
style = "~/Styles/BlackStyleSheet.css"
ElseIf rbbluestyle.Checked Then
style = "~/Styles/BlueStyleSheet.css"
ElseIf rbgreenstyle.Checked Then
style = "~/Styles/GreenStyleSheet.css"
End If

99

Dim emailinuse As Boolean = False


sql = "SELECT * FROM [Users] WHERE [EmailAddress]='{0}' AND [UserId]<>'{1}'"
sql = String.Format(sql, Me.txtemailaddress.Text, userid)
Dim reader As OleDbDataReader
reader = New OleDbCommand(sql, connection).ExecuteReader()
emailinuse = reader.Read
reader.Close()
If emailinuse = True Then
Me.lblmessage.Text = "<div class='error'>The email address " &
Me.txtemailaddress.Text.Trim() & " is in use. Please try another email address.</div>"
Else

sql = "UPDATE [Users] SET [LastName]='{1}', [FirstName]='{2}',


[EmailAddress]='{3}', [Style]='{4}', [Timestamp]=Now() WHERE [UserId]='{0}'"
sql = String.Format(sql, userid,
Me.txtlastname.Text.Trim(),
Me.txtfirstname.Text.Trim(),
Me.txtemailaddress.Text.Trim(),
style)
Dim command As New OleDbCommand(sql, connection)
command.ExecuteNonQuery()
If Not String.IsNullOrEmpty(Me.txtpassword.Text.Trim()) Then
sql = "UPDATE [UserSecurity] SET [Password]='{1}' WHERE
[EmailAddress]='{0}'"
sql = String.Format(sql, Me.txtemailaddress.Text.Trim(),
Me.txtpassword.Text.Trim())
command = New OleDbCommand(sql, connection)
command.ExecuteNonQuery()
End If
Me.lblmessage.Text = "<div class='notify'>User profile has been modified, you
must logout and login to view all changes. <a href=RegisteredUsers.aspx>Return</a> to
registered users area.</div>"
End If
connection.Close()
End Sub
Protected Sub btncancel_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles btncancel.Click
Response.Redirect("RegisteredUsers.aspx")
End Sub
End Class

100

ManageTests.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ManageTests.aspx.vb"
Inherits="ManageTests" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Manage Tests</title>
<link id="css" type="text/css" rel="Stylesheet" runat="server" />
</head>
<body>
<form id="form1" runat="server">
<div id="header">
<img src="header.png" alt="Rennet's Testing" />
</div>
<div id="idtag" runat="server"></div>
<div id="body">
<div id="displaytable" runat="server"></div>
</div>
</form>
</body>
</html>

ManageTests.aspx.vb
Imports System.Data
Imports System.Data.OleDb
Partial Class ManageTests
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
If Session("UserId") Is Nothing Then
Response.Redirect("Default.aspx")
End If
If Not Session("UserTypeCd").Equals("TUT") Then
Response.Redirect("RegisteredUsers.aspx")
End If
Me.css.Href = Session("Style")
Me.idtag.InnerHtml = String.Format("<a
href='RegisteredUsers.aspx'>Home</a>&nbsp;|&nbsp;Hello {0} ({1}), Logged in as
{2}.&nbsp;|&nbsp;<a href='ModifyUser.aspx'>Modify My Profile</a>&nbsp;|&nbsp;<a
href='Logout.aspx'>Logout</a>",
Session("FirstName"),
Session("EmailAddress"),

101

Session("UserTypeDesc"))
Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source={0}; User Id=admin; Password=;"
Dim connection As New OleDbConnection
connection.ConnectionString = String.Format(connectionstring,
Server.MapPath(ConfigurationManager.AppSettings("DB")))
connection.Open()
Dim sql As String = "SELECT Examinations.ExaminationId,
Examinations.ExaminationName, Examinations.CreateUserId, Examinations.Timestamp,
[Users].LastName, [Users].FirstName, Format(CDate([Examinations.Timestamp]), ""yyyy/mm/dd
HH:mm"") AS [FormattedDate], COUNT(ExaminationQuestions.QuestionId) AS [QuestionCount] "
sql &= "FROM Examinations, [Users], ExaminationQuestions "
sql &= "WHERE Examinations.CreateUserId = [Users].UserId And
Examinations.ExaminationId = ExaminationQuestions.ExaminationId "
sql &= "GROUP BY Examinations.ExaminationId, Examinations.ExaminationName,
Examinations.CreateUserId, Examinations.Timestamp, [Users].LastName, [Users].FirstName,
Format(CDate([Examinations.Timestamp]), ""yyyy/mm/dd HH:mm"") "
sql &= "ORDER BY Format(CDate([Examinations.Timestamp]), ""yyyy/mm/dd HH:mm"")
DESC"
Dim reader As OleDbDataReader
reader = New OleDbCommand(sql, connection).ExecuteReader()
Dim b As Boolean = reader.Read
reader.Close()
If b Then

Questions")

Me.displaytable.InnerHtml = "<table class='grid'>"


Me.displaytable.InnerHtml &= "<tr>"
Me.displaytable.InnerHtml &= String.Format("<th>{0}</th>", "Delete")
'Me.displaytable.InnerHtml &= String.Format("<th>{0}</th>", "Modify")
Me.displaytable.InnerHtml &= String.Format("<th>{0}</th>", "Examination")
Me.displaytable.InnerHtml &= String.Format("<th>{0}</th>", "Tutor")
Me.displaytable.InnerHtml &= String.Format("<th>{0}</th>", "Created")
Me.displaytable.InnerHtml &= String.Format("<th>{0}</th>", "No. of
Me.displaytable.InnerHtml &= "</tr>"
reader = New OleDbCommand(sql, connection).ExecuteReader()
While reader.Read

Me.displaytable.InnerHtml &= "<tr>"


Me.displaytable.InnerHtml &= String.Format("<td><a
href=?cmd=delete&id={0}>Delete</a></td>", reader("ExaminationId"))
'Me.displaytable.InnerHtml &= String.Format("<td><a
href=?cmd=modify&id={0}>Modify</a></td>", reader("ExaminationId"))
Me.displaytable.InnerHtml &= String.Format("<td>{0}</td>",
reader("ExaminationName"))
Me.displaytable.InnerHtml &= String.Format("<td>{0}&nbsp;{1}</td>",
reader("FirstName"), reader("LastName"))
Me.displaytable.InnerHtml &= String.Format("<td>{0}</td>",
reader("FormattedDate"))
Me.displaytable.InnerHtml &= String.Format("<td>{0}</td>",
reader("QuestionCount"))

102

Me.displaytable.InnerHtml &= "</tr>"


End While
reader.Close()
Me.displaytable.InnerHtml &= "</table>"
End If
connection.Close()
End Sub
End Class

103

CreateTest.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="CreateTest.aspx.vb"
Inherits="CreateTest" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Create Test</title>
<link id="css" type="text/css" rel="Stylesheet" runat="server" />
</head>
<body>
<form id="form1" runat="server">
<div id="header">
<img src="header.png" alt="Rennet's Testing" />
</div>
<div id="idtag" runat="server"></div>
<div id="body">
<table class="grid">
<tr>
<td>Enter name of test:</td>
<td><asp:TextBox ID="txtexaminationname" runat="server"
Width="600"></asp:TextBox></td>
<td><asp:Label ID="lblmessage" runat="server"></asp:Label></td>
</tr>
</table>
<br />
<table class="grid">
<tr>
<td rowspan="5">Question</td>
<td colspan="2">Enter question text:</td>
<td colspan="8"><asp:TextBox ID="txtquestion_text" runat="server"
TextMode="MultiLine" Width="500"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2">Select question subject:</td>
<td colspan="4">
<asp:DropDownList ID="ddlsubjects" runat="server"></asp:DropDownList>
</td>
<td colspan="2">Select question type:</td>
<td colspan="2">
<asp:RadioButton ID="rbquestion_type_multi" runat="server"
GroupName="questiontype" />Multiple Choice
<br />
<asp:RadioButton ID="rbquestion_type_tf" runat="server"
GroupName="questiontype" />True/False
</td>
</tr>
<tr>
<td>A</td>
<td><asp:TextBox ID="txtquestion_choice1" TextMode="MultiLine"
runat="server"></asp:TextBox></td>
<td>B</td>

104

<td><asp:TextBox ID="txtquestion_choice2" TextMode="MultiLine"


runat="server"></asp:TextBox></td>
<td>C</td>
<td><asp:TextBox ID="txtquestion_choice3" TextMode="MultiLine"
runat="server"></asp:TextBox></td>
<td>D</td>
<td><asp:TextBox ID="txtquestion_choice4" TextMode="MultiLine"
runat="server"></asp:TextBox></td>
<td>E</td>
<td><asp:TextBox ID="txtquestion_choice5" TextMode="MultiLine"
runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><asp:RadioButton ID="rbquestioncorrect_choice1" runat="server"
GroupName="questioncorrectchoice" />Correct/True</td>
<td>&nbsp;</td>
<td><asp:RadioButton ID="rbquestioncorrect_choice2" runat="server"
GroupName="questioncorrectchoice" />Correct/False</td>
<td>&nbsp;</td>
<td><asp:RadioButton ID="rbquestioncorrect_choice3" runat="server"
GroupName="questioncorrectchoice" />Correct</td>
<td>&nbsp;</td>
<td><asp:RadioButton ID="rbquestioncorrect_choice4" runat="server"
GroupName="questioncorrectchoice" />Correct</td>
<td>&nbsp;</td>
<td><asp:RadioButton ID="rbquestioncorrect_choice5" runat="server"
GroupName="questioncorrectchoice" />Correct</td>
</tr>
<tr>
<td colspan="10">
<asp:Button ID="btnaddtolist" Text="Add Question" runat="server"
CssClass="buttons" />
&nbsp;
<asp:Button ID="btnsavetest" Text="Save &amp; Finalize Test"
runat="server" CssClass="buttons" />
</td>
</tr>
</table>
<br />
<div id="questionlistdisplaytable" runat="server"></div>
</div>
</form>
</body>
</html>

105

CreateTest.aspx.vb
Imports System.Data
Imports System.Data.OleDb
Partial Class CreateTest
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
If Session("UserId") Is Nothing Then
Response.Redirect("Default.aspx")
End If
If Not Session("UserTypeCd").Equals("TUT") Then
Response.Redirect("RegisteredUsers.aspx")
End If
Me.css.Href = Session("Style")
Me.idtag.InnerHtml = String.Format("<a
href='RegisteredUsers.aspx'>Home</a>&nbsp;|&nbsp;Hello {0} ({1}), Logged in as
{2}.&nbsp;|&nbsp;<a href='ModifyUser.aspx'>Modify My Profile</a>&nbsp;|&nbsp;<a
href='Logout.aspx'>Logout</a>",
Session("FirstName"),
Session("EmailAddress"),
Session("UserTypeDesc"))
Me.lblmessage.Text = String.Empty
If Not IsPostBack Then
Me.rbquestion_type_multi.Checked = True
Me.rbquestioncorrect_choice1.Checked = True
Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source={0}; User Id=admin; Password=;"
Dim connection As New OleDbConnection
connection.ConnectionString = String.Format(connectionstring,
Server.MapPath(ConfigurationManager.AppSettings("DB")))
connection.Open()
Dim sql As String = "SELECT * FROM [ExaminationQuestionSubjects] ORDER BY 1"
Dim reader As OleDbDataReader
reader = New OleDbCommand(sql, connection).ExecuteReader()
While reader.Read
Dim li As New ListItem
li.Text = reader("SubjectDesc")
li.Value = reader("SubjectCd")
Me.ddlsubjects.Items.Add(li)
End While
reader.Close()

106

connection.Close()

Question))

If Not String.IsNullOrEmpty(Request("cmd")) Then


If Request("cmd").Equals("delete") Then
If Not Session("questionlist") Is Nothing Then
Dim id As String = Request("id")
Dim questionlist As List(Of Question)
Dim questiontoremove As Question = Nothing
questionlist = DirectCast(Session("questionlist"), List(Of
For Each q As Question In questionlist
If id.Equals(q.ID) Then
questiontoremove = q
Exit For
End If
Next
If Not questiontoremove Is Nothing Then
questionlist.Remove(questiontoremove)
End If
End If
End If
End If

End If
Me.DisplayTable()
End Sub
Protected Sub DisplayTable()
Dim questionlist As List(Of Question)
If Session("questionlist") Is Nothing Then
questionlist = New List(Of Question)()
Else
questionlist = DirectCast(Session("questionlist"), List(Of Question))
End If
If questionlist.Count > 0 Then
90%;'>"

"Subject")
Choice")
1")
2")

questionlistdisplaytable.InnerHtml = "<table class='grid' style='width:


questionlistdisplaytable.InnerHtml
questionlistdisplaytable.InnerHtml
questionlistdisplaytable.InnerHtml
questionlistdisplaytable.InnerHtml

&=
&=
&=
&=

"<tr>"
String.Format("<th>{0}</th>", "Remove")
String.Format("<th>{0}</th>", "Type")
String.Format("<th>{0}</th>",

questionlistdisplaytable.InnerHtml &= String.Format("<th>{0}</th>", "Text")


questionlistdisplaytable.InnerHtml &= String.Format("<th>{0}</th>", "Correct
questionlistdisplaytable.InnerHtml &= String.Format("<th>{0}</th>", "Choice
questionlistdisplaytable.InnerHtml &= String.Format("<th>{0}</th>", "Choice

107

questionlistdisplaytable.InnerHtml &= String.Format("<th>{0}</th>", "Choice

3")

questionlistdisplaytable.InnerHtml &= String.Format("<th>{0}</th>", "Choice

4")

questionlistdisplaytable.InnerHtml &= String.Format("<th>{0}</th>", "Choice

5")

questionlistdisplaytable.InnerHtml &= "</tr>"

For Each q As Question In questionlist


questionlistdisplaytable.InnerHtml &= "<tr>"
questionlistdisplaytable.InnerHtml &= String.Format("<td><a
href=?cmd=delete&id={0}>Delete</a></td>", q.ID)
questionlistdisplaytable.InnerHtml &= String.Format("<td>{0}</td>",
q.Type)
questionlistdisplaytable.InnerHtml &= String.Format("<td>{0}</td>",
q.Subject)
questionlistdisplaytable.InnerHtml &= String.Format("<td>{0}</td>",
q.Text)
questionlistdisplaytable.InnerHtml &= String.Format("<td>{0}</td>",
q.CorrectChoice)
questionlistdisplaytable.InnerHtml &= String.Format("<td>{0}</td>",
IIf(q.Type.Equals("TF"), "T", q.Choice1))
questionlistdisplaytable.InnerHtml &= String.Format("<td>{0}</td>",
IIf(q.Type.Equals("TF"), "F", q.Choice2))
questionlistdisplaytable.InnerHtml &= String.Format("<td>{0}</td>",
IIf(q.Type.Equals("TF"), "&nbsp;", q.Choice3))
questionlistdisplaytable.InnerHtml &= String.Format("<td>{0}</td>",
IIf(q.Type.Equals("TF"), "&nbsp;", q.Choice4))
questionlistdisplaytable.InnerHtml &= String.Format("<td>{0}</td>",
IIf(q.Type.Equals("TF"), "&nbsp;", q.Choice5))
questionlistdisplaytable.InnerHtml &= "</tr>"
Next
questionlistdisplaytable.InnerHtml &= "</table>"
End If
End Sub
Protected Sub btnaddtolist_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles btnaddtolist.Click
If String.IsNullOrEmpty(Me.txtquestion_text.Text.Trim()) Then
Me.lblmessage.Text = "<div class='error'>Question text is required.</div>"
Exit Sub
End If
Dim choicecount As Integer = 0
1)
1)
1)

choicecount += IIf(String.IsNullOrEmpty(Me.txtquestion_choice1.Text.Trim()), 0,
choicecount += IIf(String.IsNullOrEmpty(Me.txtquestion_choice2.Text.Trim()), 0,
choicecount += IIf(String.IsNullOrEmpty(Me.txtquestion_choice3.Text.Trim()), 0,

108

1)
1)

choicecount += IIf(String.IsNullOrEmpty(Me.txtquestion_choice4.Text.Trim()), 0,
choicecount += IIf(String.IsNullOrEmpty(Me.txtquestion_choice5.Text.Trim()), 0,

If (rbquestion_type_multi.Checked And (choicecount < 2)) Then


Me.lblmessage.Text = "<div class='error'>Multiple choice questions require at
least 2 choices.</div>"
Exit Sub
End If
Dim questionlist As List(Of Question)
If Session("questionlist") Is Nothing Then
questionlist = New List(Of Question)()
Else
questionlist = DirectCast(Session("questionlist"), List(Of Question))
End If
Dim _question As New Question()
_question.ID = Guid.NewGuid().ToString()
_question.Text = Me.txtquestion_text.Text.Trim()
_question.Type = IIf(rbquestion_type_multi.Checked, "MULTI", "TF")
_question.Subject = Me.ddlsubjects.SelectedValue
_question.Choice1 = Me.txtquestion_choice1.Text.Trim()
_question.Choice2 = Me.txtquestion_choice2.Text.Trim()
_question.Choice3 = Me.txtquestion_choice3.Text.Trim()
_question.Choice4 = Me.txtquestion_choice4.Text.Trim()
_question.Choice5 = Me.txtquestion_choice5.Text.Trim()
If rbquestion_type_multi.Checked Then
If rbquestioncorrect_choice1.Checked Then
_question.CorrectChoice = "1"
ElseIf rbquestioncorrect_choice2.Checked Then
_question.CorrectChoice = "2"
ElseIf rbquestioncorrect_choice3.Checked Then
_question.CorrectChoice = "3"
ElseIf rbquestioncorrect_choice4.Checked Then
_question.CorrectChoice = "4"
Else
_question.CorrectChoice = "5"
End If
Else

_question.CorrectChoice = IIf(rbquestioncorrect_choice1.Checked, "T", "F")


End If
questionlist.Add(_question)
Session("questionlist") = questionlist
Me.DisplayTable()
End Sub

109

Protected Sub btnsavetest_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles btnsavetest.Click
If String.IsNullOrEmpty(Me.txtexaminationname.Text.Trim()) Then
Me.lblmessage.Text = "<div class='error'>Test name is required.</div>"
Exit Sub
End If
Dim questionlist As List(Of Question)
If Session("questionlist") Is Nothing Then
questionlist = New List(Of Question)()
Else
questionlist = DirectCast(Session("questionlist"), List(Of Question))
End If
If questionlist.Count < 1 Then
Me.lblmessage.Text = "<div class='error'>Test must contain al least 1
question.</div>"
Exit Sub
End If
Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source={0}; User Id=admin; Password=;"
Dim connection As New OleDbConnection
connection.ConnectionString = String.Format(connectionstring,
Server.MapPath(ConfigurationManager.AppSettings("DB")))
connection.Open()
Dim examinationid As String = Guid.NewGuid().ToString()
Dim sql As String
sql = "INSERT INTO [Examinations] ([ExaminationId], [ExaminationName],
[CreateUserId], [Timestamp]) VALUES ('{0}','{1}','{2}',Now())"
sql = String.Format(sql,
examinationid,
Me.txtexaminationname.Text.Trim(),
Session("UserId"))
Dim command As New OleDbCommand(sql, connection)
command.ExecuteNonQuery()
For Each q As Question In questionlist
Dim questionid As String = Guid.NewGuid().ToString()
sql = "INSERT INTO [ExaminationQuestions] (ExaminationId, QuestionId,
QuestionTypeCd, SubjectCd, QuestionText) VALUES ('{0}','{1}','{2}','{3}','{4}')"
sql = String.Format(sql,
examinationid,
questionid,
q.Type,
q.Subject,
Me.txtquestion_text.Text.Trim())
command = New OleDbCommand(sql, connection)
command.ExecuteNonQuery()
If q.Type.Equals("MULTI") Then
sql = "INSERT INTO [ExaminationQuestionChoices] (ExaminationId,
QuestionId, ChoiceId, ChoiceText, IsCorrect) VALUES ('{0}','{1}','{2}','{3}','{4}')"

110

sql = String.Format(sql,
examinationid,
questionid,
"1",
q.Choice1,
IIf(q.CorrectChoice.Equals("1"), "Y", "N"))
command = New OleDbCommand(sql, connection)
command.ExecuteNonQuery()
sql = "INSERT INTO [ExaminationQuestionChoices] (ExaminationId,
QuestionId, ChoiceId, ChoiceText, IsCorrect) VALUES ('{0}','{1}','{2}','{3}','{4}')"
sql = String.Format(sql,
examinationid,
questionid,
"2",
q.Choice2,
IIf(q.CorrectChoice.Equals("2"), "Y", "N"))
command = New OleDbCommand(sql, connection)
command.ExecuteNonQuery()
sql = "INSERT INTO [ExaminationQuestionChoices] (ExaminationId,
QuestionId, ChoiceId, ChoiceText, IsCorrect) VALUES ('{0}','{1}','{2}','{3}','{4}')"
sql = String.Format(sql,
examinationid,
questionid,
"3",
q.Choice3,
IIf(q.CorrectChoice.Equals("3"), "Y", "N"))
command = New OleDbCommand(sql, connection)
command.ExecuteNonQuery()
sql = "INSERT INTO [ExaminationQuestionChoices] (ExaminationId,
QuestionId, ChoiceId, ChoiceText, IsCorrect) VALUES ('{0}','{1}','{2}','{3}','{4}')"
sql = String.Format(sql,
examinationid,
questionid,
"4",
q.Choice4,
IIf(q.CorrectChoice.Equals("4"), "Y", "N"))
command = New OleDbCommand(sql, connection)
command.ExecuteNonQuery()
sql = "INSERT INTO [ExaminationQuestionChoices] (ExaminationId,
QuestionId, ChoiceId, ChoiceText, IsCorrect) VALUES ('{0}','{1}','{2}','{3}','{4}')"
sql = String.Format(sql,
examinationid,
questionid,
"5",
q.Choice5,
IIf(q.CorrectChoice.Equals("5"), "Y", "N"))
command = New OleDbCommand(sql, connection)

111

command.ExecuteNonQuery()
Else
sql = "INSERT INTO [ExaminationQuestionChoices] (ExaminationId,
QuestionId, ChoiceId, ChoiceText, IsCorrect) VALUES ('{0}','{1}','{2}','{3}','{4}')"
sql = String.Format(sql,
examinationid,
questionid,
"T",
"True",
IIf(q.CorrectChoice.Equals("T"), "Y", "N"))
command = New OleDbCommand(sql, connection)
command.ExecuteNonQuery()
sql = "INSERT INTO [ExaminationQuestionChoices] (ExaminationId,
QuestionId, ChoiceId, ChoiceText, IsCorrect) VALUES ('{0}','{1}','{2}','{3}','{4}')"
sql = String.Format(sql,
examinationid,
questionid,
"F",
"False",
IIf(q.CorrectChoice.Equals("F"), "Y", "N"))
command = New OleDbCommand(sql, connection)
command.ExecuteNonQuery()
End If
Next
connection.Close()
Session("questionlist") = Nothing
Response.Redirect("ManageTests.aspx")
End Sub
End Class

112

Login.aspx

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Login.aspx.vb" Inherits="Login"


%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Login</title>
<link id="css" type="text/css" rel="Stylesheet" runat="server" />
</head>
<body>
<form id="form1" runat="server">
<div id="header">
<img src="header.png" alt="Rennet's Testing" />
</div>
<div id="body">
<table>
<tr>
<td>Please enter your email address:</td>
<td><asp:TextBox ID="txtemailaddress" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Please enter your password:</td>
<td><asp:TextBox ID="txtpassword" TextMode="Password"
runat="server"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="btnsubmit" Text="Login" runat="server" />
</td>
</tr>
<tr>
<td colspan="2">
<asp:Label ID="lblmessage" runat="server"></asp:Label>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>

Login.aspx.vb
Imports System.Data
Imports System.Data.OleDb

113

Partial Class Login


Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
Me.css.Href = "~/Styles/DefaultStyleSheet.css"
End Sub
Protected Sub btnsubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles btnsubmit.Click
Session.Clear()
Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source={0}; User Id=admin; Password=;"
Dim connection As New OleDbConnection
connection.ConnectionString = String.Format(connectionstring,
Server.MapPath(ConfigurationManager.AppSettings("DB")))
connection.Open()
Dim sql As String
sql = "SELECT [Users].*, [UserTypes].[UserTypeDesc] FROM [Users], [UserSecurity],
[UserTypes] WHERE [Users].[EmailAddress] = [UserSecurity].[EmailAddress] AND
[Users].[UserTypeCd] = [UserTypes].[UserTypeCd] "
sql &= "AND [UserSecurity].[EmailAddress]='{0}' AND
[UserSecurity].[Password]='{1}'"
sql = String.Format(sql, Me.txtemailaddress.Text.Trim(),
Me.txtpassword.Text.Trim())
Dim reader As OleDbDataReader
reader = New OleDbCommand(sql, connection).ExecuteReader()
While reader.Read
Session("UserId") = reader("UserId")
Session("UserTypeCd") = reader("UserTypeCd")
Session("UserTypeDesc") = reader("UserTypeDesc")
Session("LastName") = reader("LastName")
Session("FirstName") = reader("FirstName")
Session("EmailAddress") = reader("EmailAddress")
Session("Style") = reader("Style")
End While
reader.Close()
connection.Close()

again."

If Session("UserId") Is Nothing Then


Me.lblmessage.Text = "Incorrect email address and password. Please try
Else

Response.Redirect("RegisteredUsers.aspx")
End If
End Sub
End Class

114

Logout.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Logout.aspx.vb"
Inherits="Logout" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Logout</title>
<link id="css" type="text/css" rel="Stylesheet" runat="server" />
</head>
<body>
<form id="form1" runat="server">
<div id="header">
<img src="header.png" alt="Rennet's Testing" />
</div>
<div id="body">
You have been logged out of <a href="Default.aspx">Teachers CBT</a>.
</div>
</form>
</body>
</html>

Logout.aspx.vb
Partial Class Logout
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
Me.css.Href = "~/Styles/DefaultStyleSheet.css"
Session.Clear()
End Sub
End Class

115

Default.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Home</title>
<link id="css" type="text/css" rel="Stylesheet" runat="server" />
</head>
<body>
<form id="form1" runat="server">
<div id="header">
<img src="header.png" alt="Rennet's Testing" />
</div>
<div id="body">
<div>
<a href="Register.aspx">Register</a>
<p>If you are not a member of our exciting community of tutors and users, now
is the time to register.</p>
</div>
<div>
<a href="Login.aspx">Login</a>
<p>Login now to view the newly created examinations by your favorite
tutors.</p>
</div>
<div>
<b>Sample Accounts</b>
<br />
<table class="grid">
<tr>
<th>Email Address</th>
<th>Password</th>
<th>Profile Color Style</th>
<th>User Type</th>
</tr>
<tr>
<td>janice@infotech.com</td>
<td>123</td>
<td>Green</td>
<td>User</td>
</tr>
<tr>
<td>johndoe@hotmail.com</td>
<td>abcdef</td>
<td>Default</td>
<td>Tutor</td>
</tr>
<tr>
<td>jonesy@hotmail.com</td>
<td>456</td>
<td>Blue</td>

116

<td>User</td>
</tr>
<tr>
<td>rennet@abc.com</td>
<td>abc</td>
<td>Black</td>
<td>User</td>
</tr>
</table>
</div>
</div>
</form>
</body>
</html>

Default.aspx.vb
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
Me.css.Href = "~/Styles/DefaultStyleSheet.css"
End Sub
End Class

117

Appendix G- BlackBox Testing


Black box Testing Results
Login
Using Last Name: doe
First Name: john
Email Address:johndoe@hotmail.com
Password: abcdef
Test Field

Input

Expected
Output
Email
Email
Login Is
Address:johndoe@hotmail.com Address:johndoe@hotmail.com Successful
Password :abcdef
Password :abcdef

Actual
Output
Login Is
Successful

Email
Email
Incorrect
Address:johndoe@hotmail.com Address:johndoe@hotmail.com email
address and
Password :abvvef
Password :abvvef
password.
Please try
again.
Email
Email
Incorrect
Address:joende@hotmail.com
Address:joende@hotmail.com
email
Password :abcdef
Password :abcdef
address and
password.
Please try
again.

Incorrect
email
address and
password.
Please try
again.
Incorrect
email
address and
password.
Please try
again.

118

Registration
Using Last Name: doe
First Name: john
Email Address:johndoe@hotmail.com
Password: abcdef
Test Field

Input

Last Name
First Name
Email Address

Password

1234

Password

Expected
Output
Last Name
is required
First Name
is required
Email
Address is
required
12345

Actual
Output
Last Name
is required
First Name
is required
Email
Address is
required
Passwords
dont match
Passwords
is required
Registration Registration
Is
Is
Successful Successful

Last Name: doe


First Name: john
Email
Address:johndoe@hotmail.com
Password :abcdef

Last Name: doe


First Name: john
Email
Address:johndoe@hotmail.com
Password :abcdef

Last Name: do2we


First Name: johe3n
Email
Address:joh%ndoe@hotmail.com
Password :abcdef2$

Last Name: do2we


Registration Registration
First Name: johe3n
Is
Is
Email
Successful Successful
Address:joh%ndoe@hotmail.com
Password :abcdef2$

119

Edit Account/Modify My Profile


Using Last Name: d
First Name: j
Email Address:jk@hotmail.com
Password: abcf
Test Field

Input

Expected Output

Email

User profile has been


Email
Address:jk@hotmail.com modified; you must

Actual Output

logout and login to


view all
changes. Return to
registered users area.
Email Address is
required

User profile has been


modified; you must
logout and login to
view all
changes. Return to
registered users area.
Email Address is
required

Last Name

User profile has been


modified; you must
logout and login to
view all
changes. Return to
registered users area.
Last Name is required

User profile has been


modified; you must
logout and login to
view all
changes. Return to
registered users area.
Last Name is required

First Name

First Name is required

First Name is
required
User profile has been
modified; you must
logout and login to
view all
changes. Return to
registered users area.
Passwords dont
match

Email

Last Name

Last Name: d

First Name

First Name: j

Password

1234

User profile has been


modified; you must
logout and login to
view all
changes. Return to
registered users area.
12345

Password
Password

Passwords is
required
Password: abcf

User profile has been


modified; you must

User profile has been


modified; you must
120

logout and login to


view all
changes. Return to
registered users area.

logout and login to


view all
changes. Return to
registered users area.

121

Appendix H- WhiteBox Testing


Whitebox Testing
Function
db_connect in
web.config file

Input
/db/OnlineExamination.mdb

Expected Output
Working

Output
Connect to
database

none

Destroy session
and logs out user

Success message
and logs out user

compare email

email

If input does not


meet requirements
display an error
message
True if ID is found in
database and false
otherwise
True if email is
correct and false
otherwise

Error message
Displayed

Check user ID

Username,password,first
name, last name, email
address and mandatory
fields left out.
id

logout
Error reporting

Boolean

User id, email

122

Appendix I- Analysis Of Test Results

Analysis Of Test Results


Student
Use test account janice@infotech.com with a password of 123

General Administration
Description
Users able to register
as students
Users able to sign in
using email and
password
Users able to set
background color and
font preferences

Users able to modify


first name ,last name,
email address and
password

Method
Go to login page and
enter the required details
to create an account
Sign in using the account
created above

Pass/Fail
Pass

Sign in and go to Modify My Profile


hyperlink and amend color and font
size field.
Logout and login back to see the
changes.
Sign in and go to Modify My Profile
hyperlink and amend first name,
last name, email address and
password.
Logout and login back to see the
changes.

Pass

Method
Sign in using the account created
above.
Go to the Select And Take A Test
hyperlink and choose a test to take.
Sign in using the account created
above.
Go to the Select And Take A Test
hyperlink and choose a test to take.

Pass/Fail
Pass

Pass

Pass

The Test
Description
Users able to take a
test

Test questions are


generated randomly
from an
existing database

Fail

123

Users able to take


tests many times

Users able to view


their test history

Sign in using the account created


above. Go to the Select And Take A
Test hyperlink and choose a test to
take.
Sign in and go to View Test History
hyperlink to View your Test History

The Student can


Sign in using the account created
request hints and tips above.
on specific questions
Go to the Select And Take A Test
during the test
hyperlink and choose a test to take.
Objective Method Pass/Fail

Pass

Pass
Fail

Feedback

Method
Sign in and Take a test and then go
to View Test History hyperlink to
View your Test Score or
Go to View Test History hyperlink to
view your Test Score if test was
already taken.

Pass/Fail
Pass

Feedback by student
will be given at the
end of the test

Sign in using the account created


above.
Go to the Feedback hyperlink and
give your feedback.

Pass

Feedback by
application will be
given at the end of
the test

Sign in using the account created


above.
Go to the Select And Take A Test
hyperlink and choose a test to take.
After completing test feedback
would be given.

Fail

Description
Scores will be given
at the end of the test

Reference Description Release

Progress And Performance


Description
Students will be able
to review their own
history and
progress over time

Method
Sign in and Take a test and then go
to View Test History hyperlink to
View your Test Score.

Pass/Fail
Pass

124

Students will be
presented with a timer
showing how far
through the test they
are
Students will be
presented with a
progress bar
during the test

Sign in using the account created


above.
Go to the Select And Take A Test
hyperlink and choose a test to take.

Sign in using the account created


above.
Go to the Select And Take A Test
hyperlink and choose a test to take.
During the test the progress bar
would be shown.
Objective Method Pass

Fail
Only Partially Implemented
As a timer is shown for each
question only.
Pass

Tutor/Administrator
Use test account johndoe@hotmail.com with a password of abcdef

General Administration
Description
Users able to sign in
using email and
password
Users able to set
background color and
font preferences

Users able to modify


first name ,last name,
email address and
password

Users able to View all


Student records in the
database

Users able to Modify


all Student records in
the database

Method
Sign in using the account
created above

Pass/Fail
Pass

Sign in and go to Modify My Profile


hyperlink and amend color and font
size field.
Logout and login back to see the
changes.
Sign in and go to Modify My Profile
hyperlink and amend first name,
last name, email address and
password.
Logout and login back to see the
changes.
Sign in and go to View All Student
records hyperlink.
You can see Students fullname,
Email address, Profile settings, and
Registration date and user type.
Sign in and go to View All Student
records hyperlink.
Click the Modify hyperlink and
amend first name, last name, email
address, profile color, fonts and
password.
Logout and login back to see the
changes.

Pass

Pass

Pass

Pass

125

The Test
Description
Users are able to view
and review students
history and
progress over time

Users are able to


Create a test

Users are able to


Modify a test

Users are able to


View student
feedback.

Method
Sign in and go to View All Student
Results hyperlink to View all
Students in the database
username, the name of the Test
taken, the Test date, the total
questions in the test, and the total
question the student got correct
together with the Student Score.
Sign in using the account created
above.
Go to Add Tests hyperlink.
Choose a name for the test.
Enter questions to add.
Choose type of test (multiple choice
or true/false).
Add questions
Save and Finalize test.

Pass/Fail
Pass

Sign in using the account created


above.
Go to the Modify A Test hyperlink
and choose a test to modify.

Fail

Users have to sign into an external


website using a specified email
address using their username and
password to see student feedback.
Objective Method Pass

Pass

Because if a student took the


test already and you then go
and modify a test (add/delete
questions), his grades would be
affected.
Couldnt find a solution to this.

Pass

126

Appendix J-Protocol Number


UNIVERSITY OF HERTFORDSHIRE
FACULTY OF SCIENCE, TECHNOLOGY AND CREATIVE ARTS

MEMORANDUM

TO

Rennie Ramlochan

CC

Andrew Pyper

FROM

Dr Steven Adams Chair, Faculty Ethics Committee

DATE

3 August 2011

Your project entitled:

Teachers CBT Testing Centre

has been granted ethics approval and has been assigned the Protocol Number: 1011/314.

127

The approval is valid as follows:

From 14 August 2011

Until 30 October 2011

Please note that if it is possible that the project may continue after the end of this period, you will need to
resubmit an application in time to allow the case to be considered.

128

You might also like