How to create and manage virtual labs and interactive exercises in Open edX?
Creating and managing virtual labs and interactive exercises in Open edX enhances hands-on learning experiences, especially for STEM, coding, and technical courses. Open edX supports virtual labs using LTI integrations, Jupyter Notebooks, Code Editors, and External Tools. Below is a step-by-step guide on how to create, integrate, and manage virtual labs in Open edX.
1. Choose the Type of Virtual Lab
Open edX supports several methods for adding interactive exercises and virtual labs:
Type | Description | Common Tools |
---|---|---|
LTI (Learning Tools Interoperability) | Integrates third-party tools | JupyterHub, Labster, MATLAB, Unity |
Jupyter Notebooks | Interactive coding exercises | JupyterHub |
Embedded Code Editors | Code execution inside Open edX | CodeJail, nbgrader, CodeOcean |
Virtual Simulations | Hands-on simulations for science & engineering | Labster, PhET, OpenLab |
Custom XBlocks | Custom-built interactive exercises | Problem Builder, Drag & Drop, SCORM |
2. Set Up a Virtual Lab in Open edX
Method 1: LTI Tool Integration (For External Labs)
If using Labster, MATLAB, or JupyterHub, integrate via LTI (Learning Tools Interoperability).
Step 1: Enable LTI Consumer in Open edX
- Go to Open edX Studio (
/studio
). - Navigate to Settings > Advanced Settings.
- Find
"lti_consumer_enabled"
and set it to:"true"
- Save Changes.
Step 2: Add the LTI Tool
- Open the course in Studio.
- Click on “Add New Component” → Advanced.
- Select LTI Consumer.
- Enter the following details:
- LTI URL (provided by the external tool)
- Consumer Key & Secret (given by the external provider)
- LTI Launch Target (
New Window
recommended for external tools)
- Save and preview the lab.
Method 2: Jupyter Notebook Integration
Jupyter Notebooks allow interactive coding exercises.
Step 1: Enable JupyterHub
- Install JupyterHub on a cloud server.
- Get the JupyterHub LTI Plugin and configure it with Open edX.
- Add it as an LTI component (see Method 1).
Step 2: Embed Jupyter Notebooks
- If you don’t need LTI, you can embed Jupyter notebooks using NBViewer.
- Add an iframe to an HTML component:
<iframe src="https://nbviewer.jupyter.org/url/YOUR-NOTEBOOK-URL" width="800" height="600"></iframe>
Method 3: Embedding Code Editors (Python, Java, C, R)
Open edX allows in-course code execution using:
- CodeJail (for Python execution)
- External Editors (JSFiddle, CodePen)
- Google Colab / Replit (for Python & other languages)
Step 1: Enable CodeJail
- Install CodeJail on the Open edX server:
pip install codejail
- Configure CodeJail in the Open edX settings (
lms.env.json
):"ENABLE_CODEJAIL": true
- Restart Open edX.
Step 2: Embed a Code Editor
For an in-browser code editor, use Replit:
- Add an HTML component in Studio.
- Paste:
<iframe height="400px" width="100%" src="https://replit.com/@yourusername/sample-code?lite=true"></iframe>
Method 4: Virtual Simulations (Physics, Chemistry, Biology)
For interactive simulations:
- Use PhET or Labster
- Embed simulations using
<iframe>
.
<iframe src="https://phet.colorado.edu/sims/html/pendulum-lab/latest/pendulum-lab_en.html" width="800" height="600"></iframe>
- Embed simulations using
- Upload SCORM Packages
- If the lab is a SCORM package, enable SCORM in Open edX settings:
"ENABLE_SCORM": true
- Upload the SCORM package in Studio.
- If the lab is a SCORM package, enable SCORM in Open edX settings:
3. Manage & Track Virtual Lab Performance
Once labs are set up, you need to track learners’ engagement.
Method 1: Open edX Insights
- Go to Open edX Insights Dashboard.
- Track lab completion, time spent, and performance.
Method 2: LTI Reports
- If using Badgr or Labster, download LTI analytics reports.
- Analyze grades and participation.
Method 3: Custom Tracking with XBlocks
- Install Problem Builder XBlock for tracking interactive exercises.
- Use Open edX event logs for user interactions.
4. Troubleshooting & Best Practices
Issue | Solution |
---|---|
LTI Lab not loading | Check LTI URL, Consumer Key, and Secret. |
Code editor not working | Ensure CodeJail is enabled. |
Jupyter Notebook not displaying | Verify the Jupyter server is running and accessible. |
SCORM packages not running | Enable "ENABLE_SCORM": true and upload a valid SCORM file. |
5. Conclusion
Integrating virtual labs and interactive exercises in Open edX enhances hands-on learning. Whether using LTI tools, JupyterHub, code editors, or virtual simulations, Open edX provides flexible ways to incorporate interactive elements.