Using content built without HTML editor inside Exercise, Assignement, etc.

Using content built without HTML editor inside Exercise, Assignement, etc.

by Andrea Bicciolo -
Number of replies: 5

I'm trying to find a simple way in order to enable display of custom content in Exercise, Quiz, Assignement, Lesson and other activities different from resources: currently, when adding an Activity such as those mentioned before, the HTML editor allows the creation of HTML content  with images and hyperlink but without video, swf or pdf.

I tried to upload animation and video in the course files, add an Assignement activity, switch the HTML editor in code view to manually add the <object> and <embed> tags required to let plugins work, but without success. And if it worked, it is surely http address dependent and surely not a simple way.

I'm missing something? Any suggestion greatly appreciated.

Average of ratings: -
In reply to Andrea Bicciolo

Re: Using content built without HTML editor inside Exercise, Assignement, etc.

by David Le Blanc -

Hello Andrea,

I wonder if there isn't something wrong with your code. I often incorporate video etc., into my assignments, journals, and so forth. For instance, the code below can be placed into an assignment by pressing the ed_html.gif button. Note that the player automatically displays inside the code of this post. You can ignore the player in the code portion of the post.


<p>Watch the CBC video clip from the 40th anniversary of D-Day. Imagine that you are a Canadian soldier or a French Citizen who has survived D-Day. Make a short journal entry describing the emotional affect upon you and your counterparts after the Canadians landed on Juno Beach.</p><p>   </p><embed style="LEFT: 10px; WIDTH: 300px; TOP: 171px; HEIGHT: 225px" src="HTTP://ms.radio-canada.ca/archives/2004/en/wmv/d-day19840601et1.wmv" width="300" height="225" type="video/x-ms-wvx" />


Watch the CBC video clip from the 40th anniversary of D-Day. Imagine that you are a Canadian soldier or a French Citizen who has survived D-Day. Make a short journal entry describing the emotional affect upon you and your counterparts after the Canadians landed on Juno Beach.

In reply to David Le Blanc

Re: Using content built without HTML editor inside Exercise, Assignement, etc.

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
It can be even easier than that if you have the Media Plugin filter activated in Administration >> Configuration >> Filters.

Just link to the media file with an ordinary link
In reply to Martin Dougiamas

Re: Using content built without HTML editor inside Exercise, Assignement, etc.

by Andrea Bicciolo -

Thanks for your prompt reply! smile. Yes Martin, I tried the mediaplugin filter way, it is very close to what I need except for the fixed size of the media, for example a swf is always embedded at the size specified in the php code. 

About the suggestion of David, I think my problems arise from where the videos are downloaded: I tried to embed videos uploaded in the course file area, stored outside the web space. David did you tried also to copy and paste the <object> tag?

Would it be a bad idea (in future versions of activity modules) to add the possibility to choose whether include an uploaded HTML file or create an HTML content by the HTML editor? Mozilla and IE are able to correctly display a page with included HTML even with unstripped <head>, <body> <title> and  <html> tags; of course would be far better to strip the duplicated tags, maybe with portion of the code written for the import routine of the Skodak's Book module.

In reply to Andrea Bicciolo

Re: Using content built without HTML editor inside Exercise, Assignement, etc.

by N Hansen -
Andrea-You don't have to use a fixed size for swf files. You can specify that yourself. There was a long thread on this topic several months where everyone got off topic bickering about politeness in a very un-Moodlelike way, but buried in the middle of the thread I found some html code posted by WP1 that actually worked. It's actually quite simple. Here's an example of what you need to do (I have a strange keyboard and I can't type pointy brackets (or at least the keys that are supposed to do them never have) with it so you have to imagine this in pointy brackets as one uses in normal html. Perhaps someone else can type this over properly. If I try to paste the code in the html editor well then I get the problem of it interpreting it as real html:

embed width="150" height="200" src="http://www.my site.com/file.php/1/images/B3.swf"


In reply to N Hansen

Re: Using content built without HTML editor inside Exercise, Assignement, etc.

by Andrea Bicciolo -
Thanks for your reply. I'll keep trying.