Moodle 2 bulk course creation

Moodle 2 bulk course creation

by Greg Rodenhiser -
Number of replies: 10

I've installed Moodle 2 RC1 on a test server and am disappointed to see that Moodle still does not seem to support bulk creation of courses (through uploaded CSV file).  In Moodle 1.8/1.9 we did this through the uploadcourse.php module (http://moodle.org/mod/data/view.php?d=13&rid=1536&filter=1), but it just comes up a blank screen in Moodle 2 RC1.

So...... what's the best way to create 700+ courses per semester in Moodle 2?  We use PeopleSoft for courses/enrollments to synciing to an SIS is not an option.

Average of ratings: -
In reply to Greg Rodenhiser

Re: Moodle 2 bulk course creation

by yush yuen -

I have made a hack to make it work on 2.0. See if it will work for you. You will have to change the database connection info at the beginning of the file.

Look for //YUSH HACK: for code that I have updated.

This files is also uploaded to the main uploadcourse thread.

In reply to yush yuen

Re: Moodle 2 bulk course creation

by Greg Rodenhiser -

Unfortunately this does not work for me.  I had also changed the database login section of the script (doing exactly what you did), and get the following error:

Coding error detected: It must be fixed by a programmer. Invalid state passed to moodle_page::set_state.  We are in state 2 and state 1 requested.

In reply to Greg Rodenhiser

Re: Moodle 2 bulk course creation

by yush yuen -

It usually have to do with incorrect field format of the csv file. Can you upload a few line of your csv file for me to take a look?

In reply to yush yuen

Re: Moodle 2 bulk course creation

by Ludovic Bocken -

Hi,

I've got a same problem. Can you advice me ? Thank you very much !

Ludovic

In reply to Ludovic Bocken

Re: Moodle 2 bulk course creation

by Jason Hardy -

Has anyone had a fix for this yet? I am experiencing the smae things.

In reply to Jason Hardy

Re: Moodle 2 bulk course creation

by Derek Chirnside -

Martin has posted on this in the tracker: http://tracker.moodle.org/browse/MDL-13114 Voting is now up to 91, the second highest vote.

This item references several other tracker items as well.

Martin has said

  1. the current code patch is not good enough and
  2. he has asked for a spec

Here's the problem: people need this utility, surf the forums to find one of the (at least) three code fragments, hack hack hack and run it, get it to a position of happiness, then move on.  No-one has ever sort of tidied up the code to be good enough to move to the next stage of submitting it to MoodleHQ to get it into the core, in spite of some god efforts by various individuals since Modle 1.4.  Once the bulk lot of courses are done, people just loose interest.

And as I have said elsewhere there is no motivation for anyone to do this really, as big clients use an SMS to create/populate courses.

My 2c worth.

So: if anyone wants to have another go a this and start with a spec, maybe a coder can start on the next bit?

-Derek
Ever optimistic

In reply to Derek Chirnside

Re: Moodle 2 bulk course creation

by Paul Fynn -

It's great to see the concern that Moodle now has for 'proper code'.

However, I need to create 180 courses, preferably this week, in order to be able to take my institution forwards with 2.0 and in the absence of a bulk migration tool to bring the courses from 1.9.

I look forwards to the QA'd version - in the meantime have any of the hacks available been used in anger to set a new tranche of bulk courses up in 2.0 ??

A simple workaround is all I need now - I'll take the Rolls Royce version later.........

In reply to Paul Fynn

Re: Moodle 2 bulk course creation

by Derek Chirnside -

Sorry Paul, this I don't know.  There is an unfinished conversation in this post, people saying it "doesn't work" and yush saying "Upload a part of the CSV"  Try a message maybe?

Anyway, just in case you have not thought of this, a convertor is here: http://www.moodleinschools.org.nz/courseconverter.  This MAY speed the process for you.  (You could hire three students who type fast and are accurate, lock them in a room with coke and pizza and get them to do the migratin to a nice shiny new 2.0.3 install. You just do the QA)  At least you have only got 180 courses to do.

Good luck.

-Derek

In reply to Derek Chirnside

Re: Moodle 2 bulk course creation

by Paul Fynn -

Thanks Derek - there seem to be three or four 'hacks' on the go at the moment for bulk creation  in different places on the moodle forums - as you've identified, there's little interest in further development once folk have met their own immediate needs.

best

Paul