Les API sous la version /beta dans Microsoft Graph sont susceptibles d’être modifiées. L’utilisation de ces API dans des applications de production n’est pas prise en charge. Pour déterminer si une API est disponible dans v1.0, utilisez le sélecteur Version .
POST https://graph.microsoft.com/beta/education/me/rubrics
Content-type: application/json
{
"displayName":"Example Credit Rubric",
"description":{
"content":"This is an example of a credit rubric (no points)",
"contentType":"text"
},
"levels":[
{
"displayName":"Good",
"description":{
"content":"",
"contentType":"text"
}
},
{
"displayName":"Poor",
"description":{
"content":"",
"contentType":"text"
}
}
],
"qualities":[
{
"description":{
"content":"Argument",
"contentType":"text"
},
"criteria":[
{
"description":{
"content":"The essay's argument is persuasive.",
"contentType":"text"
}
},
{
"description":{
"content":"The essay's argument does not make sense.",
"contentType":"text"
}
}
]
},
{
"description":{
"content":"Spelling and Grammar",
"contentType":"text"
},
"criteria":[
{
"description":{
"content":"The essay uses proper spelling and grammar with few or no errors.",
"contentType":"text"
}
},
{
"description":{
"content":"The essay has numerous errors in spelling and/or grammar.",
"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 EducationRubric
{
DisplayName = "Example Credit Rubric",
Description = new EducationItemBody
{
Content = "This is an example of a credit rubric (no points)",
ContentType = BodyType.Text,
},
Levels = new List<RubricLevel>
{
new RubricLevel
{
DisplayName = "Good",
Description = new EducationItemBody
{
Content = "",
ContentType = BodyType.Text,
},
},
new RubricLevel
{
DisplayName = "Poor",
Description = new EducationItemBody
{
Content = "",
ContentType = BodyType.Text,
},
},
},
Qualities = new List<RubricQuality>
{
new RubricQuality
{
Description = new EducationItemBody
{
Content = "Argument",
ContentType = BodyType.Text,
},
Criteria = new List<RubricCriterion>
{
new RubricCriterion
{
Description = new EducationItemBody
{
Content = "The essay's argument is persuasive.",
ContentType = BodyType.Text,
},
},
new RubricCriterion
{
Description = new EducationItemBody
{
Content = "The essay's argument does not make sense.",
ContentType = BodyType.Text,
},
},
},
},
new RubricQuality
{
Description = new EducationItemBody
{
Content = "Spelling and Grammar",
ContentType = BodyType.Text,
},
Criteria = new List<RubricCriterion>
{
new RubricCriterion
{
Description = new EducationItemBody
{
Content = "The essay uses proper spelling and grammar with few or no errors.",
ContentType = BodyType.Text,
},
},
new RubricCriterion
{
Description = new EducationItemBody
{
Content = "The essay has numerous errors in spelling and/or grammar.",
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.Me.Rubrics.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EducationRubric educationRubric = new EducationRubric();
educationRubric.setDisplayName("Example Credit Rubric");
EducationItemBody description = new EducationItemBody();
description.setContent("This is an example of a credit rubric (no points)");
description.setContentType(BodyType.Text);
educationRubric.setDescription(description);
LinkedList<RubricLevel> levels = new LinkedList<RubricLevel>();
RubricLevel rubricLevel = new RubricLevel();
rubricLevel.setDisplayName("Good");
EducationItemBody description1 = new EducationItemBody();
description1.setContent("");
description1.setContentType(BodyType.Text);
rubricLevel.setDescription(description1);
levels.add(rubricLevel);
RubricLevel rubricLevel1 = new RubricLevel();
rubricLevel1.setDisplayName("Poor");
EducationItemBody description2 = new EducationItemBody();
description2.setContent("");
description2.setContentType(BodyType.Text);
rubricLevel1.setDescription(description2);
levels.add(rubricLevel1);
educationRubric.setLevels(levels);
LinkedList<RubricQuality> qualities = new LinkedList<RubricQuality>();
RubricQuality rubricQuality = new RubricQuality();
EducationItemBody description3 = new EducationItemBody();
description3.setContent("Argument");
description3.setContentType(BodyType.Text);
rubricQuality.setDescription(description3);
LinkedList<RubricCriterion> criteria = new LinkedList<RubricCriterion>();
RubricCriterion rubricCriterion = new RubricCriterion();
EducationItemBody description4 = new EducationItemBody();
description4.setContent("The essay's argument is persuasive.");
description4.setContentType(BodyType.Text);
rubricCriterion.setDescription(description4);
criteria.add(rubricCriterion);
RubricCriterion rubricCriterion1 = new RubricCriterion();
EducationItemBody description5 = new EducationItemBody();
description5.setContent("The essay's argument does not make sense.");
description5.setContentType(BodyType.Text);
rubricCriterion1.setDescription(description5);
criteria.add(rubricCriterion1);
rubricQuality.setCriteria(criteria);
qualities.add(rubricQuality);
RubricQuality rubricQuality1 = new RubricQuality();
EducationItemBody description6 = new EducationItemBody();
description6.setContent("Spelling and Grammar");
description6.setContentType(BodyType.Text);
rubricQuality1.setDescription(description6);
LinkedList<RubricCriterion> criteria1 = new LinkedList<RubricCriterion>();
RubricCriterion rubricCriterion2 = new RubricCriterion();
EducationItemBody description7 = new EducationItemBody();
description7.setContent("The essay uses proper spelling and grammar with few or no errors.");
description7.setContentType(BodyType.Text);
rubricCriterion2.setDescription(description7);
criteria1.add(rubricCriterion2);
RubricCriterion rubricCriterion3 = new RubricCriterion();
EducationItemBody description8 = new EducationItemBody();
description8.setContent("The essay has numerous errors in spelling and/or grammar.");
description8.setContentType(BodyType.Text);
rubricCriterion3.setDescription(description8);
criteria1.add(rubricCriterion3);
rubricQuality1.setCriteria(criteria1);
qualities.add(rubricQuality1);
educationRubric.setQualities(qualities);
EducationRubric result = graphClient.education().me().rubrics().post(educationRubric);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\EducationRubric;
use Microsoft\Graph\Beta\Generated\Models\EducationItemBody;
use Microsoft\Graph\Beta\Generated\Models\BodyType;
use Microsoft\Graph\Beta\Generated\Models\RubricLevel;
use Microsoft\Graph\Beta\Generated\Models\RubricQuality;
use Microsoft\Graph\Beta\Generated\Models\RubricCriterion;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new EducationRubric();
$requestBody->setDisplayName('Example Credit Rubric');
$description = new EducationItemBody();
$description->setContent('This is an example of a credit rubric (no points)');
$description->setContentType(new BodyType('text'));
$requestBody->setDescription($description);
$levelsRubricLevel1 = new RubricLevel();
$levelsRubricLevel1->setDisplayName('Good');
$levelsRubricLevel1Description = new EducationItemBody();
$levelsRubricLevel1Description->setContent('');
$levelsRubricLevel1Description->setContentType(new BodyType('text'));
$levelsRubricLevel1->setDescription($levelsRubricLevel1Description);
$levelsArray []= $levelsRubricLevel1;
$levelsRubricLevel2 = new RubricLevel();
$levelsRubricLevel2->setDisplayName('Poor');
$levelsRubricLevel2Description = new EducationItemBody();
$levelsRubricLevel2Description->setContent('');
$levelsRubricLevel2Description->setContentType(new BodyType('text'));
$levelsRubricLevel2->setDescription($levelsRubricLevel2Description);
$levelsArray []= $levelsRubricLevel2;
$requestBody->setLevels($levelsArray);
$qualitiesRubricQuality1 = new RubricQuality();
$qualitiesRubricQuality1Description = new EducationItemBody();
$qualitiesRubricQuality1Description->setContent('Argument');
$qualitiesRubricQuality1Description->setContentType(new BodyType('text'));
$qualitiesRubricQuality1->setDescription($qualitiesRubricQuality1Description);
$criteriaRubricCriterion1 = new RubricCriterion();
$criteriaRubricCriterion1Description = new EducationItemBody();
$criteriaRubricCriterion1Description->setContent('The essay\'s argument is persuasive.');
$criteriaRubricCriterion1Description->setContentType(new BodyType('text'));
$criteriaRubricCriterion1->setDescription($criteriaRubricCriterion1Description);
$criteriaArray []= $criteriaRubricCriterion1;
$criteriaRubricCriterion2 = new RubricCriterion();
$criteriaRubricCriterion2Description = new EducationItemBody();
$criteriaRubricCriterion2Description->setContent('The essay\'s argument does not make sense.');
$criteriaRubricCriterion2Description->setContentType(new BodyType('text'));
$criteriaRubricCriterion2->setDescription($criteriaRubricCriterion2Description);
$criteriaArray []= $criteriaRubricCriterion2;
$qualitiesRubricQuality1->setCriteria($criteriaArray);
$qualitiesArray []= $qualitiesRubricQuality1;
$qualitiesRubricQuality2 = new RubricQuality();
$qualitiesRubricQuality2Description = new EducationItemBody();
$qualitiesRubricQuality2Description->setContent('Spelling and Grammar');
$qualitiesRubricQuality2Description->setContentType(new BodyType('text'));
$qualitiesRubricQuality2->setDescription($qualitiesRubricQuality2Description);
$criteriaRubricCriterion1 = new RubricCriterion();
$criteriaRubricCriterion1Description = new EducationItemBody();
$criteriaRubricCriterion1Description->setContent('The essay uses proper spelling and grammar with few or no errors.');
$criteriaRubricCriterion1Description->setContentType(new BodyType('text'));
$criteriaRubricCriterion1->setDescription($criteriaRubricCriterion1Description);
$criteriaArray []= $criteriaRubricCriterion1;
$criteriaRubricCriterion2 = new RubricCriterion();
$criteriaRubricCriterion2Description = new EducationItemBody();
$criteriaRubricCriterion2Description->setContent('The essay has numerous errors in spelling and/or grammar.');
$criteriaRubricCriterion2Description->setContentType(new BodyType('text'));
$criteriaRubricCriterion2->setDescription($criteriaRubricCriterion2Description);
$criteriaArray []= $criteriaRubricCriterion2;
$qualitiesRubricQuality2->setCriteria($criteriaArray);
$qualitiesArray []= $qualitiesRubricQuality2;
$requestBody->setQualities($qualitiesArray);
$result = $graphServiceClient->education()->me()->rubrics()->post($requestBody)->wait();
POST https://graph.microsoft.com/beta/education/me/rubrics
Content-type: application/json
{
"displayName":"Example Points Rubric",
"description":{
"content":"This is an example of a rubric with points",
"contentType":"text"
},
"levels":[
{
"displayName":"Good",
"description":{
"content":"",
"contentType":"text"
},
"grading":{
"@odata.type":"#microsoft.graph.educationAssignmentPointsGradeType",
"maxPoints":2
}
},
{
"displayName":"Poor",
"description":{
"content":"",
"contentType":"text"
},
"grading":{
"@odata.type":"#microsoft.graph.educationAssignmentPointsGradeType",
"maxPoints":1
}
}
],
"qualities":[
{
"description":{
"content":"Argument",
"contentType":"text"
},
"criteria":[
{
"description":{
"content":"The essay's argument is persuasive.",
"contentType":"text"
}
},
{
"description":{
"content":"The essay's argument does not make sense.",
"contentType":"text"
}
}
],
"weight":50.0
},
{
"description":{
"content":"Spelling and Grammar",
"contentType":"text"
},
"criteria":[
{
"description":{
"content":"The essay uses proper spelling and grammar with few or no errors.",
"contentType":"text"
}
},
{
"description":{
"content":"The essay has numerous errors in spelling and/or grammar.",
"contentType":"text"
}
}
],
"weight":50.0
}
],
"grading":{
"@odata.type":"#microsoft.graph.educationAssignmentPointsGradeType"
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new EducationRubric
{
DisplayName = "Example Points Rubric",
Description = new EducationItemBody
{
Content = "This is an example of a rubric with points",
ContentType = BodyType.Text,
},
Levels = new List<RubricLevel>
{
new RubricLevel
{
DisplayName = "Good",
Description = new EducationItemBody
{
Content = "",
ContentType = BodyType.Text,
},
Grading = new EducationAssignmentPointsGradeType
{
OdataType = "#microsoft.graph.educationAssignmentPointsGradeType",
MaxPoints = 2f,
},
},
new RubricLevel
{
DisplayName = "Poor",
Description = new EducationItemBody
{
Content = "",
ContentType = BodyType.Text,
},
Grading = new EducationAssignmentPointsGradeType
{
OdataType = "#microsoft.graph.educationAssignmentPointsGradeType",
MaxPoints = 1f,
},
},
},
Qualities = new List<RubricQuality>
{
new RubricQuality
{
Description = new EducationItemBody
{
Content = "Argument",
ContentType = BodyType.Text,
},
Criteria = new List<RubricCriterion>
{
new RubricCriterion
{
Description = new EducationItemBody
{
Content = "The essay's argument is persuasive.",
ContentType = BodyType.Text,
},
},
new RubricCriterion
{
Description = new EducationItemBody
{
Content = "The essay's argument does not make sense.",
ContentType = BodyType.Text,
},
},
},
Weight = 50.0f,
},
new RubricQuality
{
Description = new EducationItemBody
{
Content = "Spelling and Grammar",
ContentType = BodyType.Text,
},
Criteria = new List<RubricCriterion>
{
new RubricCriterion
{
Description = new EducationItemBody
{
Content = "The essay uses proper spelling and grammar with few or no errors.",
ContentType = BodyType.Text,
},
},
new RubricCriterion
{
Description = new EducationItemBody
{
Content = "The essay has numerous errors in spelling and/or grammar.",
ContentType = BodyType.Text,
},
},
},
Weight = 50.0f,
},
},
Grading = new EducationAssignmentPointsGradeType
{
OdataType = "#microsoft.graph.educationAssignmentPointsGradeType",
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Education.Me.Rubrics.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EducationRubric educationRubric = new EducationRubric();
educationRubric.setDisplayName("Example Points Rubric");
EducationItemBody description = new EducationItemBody();
description.setContent("This is an example of a rubric with points");
description.setContentType(BodyType.Text);
educationRubric.setDescription(description);
LinkedList<RubricLevel> levels = new LinkedList<RubricLevel>();
RubricLevel rubricLevel = new RubricLevel();
rubricLevel.setDisplayName("Good");
EducationItemBody description1 = new EducationItemBody();
description1.setContent("");
description1.setContentType(BodyType.Text);
rubricLevel.setDescription(description1);
EducationAssignmentPointsGradeType grading = new EducationAssignmentPointsGradeType();
grading.setOdataType("#microsoft.graph.educationAssignmentPointsGradeType");
grading.setMaxPoints(2f);
rubricLevel.setGrading(grading);
levels.add(rubricLevel);
RubricLevel rubricLevel1 = new RubricLevel();
rubricLevel1.setDisplayName("Poor");
EducationItemBody description2 = new EducationItemBody();
description2.setContent("");
description2.setContentType(BodyType.Text);
rubricLevel1.setDescription(description2);
EducationAssignmentPointsGradeType grading1 = new EducationAssignmentPointsGradeType();
grading1.setOdataType("#microsoft.graph.educationAssignmentPointsGradeType");
grading1.setMaxPoints(1f);
rubricLevel1.setGrading(grading1);
levels.add(rubricLevel1);
educationRubric.setLevels(levels);
LinkedList<RubricQuality> qualities = new LinkedList<RubricQuality>();
RubricQuality rubricQuality = new RubricQuality();
EducationItemBody description3 = new EducationItemBody();
description3.setContent("Argument");
description3.setContentType(BodyType.Text);
rubricQuality.setDescription(description3);
LinkedList<RubricCriterion> criteria = new LinkedList<RubricCriterion>();
RubricCriterion rubricCriterion = new RubricCriterion();
EducationItemBody description4 = new EducationItemBody();
description4.setContent("The essay's argument is persuasive.");
description4.setContentType(BodyType.Text);
rubricCriterion.setDescription(description4);
criteria.add(rubricCriterion);
RubricCriterion rubricCriterion1 = new RubricCriterion();
EducationItemBody description5 = new EducationItemBody();
description5.setContent("The essay's argument does not make sense.");
description5.setContentType(BodyType.Text);
rubricCriterion1.setDescription(description5);
criteria.add(rubricCriterion1);
rubricQuality.setCriteria(criteria);
rubricQuality.setWeight(50.0f);
qualities.add(rubricQuality);
RubricQuality rubricQuality1 = new RubricQuality();
EducationItemBody description6 = new EducationItemBody();
description6.setContent("Spelling and Grammar");
description6.setContentType(BodyType.Text);
rubricQuality1.setDescription(description6);
LinkedList<RubricCriterion> criteria1 = new LinkedList<RubricCriterion>();
RubricCriterion rubricCriterion2 = new RubricCriterion();
EducationItemBody description7 = new EducationItemBody();
description7.setContent("The essay uses proper spelling and grammar with few or no errors.");
description7.setContentType(BodyType.Text);
rubricCriterion2.setDescription(description7);
criteria1.add(rubricCriterion2);
RubricCriterion rubricCriterion3 = new RubricCriterion();
EducationItemBody description8 = new EducationItemBody();
description8.setContent("The essay has numerous errors in spelling and/or grammar.");
description8.setContentType(BodyType.Text);
rubricCriterion3.setDescription(description8);
criteria1.add(rubricCriterion3);
rubricQuality1.setCriteria(criteria1);
rubricQuality1.setWeight(50.0f);
qualities.add(rubricQuality1);
educationRubric.setQualities(qualities);
EducationAssignmentPointsGradeType grading2 = new EducationAssignmentPointsGradeType();
grading2.setOdataType("#microsoft.graph.educationAssignmentPointsGradeType");
educationRubric.setGrading(grading2);
EducationRubric result = graphClient.education().me().rubrics().post(educationRubric);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\EducationRubric;
use Microsoft\Graph\Beta\Generated\Models\EducationItemBody;
use Microsoft\Graph\Beta\Generated\Models\BodyType;
use Microsoft\Graph\Beta\Generated\Models\RubricLevel;
use Microsoft\Graph\Beta\Generated\Models\EducationAssignmentPointsGradeType;
use Microsoft\Graph\Beta\Generated\Models\RubricQuality;
use Microsoft\Graph\Beta\Generated\Models\RubricCriterion;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new EducationRubric();
$requestBody->setDisplayName('Example Points Rubric');
$description = new EducationItemBody();
$description->setContent('This is an example of a rubric with points');
$description->setContentType(new BodyType('text'));
$requestBody->setDescription($description);
$levelsRubricLevel1 = new RubricLevel();
$levelsRubricLevel1->setDisplayName('Good');
$levelsRubricLevel1Description = new EducationItemBody();
$levelsRubricLevel1Description->setContent('');
$levelsRubricLevel1Description->setContentType(new BodyType('text'));
$levelsRubricLevel1->setDescription($levelsRubricLevel1Description);
$levelsRubricLevel1Grading = new EducationAssignmentPointsGradeType();
$levelsRubricLevel1Grading->setOdataType('#microsoft.graph.educationAssignmentPointsGradeType');
$levelsRubricLevel1Grading->setMaxPoints(2);
$levelsRubricLevel1->setGrading($levelsRubricLevel1Grading);
$levelsArray []= $levelsRubricLevel1;
$levelsRubricLevel2 = new RubricLevel();
$levelsRubricLevel2->setDisplayName('Poor');
$levelsRubricLevel2Description = new EducationItemBody();
$levelsRubricLevel2Description->setContent('');
$levelsRubricLevel2Description->setContentType(new BodyType('text'));
$levelsRubricLevel2->setDescription($levelsRubricLevel2Description);
$levelsRubricLevel2Grading = new EducationAssignmentPointsGradeType();
$levelsRubricLevel2Grading->setOdataType('#microsoft.graph.educationAssignmentPointsGradeType');
$levelsRubricLevel2Grading->setMaxPoints(1);
$levelsRubricLevel2->setGrading($levelsRubricLevel2Grading);
$levelsArray []= $levelsRubricLevel2;
$requestBody->setLevels($levelsArray);
$qualitiesRubricQuality1 = new RubricQuality();
$qualitiesRubricQuality1Description = new EducationItemBody();
$qualitiesRubricQuality1Description->setContent('Argument');
$qualitiesRubricQuality1Description->setContentType(new BodyType('text'));
$qualitiesRubricQuality1->setDescription($qualitiesRubricQuality1Description);
$criteriaRubricCriterion1 = new RubricCriterion();
$criteriaRubricCriterion1Description = new EducationItemBody();
$criteriaRubricCriterion1Description->setContent('The essay\'s argument is persuasive.');
$criteriaRubricCriterion1Description->setContentType(new BodyType('text'));
$criteriaRubricCriterion1->setDescription($criteriaRubricCriterion1Description);
$criteriaArray []= $criteriaRubricCriterion1;
$criteriaRubricCriterion2 = new RubricCriterion();
$criteriaRubricCriterion2Description = new EducationItemBody();
$criteriaRubricCriterion2Description->setContent('The essay\'s argument does not make sense.');
$criteriaRubricCriterion2Description->setContentType(new BodyType('text'));
$criteriaRubricCriterion2->setDescription($criteriaRubricCriterion2Description);
$criteriaArray []= $criteriaRubricCriterion2;
$qualitiesRubricQuality1->setCriteria($criteriaArray);
$qualitiesRubricQuality1->setWeight(50.0);
$qualitiesArray []= $qualitiesRubricQuality1;
$qualitiesRubricQuality2 = new RubricQuality();
$qualitiesRubricQuality2Description = new EducationItemBody();
$qualitiesRubricQuality2Description->setContent('Spelling and Grammar');
$qualitiesRubricQuality2Description->setContentType(new BodyType('text'));
$qualitiesRubricQuality2->setDescription($qualitiesRubricQuality2Description);
$criteriaRubricCriterion1 = new RubricCriterion();
$criteriaRubricCriterion1Description = new EducationItemBody();
$criteriaRubricCriterion1Description->setContent('The essay uses proper spelling and grammar with few or no errors.');
$criteriaRubricCriterion1Description->setContentType(new BodyType('text'));
$criteriaRubricCriterion1->setDescription($criteriaRubricCriterion1Description);
$criteriaArray []= $criteriaRubricCriterion1;
$criteriaRubricCriterion2 = new RubricCriterion();
$criteriaRubricCriterion2Description = new EducationItemBody();
$criteriaRubricCriterion2Description->setContent('The essay has numerous errors in spelling and/or grammar.');
$criteriaRubricCriterion2Description->setContentType(new BodyType('text'));
$criteriaRubricCriterion2->setDescription($criteriaRubricCriterion2Description);
$criteriaArray []= $criteriaRubricCriterion2;
$qualitiesRubricQuality2->setCriteria($criteriaArray);
$qualitiesRubricQuality2->setWeight(50.0);
$qualitiesArray []= $qualitiesRubricQuality2;
$requestBody->setQualities($qualitiesArray);
$grading = new EducationAssignmentPointsGradeType();
$grading->setOdataType('#microsoft.graph.educationAssignmentPointsGradeType');
$requestBody->setGrading($grading);
$result = $graphServiceClient->education()->me()->rubrics()->post($requestBody)->wait();