Update educationAssignmentSettings
Article
03/02/2023
2 minutes to read
4 contributors
Feedback
In this article
Namespace: microsoft.graph
Update the properties of an educationAssignmentSettings object. Only Teachers can update these settings.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions .
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
EduAssignments.ReadWriteBasic, EduAssignments.ReadWrite
Delegated (personal Microsoft account)
Not supported.
Application
Not supported.
HTTP request
PATCH /education/classes/acdefc6b-2dc6-4e71-b1e9-6d9810ab1793/assignmentSettings
Name
Description
Authorization
Bearer {token}. Required.
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 turn-in celebration animation will be shown. A value of true
indicates that the animation will not be shown. 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
Request
PATCH https://graph.microsoft.com/v1.0/education/classes/acdefc6b-2dc6-4e71-b1e9-6d9810ab1793/assignmentSettings
Content-Type: application/json
{
"submissionAnimationDisabled": true
}
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new EducationAssignmentSettings
{
SubmissionAnimationDisabled = true,
};
var result = await graphClient.Education.Classes["{educationClass-id}"].AssignmentSettings.PatchAsync(requestBody);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
const options = {
authProvider,
};
const client = Client.init(options);
const educationAssignmentSettings = {
submissionAnimationDisabled: true
};
await client.api('/education/classes/acdefc6b-2dc6-4e71-b1e9-6d9810ab1793/assignmentSettings')
.update(educationAssignmentSettings);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
EducationAssignmentSettings educationAssignmentSettings = new EducationAssignmentSettings();
educationAssignmentSettings.submissionAnimationDisabled = true;
graphClient.education().classes("acdefc6b-2dc6-4e71-b1e9-6d9810ab1793").assignmentSettings()
.buildRequest()
.patch(educationAssignmentSettings);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphmodels.NewEducationAssignmentSettings()
submissionAnimationDisabled := true
requestBody.SetSubmissionAnimationDisabled(&submissionAnimationDisabled)
result, err := graphClient.Education().ClassesById("educationClass-id").AssignmentSettings().Patch(context.Background(), requestBody, nil)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
Import-Module Microsoft.Graph.Education
$params = @{
SubmissionAnimationDisabled = $true
}
Update-MgEducationClassAssignmentSetting -EducationClassId $educationClassId -BodyParameter $params
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new EducationAssignmentSettings();
$requestBody->setSubmissionAnimationDisabled(true);
$requestResult = $graphServiceClient->education()->classesById('educationClass-id')->assignmentSettings()->patch($requestBody);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
Response
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-Type: application/json
{
"submissionAnimationDisabled": true
}