Juan Jose
Juan Jose

Reputation: 1

How to upload a file on an activity alredy created on moodle programmatically?

I have been search how to upload a file to moodle, I understand with the function "core_files_upload" the file is uploaded into a "draft area", but I don't know how to move the file from this area to a specific activity of a course.

I got this response after using the function upload_file {'contextid': 16, 'component': 'user', 'filearea': 'draft', 'itemid': 12345, 'filepath': '/', 'filename': 'ejemplo2.png', 'url': 'https://xxxxxxx/draftfile.php/16/user/draft/12345/ejemplo2.png'}

Upvotes: 0

Views: 17

Answers (0)

Related Questions