MDL-14160 SQL in get_categories_for_contexts does not work on Oracle. Thanks to Adrian Smith and Francois Marier for the fix.

This commit is contained in:
tjhunt
2008-09-02 06:55:40 +00:00
parent f31e70f7db
commit 5c6522115b
+1 -1
View File
@@ -1927,7 +1927,7 @@ function question_make_default_categories($contexts) {
function get_categories_for_contexts($contexts, $sortorder = 'parent, sortorder, name ASC') {
global $CFG;
return get_records_sql("
SELECT *, (SELECT count(1) FROM {$CFG->prefix}question q
SELECT c.*, (SELECT count(1) FROM {$CFG->prefix}question q
WHERE c.id = q.category AND q.hidden='0' AND q.parent='0') as questioncount
FROM {$CFG->prefix}question_categories c
WHERE c.contextid IN ($contexts)