educationassignment を更新する

名前空間: microsoft.graph

educationAssignment オブジェクトを更新します。

このアクションを実行できるのは教師だけです。

または、発行アクションを使用して割り当ての状態を変更するように要求します。 この目的には PATCH 操作を使用しないでください。

この API は、次の国内クラウド展開で使用できます。

グローバル サービス 米国政府機関 L4 米国政府機関 L5 (DOD) 21Vianet が運営する中国

アクセス許可

この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。 アプリで必要な場合にのみ、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「 アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、 アクセス許可のリファレンスを参照してください

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

HTTP 要求

PATCH /education/classes/{class-id}/assignments/{assignment-id}

要求ヘッダー

ヘッダー
Authorization ベアラー {token}。 必須です。 認証と承認の詳細については、こちらをご覧ください。
Content-Type application/json

要求本文

要求本文で、更新するフィールドの値のみを指定します。

要求本文に含まれていない既存のプロパティは、以前の値を維持するか、他のプロパティ値の変更に基づいて再計算されます。 最適なパフォーマンスを得るために、変更されていない既存の値を含めないでください。

プロパティ 説明
addedStudentAction String 課題の発行日以降に追加される学生に課題を配布する必要があるかどうかを説明します。
addToCalendarAction educationAddToCalendarOptions 課題の発行時に学生と教師の予定表に課題を追加するための割り当ての動作を制御する省略可能なフィールド。 使用可能な値: nonestudentsAndPublisherstudentsAndTeamOwnersunknownFutureValuestudentsOnly。 要求ヘッダーを使用して、Prefer: include - unknown -enum-membersこの進化可能な列挙型で次の値を取得する必要があります。 studentsOnly オプション。
allowLateSubmissions ブール型 学生が期日以降に提出を送信できるかどうか。
allowStudentsToAddResourcesToSubmission ブール型 学生が申請にリソースを追加できるかどうか。 また、申請内のすべてのリソースが割り当てリソースリストに対応するかどうかを示します。
assignDateTime DateTimeOffset 課題を学生に発行する日付を示します。 割り当てが発行された後は編集できません。
assignTo educationAssignmentRecipient 課題を取得する学生。
closeDateTime DateTimeOffset 申請の割り当てが終了した日付。 これは省略可能なフィールドで、割り当てが AllowLateSubmissions を許可しない場合、または closeDateTime が dueDateTime と同じであるが、指定した場合は dueDateTime 以上である必要があります。
displayName String 割り当ての名前。
dueDateTime DateTimeOffset 日付の割り当てが期限です。
グレーディング educationAssignmentGradeType 課題の採点方法。
指示 itemBody 課題と共に生徒に与えられる指示。
notificationChannelUrl String 割り当てに関連する通知を伝えるチャネル。 URL を変更するには、値を assignToeducationAssignmentClassRecipient に設定します。 割り当ての発行後にチャネル URL を変更することはできません。

応答

成功した場合、このメソッドは 200 OK 応答コードと、応答本文で更新された educationAssignment オブジェクトを返します。

要求

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

PATCH https://graph.microsoft.com/v1.0/education/classes/72a7baec-c3e9-4213-a850-f62de0adad5f/assignments/4679bc1b-90c5-45af-ae1a-d5357672ed39
Content-type: application/json

{
    "displayName": "Reading and review test 09.03 #5",
    "instructions": {
        "contentType": "text",
        "content": "Read chapter 5 and write your review"
    },
    "dueDateTime": "2021-09-10T00:00:00Z",
    "addedStudentAction": "none"
}

応答

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

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

HTTP/1.1 200 OK
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 and review test 09.03 #5",
    "closeDateTime": null,
    "dueDateTime": "2021-09-10T00:00:00Z",
    "assignDateTime": null,
    "assignedDateTime": null,
    "allowLateSubmissions": true,
    "resourcesFolderUrl": null,
    "createdDateTime": "2021-09-03T23:57:14.6088791Z",
    "lastModifiedDateTime": "2021-09-04T15:01:35.3361649Z",
    "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 and write your review",
        "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
        }
    }
}