1 of 37

Braden MacDonald

braden@opencraft.com

Breaking up & reusing course content:

How we built LabXchange using Open edX and Blockstore

2 of 37

Overview

Vision for LabXchange

Demo of LabXchange

Why build on Open edX?

LabXchange architecture (overview)

Open edX APIs we use

What we built separately

The end result

How you can build with Blockstore

3 of 37

Vision for LabXchange

4 of 37

5 of 37

Why build on Open edX?

Adapters for content - XBlocks!

Reuse content from edX courses

Scalable

Open source

Existing relationship with Harvard

6 of 37

Challenges with Open edX

Focused on courses

Requires registration & enrollment

Limited search, no tagging

Limited social features

7 of 37

LabXchange Architecture

8 of 37

LabXchange

backend

LabXchange

frontend

edX.org��LMS+Studio�+ plugins

Blockstore

Discourse

React

TypeScript

REST API

OpenAPI

Django

Kubernetes

Open edX

REST API

ElasticSearch

MySQL

proprietary

open source

9 of 37

Open edX APIs we use

and you can too!

10 of 37

Single Sign-On

Uses edx-auth-backends (GitHub / PyPI)

11 of 37

User account/profile API

12 of 37

Content Libraries v2

13 of 37

Content Libraries v2

get_library (lib_key)

library_exists (lib_key)

create_library (org_id, collection_uuid, slug, title, description="")

delete_library (lib_key)

add_block_to_library (lib_key, block_type, slug, parent_block=None)

get_library_block_olx (block_key)

set_library_block_olx (block_key, new_olx)

commit_library_changes (lib_key)

get_library_block (block_key)

delete_library_block (block_key)

get_library_blocks (lib_key)

get_library_block_assets (block_key)

get_library_block_asset_file (block_key, filename)

set_library_block_asset_file (block_key, filename, content)

Defined in edx-platform/openedx/core/djangoapps/content_libraries/urls.py

14 of 37

Content Libraries v2: OLX API

set_library_block_olx (block_key, new_olx)

15 of 37

XBlock runtime REST API

render_block_view (block_key, view_name)

render_block_view_studio (block_key, view_name)

get_xblock_metadata (block_key, extra_fields=None)

get_xblock_children (block_key: UsageKey)

get_block_handler_url (block_key, handler_name, use_cached_handler_url=False)

get_block_handler_url_studio (block_key, handler_name)

call_block_handler (block_key, handler_name, method='get', **kwargs)

call_block_handler_studio (block_key, handler_name, method='get', **kwargs)

Defined in edx-platform/openedx/core/djangoapps/xblock/rest_api/urls.py

16 of 37

XBlock Sandbox

<iframe>

HTML file served from unique domain, e.g.�https://d4f3crotqjvv0.cloudfront.net

17 of 37

Anonymous Access

During create_library:

�{� ...

"allow_public_learning": true�}

18 of 37

OLX Export API

Open edX OLX REST API Plugin

https://github.com/open-craft/openedx-olx-rest-api��Usage:�https://studio/api/olx-export/v1/xblock/:block_id/

�JSON response with:

  • OLX (XML)
  • Static files (images, PDFs, etc.)

<OLX/>

19 of 37

Pathways Plugin

“Pathway” as a new learning context.

REST API methods:

  • create_pathway
  • get_pathway_data
  • set_pathway_draft_data
  • publish_pathway_changes
  • delete_pathway

Opaque key: “lx-pathway:”

github.com/open-craft/lx-pathway-plugin

20 of 37

Custom XBlocks

  1. Assignment XBlock
  2. Case Study XBlock�
  3. Document XBlock�
  4. Image XBlock�
  5. Simulation XBlock�
  6. Narrative XBlock�
  7. Audio XBlock

github.com/open-craft/labxchange-xblocks

21 of 37

Custom XBlocks

  • Assignment XBlock�
  • Case Study XBlock
  • Document XBlock�
  • Image XBlock�
  • Simulation XBlock�
  • Narrative XBlock�
  • Audio XBlock

github.com/open-craft/labxchange-xblocks

22 of 37

Custom XBlocks

  • Assignment XBlock�
  • Case Study XBlock�
  • Document XBlock�
  • Image XBlock�
  • Simulation XBlock�
  • Narrative XBlock�
  • Audio XBlock

github.com/open-craft/labxchange-xblocks

23 of 37

Custom XBlocks

  • Assignment XBlock�
  • Case Study XBlock�
  • Document XBlock�
  • Image XBlock�
  • Simulation XBlock�
  • Narrative XBlock�
  • Audio XBlock

github.com/open-craft/labxchange-xblocks

24 of 37

Custom XBlocks

  • Assignment XBlock�
  • Case Study XBlock�
  • Document XBlock�
  • Image XBlock�
  • Simulation XBlock�
  • Narrative XBlock�
  • Audio XBlock

github.com/open-craft/labxchange-xblocks

25 of 37

Custom XBlocks

  • Assignment XBlock�
  • Case Study XBlock�
  • Document XBlock�
  • Image XBlock�
  • Simulation XBlock�
  • Narrative XBlock�
  • Audio XBlock

github.com/open-craft/labxchange-xblocks

26 of 37

Custom XBlocks

  • Assignment XBlock�
  • Case Study XBlock�
  • Document XBlock�
  • Image XBlock�
  • Simulation XBlock�
  • Narrative XBlock�
  • Audio XBlock

github.com/open-craft/labxchange-xblocks

27 of 37

What we built separately

28 of 37

Discussion forum

29 of 37

Visual problem editor

by Raccoon Gang

30 of 37

Search + Tagging

31 of 37

Classrooms

32 of 37

Grade Interception/Cache

33 of 37

Other features

Notifications

Mentoring

Internationalization

34 of 37

The End Result

LabXchange launched on January 22, 2020

35 of 37

36 of 37

How you can build with Blockstore

github.com/edx/frontend-app-library-authoring - see the README

edx-platform/openedx/core/djangoapps/content_libraries/urls.py

edx-platform/openedx/core/djangoapps/xblock/rest_api/urls.py

37 of 37

Braden MacDonald

braden@opencraft.com

CTO

Questions?