Question about API/command line/function capability of assignment module

Question about API/command line/function capability of assignment module

by Razvan Carbunescu -
Number of replies: 3

Hello moodle community I'm a new user that's going to be the TA for a XSEDE sponsored course on parallel computing starting in mid-February (the course is free to register for through their portal and advertisement for it should begin shortly). The course will be online so all student will be remote.

We were planning on using Moodle for the student Q&A forum and for student assignments (upload / grading) and while the Q&A part looks easily doable I have looked over the assignment module on the test server and had a few questions about the module:

1) Is there an option to contact the server through command line and/or function calls to login and download all assignments?

2) Is there an option to contact the server through command line and/or function calls to upload grades for the assignments?

3) If the above don't exist if the server is hosted on a local/ accesible machine does the package provide a reasonably normal/predictable naming scheme for uploaded files/ grade databases so that the above statements could be done under the hood of moodle.

The assignments themselves are relatively complex and will entail the submission of a C source code file that will then be combined with other components and ran on a parallel machine on which students will have access to. The way I had imagined the submission process going was:

- student logs in to moodle and uploads file

- when he clicks submit or upon every hour or so a script is run that grabs the new codes and copies files to supercomputers

- another script submits runs on the supercomputer machines and after getting the results/error messages returns a comment and a grade for the assignment to moodle

Is this something that's likely to be doable within moodle framework or currently is this outside the scope of the framework?

Average of ratings: -
In reply to Razvan Carbunescu

Re: Question about API/command line/function capability of assignment module

by Damyon Wiese -
Picture of Core developers Picture of Moodle HQ Picture of Plugin developers Picture of Testers

We are currently adding webservices to the assignment module that will let you do this more easily (with no code in Moodle) - but they will not likely be the version that you are using (2.5 is likely to have all these). 

For earlier versions I would suggest a new assignsubmission plugin that accepts files, posts them to your remote server, then an assignfeedback plugin that checks the remote server for any grades/compilation errors etc on the remote server for a given submission id. 

(There are other ways to do this - this is just a suggestion).

- Damyon

 

In reply to Damyon Wiese

Re: Question about API/command line/function capability of assignment module

by Paul Charsley -

Hi,

One of the web service functions that Damyon is referring to is mod_assign_export_submissions (See MDL-31886). This function will accept an assignment id as a parameter and will download a zip file containing submission files. I believe this should meet your requirements and we are hopeful of including it in Moodle 2.5.

The issue is currently blocked by MDL-32336 which is our proposed change to support file downloads in web service function.

Paul

In reply to Paul Charsley

Re: Question about API/command line/function capability of assignment module

by Razvan Carbunescu -

Thank you for the sugestions and I'll look to see which parts of the assignment module we can use and try to integrate it with the manual all-dowload option that's available if nothing else comes up.