CreateAssessmentAttempt
Creates an assessment attempt for a course assessment. This is used to create a super quiz attempt with user's selected questions. The results of this mutation can be affected by providing an authToken header to set a user for the operation.
CreateAssessmentAttempt(
topicId: ID!
courseId: ID!
questions: [QuestionInput!]!
): AssessmentAttempt!
Directives
authAccess
This requires the current user to be in
MANAGER
role.
Arguments
CreateAssessmentAttempt.topicId
● ID!
non-null scalar
The ID of the topic.
CreateAssessmentAttempt.courseId
● ID!
non-null scalar
The ID of the course.
CreateAssessmentAttempt.questions
● [QuestionInput!]!
non-null input
The questions user selected for super quiz.
Type
AssessmentAttempt
object
Examples
Query:
CreateAssessmentAttempt(
$topicId: ID!,
$courseId: ID!,
$questions: [QuestionInput!]!
) {
CreateAssessmentAttempt(
topicId: $topicId,
courseId: $courseId,
questions: $questions
) {
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:
{
"topicId": "58ccb96c-8e90-4464-86e0-f284442981df",
"courseId": "58ccb96c-8e90-4464-86e0-f284442981df",
"questions": [
"QuestionInput"
]
}
Response:
{
"data": {
"CreateAssessmentAttempt": {
"id": "58ccb96c-8e90-4464-86e0-f284442981df",
"assessment": "Assessment",
"answers": [
"AssessmentAnswer"
],
"course": "course-1",
"courseId": "course-1",
"user": "User",
"createdAt": "2024-06-20T16:58:58.782Z",
"updatedAt": "2024-06-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": true
}
}
}