MDL-61194 assignfeedback_editpdf: Check if we can convert online text
[moodle.git] / mod / assign / feedback / editpdf / classes / document_services.php
index 0920bbc..fa6dbfb 100644 (file)
@@ -188,7 +188,7 @@ EOD;
                         } else if ($convertedfile = $converter->start_conversion($file, 'pdf')) {
                             $files[$filename] = $convertedfile;
                         }
-                    } else {
+                    } else if ($converter->can_convert_format_to('html', 'pdf')) {
                         // Create a tmp stored_file from this html string.
                         $file = reset($file);
                         // Strip image tags, because they will not be resolvable.