Moodle

Image support for GIFT format

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.8.4, 1.9
  • Fix Version/s: None
  • Component/s: Questions
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

The GIFT format is nice and simple, e.g. for automatic question generation from a template.
However, it doesn't support an image to show with the question.

This patch adds such support in a backward compatible way by generating and parsing a comment field with the image name. I have initially chosen to create a new gift_img format for this, but since the changes are so simple I think one could consider adding this feature to the normal gift format as well.

Activity

Hide
Tim Hunt added a comment -

This is probably more your area of expertise Howard.

Show
Tim Hunt added a comment - This is probably more your area of expertise Howard.
Hide
Howard Miller added a comment -

Thanks Wolfram... I'll take a look

Show
Howard Miller added a comment - Thanks Wolfram... I'll take a look
Hide
Elena Ivanova added a comment -

Hi everyone,
Just wondering if this feature is still on the radar for development. Thank you

Show
Elena Ivanova added a comment - Hi everyone, Just wondering if this feature is still on the radar for development. Thank you
Hide
Howard Miller added a comment -

Do bear in mind that this only allows you to add an image URL into the GIFT file not an actual image. I would rather not have this in a comment - it could be done like $CATEGORY, i.e. $IMAGE: url. However, is this actually useful? I'll do it if it's thought it is.

Show
Howard Miller added a comment - Do bear in mind that this only allows you to add an image URL into the GIFT file not an actual image. I would rather not have this in a comment - it could be done like $CATEGORY, i.e. $IMAGE: url. However, is this actually useful? I'll do it if it's thought it is.
Hide
vikram solia added a comment -

Yes, could be really useful.

Perhaps One nice place to add the image would be to inside the double colons used for specifying name as this is a per question field. Perhaps the name field could be separated by single colons.

::questioname:imageURL::questiontext {answer(s) }

Show
vikram solia added a comment - Yes, could be really useful. Perhaps One nice place to add the image would be to inside the double colons used for specifying name as this is a per question field. Perhaps the name field could be separated by single colons. ::questioname:imageURL::questiontext {answer(s) }
Hide
Peter Ruthven-Stuart added a comment -

Hello, I am an avid user of the GIFT format, and this issue seems to be related to a GIFT and Version 2 matter that I have discovered.

I fear that with the discontinuation of 'course files directories', it is no longer possible to link to multimedia that has been uploaded to a Moodle site. My practice with 1.9 has been to mass produce questions in Excel. This includes adding links to sound files and HTML img tags to embed images. I then transfer these questions to a text file in the GIFT format. I then upload all the images and sound files to the relevant 'course files directories' (which I have linked to in the GIFT formatted questions). So, when I import the GIFT formatted questions to the relevant course question bank, all the sounds and images will be embedded and linked to. Wonderful. A huge time saver.

I have attached a text file containing two GIFT formatted MC questions to show you what I mean.

However, with the discontinuation of 'course files directories' in version 2 this is no longer possible. The only way to do it is to upload the multimedia to an external directory. This is something that many Moodle users will not be able to, or want to do. One reason that I'd prefer not to have to do this workaround is that the advantage of the new file system in version 2 is that multimedia files become permanently attached to questions. This would not be the case if the multimedia files were in an external repository.

So, in both 1.9 and 2, it is possible to add links to images and sound files to GIFT questions so that when they load in Moodle they are embedded into the question. HOWEVER, with Moodle version 2 it is NOT possible to add links to files that have been uploaded to the Moodle system because the 'course files directories' have been discontinued. I am really hoping this issue can be fixed. Perhaps I should open another issue?

The discussion here may shed more light on this issue:

http://moodle.org/mod/forum/discuss.php?d=170493

Show
Peter Ruthven-Stuart added a comment - Hello, I am an avid user of the GIFT format, and this issue seems to be related to a GIFT and Version 2 matter that I have discovered. I fear that with the discontinuation of 'course files directories', it is no longer possible to link to multimedia that has been uploaded to a Moodle site. My practice with 1.9 has been to mass produce questions in Excel. This includes adding links to sound files and HTML img tags to embed images. I then transfer these questions to a text file in the GIFT format. I then upload all the images and sound files to the relevant 'course files directories' (which I have linked to in the GIFT formatted questions). So, when I import the GIFT formatted questions to the relevant course question bank, all the sounds and images will be embedded and linked to. Wonderful. A huge time saver. I have attached a text file containing two GIFT formatted MC questions to show you what I mean. However, with the discontinuation of 'course files directories' in version 2 this is no longer possible. The only way to do it is to upload the multimedia to an external directory. This is something that many Moodle users will not be able to, or want to do. One reason that I'd prefer not to have to do this workaround is that the advantage of the new file system in version 2 is that multimedia files become permanently attached to questions. This would not be the case if the multimedia files were in an external repository. So, in both 1.9 and 2, it is possible to add links to images and sound files to GIFT questions so that when they load in Moodle they are embedded into the question. HOWEVER, with Moodle version 2 it is NOT possible to add links to files that have been uploaded to the Moodle system because the 'course files directories' have been discontinued. I am really hoping this issue can be fixed. Perhaps I should open another issue? The discussion here may shed more light on this issue: http://moodle.org/mod/forum/discuss.php?d=170493
Hide
Peter Ruthven-Stuart added a comment -

This file contains two GIFT formatted MC questions.

The first question is contains a link to an MP3 in a course directory. This works in 1.9, but is no longer possible in version 2.

The second question is more complex. It contains links to both images and sound files (OGGs). Even the feedback contains links to sound files. Because all these images and sounds are in an external site (Wikimedia) this question will work in both versions 1.9 and 2.

The issue for me is that in version 2 it is not possible to make this same question with links to files within the Moodle system.

Show
Peter Ruthven-Stuart added a comment - This file contains two GIFT formatted MC questions. The first question is contains a link to an MP3 in a course directory. This works in 1.9, but is no longer possible in version 2. The second question is more complex. It contains links to both images and sound files (OGGs). Even the feedback contains links to sound files. Because all these images and sounds are in an external site (Wikimedia) this question will work in both versions 1.9 and 2. The issue for me is that in version 2 it is not possible to make this same question with links to files within the Moodle system.

People

Dates

  • Created:
    Updated: