iframe embed in Moodle Glossary

iframe embed in Moodle Glossary

by Barbara Schroeder -
Number of replies: 2
I want my students to copy/paste their embed code from a Google Docs presentation to a Glossary post. I have enabled all of the multimedia filters and have not had any issues with embedding video content in other activities. However, when I add the Google docs embed code, such as

<iframe src="https://docs.google.com/present/embed?id=dg98z9fh_21f3w8rfgv" frameborder="0" width="410" height="342"></iframe>


the video does not show up. Any ideas or suggestions? I wanted to use this glossary to insert a random block, easily showing student work.
Average of ratings: -
In reply to Barbara Schroeder

Re: iframe embed in Moodle Glossary

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Barbara,

The cause of your problem is that <iframe> tags are considered not "safe" by Moodle and are by default enabled for teachers but disabled for students.

This is a new version of my earlier reply to your post. Upon further research I have found a neater solution.

  1. Logged in as Admin, go to Administration ► Security ► Site policies
    Read the warning info and, if you agree, check Enable Trusted Content.
  2. Go to your course and to the Glossary where you want your students to paste the <iframe> code for their GoogleDocs.
  3. Edit/UPdate that Glossary's settings / Tab Override permissions / Student / Trust submitted content -> check Allow.

These settings will allow your students to paste <iframe> links ONLY in that glossary where you made the overrride.

Hope that helps,

Joseph

Attachment image01.jpg
Average of ratings: Useful (4)
In reply to Joseph Rézeau

Re: iframe embed in Moodle Glossary

by Colin Simpson -

This issue also arises with embedding Youtube videos.

Fortunately you can select the "Use old embed code" option in Youtube to get the non-iFrame based option.