Hi everyone this is been driving me mad so I hope you can help
I am trying to use patch() to assigne a draft grade to an assignment but keep getting the error (patch) unknown parameter: 'draftGrade'
here is my code created in laravel PHP
$this->client->setAccessToken($_SESSION['access_token']);
$service = new \Google_Service_Classroom($this->client);
$courseId = '17531696064';
$courseWorkId = '29297231820';
$id = 'CgwI9aG3lwkQzI-Bkm0';
$post_body = new \Google_Service_Classroom_StudentSubmission(array(
'updateMask' => 'draftGrade',
));
$opt_params = array(
'draftGrade' => 90,
);
$list = $service->courses_courseWork_studentSubmissions->patch($courseId, $courseWorkId, $id, $post_body, $opt_params);
I have also used the following but still have no joy.
$list = $service->courses_courseWork_studentSubmissions->patch(17531696064,
29297231820,
'CgwI9aG3lwkQzI-Bkm0',
new \Google_Service_Classroom_StudentSubmission(array('updateMask' => 'draftGrade')),
array ('resource' =>['draftGrade' => 90] ));
Any help would be great.