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
This commit is contained in:
pichetp 2007-03-02 13:59:46 +00:00
parent e2dfe8bfca
commit 562dc5fdda

View file

@ -27,7 +27,7 @@ class question_dataset_dependent_questiontype extends default_questiontype {
// Find out how many datasets are available // Find out how many datasets are available
global $CFG; global $CFG;
if(!$maxnumber = (int)get_field_sql( if(!$maxnumber = (int)get_field_sql(
"SELECT MAX(a.itemcount) "SELECT MIN(a.itemcount)
FROM {$CFG->prefix}question_dataset_definitions a, FROM {$CFG->prefix}question_dataset_definitions a,
{$CFG->prefix}question_datasets b {$CFG->prefix}question_datasets b
WHERE b.question = $question->id WHERE b.question = $question->id