LoadAssessmentAttemptsByTopicOrCourse
Returns assessment attempts by course and/or topic for the current user. The results of this query can be affected by providing an authToken header to set a user for the operation.
LoadAssessmentAttemptsByTopicOrCourse(
topicId: ID
courseId: ID
): [AssessmentAttempt!]!
Directives
authAccess
This requires the current user to be in
STUDENT
role.
Arguments
LoadAssessmentAttemptsByTopicOrCourse.topicId
● ID
scalar
LoadAssessmentAttemptsByTopicOrCourse.courseId
● ID
scalar
Type
AssessmentAttempt
object
Examples
Query:
LoadAssessmentAttemptsByTopicOrCourse(
$topicId: ID,
$courseId: ID
) {
LoadAssessmentAttemptsByTopicOrCourse(
topicId: $topicId,
courseId: $courseId
) {
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"
}
Response:
{
"data": {
"LoadAssessmentAttemptsByTopicOrCourse": [
{
"id": "58ccb96c-8e90-4464-86e0-f284442981df",
"assessment": "Assessment",
"answers": [
"AssessmentAnswer"
],
"course": "Course",
"courseId": "58ccb96c-8e90-4464-86e0-f284442981df",
"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": 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
}
]
}
}