Hi All,

I have written a number of quizzes that are generated by a program based in their Moodle user ID. This means that each student receives their own version of a problem. I use it in labs and it encourages student discussion as students show their peers how to go about solving the problem rather than just supplying the answer (which they can't do since each answer is different).

It is hard to describe without an example, and so, an example: I teach an algorithms module and as part of that module, students learn about graphs. Here is an example question on depth first search. You will have to log in to see it, but I can give you a gist of the question without logging in...

Each student is asked to indicate the order in which the nodes of a graph will be visited by depth first search. And each student is given a different graph; here is an example graph: http://toodle.computing.dcu.ie/dyngraph/graph/77_7_3_.3.png

The url indicates that this graph is a static image, but actually it is generated on the fly using a computer program. There are four numbers separated by three underscores. The first number, 77, is a seed. Changing this gives you a different graph. The second number is the number of nodes, third number is the maximum number of outgoing nodes and the final number is a number between 0 and 1 which is the probability that one node will be connected to another (subject to the previous number's constraint).

So, I can now pose a general problem on graphs and each student gets a different version of the problem and it hugely encourages discussion in computer labs. These problems are also automatically marked.

Now for my question. To generate these problems I use Python. I also use Python to mark the problems. Unfortunately, since Moodle doesn't use Python, I use the VPL plugon to allow me to write these problems. On the front end, I have to use javascript to decode the Moodle user ID and course ID. This is obviously not good design.

I want to adapt the Moodle Quiz plugin so that I can easily incorporate python code in the description and the solution of the problem. I know that some plugins already exist, but they look as if they provide far more than I need.

I simply want to supply the quiz with the URL of a Python program which will generate the html text of the problem based on a user ID and course ID and also provide a mark for the student response. I just wanted to know if anyone else has done similar work in the past or if anyone has recommendations on how to proceed.

I really am not a PHP person and find it hard to write code in PHP. Also much of the useful open source software (such as the software to draw graphs) already exists in Python.

Thanks for reading this far and for any suggestions,

Charlie