MDL-12016 Category text not being sent to 'create_category_path'.
authormchurch <mchurch>
Thu, 15 Nov 2007 14:05:17 +0000 (14:05 +0000)
committermchurch <mchurch>
Thu, 15 Nov 2007 14:05:17 +0000 (14:05 +0000)
question/format.php

index 091897dcd9135932dc3d76018547b7fa72ef916a..c863dfa54e145fe7cf057b41e47bb178dd8148f3 100644 (file)
@@ -257,7 +257,7 @@ class qformat_default {
             if ($question->qtype=='category') {
                 if ($this->catfromfile) {
                     // find/create category object
-                    $catpath = $question->category;
+                    $catpath = $question->category['text'][0]['#'];
                     $newcategory = $this->create_category_path( $catpath, '/');
                     if (!empty($newcategory)) {
                         $this->category = $newcategory;