Learning Paths
Learning Paths is Administrate's feature for designing and creating a learning journey for your students. Our support documentation contains an in-depth introduction.
Search
The following example fetches the first page of published Learning Paths whose name
contains first aid
:
Example
query {
learningPaths(
filters:[
{field: lifecycleState, operation: eq, value: "published"}
{field: name, operation: like, value: "%first aid%"}
]
){
edges{
node{
id
code
name
description
}
}
}
}
For the full range of available filters see the LearningPathField API Reference.
Create
The following example creates a new Learning Path with the specified code and title:
Example
mutation{
learningPaths{
create(input:{
code: "ABC-123"
name: "New Learning Path"
}) {
learningPath{
id
lifecycleState
}
errors{
label
message
value
}
}
}
}
For the full range of available create parameters see the LearningPathCreateInput API Reference.
The response shows that the new Learning Path lifecycle state is draft
:
{
"data": {
"learningPaths": {
"create": {
"learningPath": {
"id": "TGVhcm5pbmdQYXRoOjE=",
"lifecycleState": "draft"
},
"errors": []
}
}
}
}
Update
For the full range of available update parameters see the LearningPathUpdateInput API Reference.
Publish
The following example publishes the Learning Path by updating its lifecycleState
to active
:
Example
mutation{
learningPaths{
update(input:{
learningPathId: "TGVhcm5pbmdQYXRoOjE="
lifecycleState: active
}) {
learningPath{
id
lifecycleState
}
errors{
label
message
value
}
}
}
}
Archive
Replace active
with archived
in the above example.
Objectives
A Learning Path will define several objectives that a Learner must complete in order to complete the path. The following example defines a Course, an Event and an External Activity objective on a Learning Path:
Example
mutation{
learningPaths{
update(
input:{
learningPathId: "TGVhcm5pbmdQYXRoOjE="
learningObjectives:[
{
type: course
courseTemplateId: "Q291cnNlVGVtcGxhdGU6MTE="
},
{
type: event
eventId:"Q291cnNlOjE="
},
{
type: external,
name: "Complete Survey"
description: "The description will contain the survey external URL"
}
]
}) {
learningPath{
id
learningObjectives{
edges{
node{
id
__typename
... on EventObjective{
event{
id
code
}
}
... on CourseObjective{
courseTemplate{
id
code
}
}
... on ExternalObjective{
name
description
}
}
}
}
}
errors{
label
message
value
}
}
}
}
Learner Registration
Learners can be added to a published Learning Path as
- named learners, when the identity of the person attending the training is known at the point of registration
- unnamed learners, to book and and invoice for a number of places on a Learning Path without knowing the attendee's identity in advance
The below examples cover the basics, there are many options that can be specified when registering Learners onto a Learning Path (such as pricing info). For a full specification, see our LearningPathLearnerRegistrationInput API Reference.
Named
Named learners can be registered like in the following example which
- registers 2 contacts on the learning path
- specifies an optional event for a course objective for the 2nd learner
Example
mutation {
learningPaths{
registerLearners(
input:{
learningPathId: "TGVhcm5pbmdQYXRoOjE="
learners:[
{ contactId:"UGVyc29uOjM2" }
{
contactId:"UGVyc29uOjI=",
selectedEvents:[
{
courseObjectiveId:"TGVhcm5pbmdPYmplY3RpdmU6MQ=="
eventId:"Q291cnNlOjE="
}
]}
]
}
) {
errors{
label
message
value
}
learners{
id
contact{
id
personalName{
name
}
}
isActive
}
}
}
}
The following example response shows the learners are now active:
{
"data": {
"learningPaths": {
"registerLearners": {
"errors": [],
"learners": [
{
"id": "TGVhcm5pbmdQYXRoTGVhcm5lcjox",
"contact": {
"id": "UGVyc29uOjM2",
"personalName": {
"name": "Jane Green"
}
},
"isActive": true
},
{
"id": "TGVhcm5pbmdQYXRoTGVhcm5lcjoy",
"contact": {
"id": "UGVyc29uOjI=",
"personalName": {
"name": "Jack Black"
}
},
"isActive": true
}
]
}
}
}
}
Unnamed
To register unnamed learners, the same mutation can be executed where bookingContactId
and quantity
are specified instead of contactId
:
Example
mutation {
learningPaths{
registerLearners(
input:{
learningPathId: "TGVhcm5pbmdQYXRoOjE="
learners:[
{
bookingContactId:"UGVyc29uOjM2",
quantity: 3
}
]
}
) {
errors{
label
message
value
}
learners{
id
contact{
id
}
isActive
}
}
}
}
The response's contact
will be null
:
{
"data": {
"learningPaths": {
"registerLearners": {
"errors": [],
"learners": [
{
"id": "TGVhcm5pbmdQYXRoTGVhcm5lcjoz",
"contact": null,
"isActive": true,
}
]
}
}
}
}
You can then later associate unnamed learners with specific contacts once the identity of the attendees is known. Given the previous example created 3 unnamed learners, we can associate 2 of them to TMS Contacts, leaving 1 learner still unnamed:
Example
mutation{
learningPaths{
associateUnnamedWithContacts(
input:{
learningPathLearnerId: "TGVhcm5pbmdQYXRoTGVhcm5lcjoz"
contactIds: ["UGVyc29uOjM=", "UGVyc29uOjM1"]
}
){
errors{
label
message
value
}
learners{
id
contact{
id
personalName{
name
}
}
isActive
}
}
}
}
The response contains the learners that are now named.
{
"data": {
"learningPaths": {
"associateUnnamedWithContacts": {
"errors": [],
"learners": [
{
"id": "TGVhcm5pbmdQYXRoTGVhcm5lcjo0",
"contact": {
"id": "UGVyc29uOjM=",
"personalName": {
"name": "James Tod"
}
},
"isActive": true
},
{
"id": "TGVhcm5pbmdQYXRoTGVhcm5lcjo1",
"contact": {
"id": "UGVyc29uOjM1",
"personalName": {
"name": "Test User"
}
},
"isActive": true
}
]
}
}
}
}
Fulfil Course Objectives
A specific Learner registered on a Learning Path will complete a Course Objective if they complete an Event for that Course Template. In order for them to access the Objective via our LMS API and for progress to be recorded, the Course objective will have to be fulfilled by selecting a specific event.
The below example fulfils a specific Course Objective for this learner with the specified Event ID:
Example
mutation{
learningPaths{
fulfilObjective(input:{
learningPathLearnerId:"TGVhcm5pbmdQYXRoTGVhcm5lcjox"
objectiveId:"TGVhcm5pbmdPYmplY3RpdmU6MQ=="
eventId:"Q291cnNlOjE="
}) {
learner{
id
}
errors{
label
message
value
}
}
}
}
This can also be specified at the point of registration like the previous example for Named Learners.
Learner Progress
Given a Learning Path with a number of Learning Objectives, a Learner will be assigned a number of Learning Outcomes, one for each objective. The Learner will have to complete each Learning Outcome in order to complete the Learning Path.
The recording of progress and completion for each Outcome is handled by our LMS API.
Learning Path progress is automatically tracked when the Learner is recorded as "passed" on each Event corresponding to their Learning Outcomes. For more information, see our Event auto-pass and achievement documentation and our Events Developer documentation
The two mutations mentioned below are for manually overriding a Learning Path Outcome as completed irrespective of the Learner's progress on the associated Events.
Mark Outcome as complete
A Learning Outcome for a specific Learner can be marked as completed with the following query
Example
mutation{
learningPaths{
setOutcomeIsCompleted(input:{
learningOutcomeId:"TGVhcm5pbmdPdXRjb21lOjQ="
isCompleted: true
}) {
learningOutcome{
id
isCompleted
}
errors{
label
message
value
}
}
}
}
The response will confirm its completed status:
{
"data": {
"learningPaths": {
"setOutcomeIsCompleted": {
"learningOutcome": {
"id": "TGVhcm5pbmdPdXRjb21lOjQ=",
"isCompleted": true
},
"errors": []
}
}
}
}
Mark Objective as complete
Bulk-completion of a specific Objective for a number of Learners can also be set with the following query
Example
mutation{
learningPaths{
setObjectiveCompletionForLearners(input:{
objectiveId: "TGVhcm5pbmdPYmplY3RpdmU6MQ=="
learningPathLearnerIds: [
"TGVhcm5pbmdQYXRoTGVhcm5lcjoy"
]
isCompleted: true
}) {
learningOutcomes{
id
isCompleted
learningPathLearner{
contact{
personalName{
name
}
}
}
}
errors{
label
message
value
}
}
}
}
The response will contain details of all the Outcomes that have been updated:
{
"data": {
"learningPaths": {
"setObjectiveCompletionForLearners": {
"learningOutcomes": [
{
"id": "TGVhcm5pbmdPdXRjb21lOjQ=",
"isCompleted": true,
"learningPathLearner": {
"contact": {
"personalName": {
"name": "Jenna Black"
}
}
}
}
],
"errors": []
}
}
}
}