From ff4d87739d7b9b63fcb4fdf998ce6a878676e61e Mon Sep 17 00:00:00 2001 From: ppichet Date: Wed, 4 Apr 2012 15:42:37 -0400 Subject: [PATCH] MDL-32217_21 Setting options->unitgradingtype Signed-off-by: ppichet --- question/type/numerical/questiontype.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/question/type/numerical/questiontype.php b/question/type/numerical/questiontype.php index 53f29b2c407..60e34ef5fd5 100644 --- a/question/type/numerical/questiontype.php +++ b/question/type/numerical/questiontype.php @@ -281,7 +281,9 @@ class qtype_numerical extends question_type { } else if (isset($question->showunits)) { // Updated import, e.g. Moodle XML. $options->showunits = $question->showunits; - + if (isset($question->unitgradingtype)) { + $options->unitgradingtype = $question->unitgradingtype; + } } else { // Legacy import. if ($defaultunit = $this->get_default_numerical_unit($question)) {