編輯

共用方式為


Update educationRubric

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Update the properties of an educationRubric object. Only teachers can perform this operation.

Updating a rubric attached to an assignment (PATCH /education/classes/{id}/assignments/{id}/rubric) is only possible before the assignment is published, and what is updated is actually the original rubric that exists under /education/users/{id}/rubrics. After the assignment is published, an immutable copy of the rubric is made that is attached to that specific assignment. That rubric can be retrieved using GET /education/classes/{id}/assignments/{id}/rubric, but it can't be updated.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) EduAssignments.ReadWriteBasic EduAssignments.ReadWrite
Delegated (personal Microsoft account) Not supported. Not supported.
Application Not supported. Not supported.

HTTP request

PATCH /education/me/rubrics/{id}
PATCH /education/classes/{id}/assignments/{id}/rubric

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

In the request body, supply the values for relevant fields that should be updated. Existing properties that aren't included in the request body maintain their previous values or are recalculated based on changes to other property values. For best performance, don't include existing values that haven't changed.

Property Type Description
description itemBody The description of this rubric.
displayName String The name of this rubric.
grading educationAssignmentGradeType The grading type of the rubric. null for a no-points rubric and educationAssignmentPointsGradeType for a rubric with points.
levels rubricLevel collection The collection of levels making up this rubric.
qualities rubricQuality collection The collection of qualities making up this rubric.

Response

If successful, this method returns a 200 OK response code and an updated educationRubric object in the response body.

Examples

Request

The following example shows a request.

PATCH https://graph.microsoft.com/beta/education/me/rubrics/5f650796-a600-4d20-87ef-c46ae34da3bb
Content-type: application/json

{
  "displayName": "Example Credit Rubric after display name patch"
}

Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-type: application/json

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#education/me/rubrics/$entity",
    "displayName": "Example Credit Rubric after display name patch",
    "createdDateTime": "2024-07-17T00:21:14.4479093Z",
    "lastModifiedDateTime": "2024-07-17T14:57:13.1807857Z",
    "id": "5f650796-a600-4d20-87ef-c46ae34da3bb",
    "description": {
        "content": "New Rubric",
        "contentType": "text"
    },
    "qualities": [
        {
            "qualityId": "bdde7fc5-9a0b-4db7-9103-aeb6d4d20fbd",
            "displayName": null,
            "weight": 33.33,
            "description": {
                "content": "First quality",
                "contentType": "text"
            },
            "criteria": [
                {
                    "description": {
                        "content": "First quality is excellent",
                        "contentType": "text"
                    }
                },
                {
                    "description": {
                        "content": "First quality is good",
                        "contentType": "text"
                    }
                },
                {
                    "description": {
                        "content": "First quality is fair",
                        "contentType": "text"
                    }
                },
                {
                    "description": {
                        "content": "First quality is poor",
                        "contentType": "text"
                    }
                }
            ]
        }              
    ],
    "levels": [
        {
            "levelId": "f0b16138-3ab2-4712-bbe0-b0a2653017a1",
            "displayName": "Excellent",
            "description": {
                "content": "",
                "contentType": "text"
            },
            "grading": {
                "@odata.type": "#microsoft.graph.educationAssignmentPointsGradeType",
                "maxPoints": 4
            }
        },
        {
            "levelId": "f5b1cc98-a22e-44d6-8e20-a29fb7de4860",
            "displayName": "Good",
            "description": {
                "content": "",
                "contentType": "text"
            },
            "grading": {
                "@odata.type": "#microsoft.graph.educationAssignmentPointsGradeType",
                "maxPoints": 3
            }
        },
        {
            "levelId": "352dfa9f-0ad3-42c5-a7b7-843dc78d83f9",
            "displayName": "Fair",
            "description": {
                "content": "",
                "contentType": "text"
            },
            "grading": {
                "@odata.type": "#microsoft.graph.educationAssignmentPointsGradeType",
                "maxPoints": 2
            }
        },
        {
            "levelId": "b1d9ac8f-fb57-4172-9863-4a4994bc31fa",
            "displayName": "Poor",
            "description": {
                "content": "",
                "contentType": "text"
            },
            "grading": {
                "@odata.type": "#microsoft.graph.educationAssignmentPointsGradeType",
                "maxPoints": 1
            }
        }
    ],
    "grading": {
        "@odata.type": "#microsoft.graph.educationAssignmentPointsGradeType",
        "maxPoints": 100
    },
    "createdBy": {
        "application": null,
        "device": null,
        "user": {
            "id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
            "displayName": null
        }
    },
    "lastModifiedBy": {
        "application": null,
        "device": null,
        "user": {
            "id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
            "displayName": null
        }
    }
}