Unable to load new courses using LMB 2.5.1

Unable to load new courses using LMB 2.5.1

by Phi Le -
Number of replies: 1

Hi,

I've been fighting with this for a while now.  I installed Moodle 2.5.1 along with LMB 2.5.1 (and older version) on my devel. server.  I cannot load the courses into Moodle using this plug in.  Nothing registers in the log file other than this line: The import log will appear below.  The same xml file will work just fine in Mooddle 1.9.16/LMB 0.8.5.  Any thoughts?

Thanks in advance,

PL

Average of ratings: -
In reply to Phi Le

Re: Unable to load new courses using LMB 2.5.1

by Mark Pearson -

You've found the Achilles heel of the LMB import. Or at least one them smile (The other is that you cannot manually remove an enrollment that has been done with LMB). Here's what is happening (or at least what I understand is going on). The LMB importer script can run either as a separate cron job or as part of the system cron. If it's run with the moodle system cron it gets called every 15 minutes (or whatever interval that is set up to be). So there has to be some mechanism to say "this has already been processed, don't do it again". That mechanism is basically that the importer reads the xml file and makes a note of the date & time at the top:

        <properties lang="en">
                <datasource>INB Banner</datasource>
                <datetime>2013-08-16T11:14:36</datetime>
        </properties>

If you try to run the same file again, in this case at a time after 11:14, it'll just skip the whole thing thinking that it's already been run and you get the laconic message 'import log <blank> will appear below' because nothing has been imported. The solution now is obvious. Just change the time or date in the <datetime> field to a later time or date and the file  will now process properly.

This is something that only happens when you're testing and believe me, it took me a long time to get to the bottom of what was going on!

Mark