phpTest is a web based testing tool. It is designed to be modular and flexible. An administrator can add any number of questions, tests, users, and groups. Once a test is created, a user can log in to take the test, and their test results are recorded and stored in the database for easy viewing. It includes features designed to prevent cheating such as randomization of questions on tests, and security logging for unauthorized access to pages.
phpTest is modular, with each component depending on other components to function
The most basic component is the skill level. The skill level is a way to group similar questions in the testing environment. For instance, you may choose to make a skill level called Linux. Whenever you add a test question that has to do with Linux, you would assign it the Linux skill level. You can name the skill level whatever you want. When you create a new test, the questions on the test are chosen based on the tests skill level.
The next component is the question. Questions make up the test. Each question must have an associated skill level. Questions can be either True/False or Multiple Choice. Essay questions are implemented, butdisabled because the automatic scoring system doesn't work with essay questions. A question can be required or optional. Required questions are included on every test with the same skill level as the questions. Optional questions are chosen randomly based on the test parameters.
The last component is the test. Tests are high-level and should only be created after you have created the skill levels and questions. When creating a test, there are several parameters such as Test Title, number of required questions, and number of random questions. When an agent is taking a test, the questions are randomized so that no two tests are exactly the same. This prevents cheating. Also, multiple choice questions are randomized so that the answer is different each time. For instance, the answer to a multiple-choice question may be a once, but if the agent refreshes the page, the answer might be b next time. The correct answer stays the same, but the order of the possible answers is changed. Once a test is created, it can be set to viewable or not. Viewable means that the test is active and users can take it if they have the proper security permissions. If a test is not viewable, the test is inactive and no one will be able to take it.
Each user on the system has a unique login. There are audit trails so you can determine who took each test, and see the test results for each individual user. An administrative user is a special class of user who is able to create and modify tests, questions, skill levels, groups, and other users.
The remainder of this document will focus on creating a new testing system from scratch, showing how to use some of the features along the way.
This is the main Learning Center screen. The first thing we need to do is login with an administrative account. Enter the username and password in the Log in box, and then press the Login button.
Once you are logged in, the menu below will appear on the left-hand side of the screen. This menu contains all of the administrative functions used to maintain the tests. Lets go through these options one by one.
Change password is used to change your password. Everyone has access to this item.
Log Out logs you out of the system and takes you back to the main page.
Add skill level is used to add a new skill level.
Add Test is used to add a new test
Add multiple choice question is used to add a new multiple choice questions. Multiple choice questions are a question and 4 possible answers. The user picks the answer they believe to be correct
Add true/false question adds a true false question. True false questions are a statement. The user has the option to choose whether the statement is true or false.
Add user adds a new user to the system
Add group adds a new user group to the system. Groups will be discussed in detail later
View security log is used to view any potential abuses to the system
The rest of the options are for editing or viewing the current components listed above.
The first thing wed like to do is add a skill level. A skill level is a way to group questions together. If you have 20 questions, all belonging to a skill level called Windows, and you make a test called Windows test with the skill level of Windows, only questions from the Windows skill level will be included on the test. Below youll find out what the Add Skill Level form looks like.
Lets call this skill level Windows 95. Type in Windows 95 and press the submit! button. When we press submit, the skill is added, and we are automatically taken to the screen which shows all of the skill levels in the system
We see at the top that the skill was added successfully. Our new skill is listed at the bottom. The header columns in blue are clickable; you can sort that column by the header if you click on it. In this example we can sort by either s_id, or by name. s_id is the internal identifier for that skill level, so you dont need to worry about it.
Now that weve added our skill level, we need to add some questions for our test. On the left hand menu, lets click on Add multiple choice question. The screen below is loaded. In this case Ive already filled in the appropriate fields:
Weve selected windows 95 for our skill level. Our question is What does BSOD stand for?. The correct answer weve typed in is Blue Screen of death. Then we typed in our alternate incorrect answers. We want this question to be required on the test, and we will leave the weight at 1 point. When the data is all entered, press the submit! button. The question is added and we are taken to the View / Edit questions page automatically with a list of all questions in the system, shown below
Again, the blue header columns are clickable to sort by a given value. We see the question id, the skill level associated with the question, if the question is required or not, the question type (essay, multiple choice, or true/false), the weight, the question, the correct answer, and the alternate incorrect answers. There is also an option to delete or edit each question by clicking on appropriate link. The question we just added is shown first because I sorted the list descending by question_id.
Youll want to repeat the process for as many questions as you would like for your skill level. Once you add all of your questions, click on the Add Test link, located on the left-hand menu.
The following screen is shown. Ive filled in the parameters we want already:
When we press the Submit! button, were taken automatically to the View / Edit tests screen:
Our test is listed at the bottom. The important part of this screen is the preview URL. If we click on this, we can see a preview of what our test looks like. At this point we need to digress a bit to explain how the tests are generated. From the screenshot, we see that were having 4 required questions and 2 random questions on this test. When the test gets generated, it first randomizes the required questions and puts them on the test. Then, it randomly selects the number of random non-required questions and adds them to the test. For instance, lets pretend that we have 4 required questions and 10 random questions total for our Windows 95 skill level. When the My Windows 95 test is generated, the same 4 required questions will be on the test every single time. However, since there are only supposed to be 2 random questions on the test, the program randomly grabs 2 out of the 10 possible random questions and adds them. The effect of this is that the test is different every time it is taken. The questions might be the same, but they will be presented in a different order. This helps to discourage cheating and presents a greater challenge to the test takers. Now lets view our test by clicking on the preview link:
Because were previewing the test as an administrator the correct answer is marked with [correct answer] for each multiple-choice question. Lets log out, log in as a regular user and view the test again:
This time, the correct answers arent shown. We also notice that the questions are in a different order. Im going to take the test now; Ill get some of the questions wrong purposely for illustrative purposes. When finished with the test, press the submit button at the bottom. The next page appears:
Now lets log back in as an administrator and view the results of this users test. To do so, we first click on the View / Edit Users link on the left-hand menu. This pulls up a list of everyone who has an account on the system:
To view any users test results as an administrator, click on their username. Brandon Tallent was the user that just took the test, so lets click on tallenb:
Were shown a list of all of the tests this user has taken. You can see that the Points Scored and Points possible are displayed, as well as the score in a percentage format. The test that I just took, My Windows 95 test, is listed at the bottom. I got a 67%. Since the questions are in a different order each time, the entire test is stored along with the results. To view the test exactly as the user saw it, click on the view answers link. A popup window will appear with each question, users answer, and correct answer:
An administrator can view anyones test results, however a regular user can only view their own. The popup window is just a regular web browser window, so you can print it or copy and paste it if you wish
That completes the tour of the testing functionality of the system. Next well take a look at users and groups
Users and groups need to be added before a test can be taken. Groups are a way of grouping together similar users and tests. For instance, we may have one group that contains 5 users called help desk, and another group containing 10 users called level 2 support. Level 2 support is not interested in seeing the tests available to the help desk group, and vice versa. Each user who logs in will only be able to take the tests that are currently viewable and that belong to the same group that they are in. Adding a group is similar to adding a skill level. Click on the Add group link from the left-hand menu. The following screen appears:
Type in the name of the group you wish to add and press the submit! button. Keeping with our example well call this group Level 2 support. As with other additions, when we submit the form were taken to the listings of Groups with a notification that the Group was added successfully:
Now, we can add new users to this group, or modify existing users and assign them to this group. To add a new user, click on the Add User link from the left-hand menu. The page below is loaded (the fields are already filled in for this screens shot):
Enter in the username and the password you wish to add, along with the email address, real name and group. Were adding this user to the Level 2 support group so that theyll only be able to see Level 2 Support tests. We could check the admin box if we wanted this user to have administrator privileges. As a side note, the passwords stored in the database are encrypted, so not even an administrator knows what they are once the user changes them. Heres an example of how the user record looks in the MySQL database:
As you can see, the password is encrypted. When a user tries to login, the program encrypts their password, and then compares it to the password stored in the database. If the passwords match, the user is authenticated.
Getting back to adding a new user, once the form is submitted, well be taken to the Edit / View users page, shown in part below:
Now the user has been added, and can login to take any test available to him.
Since phpTest is a web based application, security is important to make sure that a malicious user cant modify or view someone elses test results or worse yet, the correct answers to the tests themselves. If a user tries to access an unauthorized page, they receive an error, and an entry is recorded in the security log. A screenshot of the error is below:
he security log is available to administrator in the left-hand menu by click on View Security log. It shows a list of all administrator-only pages that have been accessed by a non-administrator.
The username is listed as none if the person who tried to access the page was not currently logged in. However, their IP address is still recorded. If there were an abuser, it would be easy to trace them back to their computer on a local intranet by running the nslookup command from the dos prompt. For instance, if we run it on the IP address above, we find that the malicious user was at machine GP91922 while accessing the pages: