πŸ““

Add resources

Add resources using Airlock API

πŸ§‘β€πŸš€
The goal of this milestone is to automate content synchronization between your LMS and our AMS using the Airlock API, and to fully populate at least one Course Library.

Fetch information

Fetch information about your courses. This information will be used for content population purposes and compliance monitoring.

query {
	courses {
		id
		name
		workload
		workloadRequired
		generalSubmitted
		publicationReviewedSubmitted
		publicationReviewedRequired
		meetingSubmitted
		meetingRequired
		assignmentSubmitted
		assignmentRequired
		assignmentSummativeSubmitted
		assignmentSummativeRequired
		weights {
			id
			name
			percentage
		}
	}
}

Submit resources

Submit necessary resources for each category, upload or import their assets, and ensure that a total workload of all resources exceeds the required amount.

⚠️
You can link a resource with its ID on your platform using an externalId property. This way, you can use your ID instead of ours.

You can use a workload property to specify a required amount of time, in minutes, for each resource to be completed. If workload is not specified, a default value defined by our accreditation team for a category will apply.

Assignments must be connected to their grade weights. You must use the weightIds property to assign them.

mutation {
	# adding general resource
	addResource(
		courseId: $courseId
		resource: {
			name: "resource topic or video name"
			kind: GENERAL
			content: $content # content rendered in the LMS using markup if any
			assets: [{
				fileName: $fileName
				contentType: $contentType
				# if you provide a URL, we will automatically fetch an asset. Otherwise, we will return a signed URL and headers so you can upload it yourself.
				url: "https://cdn.example/asset1.ext"
			}]
			workload: $minutes
			externalId: $exteranlId
		}
	) {
		resource { id }
		assets { 
			headers
      uploadUrl
		}
	}
}
mutation {
	# adding publication resource
	addResource(
		courseId: $courseId
		resource: {
			name: "publication title or topic"
			kind: PUBLICATION
			assets: [{
				fileName: $fileName
				contentType: $contentType
				# if you provide a URL, we will automatically fetch an asset. Otherwise, we will return a signed URL and headers so you can upload it yourself.
				url: "https://cdn.example/asset1.ext"
			}]
			workload: $minutes
			externalId: $exteranlId
		}
	) {
		resource { id }
		assets { 
			headers
      uploadUrl
		}
	}
}
mutation {
	# adding peer-reviewed publication
	addResource(
		courseId: $courseId
		resource: {
			name: "publication title or topic"
			kind: PUBLICATION_REVIEWED
			assets: [{
				fileName: $fileName
				contentType: $contentType
				# if you provide a URL, we will automatically fetch an asset. Otherwise, we will return a signed URL and headers so you can upload it yourself.
				url: "https://cdn.example/asset1.ext"
			}]
			workload: $minutes
			externalId: $exteranlId
		}
	) {
		resource { id }
		assets { 
			headers
      uploadUrl
		}
	}
}
mutation {
	# adding meeting
	addResource(
		courseId: $courseId
		resource: {
			name: "meeting topic"
			kind: MEETING
			workload: $minutes
			externalId: $exteranlId
		}
	) {
		resource { id }
		assets { 
			headers
      uploadUrl
		}
	}
}
mutation {
	# adding assignment
	addResource(
		courseId: $courseId
		resource: {
			name: "assignment topic"
			kind: ASSIGNMENT
			content: $content
			assets: [{
				fileName: $fileName
				contentType: $contentType
				# if you provide a URL, we will automatically fetch an asset. Otherwise, we will return a signed URL and headers so you can upload it yourself.
				url: "https://cdn.example/asset1.ext"
			}]
			workload: $minutes
			externalId: $exteranlId
		}
	) {
		resource { id }
		assets { 
			headers
      uploadUrl
		}
	}
}
mutation {
	# adding summative assessment
	addResource(
		courseId: $courseId
		resource: {
			name: "examination topic or project name"
			kind: ASSIGNMENT_SUMMARIVE
			content: $content
			assets: [{
				fileName: $fileName
				contentType: $contentType
				# if you provide a URL, we will automatically fetch an asset. Otherwise, we will return a signed URL and headers so you can upload it yourself.
				url: "https://cdn.example/asset1.ext"
			}]
			workload: $minutes
			externalId: $exteranlId
		}
	) {
		resource { id }
		assets { 
			headers
      uploadUrl
		}
	}
}

The addResource and modifyResource methods include an assets property that allows you to attach files such as videos, audios, and PDFs. This property accepts an array with metadata about files you want to upload. If you provide a fileName and contentType of a file, our system will return a signed URL and headers that you can use to upload the files on your side. However, if you also provide a url property, our system will automatically import a file from that URL.

The assets import is fully asynchronous. Therefore, you need to subscribe to the IMPORTED_ASSET event using webhooks to monitor when the import is completed.

In case you need to upload long videos such as meetings recording, you can split them into chunks and upload as HTTP Live Streaming (HLS) playlists. Please note that we only support flat playlists.

Resource Modification Rules

  • Colleges can modify resources in any status, except those labeled as β€œArchived”.
  • If a college modifies a verified resource, it will lose its verified status, revert back to a draft, and be sent to Woolf for verification again.
  • The kind of verified resource can only be changed by the Woolf team and only in rare cases.
  • Once a course has started, colleges can only make minor corrections and rephrasing that do not affect the meaning or workload of resources.
  • If a college makes significant changes to resources in an active course, such as modifying assignment tasks, questions, or publications, or adding/removing content, they must archive the old resource and create a new one. This is important to prevent any problems with learning activity records.
⚠️
Please keep in mind that if a resource is archived or rejected, students can not consume it anymore. If students has already consumed a resource and it gets archived, it will still count towards their progress. If a student has already consumed a resource and it gets rejected, it will not count towards their progress.

Monitor compliance

To monitor your course compliance, use the "Submitted" and "Required" values of each resource category in the course or courses queries. Make sure that all counters exceed their related minimum values.

Integrate the REJECTED_RESOURCE event using webhooks to monitor rejections for each submitted resource in real-time.