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.