Node.js 获取课堂作业状态
使用nodejs(最终反应为native),我正在检索尚未提交的类。我从classworkapi中获得了输出,但是我找不到任何字段来告诉您分配的状态(分级、分配、上缴等)。是否有一个特定的端点,我必须调用每个类来获取状态?以下是我获得的输出(id值已被审查),仅供参考: 您似乎正在使用检查课程作业状态,该状态将返回一个不包含课程作业提交状态的实例 如果要检查每个学生的课程作业提交状态,则需要使用。如果你想检查某个学生,你可以使用 这将返回一个实例,其中包含a和Node.js 获取课堂作业状态,node.js,google-classroom,Node.js,Google Classroom,使用nodejs(最终反应为native),我正在检索尚未提交的类。我从classworkapi中获得了输出,但是我找不到任何字段来告诉您分配的状态(分级、分配、上缴等)。是否有一个特定的端点,我必须调用每个类来获取状态?以下是我获得的输出(id值已被审查),仅供参考: 您似乎正在使用检查课程作业状态,该状态将返回一个不包含课程作业提交状态的实例 如果要检查每个学生的课程作业提交状态,则需要使用。如果你想检查某个学生,你可以使用 这将返回一个实例,其中包含a和assignedGrade(如果适用
assignedGrade
(如果适用)
样本响应:
示例:我创建了分配给2名学生的课程作业,然后使用
我特别想在谷歌教室里为我找到工作。这个端点是否适用于此?在这种情况下,我不是老师,只是想得到我没有提交的作业。我正在使用
https://www.googleapis.com/auth/classroom.coursework.me.readonly
scope此方法适用于https://www.googleapis.com/auth/classroom.coursework.me.readonly
范围。使用范围时,它只返回您的提交,不返回其他学生。
{
courseId: '************',
id: '****',
title: 'HTWH Syllabus Acknowledgement Form',
materials: [Array],
state: 'PUBLISHED',
alternateLink: 'https://classroom.google.com/c/.......',
creationTime: '2020-08-26T22:10:25.522Z',
updateTime: '2020-08-26T22:15:26.587Z',
dueDate: [Object],
dueTime: [Object],
maxPoints: 5,
workType: 'ASSIGNMENT',
submissionModificationMode: 'MODIFIABLE_UNTIL_TURNED_IN',
creatorUserId: '*******',
topicId: '********'
}
{
"studentSubmissions": [
{
"courseId": "2371163xxxx",
"courseWorkId": "30629017xxxx",
"id": "Cg4IwNPyqfMGEK_pxxxxx",
"userId": "1043405157872289xxxxx",
"creationTime": "2021-03-22T21:17:51.331Z",
"updateTime": "2021-03-22T21:17:51.253Z",
"state": "CREATED",
"alternateLink": "xxxxxxxxxxxx",
"courseWorkType": "ASSIGNMENT",
"assignmentSubmission": {},
"submissionHistory": [
{
....
}
]
},
{
"courseId": "2371163xxxx",
"courseWorkId": "30629017xxxx",
"id": "Cg4I2ujEgvUIEK_pxxxxx",
"userId": "1112235452378899xxxxx",
"creationTime": "2021-03-22T21:17:44.380Z",
"updateTime": "2021-03-22T21:17:44.354Z",
"state": "CREATED",
"alternateLink": "xxxxxxxxxxxx",
"courseWorkType": "ASSIGNMENT",
"assignmentSubmission": {},
"submissionHistory": [
{
....
}
]
}
]
}