名前空間: microsoft.graph
重要
Microsoft Graph の /beta バージョンの API は変更される可能性があります。 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。 v1.0 で API を使用できるかどうかを確認するには、Version セレクターを使用します。
educationOutcome オブジェクトのプロパティを更新します。 この操作を実行できるのは教師だけです。
この API は、次の国内クラウド展開で使用できます。
| グローバル サービス |
米国政府機関 L4 |
米国政府機関 L5 (DOD) |
21Vianet が運営する中国 |
| ✅ |
❌ |
❌ |
❌ |
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。
アプリで必要な場合にのみ、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス」を参照してください。
| アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
| 委任 (職場または学校のアカウント) |
EduAssignments.ReadWrite |
注意事項なし。 |
| 委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
| アプリケーション |
EduAssignments.ReadWrite.All |
注意事項なし。 |
HTTP 要求
PATCH /education/classes/{id}/assignments/{id}/submissions/{id}/outcomes/{id}
| 名前 |
説明 |
| Authorization |
ベアラー {token}。 必須です。
認証と認可についての詳細をご覧ください。 |
要求本文
要求本文で、更新する関連フィールドの値を指定します。 要求本文に含まれていない既存のプロパティは、以前の値を維持するか、他のプロパティ値の変更に基づいて再計算されます。 最適なパフォーマンスを得るために、変更されていない既存の値を含めないでください。
educationOutcome オブジェクトは、educationPointsOutcome、educationFeedbackOutcome、educationRubricOutcome のいずれかの派生型になります。 更新する結果の種類に関連する特定のプロパティを指定します。
すべての派生結果の型には、その種類の結果に適した通常のプロパティと "発行済み" プロパティがあります。たとえば、 ポイント と 公開されたポイント、 フィードバック 、 publishedFeedback などです。 "発行済み" プロパティは更新しないでください。内部使用用です。 たとえば、 educationPointsOutcome にポイントを割り当てるには、 points プロパティを更新しますが、 publishedPoints は更新しません。
応答
成功した場合、このメソッドは応答コード 200 OK と、応答本文で更新された educationOutcome オブジェクトを返します。
pointsGradeType とポイントが負の値または無限の値に更新された場合、メソッドは400エラー メッセージを返します。
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."
}
}
}
無効な結果 ID を指定すると、 404 Not Found エラーが返されます。
HTTP/1.1 404 Not Found
Content-type: application/json
{
"error": {
"code": "20241",
"message": "Entity not found. Outcome id: 05d0f76c-1dfa-4442-926c-1b094828b505"
}
}
例
例 1: フィードバックの結果を更新する
要求
次の例は、フィードバックの結果を更新する要求を示しています。
PATCH https://graph.microsoft.com/beta/education/classes/bf1f1963-05f6-4cba-903c-5892b4ce3bd7/assignments/db8e6b0b-dba4-4c69-81b2-9ba7313c0b7a/submissions/4bca096a-7de3-8675-5e86-2fa149923860/outcomes/ca05367a-b292-42d5-aff7-5d279feeace8
Content-type: application/json
{
"@odata.type":"#microsoft.graph.educationFeedbackOutcome",
"feedback":{
"text":{
"content":"This is feedback for the assignment as a whole.",
"contentType":"text"
}
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new EducationFeedbackOutcome
{
OdataType = "#microsoft.graph.educationFeedbackOutcome",
Feedback = new EducationFeedback
{
Text = new EducationItemBody
{
Content = "This is feedback for the assignment as a whole.",
ContentType = BodyType.Text,
},
},
};
// 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}"].Assignments["{educationAssignment-id}"].Submissions["{educationSubmission-id}"].Outcomes["{educationOutcome-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewEducationOutcome()
feedback := graphmodels.NewEducationFeedback()
text := graphmodels.NewEducationItemBody()
content := "This is feedback for the assignment as a whole."
text.SetContent(&content)
contentType := graphmodels.TEXT_BODYTYPE
text.SetContentType(&contentType)
feedback.SetText(text)
requestBody.SetFeedback(feedback)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
outcomes, err := graphClient.Education().Classes().ByEducationClassId("educationClass-id").Assignments().ByEducationAssignmentId("educationAssignment-id").Submissions().ByEducationSubmissionId("educationSubmission-id").Outcomes().ByEducationOutcomeId("educationOutcome-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EducationFeedbackOutcome educationOutcome = new EducationFeedbackOutcome();
educationOutcome.setOdataType("#microsoft.graph.educationFeedbackOutcome");
EducationFeedback feedback = new EducationFeedback();
EducationItemBody text = new EducationItemBody();
text.setContent("This is feedback for the assignment as a whole.");
text.setContentType(BodyType.Text);
feedback.setText(text);
educationOutcome.setFeedback(feedback);
EducationOutcome result = graphClient.education().classes().byEducationClassId("{educationClass-id}").assignments().byEducationAssignmentId("{educationAssignment-id}").submissions().byEducationSubmissionId("{educationSubmission-id}").outcomes().byEducationOutcomeId("{educationOutcome-id}").patch(educationOutcome);
const options = {
authProvider,
};
const client = Client.init(options);
const educationOutcome = {
'@odata.type':'#microsoft.graph.educationFeedbackOutcome',
feedback: {
text: {
content: 'This is feedback for the assignment as a whole.',
contentType: 'text'
}
}
};
await client.api('/education/classes/bf1f1963-05f6-4cba-903c-5892b4ce3bd7/assignments/db8e6b0b-dba4-4c69-81b2-9ba7313c0b7a/submissions/4bca096a-7de3-8675-5e86-2fa149923860/outcomes/ca05367a-b292-42d5-aff7-5d279feeace8')
.version('beta')
.update(educationOutcome);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\EducationFeedbackOutcome;
use Microsoft\Graph\Beta\Generated\Models\EducationFeedback;
use Microsoft\Graph\Beta\Generated\Models\EducationItemBody;
use Microsoft\Graph\Beta\Generated\Models\BodyType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new EducationFeedbackOutcome();
$requestBody->setOdataType('#microsoft.graph.educationFeedbackOutcome');
$feedback = new EducationFeedback();
$feedbackText = new EducationItemBody();
$feedbackText->setContent('This is feedback for the assignment as a whole.');
$feedbackText->setContentType(new BodyType('text'));
$feedback->setText($feedbackText);
$requestBody->setFeedback($feedback);
$result = $graphServiceClient->education()->classes()->byEducationClassId('educationClass-id')->assignments()->byEducationAssignmentId('educationAssignment-id')->submissions()->byEducationSubmissionId('educationSubmission-id')->outcomes()->byEducationOutcomeId('educationOutcome-id')->patch($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Education
$params = @{
"@odata.type" = "#microsoft.graph.educationFeedbackOutcome"
feedback = @{
text = @{
content = "This is feedback for the assignment as a whole."
contentType = "text"
}
}
}
Update-MgBetaEducationClassAssignmentSubmissionOutcome -EducationClassId $educationClassId -EducationAssignmentId $educationAssignmentId -EducationSubmissionId $educationSubmissionId -EducationOutcomeId $educationOutcomeId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.education_feedback_outcome import EducationFeedbackOutcome
from msgraph_beta.generated.models.education_feedback import EducationFeedback
from msgraph_beta.generated.models.education_item_body import EducationItemBody
from msgraph_beta.generated.models.body_type import BodyType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = EducationFeedbackOutcome(
odata_type = "#microsoft.graph.educationFeedbackOutcome",
feedback = EducationFeedback(
text = EducationItemBody(
content = "This is feedback for the assignment as a whole.",
content_type = BodyType.Text,
),
),
)
result = await graph_client.education.classes.by_education_class_id('educationClass-id').assignments.by_education_assignment_id('educationAssignment-id').submissions.by_education_submission_id('educationSubmission-id').outcomes.by_education_outcome_id('educationOutcome-id').patch(request_body)
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('bf1f1963-05f6-4cba-903c-5892b4ce3bd7')/assignments('db8e6b0b-dba4-4c69-81b2-9ba7313c0b7a')/submissions('4bca096a-7de3-8675-5e86-2fa149923860')/outcomes/$entity",
"@odata.type": "#microsoft.graph.educationFeedbackOutcome",
"lastModifiedDateTime": "2024-08-14T06:37:17.7703021Z",
"id": "ca05367a-b292-42d5-aff7-5d279feeace8",
"publishedFeedback": null,
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
"displayName": null
}
},
"feedback": {
"feedbackDateTime": "2024-08-14T06:37:17.7703021Z",
"text": {
"content": "This is feedback for the assignment as a whole.",
"contentType": "text"
},
"feedbackBy": {
"application": null,
"device": null,
"user": {
"id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
"displayName": null
}
}
}
}
例 2: ポイントの結果を更新する
要求
次の例は、ポイントの結果を更新する要求を示しています。
PATCH https://graph.microsoft.com/beta/education/classes/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/assignments/0965958c-84f2-4ca4-b854-05cce3440aa4/submissions/fbf5605c-eba9-ccfb-d66c-afbd161dac41/outcomes/ea1351f6-ba33-4940-b2cb-6a7254af2dc8
Content-type: application/json
{
"@odata.type":"#microsoft.graph.educationPointsOutcome",
"points":{
"@odata.type":"#microsoft.graph.educationAssignmentPointsGrade",
"points":85.5
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new EducationPointsOutcome
{
OdataType = "#microsoft.graph.educationPointsOutcome",
Points = new EducationAssignmentPointsGrade
{
OdataType = "#microsoft.graph.educationAssignmentPointsGrade",
Points = 85.5f,
},
};
// 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}"].Assignments["{educationAssignment-id}"].Submissions["{educationSubmission-id}"].Outcomes["{educationOutcome-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewEducationOutcome()
points := graphmodels.NewEducationAssignmentPointsGrade()
points := float32(85.5)
points.SetPoints(&points)
requestBody.SetPoints(points)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
outcomes, err := graphClient.Education().Classes().ByEducationClassId("educationClass-id").Assignments().ByEducationAssignmentId("educationAssignment-id").Submissions().ByEducationSubmissionId("educationSubmission-id").Outcomes().ByEducationOutcomeId("educationOutcome-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EducationPointsOutcome educationOutcome = new EducationPointsOutcome();
educationOutcome.setOdataType("#microsoft.graph.educationPointsOutcome");
EducationAssignmentPointsGrade points = new EducationAssignmentPointsGrade();
points.setOdataType("#microsoft.graph.educationAssignmentPointsGrade");
points.setPoints(85.5f);
educationOutcome.setPoints(points);
EducationOutcome result = graphClient.education().classes().byEducationClassId("{educationClass-id}").assignments().byEducationAssignmentId("{educationAssignment-id}").submissions().byEducationSubmissionId("{educationSubmission-id}").outcomes().byEducationOutcomeId("{educationOutcome-id}").patch(educationOutcome);
const options = {
authProvider,
};
const client = Client.init(options);
const educationOutcome = {
'@odata.type':'#microsoft.graph.educationPointsOutcome',
points: {
'@odata.type':'#microsoft.graph.educationAssignmentPointsGrade',
points: 85.5
}
};
await client.api('/education/classes/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/assignments/0965958c-84f2-4ca4-b854-05cce3440aa4/submissions/fbf5605c-eba9-ccfb-d66c-afbd161dac41/outcomes/ea1351f6-ba33-4940-b2cb-6a7254af2dc8')
.version('beta')
.update(educationOutcome);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\EducationPointsOutcome;
use Microsoft\Graph\Beta\Generated\Models\EducationAssignmentPointsGrade;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new EducationPointsOutcome();
$requestBody->setOdataType('#microsoft.graph.educationPointsOutcome');
$points = new EducationAssignmentPointsGrade();
$points->setOdataType('#microsoft.graph.educationAssignmentPointsGrade');
$points->setPoints(85.5);
$requestBody->setPoints($points);
$result = $graphServiceClient->education()->classes()->byEducationClassId('educationClass-id')->assignments()->byEducationAssignmentId('educationAssignment-id')->submissions()->byEducationSubmissionId('educationSubmission-id')->outcomes()->byEducationOutcomeId('educationOutcome-id')->patch($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Education
$params = @{
"@odata.type" = "#microsoft.graph.educationPointsOutcome"
points = @{
"@odata.type" = "#microsoft.graph.educationAssignmentPointsGrade"
points =
}
}
Update-MgBetaEducationClassAssignmentSubmissionOutcome -EducationClassId $educationClassId -EducationAssignmentId $educationAssignmentId -EducationSubmissionId $educationSubmissionId -EducationOutcomeId $educationOutcomeId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.education_points_outcome import EducationPointsOutcome
from msgraph_beta.generated.models.education_assignment_points_grade import EducationAssignmentPointsGrade
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = EducationPointsOutcome(
odata_type = "#microsoft.graph.educationPointsOutcome",
points = EducationAssignmentPointsGrade(
odata_type = "#microsoft.graph.educationAssignmentPointsGrade",
points = 85.5,
),
)
result = await graph_client.education.classes.by_education_class_id('educationClass-id').assignments.by_education_assignment_id('educationAssignment-id').submissions.by_education_submission_id('educationSubmission-id').outcomes.by_education_outcome_id('educationOutcome-id').patch(request_body)
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('37d99af7-cfc5-4e3b-8566-f7d40e4a2070')/assignments('0965958c-84f2-4ca4-b854-05cce3440aa4')/submissions('fbf5605c-eba9-ccfb-d66c-afbd161dac41')/outcomes/$entity",
"@odata.type": "#microsoft.graph.educationPointsOutcome",
"lastModifiedDateTime": "2025-05-15T18:05:13.1720895Z",
"id": "ea1351f6-ba33-4940-b2cb-6a7254af2dc8",
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
"displayName": null
}
},
"points": {
"gradedDateTime": "2025-05-15T18:05:13.1720895Z",
"points": 85.5,
"grade": "B",
"gradedBy": {
"application": null,
"device": null,
"user": {
"id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
"displayName": null
}
}
}
}
例 3: ルーブリックの結果を更新する
要求
次の例は、ルーブリックの結果を更新する要求を示しています。
PATCH https://graph.microsoft.com/beta/education/classes/{id}/assignments/{id}/submissions/{id}/outcomes/{id}
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"
}
]
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new EducationRubricOutcome
{
OdataType = "#microsoft.graph.educationRubricOutcome",
RubricQualityFeedback = new List<RubricQualityFeedbackModel>
{
new RubricQualityFeedbackModel
{
QualityId = "9a145aa8-f3d9-43a1-8f77-5387ff0693f2",
Feedback = new EducationItemBody
{
Content = "This is feedback specific to the first quality of the rubric.",
ContentType = BodyType.Text,
},
},
new RubricQualityFeedbackModel
{
QualityId = "d2331fb2-2761-402e-8de6-93e0afaa076e",
Feedback = new EducationItemBody
{
Content = "This is feedback specific to the second quality of the rubric.",
ContentType = BodyType.Text,
},
},
},
RubricQualitySelectedLevels = new List<RubricQualitySelectedColumnModel>
{
new RubricQualitySelectedColumnModel
{
QualityId = "9a145aa8-f3d9-43a1-8f77-5387ff0693f2",
ColumnId = "4fb17a1d-5681-46c2-a295-4e305c3eae23",
},
new RubricQualitySelectedColumnModel
{
QualityId = "d2331fb2-2761-402e-8de6-93e0afaa076e",
ColumnId = "aac076bf-51ba-48c5-a2e0-ee235b0b9740",
},
},
};
// 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}"].Assignments["{educationAssignment-id}"].Submissions["{educationSubmission-id}"].Outcomes["{educationOutcome-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewEducationOutcome()
rubricQualityFeedbackModel := graphmodels.NewRubricQualityFeedbackModel()
qualityId := "9a145aa8-f3d9-43a1-8f77-5387ff0693f2"
rubricQualityFeedbackModel.SetQualityId(&qualityId)
feedback := graphmodels.NewEducationItemBody()
content := "This is feedback specific to the first quality of the rubric."
feedback.SetContent(&content)
contentType := graphmodels.TEXT_BODYTYPE
feedback.SetContentType(&contentType)
rubricQualityFeedbackModel.SetFeedback(feedback)
rubricQualityFeedbackModel1 := graphmodels.NewRubricQualityFeedbackModel()
qualityId := "d2331fb2-2761-402e-8de6-93e0afaa076e"
rubricQualityFeedbackModel1.SetQualityId(&qualityId)
feedback := graphmodels.NewEducationItemBody()
content := "This is feedback specific to the second quality of the rubric."
feedback.SetContent(&content)
contentType := graphmodels.TEXT_BODYTYPE
feedback.SetContentType(&contentType)
rubricQualityFeedbackModel1.SetFeedback(feedback)
rubricQualityFeedback := []graphmodels.RubricQualityFeedbackModelable {
rubricQualityFeedbackModel,
rubricQualityFeedbackModel1,
}
requestBody.SetRubricQualityFeedback(rubricQualityFeedback)
rubricQualitySelectedColumnModel := graphmodels.NewRubricQualitySelectedColumnModel()
qualityId := "9a145aa8-f3d9-43a1-8f77-5387ff0693f2"
rubricQualitySelectedColumnModel.SetQualityId(&qualityId)
columnId := "4fb17a1d-5681-46c2-a295-4e305c3eae23"
rubricQualitySelectedColumnModel.SetColumnId(&columnId)
rubricQualitySelectedColumnModel1 := graphmodels.NewRubricQualitySelectedColumnModel()
qualityId := "d2331fb2-2761-402e-8de6-93e0afaa076e"
rubricQualitySelectedColumnModel1.SetQualityId(&qualityId)
columnId := "aac076bf-51ba-48c5-a2e0-ee235b0b9740"
rubricQualitySelectedColumnModel1.SetColumnId(&columnId)
rubricQualitySelectedLevels := []graphmodels.RubricQualitySelectedColumnModelable {
rubricQualitySelectedColumnModel,
rubricQualitySelectedColumnModel1,
}
requestBody.SetRubricQualitySelectedLevels(rubricQualitySelectedLevels)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
outcomes, err := graphClient.Education().Classes().ByEducationClassId("educationClass-id").Assignments().ByEducationAssignmentId("educationAssignment-id").Submissions().ByEducationSubmissionId("educationSubmission-id").Outcomes().ByEducationOutcomeId("educationOutcome-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EducationRubricOutcome educationOutcome = new EducationRubricOutcome();
educationOutcome.setOdataType("#microsoft.graph.educationRubricOutcome");
LinkedList<RubricQualityFeedbackModel> rubricQualityFeedback = new LinkedList<RubricQualityFeedbackModel>();
RubricQualityFeedbackModel rubricQualityFeedbackModel = new RubricQualityFeedbackModel();
rubricQualityFeedbackModel.setQualityId("9a145aa8-f3d9-43a1-8f77-5387ff0693f2");
EducationItemBody feedback = new EducationItemBody();
feedback.setContent("This is feedback specific to the first quality of the rubric.");
feedback.setContentType(BodyType.Text);
rubricQualityFeedbackModel.setFeedback(feedback);
rubricQualityFeedback.add(rubricQualityFeedbackModel);
RubricQualityFeedbackModel rubricQualityFeedbackModel1 = new RubricQualityFeedbackModel();
rubricQualityFeedbackModel1.setQualityId("d2331fb2-2761-402e-8de6-93e0afaa076e");
EducationItemBody feedback1 = new EducationItemBody();
feedback1.setContent("This is feedback specific to the second quality of the rubric.");
feedback1.setContentType(BodyType.Text);
rubricQualityFeedbackModel1.setFeedback(feedback1);
rubricQualityFeedback.add(rubricQualityFeedbackModel1);
educationOutcome.setRubricQualityFeedback(rubricQualityFeedback);
LinkedList<RubricQualitySelectedColumnModel> rubricQualitySelectedLevels = new LinkedList<RubricQualitySelectedColumnModel>();
RubricQualitySelectedColumnModel rubricQualitySelectedColumnModel = new RubricQualitySelectedColumnModel();
rubricQualitySelectedColumnModel.setQualityId("9a145aa8-f3d9-43a1-8f77-5387ff0693f2");
rubricQualitySelectedColumnModel.setColumnId("4fb17a1d-5681-46c2-a295-4e305c3eae23");
rubricQualitySelectedLevels.add(rubricQualitySelectedColumnModel);
RubricQualitySelectedColumnModel rubricQualitySelectedColumnModel1 = new RubricQualitySelectedColumnModel();
rubricQualitySelectedColumnModel1.setQualityId("d2331fb2-2761-402e-8de6-93e0afaa076e");
rubricQualitySelectedColumnModel1.setColumnId("aac076bf-51ba-48c5-a2e0-ee235b0b9740");
rubricQualitySelectedLevels.add(rubricQualitySelectedColumnModel1);
educationOutcome.setRubricQualitySelectedLevels(rubricQualitySelectedLevels);
EducationOutcome result = graphClient.education().classes().byEducationClassId("{educationClass-id}").assignments().byEducationAssignmentId("{educationAssignment-id}").submissions().byEducationSubmissionId("{educationSubmission-id}").outcomes().byEducationOutcomeId("{educationOutcome-id}").patch(educationOutcome);
const options = {
authProvider,
};
const client = Client.init(options);
const educationOutcome = {
'@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'
}
]
};
await client.api('/education/classes/{id}/assignments/{id}/submissions/{id}/outcomes/{id}')
.version('beta')
.update(educationOutcome);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\EducationRubricOutcome;
use Microsoft\Graph\Beta\Generated\Models\RubricQualityFeedbackModel;
use Microsoft\Graph\Beta\Generated\Models\EducationItemBody;
use Microsoft\Graph\Beta\Generated\Models\BodyType;
use Microsoft\Graph\Beta\Generated\Models\RubricQualitySelectedColumnModel;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new EducationRubricOutcome();
$requestBody->setOdataType('#microsoft.graph.educationRubricOutcome');
$rubricQualityFeedbackRubricQualityFeedbackModel1 = new RubricQualityFeedbackModel();
$rubricQualityFeedbackRubricQualityFeedbackModel1->setQualityId('9a145aa8-f3d9-43a1-8f77-5387ff0693f2');
$rubricQualityFeedbackRubricQualityFeedbackModel1Feedback = new EducationItemBody();
$rubricQualityFeedbackRubricQualityFeedbackModel1Feedback->setContent('This is feedback specific to the first quality of the rubric.');
$rubricQualityFeedbackRubricQualityFeedbackModel1Feedback->setContentType(new BodyType('text'));
$rubricQualityFeedbackRubricQualityFeedbackModel1->setFeedback($rubricQualityFeedbackRubricQualityFeedbackModel1Feedback);
$rubricQualityFeedbackArray []= $rubricQualityFeedbackRubricQualityFeedbackModel1;
$rubricQualityFeedbackRubricQualityFeedbackModel2 = new RubricQualityFeedbackModel();
$rubricQualityFeedbackRubricQualityFeedbackModel2->setQualityId('d2331fb2-2761-402e-8de6-93e0afaa076e');
$rubricQualityFeedbackRubricQualityFeedbackModel2Feedback = new EducationItemBody();
$rubricQualityFeedbackRubricQualityFeedbackModel2Feedback->setContent('This is feedback specific to the second quality of the rubric.');
$rubricQualityFeedbackRubricQualityFeedbackModel2Feedback->setContentType(new BodyType('text'));
$rubricQualityFeedbackRubricQualityFeedbackModel2->setFeedback($rubricQualityFeedbackRubricQualityFeedbackModel2Feedback);
$rubricQualityFeedbackArray []= $rubricQualityFeedbackRubricQualityFeedbackModel2;
$requestBody->setRubricQualityFeedback($rubricQualityFeedbackArray);
$rubricQualitySelectedLevelsRubricQualitySelectedColumnModel1 = new RubricQualitySelectedColumnModel();
$rubricQualitySelectedLevelsRubricQualitySelectedColumnModel1->setQualityId('9a145aa8-f3d9-43a1-8f77-5387ff0693f2');
$rubricQualitySelectedLevelsRubricQualitySelectedColumnModel1->setColumnId('4fb17a1d-5681-46c2-a295-4e305c3eae23');
$rubricQualitySelectedLevelsArray []= $rubricQualitySelectedLevelsRubricQualitySelectedColumnModel1;
$rubricQualitySelectedLevelsRubricQualitySelectedColumnModel2 = new RubricQualitySelectedColumnModel();
$rubricQualitySelectedLevelsRubricQualitySelectedColumnModel2->setQualityId('d2331fb2-2761-402e-8de6-93e0afaa076e');
$rubricQualitySelectedLevelsRubricQualitySelectedColumnModel2->setColumnId('aac076bf-51ba-48c5-a2e0-ee235b0b9740');
$rubricQualitySelectedLevelsArray []= $rubricQualitySelectedLevelsRubricQualitySelectedColumnModel2;
$requestBody->setRubricQualitySelectedLevels($rubricQualitySelectedLevelsArray);
$result = $graphServiceClient->education()->classes()->byEducationClassId('educationClass-id')->assignments()->byEducationAssignmentId('educationAssignment-id')->submissions()->byEducationSubmissionId('educationSubmission-id')->outcomes()->byEducationOutcomeId('educationOutcome-id')->patch($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Education
$params = @{
"@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"
}
)
}
Update-MgBetaEducationClassAssignmentSubmissionOutcome -EducationClassId $educationClassId -EducationAssignmentId $educationAssignmentId -EducationSubmissionId $educationSubmissionId -EducationOutcomeId $educationOutcomeId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.education_rubric_outcome import EducationRubricOutcome
from msgraph_beta.generated.models.rubric_quality_feedback_model import RubricQualityFeedbackModel
from msgraph_beta.generated.models.education_item_body import EducationItemBody
from msgraph_beta.generated.models.body_type import BodyType
from msgraph_beta.generated.models.rubric_quality_selected_column_model import RubricQualitySelectedColumnModel
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = EducationRubricOutcome(
odata_type = "#microsoft.graph.educationRubricOutcome",
rubric_quality_feedback = [
RubricQualityFeedbackModel(
quality_id = "9a145aa8-f3d9-43a1-8f77-5387ff0693f2",
feedback = EducationItemBody(
content = "This is feedback specific to the first quality of the rubric.",
content_type = BodyType.Text,
),
),
RubricQualityFeedbackModel(
quality_id = "d2331fb2-2761-402e-8de6-93e0afaa076e",
feedback = EducationItemBody(
content = "This is feedback specific to the second quality of the rubric.",
content_type = BodyType.Text,
),
),
],
rubric_quality_selected_levels = [
RubricQualitySelectedColumnModel(
quality_id = "9a145aa8-f3d9-43a1-8f77-5387ff0693f2",
column_id = "4fb17a1d-5681-46c2-a295-4e305c3eae23",
),
RubricQualitySelectedColumnModel(
quality_id = "d2331fb2-2761-402e-8de6-93e0afaa076e",
column_id = "aac076bf-51ba-48c5-a2e0-ee235b0b9740",
),
],
)
result = await graph_client.education.classes.by_education_class_id('educationClass-id').assignments.by_education_assignment_id('educationAssignment-id').submissions.by_education_submission_id('educationSubmission-id').outcomes.by_education_outcome_id('educationOutcome-id').patch(request_body)
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
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"
}
]
}