Showing posts with label PENS. Show all posts
Showing posts with label PENS. Show all posts

Thursday, October 2, 2008

PENS authentication

I've written before about how to use a PENS-conformant authoring tool or LCMS with EKP. However, in that post I didn't fully explain the intricacies of how EKP handles authentication of PENS requests.

EKP actually provides two PENS endpoints, which differ only in how they handle authentication. Assuming your installation uses the default /ekp/ path prefix, the endpoint URLs are as follows.

/ekp/pens
/ekp/servlet/ekp/pens

The first of these endpoints handles authentication exactly as described in the PENS specification. That is, the PENS request is expected to include parameters named system-user-id and system-password, the values of which should correspond with, respectively, the user ID and password of an EKP account with permission to create courses. (In fact, this endpoint will also accept credentials supplied as an HTTP basic authentication header. This is allowed primarily for consistency with other EKP web services. However, the request parameters always take precedence when supplied.)

The second endpoint ignores the PENS authentication request parameters and HTTP basic authentication headers, and instead uses EKP's standard login sessions for authentication. While this is strictly outside the scope of the PENS specification, it is convenient in situations where the PENS request originates directly from a browser. Since the user is likely to have already logged into EKP at the time at which the PENS request is sent, this approach avoids the need for the user to re-enter his or her credentials every he or she initiates the PENS publishing process.

Wednesday, July 9, 2008

Desktop publishing tools and PENS

I've written before about how PENS can be used to enable one-click publishing from a publishing system (authoring tool or LCMS). Herewith, some notes on using PENS with desktop, as opposed to web-based, tools.

PENS requires that, when a publishing system sends a request to the LMS to “collect” a content package, it supplies a URL (typically using one of http, https or ftp for the URL scheme) from which the package can be collected. If the publishing system is web-based, then this URL will typically refer back to the publishing system itself.

For a desktop publishing system, this requirement effectively means that there needs to be a server, separate from the desktop software, to which the content can be uploaded prior to being collected by the LMS. Typically this will be an FTP server, although it could in principle be a web server.

Ideally, the desktop software will enable the user to configure details of this FTP server (including host, user name and password) in addition to the LMS details. When a course is published, the software should perform the following actions:

  • package the content into a zip file;
  • upload the content package to the FTP server using the configured host, user name and password; and
  • send a PENS request to the LMS instructing it to collect the content package from the FTP server.

In principle, it would be possible to manually upload the content package to the FTP server if the desktop software does not do this automatically. In practice, though, this really defeats the purpose of using PENS, since it would be simpler to create a SCORM or AICC content package on the desktop machine, and then upload the package directly to the LMS.

Another theoretical possibility would be to run a web or FTP server on the desktop machine itself. However, this would require that the desktop machine has a stable IP address and/or host name that the LMS can call back to, and that HTTP or FTP requests to the desktop machine are not blocked by hardware or software firewalls. In other words, it's almost guaranteed not to work in practice.

In summary, a desktop publishing system can theoretically “support” PENS without also supporting the automatic FTP upload step. However, without this automatic FTP upload, PENS is unlikely to provide any practical benefit.

Tuesday, February 13, 2007

What is PENS, and when should I use it?

Starting from version 4.5, EKP supports Package Exchange Notification Services (PENS). PENS enables one-click publishing of courses from a PENS-conformant authoring tool or LCMS to EKP. Note that PENS is not a format for learning content like SCORM or AICC CMI001. That is, by itself it does not define any formats or protocols for course catalog metadata, course structure, course/LMS communication, or sequencing. PENS simply defines a way for a publishing tool to notify a delivery system (LMS) that new content is available for collection. The relevant content is still transferred using an establish format such as SCORM or AICC packages (most commonly the former).

So PENS is not an alternative to, say, SCORM content packages. Rather, it simply eliminates the step of manually exporting a content package from the publishing system and then importing it into EKP. Note that if your workflow requires you to make use of the packages (e.g. you need to manually modify the packages, or wish to archive them outside of EKP) then it's probably not appropriate to use PENS.

How can I use PENS to enable one-click publishing from an authoring tool or LCMS to EKP?

Starting from version 4.5, EKP supports the Package Exchange Notification Services (PENS). PENS enables one-click publishing of courses from a PENS-conformant authoring tool or LCMS to EKP.

To configure the authoring tool or LCMS to publish courses to EKP using PENS, you will need three pieces of information: a URL, a user name, and a password.

The URL is simply the base URL for the site, followed by pens. A typical URL is shown below; if you have changed the default protocol or path for your site, you'll need to modify this URL as appropriate.

http://ekp.example.com/ekp/pens

(N.B. If you encounter problems, check that you can access the PENS URL directly in a browser. You should get a response similar to the one below. If you see a 404 Not Found message or similar, there might be a configuration problem with your web server; see I get a 404 Not Found page when accessing EKP's PENS URL, what should I do? for an explanation of how to resolve it.)

error=0
error-text=collect command received and understood
version=1.0.0
pens-data=

The user name and password should correspond to an EKP user in a role that allows them to import courses.

Monday, February 5, 2007

I get a 404 Not Found page when accessing EKP's PENS URL, what should I do?

Starting from version 4.5, EKP supports the Package Exchange Notification Services (PENS). The URL used for notifications is typically /ekp/pens.

If you see a 404 Not Found error when attempting to access this URL, it's likely that your web server (e.g. Apache HTTPD) is not configured to forward requests for this URL to your application server (e.g. Apache Tomcat).

If your web server is Apache, you can fix this by editing the httpd.conf configuration file, which is in the conf/ directory under the Apache installation directory. If you open this file in a text editor, you will find a series of "directives" such as the following:

JkMount /ekp/tx/* ajp13
JkMount /ekp/servlet/* ajp13
JkMount /ekp/*.jsp ajp13
JkMount /ekp/servlet/ekp/* ajp13
JkMount /ekp/*.tx ajp13
JkMount /ekp/xml/* ajp13

(Note: in some installations, the above directives might be in a file named mod_jk.conf under the directory conf/jk/, instead of in httpd.conf itself.)

To enable PENS support, you should add one more directive as follows:

JkMount /ekp/pens ajp13

You'll need to restart Apache for that change to take effect. Note also that if the prefix for your site is something other than /ekp, you'll need to modify the directive above as appropriate.