Erstellen Sie eine neue Feedbackressource für eine Übermittlung. Nur ein Lehrer kann diesen Vorgang ausführen.
Um eine neue dateibasierte Ressource zu erstellen, laden Sie die Datei in den Ordner feedbackressourcen hoch, der der Zuweisung zugeordnet ist. Wenn die Datei nicht vorhanden ist oder sich nicht in diesem Ordner befindet, schlägt die POST Anforderung fehl.
Wählen Sie für diese API die Als am wenigsten privilegierten Berechtigungen gekennzeichneten Berechtigungen aus. Verwenden Sie nur dann eine Berechtigung mit höheren Berechtigungen , wenn dies für Ihre App erforderlich ist. Ausführliche Informationen zu delegierten Berechtigungen und Anwendungsberechtigungen finden Sie unter Berechtigungstypen. Weitere Informationen zu diesen Berechtigungen finden Sie in der Berechtigungsreferenz.
Berechtigungstyp
Berechtigungen mit den geringsten Berechtigungen
Berechtigungen mit höheren Berechtigungen
Delegiert (Geschäfts-, Schul- oder Unikonto)
EduAssignments.ReadWrite
Nicht verfügbar.
Delegiert (persönliches Microsoft-Konto)
Nicht unterstützt
Nicht unterstützt
Anwendung
EduAssignments.ReadWrite.All
Nicht verfügbar.
HTTP-Anforderung
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)