Moodle plugins directory: Gift with medias format
Gift with medias format
Question formats ::: qformat_giftmedia
Maintained by
Jean-Michel Védrine
Question import format similar to Gift and uses the same syntax, but instead of a text file it imports a zip file containing the gift text file and media files (images, sounds, ...);
Latest release:
550 sites
186 downloads
38 fans
Current versions available: 4
Gift with media is similar to Gift and uses the same syntax, but instead of a text file it imports a zip file containing the gift text file and media files (images, sounds, ;..) in folders.
Images and medias included in questions are imported at the same time (see documentation to learn how to refer to media files in your questions)
Contributors
Jean-Michel Védrine (Lead maintainer)
Please login to view contributors details and/or to contact them
It should work for all fields that are supported by the GIFT format and that support images in Moodle. But as I have not specifically tested the essay question type, I will make some tests and report.
Thanks!
Thank you for this plugin. Is this works with moodle 3.9?
To solve the problem I had to comment out the following lines inside the import_form.php file.
$fileerrors = $qformat->validate_file($file);
if ($fileerrors) {
$errors['newfile'] = $fileerrors;
}
That file is located in moodle/question folder.
As you may know I am now retired, but I still receive mails about this plugin and I had a rapid look at this problem. Rather than modifying the Moodle core file (which is a real pain at each Moodle update) a better solution would be to add the lines
-------------------
public function validate_file(stored_file $file): string {
return '';
}
------------------
in the format.php file of the gift with media plugin.
I am unable to test this fix as I don't have a Moodle install anymore (and also no development environment on my computer) but I am quite confident this would solve the problem.
Please note this is not a commitment to maintaining this plugin, because I am now too old and I stopped all programming work but as it was quite an easy fix, better to post it here.