Multiple Choice Questionnaire Designer

C

Clippy

Hey everyone

Hope someone can help me,a beginner, with this query. Any help very much
appreciated!

What I basically want to end up with is an HTML program to use offline that
on loading will generate a page displaying 50 random questions from a pool
of say 200 with four multi choice radio buttoned options. At the end I need
a submit button that will check the answers and display results as correct /
incorrect and give a total out of score etc.

I've certainly seen this sort of thing on websites and I can easily create a
page with options and radio buttons. Obviously the tricky part is how to
link in with the questions file / generate random questions to display and
then check results (that'll be about everything then! lol).

Seriously if anyone can help or even better know of a template set of files
I can then edit it would be a very big help.

Many thanks in advance

Clippy
 
W

Weyoun the gowd damn Dominion Vorta who certainly

Hey everyone

hey

Hope someone can help me,a beginner, with this query. Any help very much
appreciated!

What I basically want to end up with is an HTML program to use


offline

that's the important bit.
that
on loading will generate a page displaying 50 random questions from a pool
of say 200 with four multi choice radio buttoned options. At the end I need
a submit button that will check the answers and display results as correct /
incorrect and give a total out of score etc.

I've certainly seen this sort of thing on websites and I can easily create a
page with options and radio buttons. Obviously the tricky part is how to
link in with the questions file / generate random questions to display and
then check results (that'll be about everything then! lol).

Seriously if anyone can help or even better know of a template set of files
I can then edit it would be a very big help.

Many thanks in advance

learn a language. C++ or something. If you want it truely offline, you
cant do it in a browser. You'll need a high level language to do this.
If you can run a server on your own PC (IIS, Apache etc) then you can do
it in PHP, ASP or Perl but as you stated "offline" those would be
impossible to use.
 
D

David Dorward

Weyoun said:
You'll need a high level language to do this.

You could write it in a low level language too - but that would be painful.
If you can run a server on your own PC (IIS, Apache etc) then you can do
it in PHP, ASP or Perl but as you stated "offline" those would be
impossible to use.

I don't know about ASP, but PHP and Perl certainly don't require a web
server and are more then capable of producing static files.
 
J

Jeff Thies

Hope someone can help me,a beginner, with this query. Any help very much
appreciated!

What I basically want to end up with is an HTML program to use offline that
on loading will generate a page displaying 50 random questions from a pool
of say 200 with four multi choice radio buttoned options. At the end I need
a submit button that will check the answers and display results as correct /
incorrect and give a total out of score etc.

Google is invariably your friend on such things. Try a search:

<URL:
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=random+question+form&
btnG=Google+Search >

This is a fairly easy thing to do, pulling random questions and answers from
a database. Embed the correct answers in the form (ie set the value of that
radio button to true, or to a score), and it becomes trivial to score.

You may wish to choose the server enviornment/language you wish to use, and
ask this question in a newsgroup related to that.

Cheers,
Jeff
 
J

Jeff Thies

Hope someone can help me,a beginner, with this query. Any help very much
My mistake, I missed the offline.

Ask nicely in comp.lang.javascript. How's your javascript?

It will involve arrays.

Cheers,
Jeff
 
T

Toby A Inkster

Clippy said:
What I basically want to end up with is an HTML program to use offline that
on loading will generate a page displaying 50 random questions from a pool
of say 200 with four multi choice radio buttoned options.

This could be done, though it would be very, very crummy. To do it
properly you really need to use server-side scripting.
 
S

SpaceGirl

David Dorward said:
You could write it in a low level language too - but that would be painful.

I don't know about ASP, but PHP and Perl certainly don't require a web
server and are more then capable of producing static files.

Can PHP run without a server? I didn't know that. ASP definitely requires a
server of some sort; but luckily the server that's needed is build into
Windows 2000 & Windows XP, so it's not like you have to invest in anything.
 
C

Clive Moss

Clippy said:
Hey everyone

Hope someone can help me,a beginner, with this query. Any help very much
appreciated!

What I basically want to end up with is an HTML program to use offline that
on loading will generate a page displaying 50 random questions from a pool
of say 200 with four multi choice radio buttoned options. At the end I need
a submit button that will check the answers and display results as correct /
incorrect and give a total out of score etc.

I've certainly seen this sort of thing on websites and I can easily create a
page with options and radio buttons. Obviously the tricky part is how to
link in with the questions file / generate random questions to display and
then check results (that'll be about everything then! lol).

Seriously if anyone can help or even better know of a template set of files
I can then edit it would be a very big help.

Many thanks in advance

Clippy
I did something like this a while back using ASP but it does require IIS (on
Windows 2000 or XP)

Contact me direct if you want my help

Clive
 
W

Weyoun the gowd damn Dominion Vorta who certainly

David said:
I don't know about ASP, but PHP and Perl certainly don't require a web
server

I may be wrong on Perl. PHP needs to be run on a server. You can't just
open a PHP file if you want it to generate pages. It needs to be run on
a server.




and are more then capable of producing static files.

sure, but you need it on a server first. That's why you need to install
PHP onto Apache in order to run a PHP website. You can make a PHP file
and upload it, but it wont "do" anything. It needs to be run on a PHP
enabled server in order to do what the OP wants.

Take my PHP message board. I can't just copy that to my C:\ and run
index.php inside my browser and expect to be able to make posts. I needs
to be run on a PHP enabled server.

I can view the files in a browser, sure, but I can't do any more than that.
 
M

Michael Winter

I may be wrong on Perl. PHP needs to be run on a server. You can't just
open a PHP file if you want it to generate pages. It needs to be run on
a server.

No it doesn't. You can run it from the command line. Chapter 23 in the
manual:

<URL:http://www.php.net/manual/en/features.commandline.php>

From my Window's prompt, I can type:

F:\PHP\PHP test.php > test.html

and it will create a static file, test.html.

In Linux, you use the -f flag to specify a file.

[snip]

Mike
 
W

Weyoun the gowd damn Dominion Vorta who certainly

Michael said:
No it doesn't. You can run it from the command line. Chapter 23 in the
manual:

<URL:http://www.php.net/manual/en/features.commandline.php>

From my Window's prompt, I can type:

F:\PHP\PHP test.php > test.html

and it will create a static file, test.html.

In Linux, you use the -f flag to specify a file.


which I suppose is easily doable and reproducable for a website ?
 
M

Michael Winter

Michael Winter wrote:

[generating static pages on the command line]
which I suppose is easily doable and reproducable for a website ?

I'm correcting you on a point of fact, nothing more. Invoking the
preprocessor from the command line may be of no use to the OP, but as your
previous post was the second time you were mistaken, I thought I'd make an
irrefutable correction.

Mike
 
W

Weyoun the gowd damn Dominion Vorta who certainly

Michael Winter wrote:

I'm correcting you on a point of fact, nothing more. Invoking the
preprocessor from the command line may be of no use to the OP, but as
your previous post was the second time you were mistaken, I thought I'd
make an irrefutable correction.

oh :)

thanks - I might use your advice wven making sites - ty :eek:)
 
T

Toby A Inkster

Michael said:
From my Window's prompt, I can type:

F:\PHP\PHP test.php > test.html

and it will create a static file, test.html.

In Linux, you use the -f flag to specify a file.

You don't need to use the '-f' flag at all. You can redirect to a file
using '>' the same way as in DOS.
 
C

Clippy

Hey

Thanks for all the help everybody. Just thought about html / java as it's
pretty simple and i'm a ludite when it comes to these things. I know I've
seen what i want imlimented before on webpages etc so my mind made the
logical jump that this would be the easiest way to proceed.

I shall think on on whats been said

Cheers
 
J

Jeff Thies

Hey
Thanks for all the help everybody. Just thought about html / java as it's
pretty simple and i'm a ludite when it comes to these things. I know I've
seen what i want imlimented before on webpages etc so my mind made the
logical jump that this would be the easiest way to proceed.

I mocked this up in javascript. If you like I'll put it online . Gotta run
at the moment...

Cheers,
Jeff
 
M

MeIsDavid

Michael Winter said:
No it doesn't. You can run it from the command line. Chapter 23 in the
manual:

<URL:http://www.php.net/manual/en/features.commandline.php>

From my Window's prompt, I can type:

F:\PHP\PHP test.php > test.html

and it will create a static file, test.html.

In Linux, you use the -f flag to specify a file.

Not necessary to use flags to create a file:
$ /usr/local/bin/run.php > file.html
will create your file. Just use >> to keep appending from different sources.
php does *not* need a server to run.
 
C

Clippy

Jeff Thies said:
I mocked this up in javascript. If you like I'll put it online . Gotta run
at the moment...

Cheers,
Jeff

That would be great, as and when you can. Many thanks for the assistance.

Clippy
 
B

Ben Measures

Toby said:
Clippy wrote:




This could be done, though it would be very, very crummy. To do it
properly you really need to use server-side scripting.

No you dont:
(X)HTML + DOM + JS + CSS

Or if you want to be more modern:
XML + DOM + JS + XSL(T)
which would only need the JS to provide randomness (it could be any
other language with a DOM interface and random number generation). This
has the advantage of being portable enough to be done server-side as
well as client-side.
 
T

Toby A Inkster

Ben said:
No you dont:
(X)HTML + DOM + JS + CSS

Which would be a crummy solution as the answers would be clearly visible
by just viewing the page source.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top