Posts made by Itamar Tzadok

The database preset is a predefined database activity structure (fields, templates but no user data) conveniently archived in a zip file which you can apply in a new database instance as a fast way to create a new activity with that predefined structure. Typically someone builds the first instance of the activity, saves a preset of it and then share it so that others can use it to crate similar activities (see for instance presets in the plugins repo https://moodle.org/plugins/browse.php?id=16&list=category). The database preset does not include user data so if you want to share data as well you need to export it. Then others can take the export file and import it to add data to their instance of the activity. smile

Average of ratings: Useful (1)

As Davo indicates, you have to copy the files into a temp folder and replace the src value of the img in the html accordingly before writeHTML. Take a look at https://github.com/itamart/moodle-dataformview_pdf/blob/master/classes/pdf.php#L712 for an example. Elsewhere in that code the temp files are deleted after the pdf content has been generated. hth smile