Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2362

Upload a file as a resource in a section using core_files_upload

$
0
0

by Sebastian Rettig.  

Hi,

I want to upload a file into moodle courses using the Web Service API. They should be added as resources in sections of the course. I assume the function "core_files_upload" does this, but I can't find any documentation on the parameters.


What are possible values for component? What do the values for contextlevel (block, course, coursecat, system, user, module) mean? Should I set the filepath as well? How do I tell moodle that the file should be added as a resource into a section? Is this even possible? I haven't found any way of creating a resource activity (or "module" as it seems to be called) through a webservice, so I fear that what I want to do can't be done at all.

Thanks
Sebastian


Viewing all articles
Browse latest Browse all 2362

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>