oEmbed Filter

Filters ::: filter_oembed
Maintained by James McQuillan, Mike Churchward
A filter that will swap hyperlinks pointing towards supported websites with an embedded version using code retrieved from the site using the oEmbed protocol. An option for "Lazy" loading of some sites is also available.
Mike Churchward
Thursday, March 17, 2016, 2:54 AM
General comments

Version Reviewed:


The oEmbed filter is a power filter that simplifies the inclusion of external content in HTML within Moodle. This filter reduces the amount of time it takes an instructor to add a video to an HTML page and does not require a technical understanding of how to copy embed code from any of the supported services. This integration also doesn’t require the institution to configure a YouTube API key.

This filter also has the ability to dynamically reduce page load times for embedded content by supporting lazy load, which content it only loaded once clicked by the user.

The plugin supports the following services and more are planned over time:

  • YouTube

  • Vimeo

  • Ted

  • SlideShare

  • Screenr

  • Issuu

  • Poll Everywhere

  • Soundcloud

  • Microsoft Mix

Overall this plugin is a significant improvement over the current embed process within Moodle and should save teachers and students a lot of time and headache, especially non technical users and for non YouTube services.


The filter is well supported by Microsoft and Remote-Learner who are actively improving all of the Office 365 plugins. The plugin is easy to use and works will with all supported sites.



The plugin is installed in the normal fashion for Moodle plugins either by cloning the repository into the filters directory from the github repository or downloading a zip and following the installation instructions:

  1. Download the source files. (zip file is available under download section)

  2. Unzip the package

  3. Copy the "oembed" folder to moodle/filter on the Moodle server.

  4. Login as an admin on the Moodle site and install the filter.

One the filter is installed it will need to be enabled within Plugins > Filters and have its priority set. Administrators will also want to enable lazy loading for the services that support it.


A user added embeded content using the oembed filter by first locating the content they want to embed on the supported service. For YouTube you navigate to the video in the browser and copy the URL from the browser bar. In Moodle all you have to do is create a link using the HTML editor in any location the HTML shows up. Once you save the html then the oembed filter will embed the YouTube video.

Course Maintenance:

There is the potential impact that if existing courses have HTML content which contains links to any of the supported sites that these links will be converted to embedded content. The filter allows an administrator to turn off specific sites if desired, but otherwise this is an all or nothing filter.


The documentation for this plugin is lacking. The configuration is self explanatory, but the use of the plugin is not intuitive and could either use a button in the Atto editor to help or some user documentation explaining how to use it.


Used to decrease page load times for students and teachers and share content from YouTube, Vimeo, Ted,SlideShare, Screenr, Issuu, Poll Everywhere, Soundcloud, Microsoft Mix.


No formal accessibility testing was done on this plugin. However, nothing has come up in our other tests to indicate a problem. In the future, we will be developing more formal accessibility testing suites and will redo them then.


Code Review:

Full code testing results

(Scores out of 2 - 2 = perfect; 1 = some concerns; 0 = problems.)
Tested for PHP 5.6 and 7 on both MySQL and Postgres. No version of technology problems were found. Score - 2.
Installation test (mpci install) - no problems. Score 2.
PHP syntax test (mpci phplint) - no problems. Score 2.
PHP copy/paste detector (mpci phpcpd) - Minor duplication in one file. Score 1.
PHP code complexity (mpci phmd) - generally code is okay. Three files out of ~18 flagged with simple violations. Score - 1.
Moodle code guidelines (mpci codechecker) - Several minor Moodle coding guideline violations (65% of files violate). Score - 1.
CSS syntax test (mpci csslint) - two minor problems. Score 1.
JS syntax test (mpci jshint) - five errors identified. Score 0.
Moodle plugin structure test - Passed. Score - 2.
PHPUnit tests - 1 tests / 0 assertions passed. Score - 2.
Behat tests - No tests provided. Score - 0.
Total score 14 / 22 - 64%.  

Maintenance Review:

(Scores out of 2 - 2 = confident; 1 = nervous; 0 = concerned.)
Lifetime: Plugin has existed since June 2014 on version 2.7. Score - 1
Releases: Frequent releases to Moodle plugins DB, with the latest in March 2016. Score - 2
Maintainers: James McQuillan of Remote-Learner (former Moodle Partner) and Microsoft. Score - 2
Support Response: Has a component in Moodle Tracker. Uses Github tracker. Uses Moodle forums. Responds in plugins DB. Score - 2
Release timing: How quickly is a release made available to a major Moodle release? 3.0, 2.9, 2.8, 2.7 met criteria. Score - 2

 Total score 9 / 10 - 90%.