General developer forum

Creating resource and uploading file

 
Picture of Anze Pratnemer
Creating resource and uploading file
 

Greetings.


We are migrating from some other environment and would like to copy all our contents to Moodle.


As much as I can see, there is no webservice available that would allow us to copy files directly into course.

I have two options:

1. creating plugin with webservice like this

2. creating local plugin that takes contents of a defined folder and uploads it into appropriate course (courseid would be folder name for example)


Where I do get stuck is how to create resource at the first place. I can develop either option, but how do I create resource in a course(context) and upload file to it?

 
Average of ratings: -