MDL-53140 core_question: Support localised floats when editing questions
authorShamim Rezaie <shamim@moodle.com>
Mon, 4 Feb 2019 15:27:04 +0000 (02:27 +1100)
committerShamim Rezaie <shamim@moodle.com>
Wed, 1 May 2019 02:10:32 +0000 (12:10 +1000)
question/type/edit_question_form.php

index 7b5fb9c..735615a 100644 (file)
@@ -187,9 +187,8 @@ abstract class question_edit_form extends question_wizard_form {
         $mform->setType('questiontext', PARAM_RAW);
         $mform->addRule('questiontext', null, 'required', null, 'client');
 
         $mform->setType('questiontext', PARAM_RAW);
         $mform->addRule('questiontext', null, 'required', null, 'client');
 
-        $mform->addElement('text', 'defaultmark', get_string('defaultmark', 'question'),
+        $mform->addElement('float', 'defaultmark', get_string('defaultmark', 'question'),
                 array('size' => 7));
                 array('size' => 7));
-        $mform->setType('defaultmark', PARAM_FLOAT);
         $mform->setDefault('defaultmark', 1);
         $mform->addRule('defaultmark', null, 'required', null, 'client');
 
         $mform->setDefault('defaultmark', 1);
         $mform->addRule('defaultmark', null, 'required', null, 'client');