KB1360 - Using Shortcodes for better embedding in Moodle

Body

To make embedding media easier and more reliable, VCC Moodle supports a variety of one-line embed codes ("shortcodes"). These are single lines of text that can be entered in a Moodle editor, and are replaced automatically with embedded media or interactives from a remote service.

Why do we need to do this? Why can't I just use the embed code provided by my remote service?

For security reasons, Moodle may prohibit the use of some kinds of HTML code or web scripting in its editors for certain user roles (e.g. Moodle "student" or "demostudent" roles, in particular may not be able to see certain kinds of embed codes). Embed code from outside services like YouTube or elearning authoring sites may include tags or scripts that Moodle automatically filters out when the page gets presented to a user in Moodle's Student role.

However, approved Moodle plugins installed by eLSupport are allowed to step-around that restriction. Shortcodes provide custom one-line instructions for common web services to embed an author's remote content into Moodle without using any prohibited code.

A sample embed code for H5P:

The H5P Filter plugin provides this shortcode format:

{h5p:activity name}

You must enter the activity name exactly as it appears in the H5P activity itself (case matters, no quotation marks, no errant spaces, etc.)

e.g. If the H5P activity you want to insert is named "My interactive Video", then the H5P filter code you would enter would be

{h5p:My interactive Video}

(See KB1348 - Embedding Using the H5P Filter)

A sample embed code for WordWall:

The Poodll Widgets plugin provides this shortcode format for embedding WordWall activities:

{POODLL:type="wordwall-oembed",wordwall_url="https://wordwall.net/resource/103109473"}

Notes:

  • Above, inside the quotes after wordwall_url, replace the URL with your own.
  • If the URL contains an ampersand character (&) check the HTML source view to ensure that the ampersand character is just & and not &

A sample embed code for Quizlet:

The Poodll Widgets plugin provides this shortcode format for embedding Quizlet activities:

{POODLL:type="quizlet",game_type="flashcards",quizlet_url="https://quizlet.com/88498747/practice-activities-and-tasks-flash-cards/"}

Notes:

  • Above, the value for game_type can be set to match, learn, test, flashcards, or spell.
  • Inside the quotes after wordwall_url, replace the URL with that of your own Quizlet activity.
  • If the URL contains an ampersand character (&) check the HTML source view to ensure that the ampersand character is just & and not &

A sample embed code for YouTube:

The Poodll Widgets plugin provides this shortcode format for embedding YouTube videos:

{POODLL:type="youtube",width="560",height="315",id="TUTtJ3uYD0c",start="0"}

Notes:

  • Inside the quotes after id, insert the "v=" ID code from the YouTube URL (e.g. In "https://www.youtube.com/watch?v=TUTtJ3uYD0c", the id value would be TUTtJ3uYD0c
  • If the URL contains an ampersand character (&) check the HTML source view to ensure that the ampersand character is just & and not &

A graphical way to add Poodll Widgets

The WordWall and Quizlet shortcodes above are made possible through our installed Poodll service. Pasting the shortcodes in as plain text is straightforward, but if you prefer to use a graphical interface, Poodll shortcodes can also be constructed in the Moodle editor using the Poodll Widgets feature, shown here:

(This toolbar example is from Moodle's default TinyMCE editor. A similar "Widgets" icon is also available in the Atto editor.)

When you click on the Widgets icon, you will see a menu of Widgets like this:

Click once on a widget's button to begin adding it.
Each widget has different required parameters. The result will be a new shortcode text inserted into your editor.

Note: Use Widgets at your own risk! Widgets are an intermediate to advanced feature, meant for instructors or course authors experienced in Moodle, and confident editing HTML. Experiment with them in your Moodle sandbox shell before trying them in a live course. Widgets are not available to Students in VCC Moodle - only to Instructors, Staff, or Managers.

Details

Details

Article ID: 14358
Created
Wed 1/14/26 3:11 PM
Modified
Thu 1/15/26 7:05 PM

Related Articles