diff --git a/question/format.php b/question/format.php index f361f7eed3b..793a81cc5ca 100644 --- a/question/format.php +++ b/question/format.php @@ -229,7 +229,7 @@ class qformat_default { if ($question->qtype=='category') { if ($this->catfromfile) { // find/create category object - $catpath = $question->category['text'][0]['#']; + $catpath = $question->category; $newcategory = create_category_path( $catpath, '/', $this->course->id ); if (!empty($newcategory)) { $this->category = $newcategory;