Cree un nuevo recurso de comentarios para un envío. Solo un profesor puede realizar esta operación.
Para crear un nuevo recurso basado en archivos, cargue el archivo en la carpeta de recursos de comentarios asociada a la asignación. Si el archivo no existe o no está en esa carpeta, se producirá un error en la POST solicitud.
Elija el permiso o los permisos marcados como con privilegios mínimos para esta API. Use un permiso o permisos con privilegios superiores solo si la aplicación lo requiere. Para obtener más información sobre los permisos delegados y de aplicación, consulte Tipos de permisos. Para obtener más información sobre estos permisos, consulte la referencia de permisos.
Tipo de permiso
Permisos con privilegios mínimos
Permisos con privilegios más altos
Delegado (cuenta profesional o educativa)
EduAssignments.ReadWrite
No disponible.
Delegado (cuenta personal de Microsoft)
No admitida.
No admitida.
Aplicación
EduAssignments.ReadWrite.All
No disponible.
Solicitud HTTP
POST /education/classes/{classId}/assignments/{assignmentId}/submissions/{submissionId}/outcomes
Si se ejecuta correctamente, este método devuelve un 201 Created código de respuesta y un objeto educationFeedbackResourceOutcome en el cuerpo de la respuesta.
Este método devuelve un 400 Bad Request valor cuando el envío ha superado más de cinco recursos de comentarios.
// 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)