Skip to main content

MergeAssessmentAttemptIntoComplete

Merges an assessment attempt into the last completed assessment attempt. This is used after user finishes reviewing the unanswered questions, the current assessment attempt will be merged to the last completed assessment attempt. The results of this mutation can be affected by providing an authToken header to set a user for the operation.

MergeAssessmentAttemptIntoComplete(
completedAssessmentAttemptId: ID!
assessmentAttemptId: ID!
): AssessmentAttempt!

Directives

authAccess

This requires the current user to be in STUDENT role.

Arguments

MergeAssessmentAttemptIntoComplete.completedAssessmentAttemptId ● ID! non-null scalar

The ID of the last completed assessment attempt.

MergeAssessmentAttemptIntoComplete.assessmentAttemptId ● ID! non-null scalar

The ID of the assessment attempt.

Type

AssessmentAttempt object

Examples

Run in Postman

Query:

MergeAssessmentAttemptIntoComplete(
$completedAssessmentAttemptId: ID!,
$assessmentAttemptId: ID!
) {
MergeAssessmentAttemptIntoComplete(
completedAssessmentAttemptId: $completedAssessmentAttemptId,
assessmentAttemptId: $assessmentAttemptId
) {
id
assessment {
...AssessmentFragment
}
answers {
...AssessmentAnswerFragment
}
course {
...CourseFragment
}
courseId
user {
...UserFragment
}
createdAt
updatedAt
timeElapsedInSeconds
status
grade
originalGrade
passed
assignmentSubmissionId
questions {
...QuizQuestionFragment
}
topicType
forgiven
topic {
...TopicFragment
}
topicId
correctQuestionsCount
answeredQuestionsCount
unansweredQuestionsCount
questionsWithChoicesCount
poolLabelByQuestionId
linkedWorkbook
adminUpdatedGrade
}
}

Variables:

{
"completedAssessmentAttemptId": "58ccb96c-8e90-4464-86e0-f284442981df",
"assessmentAttemptId": "58ccb96c-8e90-4464-86e0-f284442981df"
}

Response:

{
"data": {
"MergeAssessmentAttemptIntoComplete": {
"id": "58ccb96c-8e90-4464-86e0-f284442981df",
"assessment": "Assessment",
"answers": [
"AssessmentAnswer"
],
"course": "course-1",
"courseId": "course-1",
"user": "User",
"createdAt": "2023-12-20T16:58:58.782Z",
"updatedAt": "2023-12-20T16:58:58.782Z",
"timeElapsedInSeconds": 678,
"status": "started",
"grade": 678,
"originalGrade": 678,
"passed": false,
"assignmentSubmissionId": "58ccb96c-8e90-4464-86e0-f284442981df",
"questions": [
"QuizQuestion"
],
"topicType": "ad",
"forgiven": true,
"topic": "Topic",
"topicId": "58ccb96c-8e90-4464-86e0-f284442981df",
"correctQuestionsCount": 678,
"answeredQuestionsCount": 678,
"unansweredQuestionsCount": 678,
"questionsWithChoicesCount": 678,
"poolLabelByQuestionId": "{}",
"linkedWorkbook": "58ccb96c-8e90-4464-86e0-f284442981df",
"adminUpdatedGrade": false
}
}
}