I have created an assignment where the question varies depending on the user id of the student. This is very handy as each student gets a different question and they can discuss the questions with each other. In fact, students are encouraged to discuss solutions among themselves.
In this question, a different network is created for each student and when the student submits the solution, it is compared with a computer generated solution. Each student gets an individual question and each submitted solution is marked immediately by the computer.
I have included more technical details below for those interested.
However, I have a problem. I cannot access the user id in the description of the assignment, so I cannot link the network diagram directly. Instead, I have to use a clumsy system where the student submits a dummy solution in order to get the url of the diagram which they can then use to solve the problem. I am sure there is some way to access the user id within the description of the assignment, but I can't work it out and my internet skills have failed me. Please, can someone help?
Technical details about this question type
I have created created a Virtual Programming Lab (VPL) assignment which is usually used to assess programming questions. The environment provides access to the Moodle user id. Based on this id, I create a unique network or graph and then I generate a diagram using graphviz. The student gets the diagram and then solves the question (which could be to show the order that the nodes are visited using Dijkstra's algorithm). When the student submits a solution, an identical network is again generated using the user id and is solved using a computer program and this solution is compared against the student solution.
Obviously, this question type idea is very general and can be used in many contexts, especially scientific ones.
Of course, I know how to access the user id when I am writing the VPL question (the VPL environment provides it directly), but I cannot work out how to access it from the description setting and therefore cannot include the image directly in the description which would be the icing on the cake. By the way, I would prefer to be able to include PHP directly in the assignment spec. I have tried enabling the trusted content flag but that doesn't seem to work for PHP.