I think set-tags counts as an edit (I need to test it with a non-admin account), so blocking a user from editing their test might not be doable. Also, setting up a framework for a lot of questions might get a tedious.
My thoughts are along the same lines as helmuti's idea, but using data forms. If you want to use data forms, I would envision a system like Rob describes, with each question tied to a single data form. Once a question is answered and the page is saved, the user would click a button to confirm their answer. Since the page reloads after setting the tags, you could use iftags to hide the confirm button and expose a link to the "Next Question", repeating this process for each question until you are finished with the test.
Each test would require a group of categories, each with their own data form template page:
test1q1:_template
test1q2:_template
…
test1qn:_template
On the data form, I'd structure the questions like this:
[!-- form for test1q1 --]
[[form]]
fields:
question:
label: Which number is closest to PI?
type: select
values:
wrong1: 3.41
wrong2: 4.31
correct: 3.14
wrong3: 4.13
[[/form]]
Then you could use set-tags to confirm the answer. This would tag the page with _wrong1, _wrong2, _wrong3 or _correct. You'd also need to add some kind of unique identifier tag (user-name perhaps) to the set-tags button so the answers can be grouped together by user.
[!-- not sure if %%created_by_unix%% can be used this way --]
[[button set-tags +_%%form_raw{question}%% +_%%created_by_unix%% text="Confirm Your Answer"]]
After repeating this setup for each question, you could then use ListPages to display the number for correct responses once the test is completed:
[[module ListPages category="test1q1 test1q2 ... test1qn" tags="+_correct +_%%created_by_unix%%" limit="1"]]
Out of n questions, you answered %%total%% of them correctly.
[[/module]]
This is all off the top of my head, and surely needs more work, but this is one approach I'd take if I were trying to build a multiple choice test using data forms.
I'm sure someone else will probably have a simple solution I'm not thinking of to do this all on a single data form. My motto:
If it can be done in one or two steps, I'll figure out how to over-complicate it and make it fifty steps! ;)
This is a good discussion. I can make use of something like this for my company's site.