我在google Classroom中尝试转换学生提交时遇到错误。
使用以下代码:
mService.courses().courseWork().studentSubmissions().turnIn(mCourseWork.getCourseId(),mCourseWork.getId() ,mySubmission.getId(),turnInStudentSubmissionRequest).execute();
获取以下错误:
403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "@ProjectPermissionDenied The Developer Console project is not permitted to make this request.",
"reason" : "forbidden"
} ],
"message" : "@ProjectPermissionDenied The Developer Console project is not permitted to make this request.",
"status" : "PERMISSION_DENIED"
}
答案 0 :(得分:1)
修改assignments / courseWork或student提交时,只有创建这些对象的Developer控制台项目才能修改它们。这意味着只有创建相应课程的项目才能修改它们,否则返回403 PERMISSION_DENIED错误。通过检查Google Classroom课程作业响应中的associatedWithDeveloper属性,您可以轻松确定课程工作项是否与发出请求的Developer Console项目相关联。