Unable to get submissions of group assignment

Unable to get submissions of group assignment

by Nils Kattenbeck -
Number of replies: 0

Some teachers of the university I work for would like to automate assignment grading (especially coding tasks). However when I call the "mod_assign_get_submissions" REST function on an assignment with groups submissions enabled no response contains a file url:

Compare:

...,
{
  "id": 226969,
  "userid": 133163,
  "attemptnumber": 0,
  "timecreated": 1587614003,
  "timemodified": 1587614003,
  "status": "submitted",
  "groupid": 0,
  "plugins": [
    {
      "type": "file",
      "name": "Dateiabgabe",
      "fileareas": [
        {
          "area": "submission_files",
          "files": []
        }
      ]
    },
    {
      "type": "comments",
      "name": "Submission comments"
    }
  ],
  "gradingstatus": "notgraded"
},
...

to a response of an "ungrouped assignment":

...,
{
  "id": 1,
  "userid": 2,
  "attemptnumber": 0,
  "timecreated": 1587310028,
  "timemodified": 1587325597,
  "status": "submitted",
  "groupid": 0,
  "plugins": [
    {
      "type": "file",
      "name": "File submissions",
      "fileareas": [
        {
          "area": "submission_files",
          "files": [
            {
              "filename": "code.zip",
              "filepath": "/",
              "filesize": 1019,
              "fileurl": "https://127.0.0.1/webservice/pluginfile.php/27/assignsubmission_file/submission_files/1/code.zip",
              "timemodified": 1587325596,
              "mimetype": "application/zip",
              "isexternalfile": false
            }
          ]
        }
      ]
    },
    {
      "type": "comments",
      "name": "Submission comments"
    }
  ],
  "gradingstatus": "notgraded"
},
...
Average of ratings: -