CreateAssignmentSubmission
Creates an assignment submission. This is used when user works on a manually graded assessment, the assessment attempt will be associated with the assignment submission. The results of this mutation can be affected by providing an authToken header to set a user for the operation.
CreateAssignmentSubmission(
body: String
videoAsset: String
asset: String
quizAttempt: ID
assignment: ID
course: ID!
): AssignmentSubmission!
Directives
authAccess
This requires the current user to be in
STUDENT
role.
Arguments
CreateAssignmentSubmission.body
● String
scalar
The body of the assignment submission.
CreateAssignmentSubmission.videoAsset
● String
scalar
The URL of the video asset.
CreateAssignmentSubmission.asset
● String
scalar
The URL of the asset.
CreateAssignmentSubmission.quizAttempt
● ID
scalar
The ID of the assessment attempt.
CreateAssignmentSubmission.assignment
● ID
scalar
The ID of the assignment.
CreateAssignmentSubmission.course
● ID!
non-null scalar
The ID of the course.
Type
AssignmentSubmission
object
Examples
Query:
CreateAssignmentSubmission(
$body: String,
$videoAsset: String,
$asset: String,
$quizAttempt: ID,
$assignment: ID,
$course: ID!
) {
CreateAssignmentSubmission(
body: $body,
videoAsset: $videoAsset,
asset: $asset,
quizAttempt: $quizAttempt,
assignment: $assignment,
course: $course
) {
id
assignment {
...AssignmentFragment
}
courseId
course {
...CourseFragment
}
user {
...UserFragment
}
asset
additionalAsset
videoAsset
body
commentsCount
numericGrade
grade
gradeFeedback
createdAt
updatedAt
quizAttempt {
...AssessmentAttemptFragment
}
adminUpdatedGrade
}
}
Variables:
{
"body": "xyz789",
"videoAsset": "xyz789",
"asset": "abc123",
"quizAttempt": "58ccb96c-8e90-4464-86e0-f284442981df",
"assignment": "58ccb96c-8e90-4464-86e0-f284442981df",
"course": "58ccb96c-8e90-4464-86e0-f284442981df"
}
Response:
{
"data": {
"CreateAssignmentSubmission": {
"id": "58ccb96c-8e90-4464-86e0-f284442981df",
"assignment": "Assignment",
"courseId": "course-1",
"course": "course-1",
"user": "User",
"asset": "URL",
"additionalAsset": "URL",
"videoAsset": "abc123",
"body": "abc123",
"commentsCount": 678,
"numericGrade": 236.56,
"grade": "completed",
"gradeFeedback": "xyz789",
"createdAt": "2023-12-20T16:58:58.782Z",
"updatedAt": "2023-12-20T16:58:58.782Z",
"quizAttempt": "AssessmentAttempt",
"adminUpdatedGrade": false
}
}
}