educationSubmission: excuse

命名空间:microsoft.graph

原谅 提交。 原谅提交不包括在平均成绩计算中。 将删除评分评分标准和反馈。 只有教师可以执行此操作。

Prefer: include-unknown-enum-members如果提供了请求标头,则原谅提交将显示原谅状态。 否则,提交状态将保留 返回 的状态。 有关如何使用此标头的详细信息,请参阅 示例 部分。

此 API 可用于以下国家级云部署

全局服务 美国政府 L4 美国政府 L5 (DOD) 由世纪互联运营的中国

权限

为此 API 选择标记为最低特权的权限。 只有在应用需要它时,才使用更高的特权权限。 有关委派权限和应用程序权限的详细信息,请参阅权限类型。 要了解有关这些权限的详细信息,请参阅 权限参考

权限类型 最低特权权限 更高特权权限
委派(工作或学校帐户) EduAssignments.ReadWrite 不可用。
委派(个人 Microsoft 帐户) 不支持。 不支持。
应用程序 EduAssignments.ReadWrite.All 不可用。

HTTP 请求

POST /education/classes/{classId}/assignments/{assignmentId}/submissions/{submissionId}/excuse

请求标头

标头
Authorization 持有者 {token}。 必填。 详细了解 身份验证和授权
Prefer include-unknown-enum-members. 可选。

请求正文

请勿提供此方法的请求正文。

响应

如果成功,此方法在 200 OK 响应正文中返回响应代码和 educationSubmission 对象。

示例

示例 1:具有可选 Prefer 标头的请求

请求

以下示例显示了一个使用 Prefer: include-unknown-enum-members 标头来保留原谅状态的请求。

POST https://graph.microsoft.com/v1.0/education/classes/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/assignments/28992cce-fac0-4950-a836-5a524ded8599/submissions/02859156-c3c7-876d-7a5c-915bf4f61380/excuse
Prefer: include-unknown-enum-members

响应

以下示例显示请求中提供 标头时的 Prefer: include-unknown-enum-members 响应。

HTTP/1.1 200 Ok

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.educationSubmission",
    "status": "excused",
    "submittedDateTime": "2023-07-19T15:17:37.9961504Z",
    "unsubmittedDateTime": null,
    "returnedDateTime": "2023-07-19T15:17:08.7988272Z",
    "reassignedDateTime": null,
    "excusedDateTime": "2024-04-25T11:50:36.7972162Z",
    "resourcesFolderUrl": null,
    "webUrl": "https://teams.microsoft.com/l/entity/66aeee93-507d-479a-a3ef-8f494af43945/classroom?context=%7B%22subEntityId%22%3A%22%7B%5C%22version%5C%22%3A%5C%221.0%5C%22,%5C%22config%5C%22%3A%7B%5C%22classes%5C%22%3A%5B%7B%5C%22id%5C%22%3A%5C%2237d99af7-cfc5-4e3b-8566-f7d40e4a2070%5C%22,%5C%22assignmentIds%5C%22%3A%5B%5C%2228992cce-fac0-4950-a836-5a524ded8599%5C%22%5D,%5C%22submissionId%5C%22%3A%5C%2202859156-c3c7-876d-7a5c-915bf4f61380%5C%22%7D%5D%7D,%5C%22action%5C%22%3A%5C%22navigate%5C%22,%5C%22view%5C%22%3A%5C%22speed-grader%5C%22,%5C%22appId%5C%22%3A%5C%22de8bc8b5-d9f9-48b1-a8ad-b748da725064%5C%22%7D%22,%22channelId%22%3Anull%7D",
    "id": "02859156-c3c7-876d-7a5c-915bf4f61380",
    "recipient": {
        "@odata.type": "#microsoft.graph.educationSubmissionIndividualRecipient",
        "userId": "61243ddb-6f39-499d-b232-9fa8cef26b3a"
    },
    "submittedBy": {
        "application": null,
        "device": null,
        "user": {
            "id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
            "displayName": null
        }
    },
    "unsubmittedBy": {
        "application": null,
        "device": null,
        "user": {
            "id": null,
            "displayName": null
        }
    },
    "returnedBy": {
        "application": null,
        "device": null,
        "user": {
            "id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
            "displayName": null
        }
    },
    "reassignedBy": {
        "application": null,
        "device": null,
        "user": {
            "id": null,
            "displayName": null
        }
    },
    "excusedBy": {
        "application": null,
        "device": null,
        "user": {
            "id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
            "displayName": null
        }
    }
}

示例 2:不带 Prefer 请求标头的请求

请求

以下示例显示了一个请求。

POST https://graph.microsoft.com/v1.0/education/classes/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/assignments/28992cce-fac0-4950-a836-5a524ded8599/submissions/02859156-c3c7-876d-7a5c-915bf4f61380/excuse

响应

以下示例演示请求中未包含标头且提交之前未原谅时的响应 Prefer: include-unknown-enum-members

HTTP/1.1 200 Ok

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.educationSubmission",
    "status": "returned",
    "submittedDateTime": "2023-07-19T15:17:37.9961504Z",
    "unsubmittedDateTime": null,
    "returnedDateTime": "2024-04-19T12:52:57.4362614Z",
    "reassignedDateTime": null,
    "excusedDateTime": "2024-04-19T12:52:57.4362614Z",
    "resourcesFolderUrl": null,
    "webUrl": "https://teams.microsoft.com/l/entity/66aeee93-507d-479a-a3ef-8f494af43945/classroom?context=%7B%22subEntityId%22%3A%22%7B%5C%22version%5C%22%3A%5C%221.0%5C%22,%5C%22config%5C%22%3A%7B%5C%22classes%5C%22%3A%5B%7B%5C%22id%5C%22%3A%5C%2237d99af7-cfc5-4e3b-8566-f7d40e4a2070%5C%22,%5C%22assignmentIds%5C%22%3A%5B%5C%2228992cce-fac0-4950-a836-5a524ded8599%5C%22%5D,%5C%22submissionId%5C%22%3A%5C%2202859156-c3c7-876d-7a5c-915bf4f61380%5C%22%7D%5D%7D,%5C%22action%5C%22%3A%5C%22navigate%5C%22,%5C%22view%5C%22%3A%5C%22speed-grader%5C%22,%5C%22appId%5C%22%3A%5C%22de8bc8b5-d9f9-48b1-a8ad-b748da725064%5C%22%7D%22,%22channelId%22%3Anull%7D",
    "id": "02859156-c3c7-876d-7a5c-915bf4f61380",
    "recipient": {
        "@odata.type": "#microsoft.graph.educationSubmissionIndividualRecipient",
        "userId": "61243ddb-6f39-499d-b232-9fa8cef26b3a"
    },
    "submittedBy": {
        "application": null,
        "device": null,
        "user": {
            "id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
            "displayName": null
        }
    },
    "unsubmittedBy": {
        "application": null,
        "device": null,
        "user": {
            "id": null,
            "displayName": null
        }
    },
    "returnedBy": {
        "application": null,
        "device": null,
        "user": {
            "id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
            "displayName": null
        }
    },
    "reassignedBy": {
        "application": null,
        "device": null,
        "user": {
            "id": null,
            "displayName": null
        }
    },
    "excusedBy": {
        "application": null,
        "device": null,
        "user": {
            "id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
            "displayName": null
        }
    }
}

另请参阅