Merge branch 'MDL-38741-master' of git://github.com/danpoltawski/moodle
authorDamyon Wiese <damyon@moodle.com>
Mon, 8 Apr 2013 04:00:52 +0000 (12:00 +0800)
committerDamyon Wiese <damyon@moodle.com>
Mon, 8 Apr 2013 04:00:52 +0000 (12:00 +0800)
1  2 
question/type/calculated/edit_calculated_form.php
question/type/calculatedmulti/edit_calculatedmulti_form.php

@@@ -82,15 -79,15 +82,16 @@@ class qtype_calculatedmulti_edit_form e
  
          $mform->setType('answer', PARAM_NOTAGS);
  
 -        $addrepeated = array();
 -        $addrepeated[] = $mform->createElement('hidden', 'tolerance');
 -        $addrepeated[] = $mform->createElement('hidden', 'tolerancetype', 1);
 +        $repeated[] = $mform->createElement('hidden', 'tolerance');
 +        $repeated[] = $mform->createElement('hidden', 'tolerancetype', 1);
          $repeatedoptions['tolerance']['type'] = PARAM_FLOAT;
          $repeatedoptions['tolerance']['default'] = 0.01;
+         $repeatedoptions['tolerancetype']['type'] = PARAM_INT;
  
 -        $addrepeated[] =  $mform->createElement('select', 'correctanswerlength',
 -                get_string('correctanswershows', 'qtype_calculated'), range(0, 9));
 +        // Create display group.
 +        $answerdisplay = array();
 +        $answerdisplay[] =  $mform->createElement('select', 'correctanswerlength',
 +                get_string('answerdisplay', 'qtype_calculated'), range(0, 9));
          $repeatedoptions['correctanswerlength']['default'] = 2;
  
          $answerlengthformats = array(