In the request body, supply only the values of the fields you want to update.
Existing properties that are not included in the request body will maintain their previous values or be recalculated based on changes to other property values. For best performance, don't include existing values that haven't changed.
The educationOutcome object will be one of the following derived types: educationPointsOutcome, educationFeedbackOutcome, or educationRubricOutcome. Supply the specific properties relevant to the type of outcome you're updating.
All derived outcome types have a regular and a "published" property appropriate to that type of outcome; for example, points and publishedPoints, feedback and publishedFeedback. Don't update the "published" property; it is for internal use. For example, to assign points to an educationPointsOutcome, update the points property, but don't update publishedPoints.
Response
If successful, this method returns a 200 OK response code and an updated educationOutcome object in the response body.
If pointsGradeType and points are updated to a negative or infinite value, the method returns a 400 error message.
HTTP/1.1 400 Bad Request
Content-type: application/json
{
"error": {
"code": "badRequest",
"message": "Bad request.",
"innerError": {
"code": "invalidGrading",
"message": "Points must be less than 9999999 when using PointsGradeType."
}
}
}
If an invalid outcome ID is specified, a 404 Not Found error is returned.
HTTP/1.1 404 Not Found
Content-type: application/json
{
"error": {
"code": "20241",
"message": "Entity not found. Outcome id: 05d0f76c-1dfa-4442-926c-1b094828b505"
}
}
Examples
Example 1: Update a feedback outcome
Request
The following example shows a request to update a feedback outcome.
PATCH https://graph.microsoft.com/v1.0/education/classes/acdefc6b-2dc6-4e71-b1e9-6d9810ab1793/assignments/cf6005fc-9e13-44a2-a6ac-a53322006454/submissions/d1bee293-d8bb-48d4-af3e-c8cb0e3c7fe7/outcomes/9c0f2850-ff8f-4fd6-b3ac-e23077b59141
Content-type: application/json
{
"@odata.type":"#microsoft.graph.educationFeedbackOutcome",
"feedback":{
"text":{
"content":"This is feedback for the assignment as a whole.",
"contentType":"text"
}
}
}
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new EducationOutcome
{
OdataType = "#microsoft.graph.educationFeedbackOutcome",
AdditionalData = new Dictionary<string, object>
{
{
"feedback" , new
{
Text = new
{
Content = "This is feedback for the assignment as a whole.",
ContentType = "text",
},
}
},
},
};
var result = await graphClient.Education.Classes["{educationClass-id}"].Assignments["{educationAssignment-id}"].Submissions["{educationSubmission-id}"].Outcomes["{educationOutcome-id}"].PatchAsync(requestBody);
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
EducationFeedbackOutcome educationOutcome = new EducationFeedbackOutcome();
EducationFeedback feedback = new EducationFeedback();
EducationItemBody text = new EducationItemBody();
text.content = "This is feedback for the assignment as a whole.";
text.contentType = BodyType.TEXT;
feedback.text = text;
educationOutcome.feedback = feedback;
graphClient.education().classes("acdefc6b-2dc6-4e71-b1e9-6d9810ab1793").assignments("cf6005fc-9e13-44a2-a6ac-a53322006454").submissions("d1bee293-d8bb-48d4-af3e-c8cb0e3c7fe7").outcomes("9c0f2850-ff8f-4fd6-b3ac-e23077b59141")
.buildRequest()
.patch(educationOutcome);
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphmodels.NewEducationOutcome()
additionalData := map[string]interface{}{
feedback := graphmodels.New()
text := graphmodels.New()
content := "This is feedback for the assignment as a whole."
text.SetContent(&content)
contentType := "text"
text.SetContentType(&contentType)
feedback.SetText(text)
requestBody.SetFeedback(feedback)
}
requestBody.SetAdditionalData(additionalData)
result, err := graphClient.Education().ClassesById("educationClass-id").AssignmentsById("educationAssignment-id").SubmissionsById("educationSubmission-id").OutcomesById("educationOutcome-id").Patch(context.Background(), requestBody, nil)
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new EducationOutcome();
$requestBody->set@odatatype('#microsoft.graph.educationFeedbackOutcome');
$additionalData = [
'feedback' => $requestBody = new Feedback();
$text = new Text();
$ text->setContent('This is feedback for the assignment as a whole.');
$ text->setContentType('text');
$requestBody->setText($text);
$requestBody->setFeedback($feedback);
];
$requestBody->setAdditionalData($additionalData);
$requestResult = $graphServiceClient->education()->classesById('educationClass-id')->assignmentsById('educationAssignment-id')->submissionsById('educationSubmission-id')->outcomesById('educationOutcome-id')->patch($requestBody);
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new EducationOutcome
{
OdataType = "#microsoft.graph.educationPointsOutcome",
AdditionalData = new Dictionary<string, object>
{
{
"points" , new
{
OdataType = "#microsoft.graph.educationAssignmentPointsGrade",
Points = 85.0,
}
},
},
};
var result = await graphClient.Education.Classes["{educationClass-id}"].Assignments["{educationAssignment-id}"].Submissions["{educationSubmission-id}"].Outcomes["{educationOutcome-id}"].PatchAsync(requestBody);
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new EducationOutcome();
$requestBody->set@odatatype('#microsoft.graph.educationPointsOutcome');
$additionalData = [
'points' => $requestBody = new Points();
$ requestBody->set@odatatype('#microsoft.graph.educationAssignmentPointsGrade');
$requestBody->setPoints(85.0);
$requestBody->setPoints($points);
];
$requestBody->setAdditionalData($additionalData);
$requestResult = $graphServiceClient->education()->classesById('educationClass-id')->assignmentsById('educationAssignment-id')->submissionsById('educationSubmission-id')->outcomesById('educationOutcome-id')->patch($requestBody);
PATCH https://graph.microsoft.com/v1.0/education/classes/acdefc6b-2dc6-4e71-b1e9-6d9810ab1793/assignments/cf6005fc-9e13-44a2-a6ac-a53322006454/submissions/d1bee293-d8bb-48d4-af3e-c8cb0e3c7fe7/outcomes/9c0f2850-ff8f-4fd6-b3ac-e23077b59141
Content-type: application/json
{
"@odata.type":"#microsoft.graph.educationRubricOutcome",
"rubricQualityFeedback":[
{
"qualityId":"9a145aa8-f3d9-43a1-8f77-5387ff0693f2",
"feedback":{
"content":"This is feedback specific to the first quality of the rubric.",
"contentType":"text"
}
},
{
"qualityId":"d2331fb2-2761-402e-8de6-93e0afaa076e",
"feedback":{
"content":"This is feedback specific to the second quality of the rubric.",
"contentType":"text"
}
}
],
"rubricQualitySelectedLevels":[
{
"qualityId":"9a145aa8-f3d9-43a1-8f77-5387ff0693f2",
"columnId":"4fb17a1d-5681-46c2-a295-4e305c3eae23"
},
{
"qualityId":"d2331fb2-2761-402e-8de6-93e0afaa076e",
"columnId":"aac076bf-51ba-48c5-a2e0-ee235b0b9740"
}
]
}
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new EducationOutcome
{
OdataType = "#microsoft.graph.educationRubricOutcome",
AdditionalData = new Dictionary<string, object>
{
{
"rubricQualityFeedback" , new List<>
{
new
{
QualityId = "9a145aa8-f3d9-43a1-8f77-5387ff0693f2",
Feedback = new
{
Content = "This is feedback specific to the first quality of the rubric.",
ContentType = "text",
},
},
new
{
QualityId = "d2331fb2-2761-402e-8de6-93e0afaa076e",
Feedback = new
{
Content = "This is feedback specific to the second quality of the rubric.",
ContentType = "text",
},
},
}
},
{
"rubricQualitySelectedLevels" , new List<>
{
new
{
QualityId = "9a145aa8-f3d9-43a1-8f77-5387ff0693f2",
ColumnId = "4fb17a1d-5681-46c2-a295-4e305c3eae23",
},
new
{
QualityId = "d2331fb2-2761-402e-8de6-93e0afaa076e",
ColumnId = "aac076bf-51ba-48c5-a2e0-ee235b0b9740",
},
}
},
},
};
var result = await graphClient.Education.Classes["{educationClass-id}"].Assignments["{educationAssignment-id}"].Submissions["{educationSubmission-id}"].Outcomes["{educationOutcome-id}"].PatchAsync(requestBody);
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new EducationOutcome();
$requestBody->set@odatatype('#microsoft.graph.educationRubricOutcome');
$additionalData = [
'rubricQualityFeedback' => $rubricQualityFeedback1 = new ();
$ rubricQualityFeedback1->setQualityId('9a145aa8-f3d9-43a1-8f77-5387ff0693f2');
$rubricQualityFeedback1Feedback = new Feedback();
$ rubricQualityFeedback1Feedback->setContent('This is feedback specific to the first quality of the rubric.');
$ rubricQualityFeedback1Feedback->setContentType('text');
$rubricQualityFeedback1->setFeedback($rubricQualityFeedback1Feedback);
$rubricQualityFeedbackArray []= $rubricQualityFeedback1;
$rubricQualityFeedback2 = new ();
$ rubricQualityFeedback2->setQualityId('d2331fb2-2761-402e-8de6-93e0afaa076e');
$rubricQualityFeedback2Feedback = new Feedback();
$ rubricQualityFeedback2Feedback->setContent('This is feedback specific to the second quality of the rubric.');
$ rubricQualityFeedback2Feedback->setContentType('text');
$rubricQualityFeedback2->setFeedback($rubricQualityFeedback2Feedback);
$rubricQualityFeedbackArray []= $rubricQualityFeedback2;
$requestBody->setRubricQualityFeedback($rubricQualityFeedbackArray);
'rubricQualitySelectedLevels' => $rubricQualitySelectedLevels1 = new ();
$ rubricQualitySelectedLevels1->setQualityId('9a145aa8-f3d9-43a1-8f77-5387ff0693f2');
$ rubricQualitySelectedLevels1->setColumnId('4fb17a1d-5681-46c2-a295-4e305c3eae23');
$rubricQualitySelectedLevelsArray []= $rubricQualitySelectedLevels1;
$rubricQualitySelectedLevels2 = new ();
$ rubricQualitySelectedLevels2->setQualityId('d2331fb2-2761-402e-8de6-93e0afaa076e');
$ rubricQualitySelectedLevels2->setColumnId('aac076bf-51ba-48c5-a2e0-ee235b0b9740');
$rubricQualitySelectedLevelsArray []= $rubricQualitySelectedLevels2;
$requestBody->setRubricQualitySelectedLevels($rubricQualitySelectedLevelsArray);
];
$requestBody->setAdditionalData($additionalData);
$requestResult = $graphServiceClient->education()->classesById('educationClass-id')->assignmentsById('educationAssignment-id')->submissionsById('educationSubmission-id')->outcomesById('educationOutcome-id')->patch($requestBody);
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.type": "#microsoft.graph.educationRubricOutcome",
"id": "65a46d78-1a2b-4a7e-bcf8-78a22ac2611b",
"rubricQualityFeedback": [
{
"qualityId": "9a145aa8-f3d9-43a1-8f77-5387ff0693f2",
"feedback": {
"content": "This is feedback specific to the first quality of the rubric.",
"contentType": "text"
}
},
{
"qualityId": "d2331fb2-2761-402e-8de6-93e0afaa076e",
"feedback": {
"content": "This is feedback specific to the second quality of the rubric.",
"contentType": "text"
}
}
],
"rubricQualitySelectedLevels": [
{
"qualityId": "9a145aa8-f3d9-43a1-8f77-5387ff0693f2",
"columnId": "4fb17a1d-5681-46c2-a295-4e305c3eae23"
},
{
"qualityId": "d2331fb2-2761-402e-8de6-93e0afaa076e",
"columnId": "aac076bf-51ba-48c5-a2e0-ee235b0b9740"
}
]
}