Now that I've gotten the web service working I've been playing around with it for a while and it works great! But sooner or later you hit another obstacle, and now I'm stuck again. I think it would be increadibly useful to have a web service for uploading files to assignments. I have already been looking into this and found some references to it in the dev docs (http://docs.moodle.org/dev/Assignment_Web_Services) Is anyone else but me interested in such functionality?
I'm just seeing a world of possibilities here: Imagine letting students in a photography course loose to take whatever photos as they wish, instantly uploading there prefered photo directly into an assignment from their phone.
That's pretty much what I'm trying to do at the moment, but my method so far has been to try to craft a http POST request containing a file and send it to the assignment much like submitting a browser form would. I've had some success with this, for example I receive a response as if the file had uploaded succesfully and all teachers get an email notification (as I have this enabled for the course), but the actuall file is not uploaded. Maybe someone else have managed to get something similar working?
I'm using Moodle 2.3.1 by the way, and I'm eager to see what people think of this!