Massive Open Online Courses, or MOOCs, have taken the edu-tech world by storm. With skills such as python programming or financial fundamentals being taught online by professors from star-studded universities, education for all has truly embraced a new meaning with MOOCs. Learners can take these courses anywhere, at any time, making education on-demand, and a truly hands-on experience. Mostly, MOOCs consist of video lectures and assignments on a particular topic, but the particulars depend from platform to platform. Reaching a large global audience can be achieved suitably and ideally by MOOCs.
Speaking of MOOC platforms, edX- founded by Harvard and MIT, is a nonprofit organization delivering free online courses to learners on a wide range of topics. University-level courses are provided to interested learners, on concepts such as business and management, computer science, and language. The edX platform has seen a surge in growth in recent times, with many students opting for MOOCs to increase their knowledge, learn new things, and test their theoretical knowledge with practical applications.
But what if universities want to deliver their own MOOCs through a platform?
Universities or institutions can deliver courses on existing MOOC platforms such as Coursera and edX. But if these esteemed organizations want to build their own platform in order to deliver courses to interested learners, a simple yet elegant solution exists.
The Open edX platform, an open source learning management system (LMS), is a powerful tool for universities to host MOOCs and training modules independently. The platform shares the goal of delivering high-quality education to learners all over the world, and continues to grow every year. Institutions can create courses, either for a few learners, or scale them for millions of students. The Open edX platform provides an opportunity to certify learners who successfully complete courses, with certificate generation possible from within the LMS itself. Easy-to-use data analytics and reporting tools allow universities to track user responses toward their courses, and build better, more interactive learning platforms. The power of open source is truly realized with Open edX, a fantastic LMS to create your own MOOC delivery platforms.
Before getting started with Open edX development
Beginning development with Open edX is not a tough task, by all means. Individuals with a programming or development background will find themselves at home with Open edX, with the small matter of adjusting to the development environment the platform uses. Nevertheless, if done right, development with Open edX can be a breeze, and the end products as in courses created can be quite scintillating. Before we get started, let us see what’s needed to get ourselves ready for Open edX development.
- The recommended skillset
- The developmental resources
To become a productive member of the Open edX development community, a familiarity with the documentation of the development resources is a must. The documentation, and the links to the Wiki and GitHub of Open edX are available on the official website open.edx.org. Interested developers can visit the site and go through the documentation available, and make themselves familiar with the collaboration spaces and repositories.
- The environment
Devstack, as stated before, is the resource that will act as the development environment for the Open edX platform. For developing and testing Open edX on your local computer, you will require Devstack, which makes use of the Docker containers. For system requirement information, look up the documentation for production systems in the Docker documentation.
Devstack includes components such as the learning management system (LMS), the studio for course development, open response assessments, and forms. Keep in mind that to run Devstack, you will have to install Docker 17.06+ CE.
The Devstack environment also simplifies a few production settings to make development more convenient. For instance, it runs on the Django runserver, instead of nginx and gunicorn, which are disabled. All of this contributes to simplification of the production process, which ultimately leads to quicker and enhanced module/course deployment.
Customization options for the Open edX platform include XBlocks, APIs, and LTIs. More information on these to follow.
XBlocks- It is the component architecture that the Open edX platform uses. Now, to create engaging and useful content, authors must look to combine information from a variety of different sources. XBlocks is what makes this process simple, providing APIs and structures to build components integrating all these different sources. Courses are actually built in a hierarchical form, with each individual piece being called an XBlock.
The technology can even be extended to an entire course application, which makes use of course data and content. XBlocks facilitate this interaction, providing structured APIs to build components used in all such applications.
LTIs- LTI stands for a learning tool interoperability component. This allows developers to add external resources or tools to their online courses, such as digital copies of textbooks or other video lectures that they might feel are relevant to their own courses. LTIs in the Open edX environment allow addition of these external learning tools into your courses, in one of several ways. You could design an LTI in such a way that it may or may not require student response, or even use it as a sync component with an external grading system. The possibilities are endless!
APIs- For building applications that interact with the Open edX core platform, application programming interfaces are also supported by Open edX. Currently, Enrollment, User, and Data Analytics are the three APIs that are offered by Open edX. Representational state transfer (ReST) design principles are used to curate these APIs, which are secured by OAuth 2.0 systems. Building web, desktop, and mobile applications interacting with the Open edX core platform is made incredibly simple with APIs.
Key components of the Open edX architecture
If you are looking to venture into the world of Open edX, it makes sense to familiarize yourself with the Open edX architecture and key components. The learning management system (LMS) is the most visible part of the Open edX project, as you will see in the proceeding sections.
- The LMS.
The learning management system is where all the magic happens. Learners take courses using the LMS, and it provides administrators or professors/staff with the capabilities to manage and access their courses using a unified dashboard. Think of it as a dashboard for managing accounts, much as you manage your Git or reddit accounts under the accounts or settings dashboard. This interface in the Open edX environment is called the instructor dashboard, meant for those who deliver courses or are administrators.
The Open edX courses consist of XBlocks, which we will focus on developing in a future section. The precursors to XBlocks are XModules, with active work being done to rewrite all XModules as XBlocks.
- The Studio and mobile apps.
The studio is where the magic is created, per se. It is the course authoring environment, with teams using it to create and update courses. The database is shared by the studio and the learning management system described previously.
For optimization and on the go access, mobile apps have been designed by Open edX, for both iOS and Android, allowing learners to watch videos wherever they wish. Active development is being done to enhance the mobile apps, making it even more optimized for the end user.
- The analytics framework.
For analytical purposes, the Open edX platform also houses an analytics framework for developers to monitor learner behavior on their courses. Use of MySQL, Hadoop, and JSON is done to store and process results of analytics. A ReST API is used to publish the results to Insights, which instructors and administrators can then use to monitor and analyze learner behavior.
- Search and other features.
For searching in course content, comments, and other services, the search feature is integrated in the Open edX platform using Elasticsearch. This allows users and developers to search in multiple contexts.
The Open edX platform also allows developers to configure background tasks to be carried out by separate workers or applications, rather than the web application itself. Using RabbitMQ and Celery, the work is queued and distributed. Examples of tasks include producing end of course certificates, generating answer distribution reports, and sending emails in bulk to learners or course takers.
Other functions like coupons or ecommerce work flows, for instance, are managed by separate components within the Open edX suite.
Starting the development process- self managed, or fully managed?
Many Open edX first time users are confused as to where should they start the development process. The Open edX platform offers developers with two options on beginning their journey with Open edX. The self managed route is for those who want deeper integration and a more customized experience, basically, more coding by themselves. This involves setting up a dedicated instance of the Open edX platform, either by choosing one of the many available options or creating their own instance.
The fully managed route, however, uses a monthly subscription model, providing developers with a branded and managed experience. Open edX has official partners that provide developers with this fully managed route for development, and all of these partners offer 30 day trial periods. This is for those who want to code less and create more.
The self managed route
When customization and deeper integration is of the essence, the self managed route makes more sense. Developers can exercise their creative freedom in setting up Open edX instances and then creating their modules, or can even go for existing Open edX distributions and have help setting up their own instances.
Some of these distributions are source code only, such as the Open edX distribution from edX, and is targeted by organizations who have the developmental resources to create and work on their own learning platform. For those who do not possess these developmental skills, other distributions from partners like IBM and Tutor provide an opportunity for organizations with minimal programming skills or developmental resources to work on their own MOOC platforms. These distros make it easier for developers to create, program, deploy, and analyze courses, all under one single umbrella.
The fully managed route
Service partners of the Open edX platform provide fully managed Open edX implementations with a branded experience, through a subscription model. All these partners offer 30 day trials, as stated before, so that organizations can get a look and feel of the service before going all in. MOOCit, Learniphi, and Appsembler are some of the SaaS providers that Open edX is partnered with, providing services such as custom integrations, theming, support, and cloud services. This route is for those developers who might be familiar with a WordPress styled model, with minimal code, and maximal efficiency.
Coming to the good bits- developing XBlocks
Enough about background information, let’s get into some development now!
XBlocks are component architectures designed for the Open edX platform to make delivering online courses easier. As stated, each online course is built using different XBlocks, with these components also providing usage in web applications that require integration of multiple components.
Concerning ourselves with the educatory side of things, XBlocks can be used to represent individual problems, video lectures formatted for the web platform, or interactive simulations and labs. Therefore, these XBlocks can be unified together, to form an entire system of learning solutions, which we then term as a complete online course. XBlock developers can then also control other XBlocks to compose lessons, and sections, to form entire courses.
Resources and prerequisites
Deploying XBlocks to Open edX environments would require prior knowledge of the platform itself, which we assume you have gathered by now, in accordance with the previous sections of this guide. Online resources for achieving the aforementioned include the official XBlock developers guide by Open edX, the XBlocks directory which houses a list of the existing XBlocks should you wish to integrate yours with the ones already built, and the general Open edX developer guide. Feel free to consult any of these resources if you get stuck at any point.
Creating an XBlock
Now, the XBlock is the fundamental piece for designing any course. edX provides a template for creating XBlocks, available on their GitHub page, called the cookie cutter XBlock template. It is pretty simple to implement and install, making use of the cookiecutter library, which then creates the XBlock repository as well as a Docker file for the XBlock, enabling it to be built and run in the XBlock SDK environment. All it takes are two or three lines of code, and the XBlock is deployed on the localhost address of the machine.
Once you have your XBlock set up, you can then use Git to share it to a public repository, which can then enable integration of the component with the Open edX environment.
Now, once you have the Docker Devstack set up for your Open edX deployment, you can install your XBlock there itself, and run it inside the studio environment or the learning management system. You will need to install the same version of the XBlock inside both the studio and the LMS, since they do not share virtual environments in the Docker Devstack. When you complete your XBlock installation, you can use the LMS or the Studio interface to customize it as you want, adding course material, videos, tests, or whatever seems relevant to your application.
Testing, translations, and good code practice
Testing is a crucial part of all development cycles, and similar is the case with XBlocks. Once you code and create whatever you want your XBlock to represent, writing automated tests is a good code habit to implement. It protects your XBlocks against unwanted behavior whenever change is introduced, and preserves the functionality of XBlocks as your project evolves. There are some types of tests available, such as the quote of the day XBlock, the XBlock SDK testing, and other automated tools, that can help developers run unit tests, assess quality of code, and run automated tests right from the SDK workbench. Python also has some built-in tools like pylint and pep8 to check Python coding standards and quality of code written.
A good XBlock, as per all quality standards, is expected to contain a readme file explaining what the block does, how to use and test it, and other important info. Requirements files with all Python dependencies listed should also be shipped with the XBlock, as should be a setup file to allow easy installation. Automated tests, quality report, and a good amount of code coverage (at least 80%) are some of the final measures that round off what a good quality XBlock should be like.
As far as translations and internalizations are concerned, utilities such as gettext can be used to mark and extract text from the course material for translation. This helps learners from different languages be more familiar with the course content. Internalizations are supported by the Open edX platform, with the cookiecutter template for XBlock creation being a great example of a functionality that supports internalization. Developers may read the online documentation for more information.
It is time to deploy a new service!
Once you are done with the development and testing phase, it is time to deploy your new service to the Open edX platform. Considerations when deploying a service include sizing, resources required, customers, licensing, and other concerns, as well as the logging and metrics considerations.
When you feel that you’ve built exactly what you had in mind, it helps to create documentation for the online course or module that you’ve prepared. The documentation should clearly state what your service does, the customers targeted, the code and repositories used, how the service runs, does it need access to other services or not, and whether it requires metrics and monitoring services or not. All of this information helps the Open edX platform help you out in deploying your services more efficiently, and making sure that your code adheres to the international standards for quality.
Some final words
The Open edX platform is a wonderful tool for universities and institutions to build their own course delivery platforms. Easy to use, open source, and backed up by two of the most prestigious institutions of the world in Harvard and MIT, the Open edX platform is a boon for universities looking to follow in their footsteps. Development on Open edX is not a very tough nut to crack, too, as you might have made out through our comprehensive guide.
Familiarize yourself with the environment, the architecture, the customization options, and the self-managed or fully managed platforms. Once you have made all decisions required prior to the development process, it is time to start creating XBlocks, your components for the entire course or module. Create enough XBlocks, and take some from the already created XBlock directory, and build a course that is no less than magic- at least that’s what you should be aiming for! Integrate and install the XBlocks in the Open edX studio or LMS, and begin coding and creating. Oh, and always remember- it is a good idea to test and quality check your code! Developing 101!