From 562dc5fdda1c366a881aa7e167c670f1f2902f20 Mon Sep 17 00:00:00 2001 From: pichetp Date: Fri, 2 Mar 2007 13:59:46 +0000 Subject: [PATCH] changing MAX to MIN so that there is an item for each datasets MDL-8552 and 6777 could (will) be merged to older versions as this is an old problem --- question/type/datasetdependent/abstractqtype.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/question/type/datasetdependent/abstractqtype.php b/question/type/datasetdependent/abstractqtype.php index d957df8c764..4f4a0fbca92 100644 --- a/question/type/datasetdependent/abstractqtype.php +++ b/question/type/datasetdependent/abstractqtype.php @@ -27,7 +27,7 @@ class question_dataset_dependent_questiontype extends default_questiontype { // Find out how many datasets are available global $CFG; if(!$maxnumber = (int)get_field_sql( - "SELECT MAX(a.itemcount) + "SELECT MIN(a.itemcount) FROM {$CFG->prefix}question_dataset_definitions a, {$CFG->prefix}question_datasets b WHERE b.question = $question->id