Eduflow
  • Welcome
  • API Reference
  • API Explorer
  • Getting started
    • API Overview
    • Authentication
    • Usage
  • GraphQL at Eduflow
    • Introduction to GraphQL
    • Variables
    • Fragments
    • Paginating queries
    • Inline fragments
  • Guides
    • Institutions
    • Courses
    • Flows and Activities
    • Reviews and Reflections
    • Discussions
    • Quizzes
    • Users & Participants
    • Tags
    • Course summary (outputs)
    • vs Peergrade
  • API Changelog
Powered by GitBook
On this page
  • Querying
  • Mutations

Was this helpful?

  1. Guides

Courses

PreviousInstitutionsNextFlows and Activities

Last updated 2 years ago

Was this helpful?

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

Courses always have exactly one .

Course participants

Course 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

Invite links

The invite link for learners can be . In the example below they are queryable via joinUrl.

Querying

Listing (inside institution)

{
  institution {
    courses {
      edges {
        node {
          id
          title
          joinUrl
          flows {
            title
          }
        }
      }
    }
  }
}
{
  "data": {
    "institution": {
      "courses": {
        "edges": [
          {
            "node": {
              "id": "00000000-5945-95c7-65fc-a9747b200320",
              "title": "Onboarding (New Employees)",
              "joinUrl": "https://app.eduflow.com/join/ZM2MNV",
              "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",
              "joinUrl": "https://app.eduflow.com/course/9813-onboarding-new-employeees",
              "flows": [
                {
                  "title": "Welcome to History of Dunder-Mifflin"
                },
                {
                  "title": "Founding a Company"
                }
              ]
            }
          }
        ]
      }
    }
  }
}

via ID

{
  course(id: "00000000-5945-95c7-65fc-a9747b300320") {
    id
    title
    joinUrl
    flows {
      title
    }
  }
}
{
  "data": {
    "course": {
      "id": "00000000-5945-95c7-65fc-a9747b200320",
      "title": "Onboarding (New Employees)",
      "joinUrl": "https://app.eduflow.com/join/ZM2MNV",
      "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

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

Invite participants: Invite links

Invitation links and embed (a.k.a magic links) can be accessed through the Participant response object:

mutation {
  addCourseParticipants(
    courseId: "00000000-5945-95c7-65fc-a9747b200311", 
    inviteNow: false, 
    invitees: [
      {name: "Thomas Smith", email: "sthomas@youruniversity.edu"}
    ],
    participantType: Student
  ) {
    newParticipants {
      id
      participantType
      participantStatus
      user {
        name
      }
      invitationLink
      embedLoginLink
    }
  }
}
{
  "data": {
    "addCourseParticipants": {
      "newParticipants": [
        {
          "id": "5a7fdd2c-47d4-4a7f-8576-a640938e5574",
          "participantType": "Student",
          "participantStatus": "INVITATION_PENDING",
          "user": {
            "name": "Thomas Smith"
          },
          "invitationLink": "https://app.eduflow.com/join-from-email?userId=5a7fdd2c-47d4-4a7f-8576-a640938e5574&courseId=00000000-5945-95c7-65fc-a9747b200311&token=ezJ1c2VyX2lkIjoiNWE3ZmRkMmMtNDdkNC00YTdmLTg1NzYtYTY0MDkzOGU1YTc0In0.Mr15Hg.6CbxV2GGVNeKWc4C0xTn6CYTtm0",
          "embedLoginLink": "https://app.eduflow.com/join-from-email?userId=5a7fdd2c-47d4-4a7f-8576-a640938e5574&courseId=00000000-5945-95c7-65fc-a9747b200311&token=ezJ1c2VyX2lkIjoiNWE3ZmRkMmMtNDdkNC00YTdmLTg1NzYtYTY0MDkzOGU1YTc0In0.Mr15Hg.6CbxV2GGVNeKWc4C0xTn6CYTtm0&skip_signup=1"
        }
      ]
    }
  }
}
  • invitationLink: Will prompt user to create a password

  • embedLoginLink: "Magic link", takes user directly to to course

Removing participants

You can remove participants from course by email via removeCourseParticipants

Course owner and institution owner cannot be removed from course and will be ignored.

mutation {
  removeCourseParticipants(
    courseId: "00000000-5945-95c7-65fc-a9747b200311", 
    participantEmails: ["sthomas@youruniversity.edu"]
  ) {
    removedUsers {
      name
      email
    }
    course {
      title
    }
  }
}
{
  "data": {
    "removeCourseParticipants": {
      "removedUsers": [{
        "name": "Thomas Smith",
        "email": "sthomas@youruniversity.edu",
      }],
      "course": {
        "title": "Onboarding (New Employees)"
      }
    }
  }
}
institution
Participants
configured through the course participants page