I am using http://moodle/webservice/upload.php file to upload the file which giving following JSON response
{"component":"user","contextid":21834,"userid":"3972","filearea":"draft","filename":"filename.jpg","filepath":"\/","itemid":953226783,"license":"allrightsreserved","author":"Test Student","source":"O:8:\"stdClass\":1:{s:6:\"source\";s:27:\"iconIADCCertificateTile.jpg\";}"}]
I have tried given itemid as draft id while calling mod_assign_save_submission API but it is giving error :
[{"item":"Nothing was submitted","itemid":29,"warningcode":"couldnotsavesubmission","message":"Could not save submission."}]
In above response 29 is an assignment id
Can anyone help?