更新 educationOutcome
本文内容
命名空间: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
Bearer {token}。必需。
请求正文
在请求正文中,仅提供要更新的字段的值。
请求正文中不包括的现有属性将保留其以前的值,或根据对其他属性值的更改重新计算。 为了获得最佳性能,请勿加入尚未更改的现有值。
educationOutcome 对象将为以下派生类型之一 :educationPointsOutcome、educationFeedbackOutcome 或 educationRubricOutcome 。 提供与要更新的结果类型相关的特定属性。
所有派生的结果类型都有一个适合该结果类型的常规和"已发布"属性;例如 ,points 和 publishedPoints 、feedback 和 publishedFeedback 。 不要更新"published"属性;供内部使用。 例如,若要向 educationPointsOutcome 分配点,请更新 points 属性,但不更新 publishedPoint。
响应
如果成功,此方法在响应正文中返回 响应代码和更新的 200 OK educationOutcome 对象。
如果 pointsGradeType 和 points 更新为负值或无限值,该方法将 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"
}
]
}