Bulk file import via API

Bulk file import via API

by Anze Pratnemer -
Number of replies: 3

Greetings,


I cannot find any info on APIs that are opened for usage via php scripts.

I am migrating already live proprietary e-learning platform to Moodle. I have thousands of files there, that needs to be moved to Moodle.


Files are originally already taged by courses and I have created 1:1 courses in Moodle. Now I need a tool, that I can call with php script and curl some files directly to Moodle, sending "metadata" along with it, so files are already included in correct course on Moodle side.


I found File API, but thats only for scripts that operate within Moodle environment. I will be sending these files from outside world..

Average of ratings: -
In reply to Anze Pratnemer

Re: Bulk file import via API

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Have you looked at the idea of using a *.csv file? The instructions are a bit brief here, but they may help. Further information can be found in this Moodle Doc.

In reply to Colin Fraser

Re: Bulk file import via API

by Anze Pratnemer -

I'm not talking about creating courses. Courses are already handled by other means. I need to bulk upload files into this previously defined courses..

In reply to Anze Pratnemer

Re: Bulk file import via API

by Colin Fraser -
Picture of Documentation writers Picture of Testers

The the trick is to get those courses into a format that Moodle will recognize.  AFAIK, there was only a converter that would convert Blackboard courses into Moodle courses, but I don't think that has not been updated since before v2.0. 

What you may be able to do is to create a course, put something of different resources and activities equivalent to what you are currently using, back it up and compare it to what you have. See if you can create a converter of your own. I would expect the conversion of the database would be the biggest issue, but IANAD, so can't help, sorry.

Alternatively, one of the Devs in the General Developer's Forum may be able to assist you.