View Full Version : Suggestions for a script
06-05-2007, 01:40 PM
I am looking for suggestions and/or help for doing an Asp script for making online exercises of language, such as:
1. Fill the blanks
Write at,to, near,on:
_____my house there is abig tree
Her house is ______ the school
2. Is this his record?
Evidently I would need do a table with the answers, however how I do the Asp script? Do you have suggestions please?
06-05-2007, 02:22 PM
Hi LL --
What you are asking for is more of an application than a script.
You will have to store these in a table --
MySQL for your database is best. It's free, easy to use and maintain, and comes with its own forums here on CodingForums and on MySQL Forums.
You will need 2 tables. 1 to store your questions, 1 to store your answers.
Since, by your example, each question will be either a RADIO button or a TEXTFIELD, you may want to setup a 'question type' field in your Questions table.
In the Answers, have multiple answers with a 'Correct' answer yes/no field and a QuestionID field.
When doing the comparisons of the Radio buttons, it's easy to compare if the answer they gave was the correct one. If it wasn't teh correct answer, do a simple error check (if request.form("radio") <> rs("correct") then ErrText = "you supplied the wrong answer. Please try again" kind of thing)
For the Textfields, you may want to consider using the SOUNDEX SQL expression. SOUNDEX uses algorithms to determine if one word "sounds like" another. So, YES and YA will be similar enough to get a correct hit.
On your tables, you will need to store your data in UTF-8 with different collations for different languages.
I have lived and died through something very similar to this, although my questionnaire software has 21 different question types and full error checking.
Hope this helps get you on the right track!
06-05-2007, 09:47 PM
Thank you. It is a light in my way!
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.