educationAssignment を作成する

名前空間: microsoft.graph

新しい割り当てを作成します。

クラス内の教師のみが課題を作成できます。 課題は下書き状態で開始されます。つまり、学生は発行するまで課題を表示しません。

アクセス許可

この API を呼び出すには、次のいずれかのアクセス許可が必要です。アクセス許可の選択方法などの詳細については、「アクセス許可」を参照してください。

アクセス許可の種類 アクセス許可 (特権の小さいものから大きいものへ)
委任 (職場または学校のアカウント) EduAssignments.ReadWriteBasic, EduAssignments.ReadWrite
委任 (個人用 Microsoft アカウント) サポートされていません。
アプリケーション サポートされていません。

HTTP 要求

POST /education/classes/{class-id}/assignments

要求ヘッダー

ヘッダー
Authorization ベアラー {token}。必須。
Content-Type application/json

要求本文

要求本文で、 educationAssignment オブジェクトの JSON 表現を指定します。

応答

成功した場合、このメソッドは 201 Created 応答コードと、応答本文の educationAssignment オブジェクトを返します。

要求

要求の例を次に示します。

POST https://graph.microsoft.com/v1.0/education/classes/72a7baec-c3e9-4213-a850-f62de0adad5f/assignments
Content-type: application/json

{
    "dueDateTime": "2021-09-07T00:00:00Z",
    "displayName": "Reading test 09.03 #4",
    "instructions": {
        "contentType": "text",
        "content": "Read chapter 4"
    },
    "grading": {
        "@odata.type": "#microsoft.graph.educationAssignmentGradeType",
        "maxPoints": 50
    },
    "assignTo": {
        "@odata.type": "#microsoft.graph.educationAssignmentGradeType"
    },
    "status": "draft",
    "allowStudentsToAddResourcesToSubmission": true
}

要求本文で、 educationAssignment オブジェクトの JSON 表現を指定します。

応答

応答の例を次に示します。

注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。

HTTP/1.1 201 Created
Content-type: application/json

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#education/classes('72a7baec-c3e9-4213-a850-f62de0adad5f')/assignments/$entity",
    "classId": "72a7baec-c3e9-4213-a850-f62de0adad5f",
    "displayName": "Reading test 09.03 #5",
    "closeDateTime": null,
    "dueDateTime": "2021-09-07T00:00:00Z",
    "assignDateTime": null,
    "assignedDateTime": null,
    "allowLateSubmissions": true,
    "resourcesFolderUrl": null,
    "createdDateTime": "2021-09-03T23:57:14.6088791Z",
    "lastModifiedDateTime": "2021-09-03T23:57:14.6398613Z",
    "allowStudentsToAddResourcesToSubmission": true,
    "status": "draft",
    "notificationChannelUrl": 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%2272a7baec-c3e9-4213-a850-f62de0adad5f%5C%22,%5C%22displayName%5C%22%3Anull,%5C%22assignmentIds%5C%22%3A%5B%5C%224679bc1b-90c5-45af-ae1a-d5357672ed39%5C%22%5D%7D%5D%7D,%5C%22action%5C%22%3A%5C%22navigate%5C%22,%5C%22view%5C%22%3A%5C%22assignment-viewer%5C%22%7D%22,%22channelId%22%3Anull%7D",
    "addedStudentAction": "none",
    "id": "4679bc1b-90c5-45af-ae1a-d5357672ed39",
    "instructions": {
        "content": "Read chapter 5",
        "contentType": "text"
    },
    "grading": {
        "@odata.type": "#microsoft.graph.educationAssignmentPointsGradeType",
        "maxPoints": 50
    },
    "assignTo": {
        "@odata.type": "#microsoft.graph.educationAssignmentClassRecipient"
    },
    "createdBy": {
        "application": null,
        "device": null,
        "user": {
            "id": "f3a5344e-dbde-48b0-be24-b5b62a243836",
            "displayName": null
        }
    },
    "lastModifiedBy": {
        "application": null,
        "device": null,
        "user": {
            "id": "f3a5344e-dbde-48b0-be24-b5b62a243836",
            "displayName": null
        }
    }
}

関連項目