GIFT import - default grade

GIFT import - default grade

by Melissa Reznar -
Number of replies: 1

Hello,

I am importing quiz questions using GIFT format and would like to assign a different default mark than 1.0 for many of the questions. Is there a way to designate this in the import file rather than importing and then manually changing each question?

Average of ratings: -
In reply to Melissa Reznar

Re: GIFT import - default grade

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Sadly there isn't.

It is easy to change this if you can edit the code. You just need to change

        $question->defaultmark = 1;

in question/format.php.

We could make the whole workflow for doing question import a lot better. The kind of thing that I have thought of would be something like this:

  1. To start the process, you would just select a file to upload, and click Next >.
  2. Moodle would inspect that file, and automatically determine what format it is.
  3. Then, depending on the format, there might be another form with more options. For example Moodle XML has almost all the necessary information in the file, but you still need the choice to 'Use the category names from the file' or 'Import all questions into an exsiting category ...'. For GIFT you want extra options like Default mark for each question, and perhaps whether MC questions should be shuffled.
  4. At this stage, the system could also give you a preview of what questions are in the file, and what will  happen when you click Import.
  5. Finally, you click the Import button, and Moodle processes the file and writes the questions to the database.

Although I have thought that this is possible, I doubt I will get time to do this in the forseeable future.