Building a learning content management system using Silverstripe

Robin Petterd
Sprout Labs: Engineering
6 min readJul 23, 2017

--

Glasshouse is an eLearning content development platform that has been built with Silverstripe. In this blog post I’ll explain what Glasshouse is and some of our experiences with developing it. Glasshouse adds features to Silverstripe such as being able to build interactive multiple choice questions, drag-and-drop interactions, and tools for building choose-your-own-adventure style stories.

In the past, Sprout Labs used Glasshouse to design and build learning experiences for clients. As I’m writing this we are in the process of opening up Glasshouse to being a subscription-based online service. If you’re interested you can sign up at https://getglasshouse.com

The world of learning technologies sometimes has obscure standards around reporting and integration. Glasshouse works with the most common standards:

  • SCORM 1.2 — SCORM is an old standard largely based on XML metadata files and. In order to meet this, pages from Glasshouse are exported as HTML files and can then be uploaded to the learning management system as a zip archive.
  • Learning Technologies Integration (LTI) — which means with a bit of backend OAuth like authentication, a learner can be logged into Glasshouse from a learning management system such as Moodle or Totara, and completion data is sent back to the learning management system.
  • xAPI — This is a new distributed standard for reporting on learning data into a central learning record store.

Glasshouse also has features to accelerate the authoring process, like issue management and annotation tools.

An example screen.

One of the features we think is the most exciting is the ability to send learning activities out over a period of time. Drip and email courses are common, but Glasshouse takes this a step further, with the learner being sent interactive activities as well.

We are further working on features to personalise learning experiences so that they are adaptive to the learner’s strengths and weakness.

eLearning has traditionally been based around a model of slide presentations. With employees’ greater need for more mobile-friendly learning experiences, responsive web design practices are becoming common in eLearning. eLearning design is becoming more like web design, and the use of tools like Silverstripe reflects this. Others have used Wordpress and Drupal as the basis for building authoring platforms. Developing eLearning is a collaborative process between subject matter experts, learning designers and visual designers.

When we started Sprout Labs 10 years ago we focused on web design and eLearning. Then we moved in on custom eLearning, and now our focus is on eLearning products. Silverstripe has always been in the background of our journey — it was the system we used for web design.

Some things we’ve learned

Building a product is different to customising a platform for a client

In the early stages of Glasshouse, when we worked with a large client there was always a tension between adding a new custom feature or building a platform. We saw it as a tool for delivering projects and it wasn’t a standalone product. We later made the decision that it’s a universal platform and this has given our development a different focus. In hindsight, we should have made this decision three years ago.

We should have been writing more tests in the early days

Coming from a creative background in web design hasn’t been the best way to build a culture of test-driven development. As Glasshouse has become more complex, changes are more likely to break the existing code. This has especially been the case for the complex javascript that drives most of the interactions. Since we have implemented pre-deployment integration, tests they have caught problems more than a few times, without the user experience being affected.

User documentation is becoming more important

In the past we would often design and build a learning program for a client, with part of the package of services training them in how to update the program in Glasshouse. As we move to Glasshouse being openly available software, users will be interacting with us less and user documentation is becoming more important.

We should have thought of Glasshouse as being a Javascript application

Interactions such as multiple choice questions are all written in javascript. In the past, the content was delivered to the client from Silverstripe templates and manipulated by jQuery. In hindsight we should have thought about Glasshouse as being a client side javascript application and the data being being loaded from an API, as template rendering is one of the most lengthy processes for us in serving a page to a user.

The pros and cons of using Silverstripe as the base for Glasshouse

Pros

Silverstripe is fast to develop with

Using Silverstripe as the basis for Glasshouse has meant we have been focused on developing the learning-related features, and we haven’t had to worry about things like user management, permissions or page management.

The authoring experience

Silverstripe is an easy-to-use platform for content authors. Often, clients don’t need any training. We are finding that in many organisations, Silverstripe is a familiar platform that is used for public websites and their intranets, and using it for learning content is a natural fit.

Cons

Grid Fields

While working with the Silverstripe approach to authoring, content is quick for a developer to build and overall it’s logical for most authoring purposes. The approach to authoring related data objects with Grid Fields can become confusing. An example is where we have an interactive table activity that allows us to build interactive decision grids. To build this, an author needs to build the table, add a row, the add a column and finally edit the content in the cell. Using multiple Grid Field forms hasn’t given us the most intuitive interface for doing this. In the future we have plans for a drag-and-drop building interface that is built using React and GraphQL.

Page load speeds

In Glasshouse, a simple multiple choice question generates a huge number of database queries. An actual module is then made up of many of interactions. Pages often take 10,000 database queries. The data access time soon adds up — at one stage pages took up to 10 seconds to load. We have now moved to Amazon Web Services and we use a cluster of EC2 instances running docker containers behind a load balancer. This has reduced most of the page load times to around three seconds. In the future we plan to use caching to further reduce these load times.

Moving to Amazon Web Services

We used to run Glasshouse with each client having a separate vhost host on a shared server, we would deploy code to each of these vhosts. Now we use the same code base for all sites, depending on the domain name, we change the database and assets configuration for every request. Our largest challenge (and it’s still a challenge) has been sessions and caches. We run our a Redis for session storage and at one stage caching. The Silverstripe caches are stored in folders on the EC2 instances, that are mounted in the Docker containers. In a perfect world this would all be stored in a high speed shared file system that is designed for small files. We discovered the hard way that AWS’s new EFS service is really designed for large files, not small ones.

What’s next for Glasshouse — Silverstripe 4

The deep embedding of React and GraphQL in Silverstripe is exciting for us. I mentioned before that one of the challenges sometimes is the Silverstripe editing interface. With React and GraphQL we hope to build a drag-and-drop editing interface. The classic Silverstripe editing interface will become our expert editing mode, and the new drag-and-drop interface will be the rapid mode.

You can sign up to get early access to Glasshouse at https://getglasshouse.com , we have started to release to people that on this early list.

--

--