Skip to content
Browse files

MDL-38363 qtype_calculated. Fix warnings.

  • Loading branch information...
1 parent 01d6191 commit 7b62eec877ca6ca7a043dfe6fad2a1ab7dda48b4 @timhunt timhunt committed Mar 15, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 question/type/calculated/questiontype.php
View
5 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 7b62eec

Please sign in to comment.
Something went wrong with that request. Please try again.