MDL-24061 adding only one dataset item working correctly

This commit is contained in:
Pierre Pichet
2010-09-07 06:21:32 +00:00
parent d53ad240d8
commit d85a7d09a5
+1 -1
View File
@@ -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 ;