MDL-61194 assignfeedback_editpdf: Check if we can convert online text

This patch adds a check to make sure there is a converter available that
will be able to handle html->pdf conversion before adding onlinetext
submissions to the list of files to combine.
This commit is contained in:
Cameron Ball 2018-01-11 16:38:00 +08:00
parent af099b484c
commit 23fe1e2bed
No known key found for this signature in database
GPG Key ID: 305B7F70214D810C

View 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.