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