Suggestions Re: quiz files (maybe XML topic)

Mats Wichmann mats at laplaza.org
Tue May 29 17:13:26 EDT 2001


This isn't specifically a Python question, but I'd like to solve it
with Python.

I've got some semi-interactive technical quizzes that I maintain.
They're presented as a web page with multiple-choice questions, when
an answer is chosen, it is responded to using Javascript - the design
is that the comments in the answer can be seen on the same screen as
the question (as opposed to popping up a /new/ page where you'd have
to work the back button). I can imagine another way to present this
information, but that's for some other time: I inherited this
framework and don't want to ditch it just yet.

The problem is that maintaining these guys by hand is, well,
cumbersome, to use a polite term.  

I'd like to generate the quiz pages from a source that gives me a bit
more flexibility and maintainability.

I'm thinking xml might let me invent a markup language that would
cover my needs, something like this (no extensive thinking here).

<quiz>
<question>
<problem> ... </problem>
<answer type=wrong>
<explain> ... </explain>
</answer>
<answer type=right>
</answer>
</question>
<question> .....
.....
</quiz>

But I'm an xml-idiot, I don't really even know where to start.  The
Python xml docs are written with the view that you know what you are
doing, which is not me (yet).

Questions:

Is the above a wrong-headed approach? Is there something drastically
simpler that I have overlooked?

Is there enough xml support provided with Python 2.1 and/or PyXML to
implement something like the above where I don't have to invent a lot
of new "stuff"?   There is not a lot of spare time to work on this.

Where do I go for on-topic information/tutorials/etc. that would get
me pointed the right way, again given that spare cycles (of me, lots
of CPU cycles available) are limited...

Mats Wichmann

(Anti-spam stuff: to reply remove the "xyz" from the
address xyzmats at laplaza.org. Not that it helps much...)



More information about the Python-list mailing list