Search code examples
python-3.xgoogle-apigoogle-api-python-clientgoogle-classroom

Unable to use the method courses.courseWork.studentSubmissions.return() in Google Classroom API


I am trying to return the responses received in Google Classroom, according to the API documentation on this, I need to use this method courses.courseWork.studentSubmissions.return() but this triggers an error because of the keyword return being used as a funtion call.

Please correct me if I'm wrong and any help in this regard would be greatly appreciated.


Solution

  • You can find the documentation of the method in Python here

    So the request should look like

    service().courseWork().studentSubmissions().return_(courseId=PASS_HERE_THE_COURSEID, courseWorkId=PASS_HERE_THE_COURSEWORDID, id=PASS_HERE_THE_SUBMISSION_ID)
    

    Please keep in mind that:

    Only a teacher of the course that contains the requested student submission may call this method.