MDL-67547 dataformat_pdf: method to convert images to supported format.
authorPaul Holden <paulh@moodle.com>
Mon, 27 Apr 2020 09:13:30 +0000 (10:13 +0100)
committerPaul Holden <paulh@moodle.com>
Mon, 25 May 2020 23:54:27 +0000 (00:54 +0100)
commit233a51ad21ea7806b442c329814df5242b70b2e1
tree2bf44d09782ade8872c165aa57b820fc71164b01
parent118a1094998852f26d6925763af3b8b5820a1fd3
MDL-67547 dataformat_pdf: method to convert images to supported format.

For Dataformats that support exporting HTML content, provide an API for
converting images within that content to something suitable for the format.

This fixes an issue with the PDF writer when it encountered a pluginfile.php
image, which it tried to request via HTTP without an active session. This
resulted in a 303 header returned by Moodle instead of the actual image,
causing an exception in the underlying TCPDF library.
dataformat/pdf/classes/writer.php
dataformat/pdf/tests/writer_test.php [new file with mode: 0644]
dataformat/upgrade.txt
lib/classes/dataformat/base.php