How to add PENS support to your authoring tool
So you’re ready to bring one-click publishing to your authoring tool. There are a few steps to take, and we’re going to lay the groundwork for you here.
Here’s what you’ll need to get PENS implemented with your authoring tool:
- The desire to make your authoring tool easier to use
- A software developer
- A staging server
- The code to send and receive PENS communications, detailed below
- The location of the PENS system you’ll target, for example SCORM Cloud. (Have an LMS in mind that doesn’t support PENS yet? Send them here to get started.)
1. Upload to your staging server
The nature of how PENS works means that you’ll need a temporary place to store your content that can be accessed by the target LMS over the internet. The first step behind a “publish” button in your authoring tool will involve packaging and uploading the content to the staging server.
2. Send PENS collect command
After your content is on your staging server, you’ll need to send an HTTP request to the target LMS. This HTTP request can be a POST or GET request, and will tell the LMS what it needs to know about your content. The perfect place to get started with this code is our PENS request example code on Github.The LMS will then download your content.
3. Listen to the results
From here, there will be some communication sent back from the target LMS, to alert you to any errors or to confirm that everything went as planned. These “receipt” and “alert” locations can either be traditional URLs that point to a page you host, or email addresses. For URLs, you can write notifications in your system with a bit more code to process the HTTP posts you’ll get from the target system. For emails (in the form of “mailto:” links), the user can be notified directly via email without any extra code needed on your part. This code will give you a start on “listening” to results from the LMS, and will dump results to a log.
Conceptually, it’s that simple. You’ll need to familiarize yourself with the different PENS commands and parameters, and you can find them in the PENS specification, pages 10-20.