]> git.mjollnir.org Git - moodle.git/commitdiff
health centre: MDL-16935 Question categories should belong to a valid context solutio...
authortjhunt <tjhunt>
Thu, 27 Nov 2008 05:57:11 +0000 (05:57 +0000)
committertjhunt <tjhunt>
Thu, 27 Nov 2008 05:57:11 +0000 (05:57 +0000)
admin/health.php

index 56d5d29416cfb54dfdc138391f727307206722f3..7ef0a8b1195e303f4d3e3ae4aca14fefb65bdaa8 100644 (file)
@@ -659,10 +659,10 @@ class problem_000015 extends problem_base {
     function solution() {
         global $CFG;
         return '<p>You can delete the empty categories by executing the following SQL:</p><pre>
-DELETE FROM ' . $CFG->prefix . 'question_categories qc
+DELETE FROM ' . $CFG->prefix . 'question_categories
 WHERE
-    NOT EXISTS (SELECT * FROM ' . $CFG->prefix . 'question q WHERE q.category = qc.id)
-AND NOT EXISTS (SELECT * FROM ' . $CFG->prefix . 'context con WHERE qc.contextid = con.id)
+    NOT EXISTS (SELECT * FROM ' . $CFG->prefix . 'question q WHERE q.category = ' . $CFG->prefix . 'question_categories.id)
+AND NOT EXISTS (SELECT * FROM ' . $CFG->prefix . 'context con WHERE contextid = con.id)
         </pre><p>Any remaining categories that contain questions will require more thought. ' .
         'People in the <a href="http://moodle.org/mod/forum/view.php?f=121">Quiz forum</a> may be able to help.</p>';
     }