Connecting Tech Pros Worldwide Forums | Help | Site Map

uploading a question bank

Newbie
 
Join Date: Sep 2008
Posts: 2
#1: Sep 28 '08
HI all,
I need to post 100 questions in my website(A website relating to a acadamic institution) with each having 4 possible answers to choose from.i.e question and then below it four answers with radio buttons to choose the answer.if it is a correct answer then the score incriments else the correct answer must be shown.Please give me an idea how to handle this.i.e tell me where should be the question and answers saved and how should be they called and validated.

Sorry if it is not properly worded.Thank u

Shashi Sadasivan's Avatar
Moderator
 
Join Date: Aug 2007
Location: Brisbane, Australia
Posts: 1,414
#2: Sep 28 '08

re: uploading a question bank


How much have you thought about it ?
please post your thoughts and we can help you finetune it.
joedeene's Avatar
Site Addict
 
Join Date: Jul 2008
Location: US of A
Posts: 587
#3: Sep 28 '08

re: uploading a question bank


Quote:

Originally Posted by goutham39

HI all,
I need to post 100 questions in my website(A website relating to a acadamic institution) with each having 4 possible answers to choose from.i.e question and then below it four answers with radio buttons to choose the answer.if it is a correct answer then the score incriments else the correct answer must be shown.Please give me an idea how to handle this.i.e tell me where should be the question and answers saved and how should be they called and validated.

Sorry if it is not properly worded.Thank u

perhaps a using a database(sql, or ms access) and like assign each question with an id, then randomize it and pull it from the database, and have a checkanswer() function that looks at the ID of the question and will check if the answer is right or not, and how to handle it? (like if its not correct it will show the correct answer and deduct the users correct answer) uhm, something like that maybe, just an idea, if u have code im sure many of us here could assist.

joedeene
Newbie
 
Join Date: Sep 2008
Posts: 2
#4: Sep 29 '08

re: uploading a question bank


Quote:

Originally Posted by joedeene

perhaps a using a database(sql, or ms access) and like assign each question with an id, then randomize it and pull it from the database, and have a checkanswer() function that looks at the ID of the question and will check if the answer is right or not, and how to handle it? (like if its not correct it will show the correct answer and deduct the users correct answer) uhm, something like that maybe, just an idea, if u have code im sure many of us here could assist.

joedeene


Hi,
I was thinking of writing a xml file with all the questions and then read this file in to the page and save it to a directory.i.e to add an XML Question Bank.

Questions.xml

<?xml version="1.0"?>
<QUESTIONS bank_id="General Knowledge">

<QUESTION No="1">
What is the color of sky?
<ANSWER No="1">Red</ANSWER>
<ANSWER No="2" right="true">Blue</ANSWER>
<ANSWER No="3">Brown</ANSWER>
<ANSWER No="4">Green</ANSWER>
</QUESTION>

<QUESTION No="2">
What is the color of Grass?
<ANSWER No="1">Red</ANSWER>
<ANSWER No="2">Blue</ANSWER>
<ANSWER No="3">Brown</ANSWER>
<ANSWER No="4" right="true">Green</ANSWER>
</QUESTION>

</QUESTIONS>

How abt this??but i dont know exactly how to read this file in to the page and then validate.

Best Regards,
Goutham
insertAlias's Avatar
Forum Leader
 
Join Date: Apr 2008
Location: San Antonio, TX (USA)
Posts: 2,608
#5: Sep 29 '08

re: uploading a question bank


Well, if you are going to use XML, then you need to look up the System.Xml namespace. Or, if you are using .NET 3.5, you can look up LINQ to XML that will make things quite easy once you know what you are doing.

As to the rest of your question, we can't write the logic of your program for you. We can help you with coding problems, but we can't design your site.

MODERATOR
Reply