UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Multiple choice test design    
 
   
gigabyte
post Jan 18 2004, 06:11 PM
Post #1

New Member
Posts: 19
From: Montichiari, Italy



Hi. I'm relatively new at Access programming, so please bear with me...

I'm trying to design a multiple choice test with random selection of questions and random sorting of answers. I've got the "random" part down on both counts, but I'm stuck trying to store a user's selected answer. I originally planned an append query that added each wrong answer to a "Wrong Answers" table as the user made each selection. However, I would prefer to allow the user to scroll back and forth through the test form and change their answers as necessary. I'm using a list box for answer selection, but I'm running into two problems:

1. Where do I store the selected entry? Do I need some kind of temporary table that stores the random questions and selected answers for later scoring?

2. Clicking on my list box doesn't select anything. I assume this problem is related to the first.

I've attached a copy of my DB in case my rambling explanation needs further clarification...

Thanks in advance.
G
Go to the top of the page
 
+
kkeydel
post Jan 18 2004, 07:05 PM
Post #2

UtterAccess Addict
Posts: 297
From: Seattle, WA



To create a multiple choice test, create your question table like so...

tblQuestions
-ID
-QuestionNumber (PK)
-QuestionText
-CorrectAnswer
-ChoiceAText
-ChoiceBText
-ChoiceCText
-ChoiceDText
...etc.
-IllustrationKey (Question Illustration filename)
-IllustrationPath (Path to locate illustrations)

Then, you're actual test is generated randomly and placed into a table like below.

tblRandomTest
-TestID (PK)
-UserID(FK)
-QuestionNumber (FK)
-MyAnswer -The user's answer is inserted here
-MarkForReview Yes/No - Does the user want to return to review this question?
-QuestionAnswered Yes/No - Has the user attempted to answer this one, yet?
-QuestionCorrect Yes/No

Join the two tables on the QuestionNumber and insert the user's answer into the MyAnswer field. Note: If you have several different sections of questions, use both the SectionNumber and the Question number as the unique index. Mark the answer correct (true) or incorrect(false) and you've got all of his answers and scores available.

Generate your random text and insert those question numbers in the Random test table. When an answer is correct, set its QuestionCorrect field to true. When the test is done, you can dump the results of the Random Test into a storage table that will display the questions that were answered correctly, incorrectly and (if you so desire, Marked for Review).

So, while you do append the test into an ExamHistory table, you don't need to store just the wrong answers. In this way, your users can go back and review every question, or change the answers on the questions marked False in the QuestionCorrect field.

Does this help?

Kurt
Go to the top of the page
 
+
gigabyte
post Jan 18 2004, 07:15 PM
Post #3

New Member
Posts: 19
From: Montichiari, Italy



Wow! It'll take me a while to digest all that, but I think you've solved my problem. Thanks for your help.

G
Go to the top of the page
 
+
kkeydel
post Jan 18 2004, 07:28 PM
Post #4

UtterAccess Addict
Posts: 297
From: Seattle, WA



Actually, here's an example for you. This is a brief Coast Guard Marine Engineer's test. I built a complete version in Visual Basic, but this was a kind of prototype. I haven't included any of the random test generation code, but it sounds like you've got a handle on that. You'll see that the structure is really quite simple. This may give you more ideas, too.

Kurt
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 23rd May 2013 - 03:23 PM