LoadAssessmentAttemptWithQuestions
Returns an existing or new assessment attempt with questions. This is used when user starts a new assessment attempt, or resumes from an in-progress assessment attempt. The results of this query can be affected by providing an authToken header to set a user for the operation.
LoadAssessmentAttemptWithQuestions(
id: ID!
shouldShuffleAndSubset: Boolean
courseId: ID
linkedWorkbook: ID
linkedWorkbookId: ID
instructorAssessmentUser: ID
instructorAssessmentUserId: ID
topicType: AssessmentTopicType!
assessmentAttemptId: ID
): AssessmentAttempt!
Directives
authAccess
This requires the current user to be in
STUDENT
role.
Arguments
LoadAssessmentAttemptWithQuestions.id
● ID!
non-null scalar
The ID of the Topic.
LoadAssessmentAttemptWithQuestions.shouldShuffleAndSubset
● Boolean
scalar
Flag to randomly order questions and choose a subset of questions to use.
LoadAssessmentAttemptWithQuestions.courseId
● ID
scalar
The ID of the course.
LoadAssessmentAttemptWithQuestions.linkedWorkbookId
● ID
scalar
The ID of the linked workbook.
LoadAssessmentAttemptWithQuestions.instructorAssessmentUserId
● ID
scalar
The ID of the user on behalf of whom the instructor takes the assessment.
LoadAssessmentAttemptWithQuestions.topicType
● AssessmentTopicType!
non-null enum
The type of the Topic.
LoadAssessmentAttemptWithQuestions.assessmentAttemptId
● ID
scalar
The ID of the in-progress assessment attempt to resume from.
Type
AssessmentAttempt
object
Examples
Query:
LoadAssessmentAttemptWithQuestions(
$id: ID!,
$shouldShuffleAndSubset: Boolean,
$courseId: ID,
$linkedWorkbook: ID,
$linkedWorkbookId: ID,
$instructorAssessmentUser: ID,
$instructorAssessmentUserId: ID,
$topicType: AssessmentTopicType!,
$assessmentAttemptId: ID
) {
LoadAssessmentAttemptWithQuestions(
id: $id,
shouldShuffleAndSubset: $shouldShuffleAndSubset,
courseId: $courseId,
linkedWorkbook: $linkedWorkbook,
linkedWorkbookId: $linkedWorkbookId,
instructorAssessmentUser: $instructorAssessmentUser,
instructorAssessmentUserId: $instructorAssessmentUserId,
topicType: $topicType,
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:
{
"id": "58ccb96c-8e90-4464-86e0-f284442981df",
"shouldShuffleAndSubset": false,
"courseId": "58ccb96c-8e90-4464-86e0-f284442981df",
"linkedWorkbook": "58ccb96c-8e90-4464-86e0-f284442981df",
"linkedWorkbookId": "58ccb96c-8e90-4464-86e0-f284442981df",
"instructorAssessmentUser": "58ccb96c-8e90-4464-86e0-f284442981df",
"instructorAssessmentUserId": "58ccb96c-8e90-4464-86e0-f284442981df",
"topicType": "quiz",
"assessmentAttemptId": "58ccb96c-8e90-4464-86e0-f284442981df"
}
Response:
{
"data": {
"LoadAssessmentAttemptWithQuestions": {
"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": "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": false,
"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
}
}
}