Crie um novo recurso de comentários para um envio. Somente um professor pode executar essa operação.
Para criar um novo recurso baseado em arquivo, carregue o arquivo para a pasta de recursos de feedback associada à atribuição. Se o arquivo não existir ou não estiver nessa pasta, a solicitação POST falhará.
Escolha a permissão ou as permissões marcadas como menos privilegiadas para essa API. Use uma permissão ou permissões privilegiadas mais altas somente se o aplicativo exigir. Para obter detalhes sobre permissões delegadas e de aplicativo, consulte Tipos de permissão. Para saber mais sobre essas permissões, consulte a referência de permissões.
Tipo de permissão
Permissões menos privilegiadas
Permissões privilegiadas mais altas
Delegado (conta corporativa ou de estudante)
EduAssignments.ReadWrite
Indisponível.
Delegado (conta pessoal da Microsoft)
Sem suporte.
Sem suporte.
Application
EduAssignments.ReadWrite.All
Indisponível.
Solicitação HTTP
POST /education/classes/{classId}/assignments/{assignmentId}/submissions/{submissionId}/outcomes
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new EducationFeedbackResourceOutcome
{
OdataType = "#microsoft.graph.educationFeedbackResourceOutcome",
FeedbackResource = new EducationWordResource
{
OdataType = "#microsoft.graph.educationWordResource",
DisplayName = "Document1.docx",
},
};
// 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.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewEducationOutcome()
feedbackResource := graphmodels.NewEducationWordResource()
displayName := "Document1.docx"
feedbackResource.SetDisplayName(&displayName)
requestBody.SetFeedbackResource(feedbackResource)
// 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().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EducationFeedbackResourceOutcome educationOutcome = new EducationFeedbackResourceOutcome();
educationOutcome.setOdataType("#microsoft.graph.educationFeedbackResourceOutcome");
EducationWordResource feedbackResource = new EducationWordResource();
feedbackResource.setOdataType("#microsoft.graph.educationWordResource");
feedbackResource.setDisplayName("Document1.docx");
educationOutcome.setFeedbackResource(feedbackResource);
EducationOutcome result = graphClient.education().classes().byEducationClassId("{educationClass-id}").assignments().byEducationAssignmentId("{educationAssignment-id}").submissions().byEducationSubmissionId("{educationSubmission-id}").outcomes().post(educationOutcome);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\EducationFeedbackResourceOutcome;
use Microsoft\Graph\Generated\Models\EducationWordResource;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new EducationFeedbackResourceOutcome();
$requestBody->setOdataType('#microsoft.graph.educationFeedbackResourceOutcome');
$feedbackResource = new EducationWordResource();
$feedbackResource->setOdataType('#microsoft.graph.educationWordResource');
$feedbackResource->setDisplayName('Document1.docx');
$requestBody->setFeedbackResource($feedbackResource);
$result = $graphServiceClient->education()->classes()->byEducationClassId('educationClass-id')->assignments()->byEducationAssignmentId('educationAssignment-id')->submissions()->byEducationSubmissionId('educationSubmission-id')->outcomes()->post($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.education_feedback_resource_outcome import EducationFeedbackResourceOutcome
from msgraph.generated.models.education_word_resource import EducationWordResource
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = EducationFeedbackResourceOutcome(
odata_type = "#microsoft.graph.educationFeedbackResourceOutcome",
feedback_resource = EducationWordResource(
odata_type = "#microsoft.graph.educationWordResource",
display_name = "Document1.docx",
),
)
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.post(request_body)