Skip to content
Permalink
Browse files
Merge branch 'MDL-31521-33' of https://github.com/lucaboesch/moodle i…
…nto MOODLE_33_STABLE
  • Loading branch information
David Monllao committed Dec 18, 2017
2 parents 7061118 + 020fd88 commit e4b5f17a9309db2b37fac6e6762b3242a8127a5a
Showing with 9 additions and 5 deletions.
  1. +9 −5 question/type/calculated/questiontype.php
@@ -1054,11 +1054,15 @@ public function comment_on_datasetitems($qtypeobj, $questionid, $questiontext,
$comment->outsidelimit = false;
$comment->answers = array();
// Find a default unit.
if (!empty($questionid) && $unit = $DB->get_record('question_numerical_units',
array('question' => $questionid, 'multiplier' => 1.0))) {
$unit = $unit->unit;
} else {
$unit = '';
$unit = '';
if (!empty($questionid)) {
$units = $DB->get_records('question_numerical_units',
array('question' => $questionid, 'multiplier' => 1.0),
'id ASC', '*', 0, 1);
if ($units) {
$unit = reset($units);
$unit = $unit->unit;
}
}

$answers = fullclone($answers);

0 comments on commit e4b5f17

Please sign in to comment.