Skip to content

Commit

Permalink
MDL-24061 adding only one dataset item working correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ppichet committed Sep 7, 2010
1 parent d53ad24 commit d85a7d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion question/type/calculated/questiontype.php
Expand Up @@ -1163,7 +1163,7 @@ function save_dataset_items($question, $fromform){
}
// 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 ;
Expand Down

0 comments on commit d85a7d0

Please sign in to comment.