Link to home
Start Free TrialLog in
Avatar of Steve3k
Steve3k

asked on

Building an Exam page - over and over and over - easier?

I am making series of web pages that will consist of one page with a multiple-choice question and three possible answers, and a corresponding page containing the correct answer, along with an explanatory paragraph.  Clicking on any of the answers would take you to the answer page for the question.  There will be a total of 300 question pages, with 300 corresponding answer explanation pages.  Is there any way I can make a template that I can easily copy/paste the questions and answers into in order to simplify creating these 600 pages?  The pages themselves will be very simple text with no graphics.

I would like the question page to appear something like this example:
________________________________
Spanish Trivia

Question # 1

The rain in Spain falls mainly on the:
A) Mountain
B) Plain
C) City

Last updated: 4/4/2004
________________________________

And I would like each answer page to appear something like this example:
________________________________
Spanish Trivia

Answer to Question # 1:

The rain in Spain falls mainly on the: (B) Plain.
The correct quote for question # 1 is "The rain in Spain falls mainly on the Plain."

Click HERE for Question #2

Last updated: 4/4/2004
________________________________
ASKER CERTIFIED SOLUTION
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of webwoman
webwoman

Better yet, use a database. ;-)

Then you can modify the questions/answers without having to redo the HTML, have more than 3 answers if you want, and if you want to change the design of the page, you have 1 or 2 pages to change, not 300.  
Avatar of Steve3k

ASKER

Wow!  Cd& - you definitely have earned points on that answer.  That's something I can tweak for future applications.

Webwoman - If you can talk me through how to do this using a database (I have MS Access) I will start up a new question to track the points for you at the same level as this question.  Let me know if this is something you'd be willing to do and I'll create the new question to track the points.

Thanks to both of you!

Steve
Glad we could help.  Thanks for the A. :^)

Cd&
I can do better than talk you through -- I can zip up a database and the code for the quiz AND the scoring. I can't do it right now though. When you're ready, post a question and I'll get it all together. ;-)
Avatar of Steve3k

ASKER

Oops - I meant to ask a question about Cd&'s answer above.

What would I need to do to the script if I wanted to open a different link based on the answer that is selected?  For example:

If answer (A) is the correct answer and (A) is chosen, open a page that says "Correct" with a link to the next question.  If (B) is chosen, open a page that says "Incorrect" with an explanation why that answer is not the correct answer.  This page would have a link back to the question that was just answered and another link to the next question.

Thanks again!

Steve
Avatar of Steve3k

ASKER

Webwoman -

Done!  If possible, I would like to incorporate the same type of revision I posted above to Cd&.  Also, any tips you can give on how to revise the database on my own would be appreciated.

And it (almost) goes without saying -- you two are awesome!

Steve
Steve,

You would need to add additional inputs for the links to be entered and put them into generated strings.  You would also need to add events or scripting to test for correctness.

However I would advise against that, because it would introduce an easy way to cheat.  The re-direction from the client would require the answer to be available on the page. A user could simply view the source to see what the correct answer is.  You really need to check correctness on the server side, and then send back the approprate page, so that the users cannot peek at the answers.

Cd&
Webwoman,

Did you ever get around to doing this?...
"...
I can do better than talk you through -- I can zip up a database and the code for the quiz AND the scoring. I can't do it right now though...."

This is exactly what I'm looking for.

Thx, kls_tech