MDL-28364 handle question formats that support multiple file types
[moodle.git] / question / import_form.php
index 571e8cb..719317d 100644 (file)
@@ -133,7 +133,7 @@ class question_import_form extends moodleform {
         $qformat = new $classname();
 
         $file = reset($files);
-        if ($file->get_mimetype() != $qformat->mime_type()) {
+        if (!$qformat->can_import_file($file)) {
             $a = new stdClass();
             $a->actualtype = $file->get_mimetype();
             $a->expectedtype = $qformat->mime_type();