|
I found a solution to use essay questions in random, see this discussion:
http://moodle.org/mod/forum/discuss.php?d=50903 add some improvemnts, it's not perfect but it works. I'm attaching a patch to solve this. Paulo Patch Updated/Verified against moodle v1.6.4+ (2006050540).
Paulo's patch is on the right lines, but unfortunately it is not quite right.
The problem is that some random questions pick not just from a single category, but from a category and all its children. Therefore, the SQL in view_questions in mod/quiz/report/grading/report.php needs to be made even more complicated. We've (vlacs.org) run smack into this one and we need it fixed (in 1.8), so I guess I'll probably be working on it.
I'll take a look at Paulo's patch, but any other comments or advice will be appreciated. --matt It would be really great if you could work on this. My comment above on 21st Sept is accurate, but maybe a bit cryptic.
This diagram may help a bit http://docs.moodle.org/en/Development:Quiz_database_structure Looking at Paulo's patch, it basically adds an OR clause to the SQL to find random questions in categories that contain essay questions. What it fails to take into account are random questions that pick from a category and all the child categories (this is indicated by questiontext='1' for the random question), and where the essay questions are in the child categories, not the to level category. Bear in mind that the child categories can be nested to arbitrary depth. It should be possible (but hard) to extend the SQL to cover this case. Note that the random question type makes use of the question_categorylist function from questionlib to get a list of the relevant categories, but this is recursive, and only works for one question at a time, so cannot be directly used in the query. Additional discussion here:
http://moodle.org/mod/forum/discuss.php?d=94831 +1, would like to see this fixed.
I am migrating courses from WebCT into Moodle, and cannot recreate the randomised essay questions ! |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I would support the solution of excluding essay questions from the random questions by adding them to the excluded type array.
However the problem will probably also go away once the manual grading code gets extended to cover all questions. Then the grading code will no longer need to be able to identify all essay questions, it will simply list all questions in the quiz.
From Gustav Delius (gwd2 at york.ac.uk) Monday, 6 February 2006, 06:56 AM:
For now I have simply added essay questions to the list of excluded questions for random questions. This is probably the most sensible thing to do anyway given that essay questions are quite a bit different from the other questions.
From Anthony Borrow (aborrow at jesuitcp.org) Sunday, 5 March 2006, 04:57 AM:
While the issue of not being able to grade random essay questions may be fixed by excluding essay questions from the available random list, I would like to make sure that it does not disappear from the radar screen. If it is ok, I would like to reopen this and change it to a feature request. I think the ability to choose from a category of random essay questions is helpful and would be a great feature.