MDL-39172 Import of .dat files is broken in blackboard_six import format
authorJean-Michel Vedrine <vedrine@vedrine.org>
Tue, 16 Apr 2013 20:04:55 +0000 (22:04 +0200)
committerJean-Michel Vedrine <vedrine@vedrine.org>
Thu, 18 Apr 2013 15:54:02 +0000 (17:54 +0200)
question/format/blackboard_six/format.php

index 2fab6f8..8374ef4 100644 (file)
@@ -78,10 +78,10 @@ class qformat_blackboard_six extends qformat_blackboard_six_base {
             // For now we will do that searching for a required tag.
             // This is certainly not bullet-proof but works for all usual files.
             $fileobj->text = file_get_contents($filename);
-            if (strpos($text, '<questestinterop>')) {
+            if (strpos($fileobj->text, '<questestinterop>')) {
                 $fileobj->filetype = self::FILETYPE_QTI;
             }
-            if (strpos($text, '<POOL>')) {
+            if (strpos($fileobj->text, '<POOL>')) {
                 $fileobj->filetype = self::FILETYPE_POOL;
             }
             // In all other cases we are not able to handle this question file.