From d85a7d09a59cd4d6feb7abf9dcb05da0cee382bd Mon Sep 17 00:00:00 2001 From: Pierre Pichet Date: Tue, 7 Sep 2010 06:21:32 +0000 Subject: [PATCH] MDL-24061 adding only one dataset item working correctly --- question/type/calculated/questiontype.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/question/type/calculated/questiontype.php b/question/type/calculated/questiontype.php index fc8db07fc8e..19bac11ed37 100644 --- a/question/type/calculated/questiontype.php +++ b/question/type/calculated/questiontype.php @@ -1163,7 +1163,7 @@ class question_calculated_qtype extends default_questiontype { } // adding supplementary items $numbertoadd =0; - if (isset($fromform->addbutton) && $fromform->selectadd > 1 && $maxnumber < CALCULATEDQUESTIONMAXITEMNUMBER ) { + if (isset($fromform->addbutton) && $fromform->selectadd > 0 && $maxnumber < CALCULATEDQUESTIONMAXITEMNUMBER ) { $numbertoadd =$fromform->selectadd ; if ( $max100 - $maxnumber < $numbertoadd ) { $numbertoadd = $max100 - $maxnumber ;