Batch Course Upload/Update

Batch Course Upload/Update

by lee asson -
Number of replies: 58

We had the requirement to be able to batch upload courses into Moodle from a text file.

We have developed a simple utility to do this that allows an administrator to browse their local file system and upload a text file containing course data. The upload utility then creates new courses in Moodle if the course does not exist, or updates the course information if the course already exists.

There are two files upload.php and uploader.php which are placed in the root of the 'course' folder of the Moodle code. A link can then be added pointing to http://moodlesite/course/uploader.php to access the upload file page. There are some basic instructions on this page regarding the file format etc. More detailed help is likely to follow in future developments.

We have attached the files needed if anyone would like to use this. It is very much version 1 at the moment and as such any feedback/suggestions would be most welcome.

Thanks for listening, enjoy, please test before you go live.

TTFN

Lee Asson / Neil Eliot

Average of ratings: Useful (2)
In reply to lee asson

Re: Batch Course Upload/Update

by Steven Githens -
Thanks for posting this!

I'm am trying to build some functionality for automatically creating courses into some integration efforts, and it's very useful to look at this code in addition to the stuff in moodle/course/edit.php to get a better idea at how it all works together.
In reply to lee asson

Re: Batch Course Upload/Update

by Martín Langhoff -
Cool! The Enrol/LDAP module is doing this currently in 1.5, and I am working on getting Enrol/DB to do it as well...

cheers.
In reply to lee asson

Re: Batch Course Upload/Update

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Hello!

Thanks for your great script! I've hacked it a bit and made some changes. The attached version of script:
  • does not update existing course (IMHO it is too dangerous)
  • can assign teacher (her userid is the last column of text file)
  • checks sesskey
  • uses "uploader_" function name prefix
  • ...and some other little changes
Thank you for your script once more! It helped me a lot!
In reply to David Mudrák

Re: Batch Course Upload/Update

by Dave Basener -
Thank you both for your script.  I also needed to be able to batch create courses from a text file.  However, the use of the userid in David M's script was going to prove highly inconvenient, so I changed the use of that last field in the batch file to be the username - just make sure there are no spaces between the "pipe" and the first character of the username.

I have called my tgz file upload3, but the files are uploader.php and upload.php.

I think this is a very handy script - perhaps it needs a bit more work, but I couldn't support my institution without it, and I assume that others have the same need.  How does a home grown script get presented for possible inclusion in the base?

Thanks again.

Dave Basener
Aurora University
In reply to Dave Basener

Re: Batch Course Upload/Update

by Damon Blanchette -
Hello Dave, and everyone else in this thread, thanks for the files!  They saved me a ton of time.

One comment to you Dave, your script uploader.php is calling the wrong file in its form.  Once I changed the action to upload.php everything worked.

I might do some changes to the script myself, and if I do (besides what I mentioned above) I'll post here about it.

Enjoy the day,
Damon Blanchette
Smith College
In reply to Damon Blanchette

Re: Batch Course Upload/Update

by Dave Basener -
Ouch!  I sent the test version of one of the files, not the final.  I will attach them again - right from my live server.

Sorry and Thanks.

Dave Basener



In reply to Dave Basener

Re: Batch Course Upload/Update

by Damon Blanchette -
Thank you Dave!  I took them and uploaded them to our server.  The only question I have now is about themes:  it doesn't look like this script allows you to choose a theme for the newly created courses.  We made our own theme here at Smith and would like all new courses to be created using it.  Am I missing it in the script?  Would it be easy for me to add it to the script?  I'd be happy to check it out and add it, and then post the changed version back to this forum if nobody else has the time.
Thanks again,
Damon
In reply to Damon Blanchette

Re: Batch Course Upload/Update

by Art Lader -
Good idea to add theme, Damon.

-- Art
In reply to Art Lader

Re: Batch Course Upload/Update

by Damon Blanchette -
Here it is, an updated version of both files.  I added support for choosing a theme for your newly created courses.  Most would want standardwhite I believe, but this will make it easier for colleges that have created their own themes.
Enjoy smile
Damon
In reply to Damon Blanchette

Re: Batch Course Upload/Update

by Andy An -
Hi Thanks for your script here.
My question is Is it possible to create a bunch of  new courses with the course data from our existing database? I would like the script to craete the courses automatically (e.g. as a shell script or a cron job).

Thanks.

Andy
In reply to Art Lader

Re: Batch Course Upload/Update

by Dave Basener -
Damon, I would have to go into the DB and find the attribute info for theme.  Isn't the course created with your default theme?  We don't force the theme on instructors, but the courses are all created automatically with our default.

Dave
In reply to Dave Basener

Re: Batch Course Upload/Update

by Damon Blanchette -
Hi Dave, we weren't forcing the theme on faculty either, but we did want all our new courses to be created with our own in-house one. I suppose I should have checked out the administration screens before editing the upload script - this is just another way of doing the same thing I suppose. The way it is now makes it easy if you have different faculty who want different themes for their new courses.  It was easy to add: I just put the field into the scripts, and since "theme" is already a field in the database moodle figured it out on its own.
Damon
In reply to Dave Basener

Re: Batch Course Upload/Update

by Damon Blanchette -
Hello, I've come across another small problem: the script automatically chooses 0 (zero) for the section of each class.  The thing is that in our text file we have courses with the same name and short name, but different sections.  So the upload script sees them as the same course and pops out "(insert shortname) Already Exists" and then doesn't add it.

We were going to try to change our upload course text file to have the section number added to the full name and therefore forget this problem, but unfortunately the script for that is on a server that died late last week and we've been having trouble getting to it. 

In looking at the upload script, it appears there might be a way to automatically have it increment the section number if it sees courses with the same name in a row.  Anybody think it's possible?  I'll probably work on it tomorrow morning and see what happens.
Damon
In reply to Damon Blanchette

Re: Batch Course Upload/Update

by Dave Basener -
Damon,
What is the "section"?  We encode a section number into both the short and long name, but that section number comes from our database of courses in the University's main database, so there is never a clash.  We get the courses as Department,Course Number,Section,Term and use those values to create unique Short Names in Moodle.  That short name is incorporated into the Long Name for alphabetizing purposes.

I don't see a separate field in the Moodle course creation/settings that corresponds to a course section. 

Dave Basener
In reply to Dave Basener

Re: Batch Course Upload/Update

by Damon Blanchette -
Dave, that's what we ended up doing as well (create unique short names from the college's own database).  There is a moodle table called mdl_course_sections that I thought had to do with different course sections.  I don't think it means sections in terms of courses, more like sections in terms of parts of the webpages that make up each course.  Anyway, it was a lot of confusion on my part! 

Good news though - this morning me and our moodle administrator made a lot of progress getting our faculty and courses up and running - this script saved probably hours and hours of time and I thank everyone involved!  We now have over 800 courses with instructors nearly ready to go smile
Damon
In reply to Damon Blanchette

Re: Batch Course Upload/Update

by Owen Stephens -
Any thoughts on updating these scripts so they take default values for the various fields if they are left blank? Also, File Upload limit isn't included - how do others cope with not setting this on course creation?
In reply to Owen Stephens

Re: Batch Course Upload/Update

by Damon Blanchette -
Hi Owen, default values are actually something I've been meaning to check out.  Many of the fields are almost always going to have the same value (at least for us), so having a default and making the upload file smaller and easier to create would be a good thing.  What exactly do you mean by file upload limit?  File size or number of courses?  I've successfully so far uploaded a file with about 800 courses and size ~120KB (pretty small).
Damon
In reply to Damon Blanchette

Re: Batch Course Upload/Update

by Owen Stephens -
Sorry - when I said upload limit, I was referring to the course setting limiting the size of uploads to the course (mdl_course.maxbytes in the db) - not the size of the file containing the course information.
In reply to Owen Stephens

Re: Batch Course Upload/Update

by Dave Basener -
Owen,
Do you have different upload limits for different courses?  I believe that the default for a newly created course will just inherit the Upload Limit set in your Moodle Configuration Variables.

Dave Basener

In reply to Dave Basener

Re: Batch Course Upload/Update

by Owen Stephens -
At the moment we don't have different upload limits for different courses - so if they inherit from the Moodle Config, this is fine.

What I noticed was that the maxbytes field for courses created through the normal edit.php web interface gets populated with 2Mb, whereas when using the batch script, the maxbytes field is zero. This made me assume (perhaps incorrectly) that the default was just used to populate the maxbytes field, rather than being a system wide setting.

I guess I should try setting it to zero, and see what happens...
In reply to Owen Stephens

Re: Batch Course Upload/Update

by Vidar Gudmundsson -
Hello
Does this script work for 1.6 beta5 ??  I tryed to create courses and the script gave me the message " created ok" in each line..... but when i try to view them they dont show up. In mdl_courses table i can see this newly created courses exists.

regards
Vidar
In reply to Vidar Gudmundsson

Re: Batch Course Upload/Update

by Dave Basener -
Vidar,
I don't have 1.6, but the script is specific to the course creation necessities and the database and of 1.5.

Dave Basener
In reply to Dave Basener

Re: Batch Course Upload/Update

by David Lo -
Dave,

Looks like your tgz file is corrupted. I can't unzip it using Windwon WAR without error or
using gunzip and tar on Linux. Can you help? Thanks.

dav
In reply to David Lo

Re: Batch Course Upload/Update

by Johnny Zephyr -
Hi

I have had the same problem. the archived files are all corrupt. Any chance these files could be uploaded again?

In reply to Johnny Zephyr

Re: Batch Course Upload/Update

by Jaswant Tak -

Very useful script! Thanks for this. I see one issue here. There may be muliple roles in system who may have the permission to create new course. In the script it checks for admin only so I thought it should be changed with this.

on line 543 change this

if (!isadmin()) {
csverror('You must be an administrator to edit courses in this way.');
}

to this

$systemcontext = get_context_instance(CONTEXT_SYSTEM);
if (!has_capability('moodle/course:create', $systemcontext)) {
csverror('You must have permission to create new course.');
}

Am I right?

In reply to Jaswant Tak

Re: Batch Course Upload/Update

by Abdulhameed Assawadi -

Hi all,

Could you guide me from where can I get this script?

Also is there a detailed explanation of how to apply it?

This will help us a lot since we are recreating a new moodle site every semester and the restoring the courses after creating them one by one!

 

Any help please?

Regards for all.

In reply to lee asson

Re: Batch Course Upload/Update

by J Handler -

What is the cost field for?  I can't figure that one out.

Also how could I modify the code to add the Show activity reports: field set to yes.

 

Thanks,

 

In reply to J Handler

Re: Batch Course Upload/Update

by Neal Haas -

I think that the cost field is if you are charging for the class....

Thanks this is some of the help I have been looking for for uploading classes.

Neal

In reply to Neal Haas

Re: Batch Course Upload/Update

by J Handler -

I've gone in and tweaked lines 85-93 on upload2.php (and the documentation on uploader.php

It now allows you to have multiple teachers per class separated by , 

ie.  teacher1,teacher2,etc....
Let me know what you think....
Enjoy!!!!!

In reply to lee asson

Re: Batch Course Upload/Update

by Hernán Pazmiño -
Hello: Thank you very much for you script. Please could you tell me how can i know what is the internal ID of any category in Moodle?

In reply to lee asson

Re: Batch Course Upload/Update

by Alphonse Mc Clouds -

Sorry I'm stiil need update function and update teacher in course too

any one can make it for me?

Thanks

In reply to Alphonse Mc Clouds

Re: Batch Course Upload/Update

by Jeff Church -

Two of our student programmers (Cole Spicer js72111@appstate.edu and Austin Gooding bg66444@appstate.edu) modified the course upload file to work in 1.7.1. It does not have a hook into the gui interface so you run it just like you did for the original quick method. Login as the admin and enter http://moodleaddress/admin/uploadcourse.php. Most of it works the same as before but in this version the add teacher works and the fields needed for 1.7 have been added. For the teacher role use the role short name, found under define roles. This is beta software and we have only done simple test on it so far. Please do your own testing before using it on a live instance. Any feedback on this would be greatly appreciated. We are very new to Moodle so I apologize any newbie faux pas.

In reply to Jeff Church

Re: Batch Course Upload/Update

by Mark Pearson -
I have just tried this out on a test instance of Moodle v1.8. I found that I have to stick closely to the required fields. Some fields that I thought were optional were not .. When I got the test data set looking shipshape and Bristol fashion the import worked fine. Glitches:
  1. Minor. The 'sortorder' does not seem to do what it's name suggests. That is, I figured that the categories would be sorted by the sort order given. But no, the categories appear in the order they are imported.
  2. Major. The teacher role assigned to the 'teacher' field is non-editing teacher. That is, with the string 'Teacher' or 'teacher' in the teacher1_role field the role actually created is non-editing teacher. Other default roles for v1.8, such as 'Course creator' or 'non-editing teacher' threw errors, although the courses were created. This is a major issue since it entails manually changing roles for every course created.
Mark
In reply to Mark Pearson

Re: Batch Course Upload/Update

by Ellen Marie Murphy -
We are in the process of installing 1.8 and switching from Blackboard to Moodle. We need to batch upload all of our courses and users, so I'm hoping that the "major" complication listed above was fixed. Or that there is an easier fix then going in to each course and fixing it. Does anyone know...?

Thanks.
In reply to Mark Pearson

Re: Batch Course Upload/Update

by Ellen Marie Murphy -
Actually I believe I've figured out the answer to the teacher role field. Rather than enter "teacher" you have to enter "editingteacher". That fixes it.
In reply to Jeff Church

Re: Batch Course Upload/Update

by Ellen Marie Murphy -
I have not been able to find a way to add multiple teachers. I tried column heading like" teacher1_account, teacher2_account, teacher1_role, teacher2_role

as well as: teacher1_account, teacher1_role, teacher2_account, teacher2_role

and several other column heading as well.

What should the file look like in order to add multiple teachers? (I'm using excel and then saving the file in a csv format)

Thanks.
In reply to lee asson

Re: Batch Course Upload/Update

by Mark Pearson -
It has been suggested that I post some destructions about how I have used this successfully at Earlham. Here they are:

Moodle Data Import via flat file

Introduction

This conversation on moodle.org details the development of a simple plugin to create a collection of courses from data in a simple comma delimited text file. A version which is compatible with Moodle 1.7 has been created by students at Appalachian State University ( details ).

I had to perform a couple of hacks in order to make it work with the courses I had to create:

  1. increase length of shortname from 15 -> 20 chars (the database can handle 256 char length) on line 627.
  2. similarly, increase the default category length from 30 to 50 chars (line 208).

Code (including hacks listed above)

Hacks needed for Moodle

One of the more frustrating aspects of administering moodle and adding courses is the arbitrary limit on the Shortname field size. This has nothing to do with the database where the shortname field in the mdl_course table is of type varchar(100). In fact, it's a consequence of two 'magic numbers' located in the code that displays the editing and request form. Here are AWyatt's hacks (login needed) which increase the size of the shortname field in the relevant forms:

 Increase shortname field length in the course request form and the course creation form.

 In moodle/course/edit_form.php line 72
 $mform->addElement('text','shortname', get_string('shortname'),'maxlength="25" size="25"');

 moodle/course/request_form.php line 13
 $mform->addElement('text', 'shortname', get_string('shortname'), 'maxlength="25" size="25"'); 

I tried these out on my test 1.8 Moodle site and they worked:

shortname_field_hack.png

Procedure

1. Faculty Account creation

Despite claims to the contrary, the uploadcourse does not create user accounts for teachers; these have to be created prior to the course upload. We used this perl script to extract names and email addresses from the WebDb database, format them and output to a web page (note that this setup is unique to Earlham -- you'll have to find some other way of creating the comma delimited file). Example file to create faculty accounts

Go to Users : Accounts : Upload users on your Moodle site and browse for the comma delimited file of faculty account and upload it. The accounts should be created automatically.

Since many of the courses have yet to be assigned to a professor we use a moniker "TBA" to substitute the prof's name and this account must be created as well.

2. Extract and format the course data

We used this perl course creation script to run against the Earlham Webdb system which extracts and formats the data. Fell free to modify this script. There were a number of issues to cope with and here's what we did:

  • drop all AWPE courses — these are all practical and are not likely to require an online presence.
  • discard CS courses as well since we know they're not wanted.
  • if multiple teachers are listed for the course only the first teacher is selected.
  • courses that are cross listed have more than one course entry for the same course. It's impossible to determine which course is the canonical one (basically it would be the course corresponding to the teacher's department), so we leave these out too.
  • Apart from BIOL courses (ie Eco Bio) crosslisted which stay in this main listing as a special case.
  • discard any courses with '340' as being ephemeral.
  • handling multiple sections of the same course. Rather than label every course with "-1" the default section is left blank and subsequent sections have the section number attached. Thus BIOL111 , BIOL111-2, BIOL111-3. These are sufficiently rare so that the "-1" can be added by hand in Excel if need be.
  • use full email addresses as teacher names to avoid problems with multiple last names (eg Van Buskirk) and middle names (eg Scott D. Hess)
  • change role from "Teacher" to "editingteacher" (this is a logical bug)
  • placing "/" around category names (eg /Art (ART)/ ) will automatically create the category (and as an added bonus they'll be in alphabetical order too! Note: Add a dummy course for the Miscellaneous category so that this gets created too.
  • Note that the default outline format used is 'weeks' (course start date 19th Aug, # weeks 16) – we could change known courses to topics using Excel, but restoring courses would make this superfluous on the whole.

All of the above issues are coped with in the perl script. No other tweaking is required but it's always well worth loading the data into Excel to eyeball prior to uploading.

Shortname format

The format we used was <dept><course number><section>:<banner termcode>, thus BIOL111-2:200810. As explained above we apply a modest hack to accomodate the longer shortname (>15 chars).

Full name format

Here we used <shortname> – <course title>, eg BIOL111-2:200810 – Ecological Biology L & L. This means that courses can be uniquely identified by their fullname across years.

Cross listed courses are handled separately.

Instructions for installation and use

  1. Download uploadcourse.zip and unzip. This contains two files uploadcourse.php & example_course.csv.
  2. Create Faculty accounts as described above
  3. Extract the course data from Banner/other as described above.
  4. Modify the forms fields in Moodle to account for longer shortname field as described above.
  5. Open example_course.csv in Excel and check that you have the correct format for the course import file.
  6. Copy uploadcourse.php into /moodle/admin directory. Make sure permissions and ownership are set correctly (ie, match them to other .php files there)
  7. Login as Moodle administrator and run http://moodle/admin/uploadcourse.php ; browse for the course import file and execute!

Testing

I tested this on a testbed version 1.8.1+. Here's a successful import:

Parsed 340 course(s) from CSV Created 322 course(s) out of 340
18 course(s) were skipped (duplicate ShortName)
33 new category(ies) were created
You may wish to manually Re-Sort the categories
Re-Sorted courses 
ANALYZE Database Tables OK
OPTIMIZE Database Tables OK
Total Execution Time: 25.16 s

Handling cross listed courses

Cross listed courses were extracted with a modified sql script which produces a comma delimited format file. This has to be editted in Excel and the supernumary crosslisting course references removed. I have seen somewhere a system by which multiple course lables can point to the same course within Moodle but I cannot find it.


Based on information from my Moodle Issues tiddlywiki Mark Pearson July 3rd 2007

You mileage WILL vary, but the principles are here. A big huge thank you to the workers at Applacian State for their excellent script.

Average of ratings: Useful (1)
In reply to Mark Pearson

Re: Batch Course Upload/Update

by Peter Baxter -
We're using Postgres as our database so I've gone through the script and made it Postgres friendly. Thought I would post my hack here to save someone a little time if they are in the same situation.

It is based on the script by the folks at Applacian State, and I also added the tweaks noted by Mark Pearson in the previous post (shortname / default category length).

Ran a successful test import on my dev install of Moodle 1.8+:
Parsed 5 course(s) from CSV
Created 4 course(s) out of 5
1 course(s) were skipped (duplicate ShortName)
1 new category(ies) were created
You may wish to manually Re-Sort the categories
Re-Sorted courses
VACUUM ANALYZE Database Tables OK
Total Execution Time: 0.63 s

In reply to Peter Baxter

Re: Batch Course Upload/Update

by eric lopez -
I am getting this error...
"Too many actual values"


I think the problem is that the script is concatenating the query and since I am adding 4k courses it never gets done. I read that I should try the query_mem_size value in postgresql but I have already set the maximum possible values there.
I have been trying to modify the script so that it inserts each line at a time but after two days with no luck I am resorting to you guys...
Does anyone has a modify version of this script that does what I need??
regards,
eric.
In reply to Mark Pearson

Re: Batch Course Upload/Update

by Jose A. Ruiz -

hi,

how can enrol a techer into a course created, by the field "username" in the table User???

in line 290:

if ($mysqlresource1=mysql_query('SELECT `id` FROM `'.$CFG->prefix.'user` WHERE `deleted` = 0 AND `id`='.mysql_real_escape_string($userid))){  

I have modified the ID but don't work.

TKZ

In reply to Mark Pearson

Re: Batch Course Upload/Update

by Ellen Marie Murphy -
We are having problems with the course summary field. It appears that we can get the uploadcourse.php to only accept up to 5 lines of text in that field. Is there a way to fix that?

Thanks
In reply to Ellen Marie Murphy

Re: Batch Course Upload/Update

by Gareth Cadwaladr -
I am having a problem when trying to upload the csv file (even the example one given). The error message reads:

You have no category table!

Does anyone have any ideas? We are running Moodle 1.8.3 on a windows server
In reply to Ellen Marie Murphy

Re: Batch Course Upload/Update

by Rob Barnett -

I know this question is very old but I have not seen an answer to it since.  The script calls PHP's fgetcsv function.  You may need to change the second parameter, which is an optional file length. I had to increase the size from the 1024 that is set it the script where fgetcsv is called and this solved my problem.

http://php.net/manual/en/function.fgetcsv.php

In reply to lee asson

Re: Batch Course Update

by Ellen Marie Murphy -
Sometimes changes are made to our courses prior to the start of classes, but after the initial feed. Is there a way to change the course description, for example? It appears that if we use the uploadcourse.php and the csv file for that upload, then if the short name matches a course already in the system, that line is skipped.

Is there a way to update courses?
In reply to lee asson

Re: Batch Course Upload/Update

by Paulo Monteiro -
Hi,
Great batch in did. Save a lot of time.
However, I have a problem!!!:
- I want to upload any groups/course. (no problems. I have Succeeded)
- The problem are when i put the chars (ç,á,ó,ã,...). The script cut the text when find this chars. I have make some experience (like put " or ' like this: "António..") in CSV, but don't work.

There are any suggestions to do this well.

Thanks for all
Paulo Monteiro
In reply to Paulo Monteiro

Re: Batch Course Upload/Update

by Jessica McKean -
Can someone email me a sample of your file so I understand what I am doing when I batch create courses? We just installed the code but I am confused on how my file should look and the criteria I should put for each column.

jmckean@alliant.edu. We just installed Moodle and have 2 months to get it ready for our Spring 08 trial, and Summer 08 implementation.

Thank you so much!

Jessica McKean
In reply to Jessica McKean

Re: Batch Course Upload/Update

by Simon Allgood -
has anyone got a version of this that allows you to import child courses with each course you upload? or know of any way of going so.
In reply to Paulo Monteiro

Re: Batch Course Upload/Update

by Laura Laura -

Hello Paulo,

Have you found the solution?

Thanks!

In reply to lee asson

Re: Batch Course Upload/Update

by John Isner -
I know this is an old discussion but I would like to point out that there is a tracker issue MDL-13114 "Include bulk course create and remove with Moodle through the use of CSV files." If you would like to see bulk course upload become a standard Moodle feature, I encourage you to vote for the issue and add your comments!
In reply to John Isner

Re: Batch Course Upload/Update

by Marc Grober -
Apologies all around.....

Chris.... while people do get testy sometimes about others massaging what they might think is perfect prose.... I wasn't trying to make you nervous about this, just wanted to bring your attention to the functional diff between moodle core and M&P ( I don't know that I expressed that very well, but I hope you get the drift.)

AB, JI and AWT - There were some issues in using Rory's code and the exchange in the forum suggested that Rory was no longer available to discuss his offering. The code that Jeff' forwarded has apparently been vetted on 1.8 and 1.9 (both bulk add and bulk delete), but the bulk add was added to M&P by JB, while the bulk delete was not.

I certainly agree that people should vote for the inclusion of this functionality (whoops, I guess I had better vote.....) but it would also be handy because of the utility of these scripts and the demand that there was a common easily identifiable location for the files and what ever documentation is available.

The maintain or Anthony can edit the M&P pages to point to a documentation page, Chris, and as John knows, that is what happened with Dragmath (there is a docs page which is now referenced by the M&P entry.) I just want to be careful, especially as I think we are all hopeful that this funtionality will be seen in Moodle 2.0, that we don't build something now that will present difficulties later....

That being said, I am wondering Anthony, especially if Chris is willing to at least be the nominal mantainer, to abandon the current bulk upload listing in favor of a listing that includes bulk add and delete, make Chris the maintainer, and suggest a docs page that could easily be rendered obsolescent (or even just edited and incorporated as core docs) that is referenced then by the M&P page. This would make things a bit more elegant than at present and would be THE place to send folks looking for the tools until Moodle 2 reflects the community's upcoming broad demand that these utilities be included......
In reply to lee asson

Re: Batch Course Upload/Update

by Alan Zaitchik -
I am still looking for a way to run uploadcourses.php or any lighter-weight version thereof from a shell script or cron job with no need for interaction through a form. Anyone get this working?
I know the thread is a very old one, but perhaps someone will see this posting and be able to help.
Same need, by the way, for uploaduser.php! Can't use the database sync scripts for reasons I cannot go into. Need to use flat files.
Thanks for any and all help.
Alan
In reply to Alan Zaitchik

Re: Batch Course Upload/Update

by Sara Bozzini -
This is a great plugin! We successfully use it on a 1.9.1.
Thanks to all that help in developing and testing it!
Sara
In reply to Alan Zaitchik

Re: Batch Course Upload/Update

by David Lo -

Alan, did you get your answers? Can you share the code?

We at Evergreen are trying to import users, courses and enrollment to Moodle in batch mode

via .bat or cron. Any info will be appreciated. Thanks.

In reply to David Lo

Re: Batch Course Upload/Update

by Muhammed Memon -
Hi,

Just curious will this work to create SCORM courses. I know we will have to update the SCORM packages, but if we can get this to initially create the course this will save ton of time. In addition to this if we do not want teacher's name on that can we leave the field blank? I am new to Moodle, but I think it is great tool.