FYI: Import images hack - Retested

FYI: Import images hack - Retested

by Chris Collman -
Number of replies: 1
Picture of Documentation writers
Hi,
I just added some test file to the MDL-10513 tracker item. The importimg.php is a hack. It imports a series of images into a series of branch tables based upon the image name. I tested it in a 1.8 version of Moodle.

A late THANK YOU to Alexander Fleischer !!

I strongly recommend that it be used on a standalone, complete install package (otherwise known as a localhost on a desktop) non production moodle site. Then you can backup the course with just the lesson(s) and import it into your production site.

I also used OOimpress 3.0. I actually opened an existing PowerPoint with OOimpress, then edited and saved it as an .odp (impress) file before exporting it as a webpage to a folder. My OOimpress files in the test files, give some instructions as to what I did.

Still playing around with the exported image size in OOimpress. Tested it on an old folder which had 186 images. Renamed img1 to img01 and so forth. Looks great! BIG TIME SAVER smile

Best Chris
Average of ratings: -
In reply to Chris Collman

Re: FYI: Import images hack - Retested

by Chris Collman -
Picture of Documentation writers
For all you MoodleFans who are not afraid to hack or lose the "most beautiful interface" contest.

It was not rocket science stuff to figure out how to add the importIMG.php link to both the opening screen (import questions, import PowerPoint, add branch table etc), and to the links that separate pages in expanded edit view in 1.8.2. Suspect it will work in 1.8_latest. No idea about 1.9 but a 1.8 lesson will restore to a 1.9 site.wink

Now that is real handy. Teachers can add 3 pictures in a zip file here, 10 pictures from another zip file there with automatic page creation at that point.

In a couple of weeks, I will revisit this for 1.9 latest and see if it works or what it will take to work. I will also figure out where to add a "ImportIMG" string to get rid of those [ ] brackets.

And for people who have mastered importppt, you can apply the same concept (hack) to that function in edit.php and locallib.php by looking at MDL-10513 down in the comments.

As always I recommend these hacks be done on a standalone (complete install package) Moodle.

Back to my honeydew list for the weekend and then more cut and pasting of text.

Chris