Description

I'm currently working on a "quiz plugin" for MoinMoin. It's a set of plugins (parser, action and several macros) designed to make sort of, well, egzams.

Basically you prepare a form, with quoestions and answers. Users come to the page, fill in the form, and when they do so, new subpages with their answers are created.

Once the time's up, you fill the form yourself, giving the correct answers, and put on the page a macro that will look trough all the subpages and compare them with yours, displaying a score table (and maybe some pretty stats and charts later).

Progress

So far I used a parser based on SectionParser to display a <form> on the page, and then some macros to display the <input> tags (it would be nicer to just introduce some additional markup for the tags in the parser itself).

The quiz action is used to submit the form, and to create a subpage (named after the user) out of it.

The QuizScore macro reads all the subpages, compares them to the one you pass it, and displays scores.

Problems

Subpage rights

Writing

The users can hand-edit the subpages, causing some problems for the score macro. Can be probably fixed by better error handling.

The users need global write rights to be able to create the subpages.

Reading

Users can peek into each other's answers. It's OK for an entertainment quiz, but I want it to try it for some real-life egzams.

I can put proper ACL to newly created pages, but to do so the user who submits the form must have global admin rights, so it's a little silly.

Limiting access

One possible solution would be to create all the subpages with proper ACLs on them before the quiz starts. But that's a lot of work, even using a macro.

Is there any way to set ACLs for creating subpages?

The CopyPage action can be used to copy a page (template) with acls to another one. So the page is created with acls. Then you don't need admin rights for the user. -- ReimarBauer 2008-09-08 15:09:07

Code

Note that this is not a universal, working solution, it has been developed to work on a single wiki instance with specific settings. It's provided for reference.

quiz_action.py quiz_parser.py quiz_X.py quiz_O.py quiz_I.py quiz_score.py test_score.py

MoinMoin: RadomirDopieralski/QuizPlugin (last edited 2008-09-08 15:09:46 by ReimarBauer)