Request
Use the result
isPassed uses that attempt’s passing score; the quiz’s current setting may have changed. Equal creation timestamps need manual tie resolution.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
{
courseById(courseId: "22222222-2222-4222-8222-222222222222") {
id name
modules { contents {
id name variantData {
__typename
... on CourseModuleContentQuiz {
passingScore
attempts { id createdOn completedOn score isPassed student { id email } }
}
}
} }
}
}
{
"data": {
"courseById": {
"id": "22222222-2222-4222-8222-222222222222",
"name": "Drawing Essentials",
"modules": [
{
"contents": [
{
"id": "77777777-7777-4777-8777-777777777777",
"name": "Drawing basic shapes",
"variantData": {
"__typename": "CourseModuleContentVideoLesson"
}
},
{
"id": "99999999-9999-4999-8999-999999999999",
"name": "Check your understanding",
"variantData": {
"__typename": "CourseModuleContentQuiz",
"passingScore": 80,
"attempts": [
{
"id": "99999999-9999-4999-8999-999999999999",
"createdOn": 1788220800000,
"completedOn": 1788224400000,
"score": 100,
"isPassed": true,
"student": {
"id": "33333333-3333-4333-8333-333333333333",
"email": "student@example.com"
}
}
]
}
}
]
}
]
}
}
}
Compare completed quiz attempts and latest results by Student.
{
courseById(courseId: "22222222-2222-4222-8222-222222222222") {
id name
modules { contents {
id name variantData {
__typename
... on CourseModuleContentQuiz {
passingScore
attempts { id createdOn completedOn score isPassed student { id email } }
}
}
} }
}
}
{
"data": {
"courseById": {
"id": "22222222-2222-4222-8222-222222222222",
"name": "Drawing Essentials",
"modules": [
{
"contents": [
{
"id": "77777777-7777-4777-8777-777777777777",
"name": "Drawing basic shapes",
"variantData": {
"__typename": "CourseModuleContentVideoLesson"
}
},
{
"id": "99999999-9999-4999-8999-999999999999",
"name": "Check your understanding",
"variantData": {
"__typename": "CourseModuleContentQuiz",
"passingScore": 80,
"attempts": [
{
"id": "99999999-9999-4999-8999-999999999999",
"createdOn": 1788220800000,
"completedOn": 1788224400000,
"score": 100,
"isPassed": true,
"student": {
"id": "33333333-3333-4333-8333-333333333333",
"email": "student@example.com"
}
}
]
}
}
]
}
]
}
}
}
{
courseById(courseId: "22222222-2222-4222-8222-222222222222") {
id name
modules { contents {
id name variantData {
__typename
... on CourseModuleContentQuiz {
passingScore
attempts { id createdOn completedOn score isPassed student { id email } }
}
}
} }
}
}
{
"data": {
"courseById": {
"id": "22222222-2222-4222-8222-222222222222",
"name": "Drawing Essentials",
"modules": [
{
"contents": [
{
"id": "77777777-7777-4777-8777-777777777777",
"name": "Drawing basic shapes",
"variantData": {
"__typename": "CourseModuleContentVideoLesson"
}
},
{
"id": "99999999-9999-4999-8999-999999999999",
"name": "Check your understanding",
"variantData": {
"__typename": "CourseModuleContentQuiz",
"passingScore": 80,
"attempts": [
{
"id": "99999999-9999-4999-8999-999999999999",
"createdOn": 1788220800000,
"completedOn": 1788224400000,
"score": 100,
"isPassed": true,
"student": {
"id": "33333333-3333-4333-8333-333333333333",
"email": "student@example.com"
}
}
]
}
}
]
}
]
}
}
}
const course = response.data.courseById;
const rows = course.modules.flatMap(module => module.contents).flatMap(content => {
const quiz = content.variantData;
if (quiz?.__typename !== "CourseModuleContentQuiz") return [];
const latest = new Map();
for (const attempt of quiz.attempts) {
const previous = latest.get(attempt.student.id);
if (!previous || attempt.createdOn > previous.createdOn) latest.set(attempt.student.id, attempt);
}
const completed = [...latest.values()].filter(attempt => attempt.completedOn !== null);
const passing = completed.filter(attempt => attempt.isPassed);
return [{
contentId: content.id, quiz: content.name, studentsWithAttempts: latest.size,
studentsWithCompletedLatestAttempt: completed.length, studentsPassed: passing.length,
passRate: completed.length ? passing.length / completed.length : null
}];
});
isPassed uses that attempt’s passing score; the quiz’s current setting may have changed. Equal creation timestamps need manual tie resolution.Was this page helpful?
