Suggestions

I have a test generator that students take test with. It puts the questions in a list format and they answer each. The problem is if they get disconnected from the network and hit submit they lose all their work.

Maybe, save each question as its answered through an asynchronous call somehow? store them locally somehow? Suggestions on a good approach?

Thanks,
Matthew
-Matthew-Asked:
Who is Participating?
 
SidFishesCommented:
YOu've got the Asynch idea right but CF event gateways aren't meant to do this kind of thing.

"ColdFusion event gateways are ColdFusion elements that let ColdFusion react to or generate external events or messages in an asynchronous manner. Event gateways let a ColdFusion application handle information that does not come through an HTTP request. For example, you can use event gateways to handle instant messages, short messages from mobile devices, or messages sent to a TCP/IP port."
http://livedocs.adobe.com/coldfusion/8/htmldocs/UseGateways_2.html#132743

What you need is basic AJAX (asynchronous JavaScript and XML) -

When a user answers a question, use JS to fire off a GET to a CFC with URL variables including the testid, userid, questionid  and answerID  to the server. This all happens behind the scenes (thus asynch).

There a tons of different ways to use & call ajax  and all the cool kids are doing it (it's web 2.0!)






0
 
MuffyBunnyCommented:
The asynchronous call idea is a great one if you can work it out. Here's an article that may come in handy for that.

http://australiansearchengine.wordpress.com/2008/02/01/coldfusion-asynchronous-calls-event-gateway/

Otherwise there's always the old page refresh every time they answer a question. You could handle the ugly aesthetics of that concept by doing 1 question per page with a next button.

I used to work at a company that wrote LMS's (learning management systems) for large companies and if I remember correctly, we wrote all of our tests one question per page.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.