EducationOutcome の更新
[アーティクル]
01/21/2022
3 人の共同作成者
この記事の内容
名前空間: microsoft.graph
educationOutcome オブジェクトのプロパティを更新 します。
アクセス許可
この API を呼び出すには、次のいずれかのアクセス許可が必要です。アクセス許可の選択方法などの詳細については、「アクセス許可 」を参照してください。
アクセス許可の種類
アクセス許可 (特権の小さいものから大きいものへ)
委任 (職場または学校のアカウント)
EduAssignments.ReadWriteBasic, EduAssignments.ReadWrite
委任 (個人用 Microsoft アカウント)
サポートされていません。
アプリケーション
サポートされていません。
HTTP 要求
PATCH /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
名前
説明
Authorization
ベアラー {token}。必須。
要求本文
要求本文で、更新するフィールドの値のみを指定します。
要求本文に含まれない既存のプロパティは、以前の値のままになるか、他のプロパティ値の変化に基づいて再計算されます。 最適なパフォーマンスを得るために、変更されていない既存の値を含めないでください。
educationOutcome オブジェクトは、educationPointsOutcome、educationFeedbackOutcome、educationRubricOutcome のいずれかの派生型 になります 。 更新する結果の種類に関連する特定のプロパティを指定します。
すべての派生結果の種類には、その種類の結果に適した標準プロパティと "発行済み" プロパティがあります。たとえば、ポイント と発行****済みPoints 、**フィードバック、**発行済みFeedback などです。 "発行済み" プロパティを更新しない。内部使用用です。 たとえば 、educationPointsOutcome にポイントを割り当てるには 、points プロパティを更新しますが、公開されている Points は更新されません 。
応答
成功した場合、このメソッドは応答コードと、応答本文で 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/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"
}
}
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var educationOutcome = new EducationFeedbackOutcome
{
Feedback = new EducationFeedback
{
Text = new EducationItemBody
{
Content = "This is feedback for the assignment as a whole.",
ContentType = BodyType.Text
}
}
};
await graphClient.Education.Classes["{educationClass-id}"].Assignments["{educationAssignment-id}"].Submissions["{educationSubmission-id}"].Outcomes["{educationOutcome-id}"]
.Request()
.UpdateAsync(educationOutcome);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
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/acdefc6b-2dc6-4e71-b1e9-6d9810ab1793/assignments/cf6005fc-9e13-44a2-a6ac-a53322006454/submissions/d1bee293-d8bb-48d4-af3e-c8cb0e3c7fe7/outcomes/9c0f2850-ff8f-4fd6-b3ac-e23077b59141')
.update(educationOutcome);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/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"]]];
[urlRequest setHTTPMethod:@"PATCH"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphEducationOutcome *educationOutcome = [[MSGraphEducationOutcome alloc] init];
MSGraphEducationFeedback *feedback = [[MSGraphEducationFeedback alloc] init];
MSGraphEducationItemBody *text = [[MSGraphEducationItemBody alloc] init];
[text setContent:@"This is feedback for the assignment as a whole."];
[text setContentType: [MSGraphBodyType text]];
[feedback setText:text];
[educationOutcome setFeedback:feedback];
NSError *error;
NSData *educationOutcomeData = [educationOutcome getSerializedDataWithError:&error];
[urlRequest setHTTPBody:educationOutcomeData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
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);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewEducationOutcome()
requestBody.SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.educationFeedbackOutcome",
}
educationClassId := "educationClass-id"
educationAssignmentId := "educationAssignment-id"
educationSubmissionId := "educationSubmission-id"
educationOutcomeId := "educationOutcome-id"
graphClient.Education().ClassesById(&educationClassId).AssignmentsById(&educationAssignmentId).SubmissionsById(&educationSubmissionId).OutcomesById(&educationOutcomeId).Patch(requestBody)
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
Import-Module Microsoft.Graph.Education
$params = @{
"@odata.type" = "#microsoft.graph.educationFeedbackOutcome"
}
Update-MgEducationClassAssignmentSubmissionOutcome -EducationClassId $educationClassId -EducationAssignmentId $educationAssignmentId -EducationSubmissionId $educationSubmissionId -EducationOutcomeId $educationOutcomeId -BodyParameter $params
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
応答
応答の例を次に示します。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.type": "#microsoft.graph.educationFeedbackOutcome",
"id": "ca05367a-b292-42d5-aff7-5d279feeace8",
"lastModifiedBy": {
"user": {
"id": "9391878d-903c-406c-bb1c-0f17d00fd878"
}
},
"feedback": {
"feedbackDateTime": "2019-07-31T21:10:30.3231461Z",
"text": {
"content": "This is feedback for the assignment as a whole.",
"contentType": "text"
},
"feedbackBy": {
"user": {
"id": "9391878d-903c-406c-bb1c-0f17d00fd878",
}
}
}
}
例 2: ポイントの結果を更新する
要求
次の例は、ポイントの結果を更新する要求を示しています。
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.educationPointsOutcome",
"points":{
"@odata.type":"#microsoft.graph.educationAssignmentPointsGrade",
"points":85.0
}
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var educationOutcome = new EducationPointsOutcome
{
Points = new EducationAssignmentPointsGrade
{
Points = 85f
}
};
await graphClient.Education.Classes["{educationClass-id}"].Assignments["{educationAssignment-id}"].Submissions["{educationSubmission-id}"].Outcomes["{educationOutcome-id}"]
.Request()
.UpdateAsync(educationOutcome);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
const options = {
authProvider,
};
const client = Client.init(options);
const educationOutcome = {
'@odata.type':'#microsoft.graph.educationPointsOutcome',
points: {
'@odata.type':'#microsoft.graph.educationAssignmentPointsGrade',
points: 85.0
}
};
await client.api('/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')
.update(educationOutcome);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/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"]]];
[urlRequest setHTTPMethod:@"PATCH"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphEducationOutcome *educationOutcome = [[MSGraphEducationOutcome alloc] init];
MSGraphEducationAssignmentPointsGrade *points = [[MSGraphEducationAssignmentPointsGrade alloc] init];
[points setPoints: 85.0];
[educationOutcome setPoints:points];
NSError *error;
NSData *educationOutcomeData = [educationOutcome getSerializedDataWithError:&error];
[urlRequest setHTTPBody:educationOutcomeData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
EducationPointsOutcome educationOutcome = new EducationPointsOutcome();
EducationAssignmentPointsGrade points = new EducationAssignmentPointsGrade();
points.points = 85.0;
educationOutcome.points = points1;
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);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewEducationOutcome()
requestBody.SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.educationPointsOutcome",
}
educationClassId := "educationClass-id"
educationAssignmentId := "educationAssignment-id"
educationSubmissionId := "educationSubmission-id"
educationOutcomeId := "educationOutcome-id"
graphClient.Education().ClassesById(&educationClassId).AssignmentsById(&educationAssignmentId).SubmissionsById(&educationSubmissionId).OutcomesById(&educationOutcomeId).Patch(requestBody)
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
Import-Module Microsoft.Graph.Education
$params = @{
"@odata.type" = "#microsoft.graph.educationPointsOutcome"
Points = @{
"@odata.type" = "#microsoft.graph.educationAssignmentPointsGrade"
Points =
}
}
Update-MgEducationClassAssignmentSubmissionOutcome -EducationClassId $educationClassId -EducationAssignmentId $educationAssignmentId -EducationSubmissionId $educationSubmissionId -EducationOutcomeId $educationOutcomeId -BodyParameter $params
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
応答
応答の例を次に示します。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.type":"#microsoft.graph.educationPointsOutcome",
"id":"ea1351f6-ba33-4940-b2cb-6a7254af2dc8",
"lastModifiedBy":{
"user":{
"id":"9391878d-903c-406c-bb1c-0f17d00fd878"
}
},
"points":{
"gradedDateTime":"2019-07-15T22:35:48.2429387Z",
"points":85.0,
"gradedBy":{
"user":{
"id":"9391878d-903c-406c-bb1c-0f17d00fd878"
}
}
}
}
例 3: ルーブリックの結果を更新する
要求
次の例は、ルーブリックの結果を更新する要求を示しています。
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"
}
]
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var educationOutcome = new 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"
}
}
};
await graphClient.Education.Classes["{educationClass-id}"].Assignments["{educationAssignment-id}"].Submissions["{educationSubmission-id}"].Outcomes["{educationOutcome-id}"]
.Request()
.UpdateAsync(educationOutcome);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
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/acdefc6b-2dc6-4e71-b1e9-6d9810ab1793/assignments/cf6005fc-9e13-44a2-a6ac-a53322006454/submissions/d1bee293-d8bb-48d4-af3e-c8cb0e3c7fe7/outcomes/9c0f2850-ff8f-4fd6-b3ac-e23077b59141')
.update(educationOutcome);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/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"]]];
[urlRequest setHTTPMethod:@"PATCH"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphEducationOutcome *educationOutcome = [[MSGraphEducationOutcome alloc] init];
NSMutableArray *rubricQualityFeedbackList = [[NSMutableArray alloc] init];
MSGraphRubricQualityFeedbackModel *rubricQualityFeedback = [[MSGraphRubricQualityFeedbackModel alloc] init];
[rubricQualityFeedback setQualityId:@"9a145aa8-f3d9-43a1-8f77-5387ff0693f2"];
MSGraphEducationItemBody *feedback = [[MSGraphEducationItemBody alloc] init];
[feedback setContent:@"This is feedback specific to the first quality of the rubric."];
[feedback setContentType: [MSGraphBodyType text]];
[rubricQualityFeedback setFeedback:feedback];
[rubricQualityFeedbackList addObject: rubricQualityFeedback];
MSGraphRubricQualityFeedbackModel *rubricQualityFeedback = [[MSGraphRubricQualityFeedbackModel alloc] init];
[rubricQualityFeedback setQualityId:@"d2331fb2-2761-402e-8de6-93e0afaa076e"];
MSGraphEducationItemBody *feedback = [[MSGraphEducationItemBody alloc] init];
[feedback setContent:@"This is feedback specific to the second quality of the rubric."];
[feedback setContentType: [MSGraphBodyType text]];
[rubricQualityFeedback setFeedback:feedback];
[rubricQualityFeedbackList addObject: rubricQualityFeedback];
[educationOutcome setRubricQualityFeedback:rubricQualityFeedbackList];
NSMutableArray *rubricQualitySelectedLevelsList = [[NSMutableArray alloc] init];
MSGraphRubricQualitySelectedColumnModel *rubricQualitySelectedLevels = [[MSGraphRubricQualitySelectedColumnModel alloc] init];
[rubricQualitySelectedLevels setQualityId:@"9a145aa8-f3d9-43a1-8f77-5387ff0693f2"];
[rubricQualitySelectedLevels setColumnId:@"4fb17a1d-5681-46c2-a295-4e305c3eae23"];
[rubricQualitySelectedLevelsList addObject: rubricQualitySelectedLevels];
MSGraphRubricQualitySelectedColumnModel *rubricQualitySelectedLevels = [[MSGraphRubricQualitySelectedColumnModel alloc] init];
[rubricQualitySelectedLevels setQualityId:@"d2331fb2-2761-402e-8de6-93e0afaa076e"];
[rubricQualitySelectedLevels setColumnId:@"aac076bf-51ba-48c5-a2e0-ee235b0b9740"];
[rubricQualitySelectedLevelsList addObject: rubricQualitySelectedLevels];
[educationOutcome setRubricQualitySelectedLevels:rubricQualitySelectedLevelsList];
NSError *error;
NSData *educationOutcomeData = [educationOutcome getSerializedDataWithError:&error];
[urlRequest setHTTPBody:educationOutcomeData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
EducationRubricOutcome educationOutcome = new EducationRubricOutcome();
LinkedList<RubricQualityFeedbackModel> rubricQualityFeedbackList = new LinkedList<RubricQualityFeedbackModel>();
RubricQualityFeedbackModel rubricQualityFeedback = new RubricQualityFeedbackModel();
rubricQualityFeedback.qualityId = "9a145aa8-f3d9-43a1-8f77-5387ff0693f2";
EducationItemBody feedback = new EducationItemBody();
feedback.content = "This is feedback specific to the first quality of the rubric.";
feedback.contentType = BodyType.TEXT;
rubricQualityFeedback.feedback = feedback;
rubricQualityFeedbackList.add(rubricQualityFeedback);
RubricQualityFeedbackModel rubricQualityFeedback1 = new RubricQualityFeedbackModel();
rubricQualityFeedback1.qualityId = "d2331fb2-2761-402e-8de6-93e0afaa076e";
EducationItemBody feedback1 = new EducationItemBody();
feedback1.content = "This is feedback specific to the second quality of the rubric.";
feedback1.contentType = BodyType.TEXT;
rubricQualityFeedback1.feedback = feedback1;
rubricQualityFeedbackList.add(rubricQualityFeedback1);
educationOutcome.rubricQualityFeedback = rubricQualityFeedbackList;
LinkedList<RubricQualitySelectedColumnModel> rubricQualitySelectedLevelsList = new LinkedList<RubricQualitySelectedColumnModel>();
RubricQualitySelectedColumnModel rubricQualitySelectedLevels = new RubricQualitySelectedColumnModel();
rubricQualitySelectedLevels.qualityId = "9a145aa8-f3d9-43a1-8f77-5387ff0693f2";
rubricQualitySelectedLevels.columnId = "4fb17a1d-5681-46c2-a295-4e305c3eae23";
rubricQualitySelectedLevelsList.add(rubricQualitySelectedLevels);
RubricQualitySelectedColumnModel rubricQualitySelectedLevels1 = new RubricQualitySelectedColumnModel();
rubricQualitySelectedLevels1.qualityId = "d2331fb2-2761-402e-8de6-93e0afaa076e";
rubricQualitySelectedLevels1.columnId = "aac076bf-51ba-48c5-a2e0-ee235b0b9740";
rubricQualitySelectedLevelsList.add(rubricQualitySelectedLevels1);
educationOutcome.rubricQualitySelectedLevels = rubricQualitySelectedLevelsList;
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);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewEducationOutcome()
requestBody.SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.educationRubricOutcome",
"rubricQualityFeedback": []Object {
}
"rubricQualitySelectedLevels": []Object {
}
}
educationClassId := "educationClass-id"
educationAssignmentId := "educationAssignment-id"
educationSubmissionId := "educationSubmission-id"
educationOutcomeId := "educationOutcome-id"
graphClient.Education().ClassesById(&educationClassId).AssignmentsById(&educationAssignmentId).SubmissionsById(&educationSubmissionId).OutcomesById(&educationOutcomeId).Patch(requestBody)
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
Import-Module Microsoft.Graph.Education
$params = @{
"@odata.type" = "#microsoft.graph.educationRubricOutcome"
RubricQualityFeedback = @(
)
RubricQualitySelectedLevels = @(
)
}
Update-MgEducationClassAssignmentSubmissionOutcome -EducationClassId $educationClassId -EducationAssignmentId $educationAssignmentId -EducationSubmissionId $educationSubmissionId -EducationOutcomeId $educationOutcomeId -BodyParameter $params
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
応答
応答の例を次に示します。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
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"
}
]
}