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:
520 sites
235 downloads
39 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)

Build status

Screenshots

Screenshot #0

Contributors

Jean-Michel Védrine (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

إظهار التعليقات
  • Jean-Michel Védrine
    الأحد، 31 ديسمبر 2017، 3:45 م
    This plugin has been verified to work with Moodle versions up to 3.4 and there is now a documentation page explaining how to insert images, sounds, ... into the questions.
  • Mikhail Sabyanin
    الاثنين، 15 يناير 2018، 5:52 م
    How about essay questions? would it upload with media in question?
  • Jean-Michel Védrine
    الاثنين، 15 يناير 2018، 6:52 م
    Hello Mikhail.
    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.
  • Jean-Michel Védrine
    الاثنين، 15 يناير 2018، 7:00 م
    As I was suspecting it works with no problem importing an essay question with images in the question text.
  • Mikhail Sabyanin
    الثلاثاء، 16 يناير 2018، 11:50 ص
    @Jean-Michel Védrine Thank you friend, i will try to check upload on another server
  • Jean-Michel Védrine
    الثلاثاء، 16 يناير 2018، 3:44 م
    Hello Mikhail, if you have a problem and your essay questions are not imported you can send me a sample file so that I can see if there is a problem my mail is now vedrine __at__ vedrine __ dot___ net. The most frequent error is that people forget to put a backslash before the equal character when they write src="..."
  • Jean-Michel Védrine
    الثلاثاء، 16 يناير 2018، 3:50 م
  • Filippo Carnevali
    الجمعة، 22 يناير 2021، 5:37 م
    Hi! Will it be released for Moodle 3.9 aswell?
    Thanks!
  • Tharindu Samarasinghe
    الجمعة، 3 سبتمبر 2021، 11:31 ص
    Hi Sir,
    Thank you for this plugin. Is this works with moodle 3.9?
  • Adam Morrey
    الثلاثاء، 18 يناير 2022، 7:43 م
    Does it work with 3.10?
  • Петя Петечкин
    الأحد، 27 مارس 2022، 9:44 م
    Doesn't work on version 3.11?
  • Rajib Bhattacharjee
    الأربعاء، 4 مايو 2022، 1:55 ص
    I am facing an issue with this plugin on Moodle v4.0. While trying to import the zip file it is showing this error: "The file you selected does not use UTF-8 character encoding. Gift with medias format files must use UTF-8." Whereas I was not facing the same issue while importing the same zip file in Moodle v3.11.5. The text file within the zip file is UTF-8 as I have checked it multiple times (also I imported the same text file using the moodle inbuilt GIFT format and it imported fine - without the images of course). Looking for some help on this regard as without the media part we are stuck.
  • Alonso Arias
    الأحد، 10 يوليو 2022، 1:54 ص
    Rajib Bhattacharjee
    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.
  • Jean-Michel Védrine
    الأحد، 10 يوليو 2022، 8:33 م
    Hello Rajib and Alonso,
    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.
  • Florian Leupold
    الخميس، 27 أبريل 2023، 10:18 م
    After upgrading Ubuntu and PHP to 8.0, entering the Export section in the question bank caused an error:
    Array and string offset access syntax with curly braces is no longer supported in...

    The error could be fixed by replacing the curly brackets in
    } else if ($answertext{0} == '#') {
    on line 391 in the file format.php by square brackets:
    } else if ($answertext[0] == '#') {
1 2
Please login to post comments