查看工作分配的状态,如果未上交则显示“ DRAFT”,如果上交则显示“ PUBLISHED”,如果删除了工作分配,则显示“ DELETED”,所以如果未上交,为什么返回已发布
我也正在尝试使用api,以确保它与我的代码无关。
这是两个数据示例
{
"courseId": "27788641349",
"id": "40498942654",
"title": "Turned in assignment",
"materials": [
{
"driveFile": {
"driveFile": {
"id": "1jYsgpqIZOwQhM8wWOCi2oIu60gLED_r98m8HZRNbM2Q",
"title": "Turned in",
"alternateLink": "https://drive.google.com/open?id=1jYsgpqIZOwQhM8wWOCi2oIu61gLED_r98m8HZRNbM2Q",
"thumbnailUrl": "https://drive.google.com/thumbnail?id=1jYsgpqIZOwQhM8wWOCi2oIu61gLED_r98m8HZRNbM2Q&sz=s200"
},
"shareMode": "VIEW"
}
}
],
"state": "PUBLISHED",
"alternateLink": "https://classroom.google.com/c/Mjc37Dg2NDEzNDla/a/NDA0OTg5NDI2NTRa/details",
"creationTime": "2019-05-30T15:24:19.834Z",
"updateTime": "2019-05-30T15:24:40.308Z",
"dueDate": {
"year": 2019,
"month": 6,
"day": 4
},
"dueTime": {
"hours": 12
},
"workType": "ASSIGNMENT",
"submissionModificationMode": "MODIFIABLE_UNTIL_TURNED_IN",
"creatorUserId": "111903171301610679811",
"topicId": "27828304348"
},
{
"courseId": "27788641349",
"id": "35102123578",
"title": "Unturned in assignment",
"description": "this assignement was not turned in",
"materials": [
{
"driveFile": {
"driveFile": {
"id": "1SKTRfRwr__s-1MP-4P--z5hAbPCvBT_3",
"title": "items in the assignment",
"alternateLink": "https://drive.google.com/open?id=1SKTRfRwr__s-1NP-4P--z5hAbPCvBT_3",
"thumbnailUrl": "https://drive.google.com/thumbnail?id=1SKTRfRwr__s-1NP-4P--z5hAbPCvBT_3&sz=s200"
},
"shareMode": "VIEW"
}
}
],
"state": "PUBLISHED",
"alternateLink": "https://classroom.google.com/c/Mjc3RDg2NDEzNDla/a/MzUxMDIxMjM1Nzha/details",
"creationTime": "2019-04-18T16:43:30.456Z",
"updateTime": "2019-05-01T17:21:47.611Z",
"dueDate": {
"year": 2019,
"month": 4,
"day": 27
},
"dueTime": {
"hours": 3,
"minutes": 59
},
"maxPoints": 100,
"workType": "ASSIGNMENT",
"submissionModificationMode": "MODIFIABLE_UNTIL_TURNED_IN",
"creatorUserId": "111903171301610679811",
"topicId": "27828304340"
}
第一个应该具有“已发布”状态,第二个应该具有“已拖动”状态,但是它们都为“已发布”。还有其他方法可以确定分配是未提交的还是已上交的?