Courses

Instructors can create courses. When an instructor creates a course, the course is associated to the instructor's institution.

Courses always have exactly one institution.

Course participants

Course Participants are a roster of instructors and students in a course. When an instructor adds them through the course's s participants page, they will be a course participant. If they're not already an Institution participant, they'll also be linked to the institution the course belongs to.

Participants can be one type in a course: Owner, Instructor, Student, or Assistant

Querying

Listing (inside institution)

Query
Response
Query
{
institution {
courses {
edges {
node {
id
title
flows {
title
}
}
}
}
}
}
Response
{
"data": {
"institution": {
"courses": {
"edges": [
{
"node": {
"id": "00000000-5945-95c7-65fc-a9747b200320",
"title": "Onboarding (New Employees)",
"flows": [
{
"title": "Root flow"
},
{
"title": "Corporate Culture"
},
{
"title": "Paper in the 2000's"
}
]
}
},
{
"node": {
"id": "00000000-5945-95c7-65fc-a9747b200317",
"title": "History of Dunder-Mifflin",
"flows": [
{
"title": "Welcome to History of Dunder-Mifflin"
},
{
"title": "Founding a Company"
}
]
}
}
]
}
}
}
}

via ID

Query
Response
Query
{
course(id: "00000000-5945-95c7-65fc-a9747b300320") {
id
title
flows {
title
}
}
}
Response
{
"data": {
"course": {
"id": "00000000-5945-95c7-65fc-a9747b200320",
"title": "Onboarding (New Employees)",
"flows": [
{
"title": "Root flow"
},
{
"title": "Corporate Culture"
},
{
"title": "Paper in the 2000's"
}
]
}
}
}

Mutations

Inviting participants

You can invite Instructors and Students (learners) via addCourseParticipants

Query
Response
Query
mutation {
addCourseParticipants(
courseId: "00000000-5945-95c7-65fc-a9747b200311",
inviteNow: true,
invitees: [
{name: "Thomas Smith", email: "[email protected]"}
],
participantType: Student
) {
newParticipants {
id
participantType
participantStatus
user {
name
}
}
}
}
Response
{
"data": {
"addCourseParticipants": {
"newParticipants": [
{
"id": "UGFydGljaXBhbnQ6OTYyOGYwNGYtNjMyZi00YTZhLWEwMTItMjdkZWZlZTMwNTIv",
"participantType": "Student",
"participantStatus": "INVITATION_PENDING",
"user": {
"name": "Thomas Smith"
}
}
]
}
}
}