As I understand it, there is a hack for bulk course upload that appeared here: http://moodle.org/mod/data/view.php?d=13&rid=395 that was written by Rory Allford. There was some discussion that it was a bit out of date and that Rory had his hands full and was not at present updating it.
In the midst of that discussion Jeff Church mentioned that he had some bright young programmers roll their own hack. Jeff posted an upload utility and a deletion utility named delete_course_for_1.7-1.8---v1.zip here: http://moodle.org/mod/forum/discuss.php?d=91850&parent=405748 . The upload utility (but not the deletion utility) with example (though if the example hasn't been edited to address the editingteacher issue that is a bit of a caveat) is now available in M&P here: http://moodle.org/mod/data/view.php?d=13&rid=1536
Robert Russo, in the midst of this discussion mentioned that his folks have been working on a bulk deletion tool (my error in believing based on the context that he was developing, as did Jeff's people, an upload and deletion utility. Robert's posting appears here:
The bulk upload tool has a 1.7 and 1.8 version. To use it you have to create the teacher accounts before creating to courses. The role for the teacher in the csv is the role short name. So for teacher use 'editingteacher' and Non-editing teachers use 'teacher' and so on.
The bulk course delete tool uses a txt file with the course short names. One course per line.
I hope to post 1.9 versions of these soon and I hope they have helped.
On a related note our programmers have produced several add ons for Appalachian State University and we (the Instructional Technology Consultants at ASU that manage the student programers. Greg Simmons, Mary Beth McKee, and me) would like to share them. What is the best place and method to do this? These were posted by me just because someone had a problem that I happen to see.
I think you should start by contacting Anthony Borrow to get these in contrib. And then put links into the modules and plugins database. There is a place in each entry to reference discussion, download location, versioning, etc.
These are tools that many people really need, so it would be great to have them available and easy to find!
What you can search the forums on the terms "bulk course upload 1.9" which will return this http://moodle.org/mod/forum/discuss.php?d=91850&parent=427786 which has a link to here http://moodle.org/mod/data/view.php?d=13&rid=1536 which states: "This has been tested and is working on both 1.8+ and 1.9+." Voila ;=}
As far as the deletion tool, Jeff or Robert, are you ready/willing to put this in the M&P library yet?
I have not tested this or the course upload in 1.9 yet. It is on my list to do as we are moving to in in a month.
Please refresh my recollection; what did you do to get the upload script added to M&P and will you do the same for this or did someone just take care of that for you?
I did a quick test of the upload script on 1.9 and it appeared to work save that one must use editingteacher as the role, but I assumed that someone else did some testing too as the module and plugin page indicates that it works with 1.9. I wonder whether we need a QA process for M&P ;=}
Still have not seen the delete course script mentioned by Robert Russo.
It now includes a delete only function that is populated by uploaded files.
We are adding mtrace to delete functionality as well as delete from query functionality as well. Support for mtrace is added to the delete tool, adding to backup and delete now.
Only site admins can use the block. I would love this to get into contrib Anthony.
The bulk upload worked well though. Very fast. We were able to do 11K courses in short time.
We have not been able to get it to work either. I do have another question on the bulk uploads? We have subsites on our primary site, we have been able to bulk upload successfully on the subsites and the primary site. However, the enroll feature is only working on 1 of the sites. Is there some configuration setting that needs to be set within Moodle. We have not been able to figure it out.
Do you have a version of course upload (or course delete) that could work as an independent script, say with the filename passed in? We need to run this in an automated, unattended way, whether from a cron job or through some other way without any UI.
Do you have a solution for this? I need to run the script in an automated way too.
Your code works fine with English characters, but does not work if the names of categories and courses are non-English, such as farsi. Is there a way to make it work with all characters?
Hello Sean, I am having the same problem as well. I need to use special characters (á, ó, ñ....)
Have you find out the solution?
I am having the same problem.
Have you find out the solution?
Is this link the last version of this script that works with 1.9? bulk_course_tools.zip
Are there other ways to bulk upload courses into Moodle 1.9?
Is there a version of the upload tools available for version 1.9 plz ?