Permalink
Browse files

MDL-38363 qtype_calculated. Fix warnings.

  • Loading branch information...
1 parent 099e1e0 commit b433c4cedf9140e02b721b3eaa9f3e92b6aa8a31 @timhunt timhunt committed Mar 15, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 question/type/calculated/questiontype.php
@@ -1633,9 +1633,12 @@ public function print_dataset_definitions_category($form) {
FROM {question} q
WHERE q.id = ?";
if (!isset ($datasetdefs["$r->type-$r->category-$r->name"])) {
- $datasetdefs["$r->type-$r->category-$r->name"]= $r;
+ $datasetdefs["$r->type-$r->category-$r->name"] = $r;
}
if ($questionb = $DB->get_records_sql($sql1, array($r->question))) {
+ if (!isset ($datasetdefs["$r->type-$r->category-$r->name"]->questions[$r->question])) {
+ $datasetdefs["$r->type-$r->category-$r->name"]->questions[$r->question] = new stdClass();
+ }
$datasetdefs["$r->type-$r->category-$r->name"]->questions[
$r->question]->name = $questionb[$r->question]->name;
}

0 comments on commit b433c4c

Please sign in to comment.