I use a web service to write back to my music assignment types. It can write to the gradebook as well or just to the assignment. It requires an admin account on the Moodle site. I currently call it from a Java Server.
You would need to export user, module, assignment, etc. info to the external application for use logging back into the appropriate moodle course.
If you are interested I can send you the code for the web service.
You would need to export user, module, assignment, etc. info to the external application for use logging back into the appropriate moodle course.
If you are interested I can send you the code for the web service.
Thanks David! I would like to take a look at the code for your web service.
Here is the webservice I use. It is placed in the /mod/assignment folder. It obviously looks for my music assignment type.
Hope it helps,
Hope it helps,
Chaps,
I'm trying to do something which sounds kind of similar, but is probably a lot easier I'm simply trying to find out how to write a Moodle Assignment Grade from an external application. All i'm looking for is a quick and dirty way to use PHP to write an assignment grade. Do you know the easiest way to do that?
Thanks,
Alex
I'm trying to do something which sounds kind of similar, but is probably a lot easier I'm simply trying to find out how to write a Moodle Assignment Grade from an external application. All i'm looking for is a quick and dirty way to use PHP to write an assignment grade. Do you know the easiest way to do that?
Thanks,
Alex
You can use the same web service I posted above. You need some things in place however. You must login with an account that has permissions to grade. I actually use a administrator so I don't have to worry which course I'm writing to.
You also need to send the assignment, course, etc. out to the external application. You can then send that info back to the web service so it knows which course, assignment and student to write the grade to.
You also need to send the assignment, course, etc. out to the external application. You can then send that info back to the web service so it knows which course, assignment and student to write the grade to.
David,
Many thanks, I shall have a look at the code and see if I can strip it down. I'm new to the Moodle thing so if I copy your Add submission.php to /mod/assignment how would I then access it?
Essentially what i'm going to do is use Moodle to call an external program via XML-RPC. I can already do this part, so I was then looking for a way to allow the external application to in some way pass a mark back to Moodle.
I thought creating a kind of offline assignment which my external app would then pass a mark back for seemed like a good way to do this?
Thanks,
Al
Many thanks, I shall have a look at the code and see if I can strip it down. I'm new to the Moodle thing so if I copy your Add submission.php to /mod/assignment how would I then access it?
Essentially what i'm going to do is use Moodle to call an external program via XML-RPC. I can already do this part, so I was then looking for a way to allow the external application to in some way pass a mark back to Moodle.
I thought creating a kind of offline assignment which my external app would then pass a mark back for seemed like a good way to do this?
Thanks,
Al
I'm still trying to figure out how the .php service is served up. The docs speak of an XML-RPC dispatcher native to 1.9. I don't understand how to invoke this functionality. I would like to call a web service using a .NET XML-RPC library. Does anyone have a client code snippet for invoking a service through XML-RPC?