GIFT Import "Pre-Load" Analysis?

GIFT Import "Pre-Load" Analysis?

by Paul Norrod -
Number of replies: 17
I have been modifying many pre-existing text-based multiple-choice tests I have into GIFT format for import into Moodle.  Invariably, I make at least one mistake that messes up the import process.  Would it be very difficult to add a feature into the GIFT import to analyze the imported file just as if it were to be actually imported, but only show the errors and not do the import?  That way one could check the validity of the GIFT formated text file before actually loading the questions into Moodle. Just a wishlist item.

Paul Shew thank you so much for the wonderful GIFT import feature - it is very much appreciated smile
Average of ratings: -
In reply to Paul Norrod

Re: GIFT Import "Pre-Load" Analysis?

by Paul Shew -
Glad to hear that GIFT is useful.

Adding such a feature goes beyond the functions of the import format. It would mean adding a feature, not to the GIFT format, but to the quiz module's basic import routines--not so easy. A work around is to import the questions into a temporary question category. Then if you make a mistake, you can delete all of the questions in that category.

Paul.
In reply to Paul Shew

Re: GIFT Import "Pre-Load" Analysis?

by Paul Norrod -
Thanks, Paul.  I never thought about simply making a "dummy" category and dumping the questions in there as a test (duh.... black eye).  Doing that will work for me.
In reply to Paul Shew

Re: GIFT Import "Pre-Load" Analysis?

by Ger Tielemans -
Good workaround!
In reply to Ger Tielemans

Re: GIFT Import "Pre-Load" Analysis?

by Timothy Takemoto -
I thought this was a really good idea too. I made a set of questions, created a demo category, uploaded them, found their were mistakes, went to delete the category (with the test questions, I presumed) but found that when I attempted to delete the category I was forced (I think) to specify which other category I should move the questions too. So I was left with deleting questions one by one as usual.
Tim
In reply to Timothy Takemoto

Re: GIFT Import "Pre-Load" Analysis?

by Paul Norrod -
Tim, I realized the same thing as you when I tried to delete the category.   The solution would be to be able to actually delete the category and all of its questions.  Fortunately for me I have become more adept at using regular expressions with EditPad Pro and I don't make as many mistakes as I used to.
In reply to Paul Norrod

Re: GIFT Import "Pre-Load" Analysis?

by Peter Sereinigg -

EditPad Pro

how?????????? may help me a lot!

Thanks Peter

In reply to Peter Sereinigg

Re: GIFT Import "Pre-Load" Analysis?

by Paul Norrod -
Peter, I may be doing things in a clumsy manner, but I have many T-F and MC tests that are in Word format.  Some tests are in Word format that I have modified over time that are suitable for printing and some come from the publisher in Word format that have a line after each questions with something like "Answer: C  Chapter 2, page 47".

In order to get these tests into GIFT format, I copy a test or quiz to the clipboard and past it into EditPad Pro (a text processor like Windows Notepad, only a LOT more powerful (www.jgsoft.com) ).  EditPad allows regular expressions in its search and replace feature, so I can cobble together some commands to do what I want.

For example, to strip the questions number from a file (they are tab separated), I can use \t[0-9][0-9].\t  and replace it with nothing.  I process various regular expression commands until I get all of the questions in GIFT format.  Then I can save the test or quiz as a text file and import it to the Quiz area.  As I have gotten better with regular expressions, I make fewer mistakes, so deleting questions after they are uploaded is needed less and less.

EditPad Pro costs about $40 but there is a free version (although I don't know if it will allow you to use regular expressions).  I suspect other Moodlers can suggest other text processors that are free or inexpensive that can do similar things.  I have been using EditPad Pro for quite a while and like it, so it is my choice.

I would like to write my own PHP script to process these text files as I now manually do - I just never seem to get the time to sit down and tackle it.
In reply to Paul Norrod

Re: GIFT Import "Pre-Load" Analysis?

by Peter Sereinigg -

sounds great ... I will try this,

because dealing with a lot of questions moodle is very - clumsy (hey I learned a new phrase from you!) - and slow..., because moodle can not import automatic grades to quiz and that takes a lot of time ...
Local manipulation and upload and download and exchange ... wish for the future (is here any quiz - developer who can read this? Breites Grinsen)

Peter

In reply to Peter Sereinigg

Re: GIFT Import "Pre-Load" Analysis?

by Paul Norrod -
Peter, I did mean to imply that moodle itself is "clumsy", but rather the methods that I am using to get my existing tests converted into an importable GIFT format are clumsy.  Actually, there are two distinct issues here:

1.  How to convert existing tests/quizzes in various formats such as Word and text files into GIFT formated files suitable to be imported into Moodle? and

2.  If we import our GIFT tests/quizzes into a "Test" category, how do we delete that category without first deleting each question one-by-one?

For #2, your PHP scripts discussed elsewhere may do the trick, but for #1 there aren't any easy answers.

Since there are so many variations on how a test or quiz can be formated, it is impossible to create a "one-program-fits-all" conversion program.  It may be possible, however to create a program that would convert a test or quiz to uploadable GIFT format that would require a minimum of modifications to the original file.  That type of program could be written for the OS the tests/quizzes reside on, or a PHP script could also be written to convert those files after they are uploaded to the server.

I teach VB.NET and if I can ever get some free time, I am going to try to write something that would allow me to convert (for example) this:

SP32-20040426-153858.jpg

to this:

SP32-20040426-153332.jpg

I am sure many teachers have lots of tests/quizzes in similar format that they would love to get into GIFT format.   Using EditPad to convert them works "okay", but a program to help would certainly be nice.  If I ever get chance to do what I want, I will post my code.
In reply to Paul Norrod

Re: GIFT Import "Pre-Load" Analysis?

by Peter Sereinigg -

I am sure, that for #1 there will be solutions,

  • because it is not logical, that you can add selected questions from a category
  • but you can not delete seleted questions from a category, if they are NOT used in other tests ..

For #2

  • Our members prefer writing in a textfile, and they have no problems with yout GIFT - Filter (SUPER Solution!!!), with some easys examples
  • The works starts with the given points in the left screen, when you have selected questions for a test
  • Now we write in the title in "(3)" the points and only ha´ve to read and change, that makes it possible
  • Maybe a change in the quiz with "default points" in the first question definition and than - if you like - overrule this in the left site ...

I am sure you will find time - moodler find time.

now ( in 1 hour) we will start testing (optics)  pupils (age 13-14) of my wife, her school uses moodle since a month ..

Greatings from the green heart of Austria, Styria,

Peter

In reply to Paul Norrod

Re: GIFT Import "Pre-Load" Analysis? - regular expressions 4 reformatting

by Jurgis Pralgauskis -

free editors for php and so on * PSPad http://www.pspad.com/en/ freeware but not OS (imho, better than EditPlus or UltraEdit) * tsWebEditor http://phpeditor.net.tf/ OS smile not bad, still improoving, has ability to automatically check php syntax and errors (via php.exe).

visual RegExp tools: * http://www.cfregex.com. - visually construct Your RE (free) * http://www.powergrep.com/screen.html#replace visually see the effect of RE (14 day shareware - enough to construct RE's You need for transforming your quizes to GIFT smile ) * RegEx Coach and RegExp Editor - free scroll down * perl RegExp plugin or RegExp Tester for Eclipse * RegExp Tester online

In reply to Jurgis Pralgauskis

Re: GIFT Import "Pre-Load" Analysis? - regular expressions 4 reformatting

by Paul Norrod -
Jurgis, after trying out PSPad, I would tend to agree - it does seem to be better in terms of features than EditPad Pro ($40 versus free - no contest!).

Thanks for all the great links!
In reply to Paul Norrod

Re: GIFT Import "Pre-Load" Analysis?

by Timothy Takemoto -

The AON format does deals with exactly this type of question doesn't it?
Or rather you would have to get rid of "・・・・・Objective ...Page:200・・・・・"
which could be done with an MS word search and replace.

In reply to Timothy Takemoto

Re: GIFT Import "Pre-Load" Analysis?

by Paul Norrod -
Thanks, Tim.  I never closely examined the other formats until a few days ago - yes, AON could fit the bill.  Duh .... black eye.  I guess I am always in too much of a hurry - don't check things out as well as I should.

I do have tests in other forms, however (T-F, etc.), and GIFT certainly does the job - it has also forced me to learn some valuable new text file editing techniques.
In reply to Timothy Takemoto

Re: GIFT Import "Pre-Load" Analysis?

by Peter Sereinigg -

Same situation as you,

my workarround:

  • I delete all questions from a categoryNr with an php/sql skript
    Its to special written on my situation, that i could post ist ...
  • Than I have to save Test once
  • and questions are gone - you can delete category ..
  • QUIZ dont recognise in this -first - situation, that there are no questions any longer ...

Peter

In reply to Peter Sereinigg

Re: GIFT Import "Pre-Load" Analysis?

by Paul Norrod -
Peter, if you could post the script or email it, I would appreciate it.  Thanks!
In reply to Paul Norrod

Re: GIFT Import "Pre-Load" Analysis?

by Peter Sereinigg -

Hi Paul,

Scripts are on the way to you.

Here are some hints and known problems and problems that may raise up:

  • I found out, that there are NO problems in deleting questions, if they are not assigned to a quiz
  • If questions are assigned to a quiz or more than one quiz, this will/may happens (I got a lot of troubles and will not test this again!!!!)
    • Questions are deleted but the number of defined grades (or points which verb is here correct for "sum of points which are defined in the quiz definition area, where you are able to edit the questions) and than this may/will happens:
      • You get wrong results in the quiz overview table but correct result in grades view (!!!!) übel
      • You get wrong results in advanced statistics, deleted questions are shown as empty cells (!)übel
      • I corrected the wrong number of points by adding a new question, saving it and deleting it again, to override the wrong cellinformation in mdl_quiz. No resultview is correct  winken but advanced statistic has another wrong line ...Clown
    • The best way would be a function
      • first delete questions in quiz with correcting the grades
      • second delete questions totaly
      • Horror tot: deleting questions without that safety-mode and this questions are used by another teacher ....
        or will that have no influence (I will not test it Breites Grinsen)
        May be in this situation only admins are allowed to delete this ..

Maybe ... some quiz developer in moodle will include this idea in next quiz release, because question management in moodle is nearly clumbsy as user management ..lächelnd

Peter