diff -uNr moodle.orig/mod/quiz/report/grading/report.php moodle/mod/quiz/report/grading/report.php
--- moodle.orig/mod/quiz/report/grading/report.php	2006-08-19 03:09:28.000000000 +0100
+++ moodle/mod/quiz/report/grading/report.php	2007-01-29 09:49:11.000000000 +0000
@@ -137,7 +137,12 @@
                "       {$CFG->prefix}quiz_question_instances i".
                " WHERE i.quiz = '$quiz->id' AND q.id = i.question".
                "   AND q.id IN ($questionlist)".
-               "   AND q.qtype IN ($QTYPE_MANUAL)".
+               "   AND ( q.qtype IN ($QTYPE_MANUAL) ".
+               "         OR ( ".
+               "              q.qtype = 'random' AND " .
+               "              EXISTS ( select * from {$CFG->prefix}question q2 WHERE q2.category = q.category and q2.qtype IN ($QTYPE_MANUAL) ) " .
+               "            ) ".
+               "       ) ".
                "   ORDER BY q.name";
         if (empty($questionlist) or !$questions = get_records_sql($sql)) {
             print_heading(get_string('noessayquestionsfound', 'quiz'));
diff -uNr moodle.orig/question/type/random/questiontype.php moodle/question/type/random/questiontype.php
--- moodle.orig/question/type/random/questiontype.php	2006-12-12 02:16:14.000000000 +0000
+++ moodle/question/type/random/questiontype.php	2007-01-29 09:49:11.000000000 +0000
@@ -7,7 +7,7 @@
 /// QUESTION TYPE CLASS //////////////////
 class random_qtype extends default_questiontype {
 
-    var $excludedtypes = array("'random'", "'randomsamatch'", "'essay'", "'description'");
+    var $excludedtypes = array("'random'", "'randomsamatch'", "'description'");
 
     // Carries questions available as randoms sorted by category
     // This array is used when needed only
