There are a few special terms in PoodLL 3. “Templates,” “Bundles” and “Presets” are three of these. These are closely related to how the PoodLL filter works. “Widgets” and “players” are two more words we need to know. Understanding this will be really useful and will help you get the most out of your PoodLL.


Templates and Widgets

Templates are a group of settings all on one page.  The settings contain HTML, CSS and javascript. When Moodle filters some content and passes it to PoodLL to process, PoodLL replaces that content with the html from the template and also loads the CSS and javascript.  Templates contain variables (aka placeholders) for things like width, video file url and color. When PoodLL processes the page content it merges the template with whatever variables are available, to produce the output.

The output of the template + merging operation is something like a video player, or a stopwatch, or a humble piece of text welcoming the user. We generally refer to this output as a “widget.”

By default there are only 2 or 3 templates. But you can easily add more (read on ..). Access the template settings pages at:

site administration -> plugins -> filters -> Poodll -> templates

Bundles

Now lets talk about “bundles.” Templates are infinitely customisable. You can write your own, edit existing ones or copy and edit. You can even share templates with other Moodle users (email them, post them on forums, download them etc). These shared templates are called “bundles.” This is because they are bundles of javascript, CSS and HTML wrapped up into a single .txt file.

Making a bundle
On each template settings page on the top right, there is a green box with the word “bundle” inside it.

If you click on this, the current template will download to your local machine as a text file, ie a bundle. (NB Safari and IE may open the bundle file in a new tab, rather than download the bundle. It works best with Google Chrome.)

Using a bundle
To restore a template from a bundle, you need to drag the bundle text file over the green bundle button of a template settings page. The border of the button will turn blue.

If you then “drop” the bundle, it will fill in all the fields of the settings page. You  need to save the settings page after that.

Presets

At the top of the template settings page is a dropdown box containing presets.




These presets are simply bundles that ship with PoodLL by default. If you select a preset, the fields of the template settings page will fill up as though you had dropped a bundle file onto the green bundle button. You need to save the template after selecting a preset to make it permanent.

There are presets for video players, audio players, countdown timers, lightboxes, calculators etc. Spend a bit of time making templates from the presets, and see what you can do.

Although most users will not need to know about this, in the PoodLL filter directory in Moodle,there is a folder called “presets.” This contains the bundle file for each preset. You can add presets to the dropdown list by simply adding bundle files into this folder.


Players and Widgets and Atto

The final term we need to define is “player.” The PoodLL filter produces widgets from templates in two ways.


Way One: Widgets 
The first way (widgets) is if Moodle encounters a string a bit like this on the page

{POODLL:type=stopwatch}

In most cases you will use the PoodLL Atto editor widgets icon to create and insert those strings for you, because its point and click simple. Its possible to enter these strings by hand of course. You will need to do this if you don’t use Atto. For templates that should appear in Atto, set “show in atto”  on the template settings page to “yes.” This flags them as “widgets.”

What about TinyMCE users? There is no PoodLL widgets icon for TinyMCE users. Since the editor preference can be set per user,  you can create one user for using Atto with. Set the user’s editor preference to Atto. Then when you need to do some PoodLL widgeting, you log in as that user and do it.


Way Two: Players

On the PoodLL file extensions settings page, you can register file extensions that PoodLL should handle. eg “mp4”, “mp3”  or “pdf.” If Moodle comes across a text link to a file with that extension it will pass it to PoodLL to process.

This should be familiar to most Moodlers, though you might not have thought about it much. When you insert an audio or video file into Moodle, it displays as a text link. But when you view the page there is a player in place of the text link. This is how the standard Moodle media plugins filter works. And PoodLL works that way too.

Now clearly some templates do not work as players, eg stopwatch or countdown timers. Because there is no file and no file extension for them. But some do, for example the Flowplayer. For a template to be displayed on the PoodLL file extensions page, it needs to be flagged as a “player.” There is a “Show in players list” setting on the template settings page for this purpose. If this is set to “yes” the template will be displayed as a selectable item in the drop down lists on the file extension settings pages.

What if run out of templates?

By default you get 20 templates. And only a few of those are filled by default. But if you use up all 20 ( this may well happen), just add more. On the “widget settings” page you can set the number of templates.

After you have altered this, be sure to visit your site’s notifications page, which will detect the new settings.  Its impossible to edit the new settings on the page that Moodle displays at this point. Just scroll to the bottom and save all the empty settings fields. Later you can edit them from the PoodLL filter template settings menu. Some of us PoodLL’ers have close to 100 templates going ….


One Happy Fact

Even if you do not have PoodLL, you can use all this stuff. The Generico and VideoEasy filters for Moodle, both operate on the same system. Generico filter templates are “widgets” and the VideoEasy filter templates are “players.” The bundles are almost identical and can be shared between all three filters (PoodLL, Generico and VideoEasy). To be precise, the “show in atto” and show in players list” settings are missing from Generico and VideoEasy bundles. So if you copy a template from Generico or Video Easy to PoodLL, you will have to set that manually.