From: pichetp <pichetp>
Date: Fri, 2 Mar 2007 14:09:07 +0000 (+0000)
Subject: merged from 18_STABLE MDL-8552
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0cb014979dd5a4495f0b6c898fa92412f0c9bd58;p=moodle.git

merged from 18_STABLE MDL-8552
---

diff --git a/question/type/datasetdependent/abstractqtype.php b/question/type/datasetdependent/abstractqtype.php
index d957df8c76..4f4a0fbca9 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