Update educationAssignmentSettings

Namespace: microsoft.graph

Update the properties of an educationAssignmentSettings object. Only teachers can update these settings.

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/classes/{class-id}/assignmentSettings

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of the educationAssignmentSettings object.

The following table shows the properties that are required when you update the educationAssignmentSettings.

Property Type Description
submissionAnimationDisabled Boolean Indicates whether to show the turn-in celebration animation. A value of true indicates to skip the animation. Default value is false.

Response

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

Examples

Example 1: Update submissionAnimationDisabled

Request

The following example shows a request.

PATCH https://graph.microsoft.com/v1.0/education/classes/acdefc6b-2dc6-4e71-b1e9-6d9810ab1793/assignmentSettings
Content-Type: application/json

{
  "submissionAnimationDisabled": true
}

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

{
  "submissionAnimationDisabled": true
}

Example 2: Create grading categories

Request

The following example shows a request.

PATCH https://graph.microsoft.com/v1.0/education/classes/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/assignmentSettings
Content-type: application/json

{
  "gradingCategories": [
        {           
            "displayName": "Lab",
            "percentageWeight": 10
        },
        {
            "displayName": "Homework",
            "percentageWeight": 80
        },
        {
            "displayName": "Test",
            "percentageWeight": 10
        }
    ]
}

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/v1.0/$metadata#education/classes('37d99af7-cfc5-4e3b-8566-f7d40e4a2070')/assignmentSettings/$entity",
    "submissionAnimationDisabled": true,
    "gradingCategories@odata.context": "https://graph.microsoft.com/v1.0/$metadata#education/classes('37d99af7-cfc5-4e3b-8566-f7d40e4a2070')/assignmentSettings/gradingCategories",
    "gradingCategories": [
        {
            "id": "36bf5273-d3e3-4f83-a534-8c816c33cc3e",
            "displayName": "Lab",
            "percentageWeight": 10
        },
        {
            "id": "5ffdba4e-2d79-4fe5-87d0-9a2b4552d3c0",
            "displayName": "Homework",
            "percentageWeight": 80
        },
        {
            "id": "691579b1-cf38-40ba-8758-c6a27529a8b7",
            "displayName": "Test",
            "percentageWeight": 10
        }
    ]
}

Example 3: Delta payload to delete, modify and add grading categories.

Request

The following example shows a request.

PATCH https://graph.microsoft.com/v1.0/education/classes/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/assignmentSettings
Content-type: application/json

{
    "gradingCategories@delta": [
        {
            // Change this grading category's name
            "id": "03bd9196-ce2e-41bd-902f-df9ae02de4db",
            "displayName": "Lab Updated"
        },
        {
            // Delete this grading category 
            "@odata.context": "https://graph.microsoft.com/beta/$metadata#gradingCategories/$deletedEntity",
            "id": "109e5d73-3ef7-42a5-88d8-7e30cdb85f06",
            "reason": "deleted"
        },
        {
            // Add a new grading category 
            "displayName": "New Homework",
            "percentageWeight": 50
        }
    ]
}

Note: You don't need to include the comments that appear in the request body examples in your requests. They are there to clarify each operation for you.

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/v1.0/$metadata#education/classes('37d99af7-cfc5-4e3b-8566-f7d40e4a2070')/assignmentSettings/$entity",
    "submissionAnimationDisabled": true,
    "gradingCategories@odata.context": "https://graph.microsoft.com/v1.0/$metadata#education/classes('37d99af7-cfc5-4e3b-8566-f7d40e4a2070')/assignmentSettings/gradingCategories",
    "gradingCategories": [
        {
            "id": "a5ca6dda-f220-43ca-81e4-02396b99f398",
            "displayName": "Test",
            "percentageWeight": 30
        },
        {
            "id": "03bd9196-ce2e-41bd-902f-df9ae02de4db",
            "displayName": "Lab Updated",
            "percentageWeight": 20
        },
        {
            "id": "905b49a5-1639-49ab-9fbe-6a035def5ba3",
            "displayName": "New Homework",
            "percentageWeight": 50
        }
    ]
}