Permalink
Browse files

MDL-29493 questions should be createable with defaultmark a float.

  • Loading branch information...
1 parent 136fa79 commit 51fd4dd2612ac5c03423f2d10fc3f540e85762af @timhunt timhunt committed Sep 23, 2011
Showing with 3 additions and 3 deletions.
  1. +2 −2 question/previewlib.php
  2. +1 −1 question/type/edit_question_form.php
View
@@ -54,14 +54,14 @@ public function definition() {
$mform->addElement('text', 'maxmark', get_string('markedoutof', 'question'),
array('size' => '5'));
- $mform->setType('maxmark', PARAM_NUMBER);
+ $mform->setType('maxmark', PARAM_FLOAT);
if ($this->_customdata['maxvariant'] > 1) {
$variants = range(1, $this->_customdata['maxvariant']);
$mform->addElement('select', 'variant', get_string('questionvariant', 'question'),
array_combine($variants, $variants));
}
- $mform->setType('maxmark', PARAM_INT);
+ $mform->setType('variant', PARAM_INT);
$mform->addElement('select', 'correctness', get_string('whethercorrect', 'question'),
$hiddenofvisible);
@@ -152,7 +152,7 @@ protected function definition() {
$mform->addElement('text', 'defaultmark', get_string('defaultmark', 'question'),
array('size' => 3));
- $mform->setType('defaultmark', PARAM_INT);
+ $mform->setType('defaultmark', PARAM_FLOAT);
$mform->setDefault('defaultmark', 1);
$mform->addRule('defaultmark', null, 'required', null, 'client');

0 comments on commit 51fd4dd

Please sign in to comment.