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.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new EducationAssignmentSettings
{
SubmissionAnimationDisabled = true,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Education.Classes["{educationClass-id}"].AssignmentSettings.PatchAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewEducationAssignmentSettings()
submissionAnimationDisabled := true
requestBody.SetSubmissionAnimationDisabled(&submissionAnimationDisabled)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
assignmentSettings, err := graphClient.Education().Classes().ByEducationClassId("educationClass-id").AssignmentSettings().Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EducationAssignmentSettings educationAssignmentSettings = new EducationAssignmentSettings();
educationAssignmentSettings.setSubmissionAnimationDisabled(true);
EducationAssignmentSettings result = graphClient.education().classes().byEducationClassId("{educationClass-id}").assignmentSettings().patch(educationAssignmentSettings);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\EducationAssignmentSettings;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new EducationAssignmentSettings();
$requestBody->setSubmissionAnimationDisabled(true);
$result = $graphServiceClient->education()->classes()->byEducationClassId('educationClass-id')->assignmentSettings()->patch($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.education_assignment_settings import EducationAssignmentSettings
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = EducationAssignmentSettings(
submission_animation_disabled = True,
)
result = await graph_client.education.classes.by_education_class_id('educationClass-id').assignment_settings.patch(request_body)
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new EducationAssignmentSettings
{
GradingCategories = new List<EducationGradingCategory>
{
new EducationGradingCategory
{
DisplayName = "Lab",
PercentageWeight = 10,
},
new EducationGradingCategory
{
DisplayName = "Homework",
PercentageWeight = 80,
},
new EducationGradingCategory
{
DisplayName = "Test",
PercentageWeight = 10,
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Education.Classes["{educationClass-id}"].AssignmentSettings.PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EducationAssignmentSettings educationAssignmentSettings = new EducationAssignmentSettings();
LinkedList<EducationGradingCategory> gradingCategories = new LinkedList<EducationGradingCategory>();
EducationGradingCategory educationGradingCategory = new EducationGradingCategory();
educationGradingCategory.setDisplayName("Lab");
educationGradingCategory.setPercentageWeight(10);
gradingCategories.add(educationGradingCategory);
EducationGradingCategory educationGradingCategory1 = new EducationGradingCategory();
educationGradingCategory1.setDisplayName("Homework");
educationGradingCategory1.setPercentageWeight(80);
gradingCategories.add(educationGradingCategory1);
EducationGradingCategory educationGradingCategory2 = new EducationGradingCategory();
educationGradingCategory2.setDisplayName("Test");
educationGradingCategory2.setPercentageWeight(10);
gradingCategories.add(educationGradingCategory2);
educationAssignmentSettings.setGradingCategories(gradingCategories);
EducationAssignmentSettings result = graphClient.education().classes().byEducationClassId("{educationClass-id}").assignmentSettings().patch(educationAssignmentSettings);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.education_assignment_settings import EducationAssignmentSettings
from msgraph.generated.models.education_grading_category import EducationGradingCategory
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = EducationAssignmentSettings(
grading_categories = [
EducationGradingCategory(
display_name = "Lab",
percentage_weight = 10,
),
EducationGradingCategory(
display_name = "Homework",
percentage_weight = 80,
),
EducationGradingCategory(
display_name = "Test",
percentage_weight = 10,
),
],
)
result = await graph_client.education.classes.by_education_class_id('educationClass-id').assignment_settings.patch(request_body)
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
}
]
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
using Microsoft.Kiota.Abstractions.Serialization;
var requestBody = new EducationAssignmentSettings
{
AdditionalData = new Dictionary<string, object>
{
{
"gradingCategories@delta" , new List<object>
{
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"id", new UntypedString("03bd9196-ce2e-41bd-902f-df9ae02de4db")
},
{
"displayName", new UntypedString("Lab Updated")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"@odata.context", new UntypedString("https://graph.microsoft.com/beta/$metadata#gradingCategories/$deletedEntity")
},
{
"id", new UntypedString("109e5d73-3ef7-42a5-88d8-7e30cdb85f06")
},
{
"reason", new UntypedString("deleted")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"displayName", new UntypedString("New Homework")
},
{
"percentageWeight", new UntypedString("50")
},
}),
}
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Education.Classes["{educationClass-id}"].AssignmentSettings.PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EducationAssignmentSettings educationAssignmentSettings = new EducationAssignmentSettings();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
LinkedList<Object> gradingCategoriesDelta = new LinkedList<Object>();
property = new ();
property.setId("03bd9196-ce2e-41bd-902f-df9ae02de4db");
property.setDisplayName("Lab Updated");
gradingCategoriesDelta.add(property);
property1 = new ();
property1.setOdataContext("https://graph.microsoft.com/beta/$metadata#gradingCategories/$deletedEntity");
property1.setId("109e5d73-3ef7-42a5-88d8-7e30cdb85f06");
property1.setReason("deleted");
gradingCategoriesDelta.add(property1);
property2 = new ();
property2.setDisplayName("New Homework");
property2.setPercentageWeight(50);
gradingCategoriesDelta.add(property2);
additionalData.put("gradingCategories@delta", gradingCategoriesDelta);
educationAssignmentSettings.setAdditionalData(additionalData);
EducationAssignmentSettings result = graphClient.education().classes().byEducationClassId("{educationClass-id}").assignmentSettings().patch(educationAssignmentSettings);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.education_assignment_settings import EducationAssignmentSettings
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = EducationAssignmentSettings(
additional_data = {
"grading_categories@delta" : [
{
"id" : "03bd9196-ce2e-41bd-902f-df9ae02de4db",
"display_name" : "Lab Updated",
},
{
"@odata_context" : "https://graph.microsoft.com/beta/$metadata#gradingCategories/$deletedEntity",
"id" : "109e5d73-3ef7-42a5-88d8-7e30cdb85f06",
"reason" : "deleted",
},
{
"display_name" : "New Homework",
"percentage_weight" : 50,
},
],
}
)
result = await graph_client.education.classes.by_education_class_id('educationClass-id').assignment_settings.patch(request_body)
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.