MDL-40785 question instances report: ignore subquestions

We should not count subquestions of cloze questions (parent != 0) but we
do want to count random questions (parent = id).
This commit is contained in:
Tim Hunt
2013-07-19 15:15:18 +01:00
parent ffc3f5308b
commit 7dcb9b0616
+1
View File
@@ -94,6 +94,7 @@ if ($requestedqtype) {
JOIN {question_categories} qc ON q.category = qc.id
JOIN {context} con ON con.id = qc.contextid
$sqlqtypetest
AND (q.parent = 0 OR q.parent = q.id)
GROUP BY qc.contextid, $ctxgroupby
ORDER BY numquestions DESC, numhidden ASC, con.contextlevel ASC, con.id ASC", $params);