Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Oct 2006
    Location
    Spain
    Posts
    147
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Suggestions for a script

    Dear friends,

    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?

    Thank you

    LL

  • #2
    Regular Coder
    Join Date
    Mar 2007
    Posts
    505
    Thanks
    1
    Thanked 19 Times in 19 Posts
    Hi LL --

    What you are asking for is more of an application than a script.

    You will have to store these in a table --

    [PLUG] 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. [/PLUG]

    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!
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.

  • #3
    Regular Coder
    Join Date
    Oct 2006
    Location
    Spain
    Posts
    147
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Daemonspyre,

    Thank you. It is a light in my way!

    Lebron


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •