Video in a DB entry

Video in a DB entry

by JF Dragon -
Number of replies: 11

Need help to understand what happen!

I face a problem when inserting video in a DB entry on Moodle 1.9.4. In fact, the video I wanted to insert is not accessible in the DB entry, but for example, when I insert it on a label block, the same video is displayed correctly.

Here is an example of the code:

<object width="320" height="240" type="application/x-shockwave-flash" data="http://subdomain.domain.com:19850/player_flv_maxi.swf" id="Object1">
<param value="http://subdomain.domain.com:19850/player_flv_maxi.swf" name="movie" />
<param value="true" name="allowFullScreen" /><param value="opaque" name="wmode" />
<param value="sameDomain" name="allowScriptAccess" /><param value="high" name="quality" />
<param value="true" name="menu" /><param value="false" name="autoplay" />
<param value="false" name="autoload" />
<param value="configxml=http://subdomain.domain.com:19850/EL2010num00art02_vid016_1Mb.xml" name="FlashVars" />
</object>

Being unable to displayed that video, I made some research on the forum (see the 3 post in reference at the end of this post...) and try some adjustments:

  1. We set all the security right to be abble to embed video correctly with OBJECT and EMBED tag and to allow trusted content in the admin settings (like propose by Itamar Tzadok and Joseph Rézeau)
  2. Like what Sean Farrell propose to Steven A., I URLencode the FlashVars like so “configxml%3Dhttp%3A%2F%2Fsubdomain.domain.com%3A19850%2FEL2010num00art02%5Fvid016%5F1Mb.xml”... but that’s not work more
  3. I also try to link directly to the FLV file on the server (same location as the XML file) and nothing happen

Just to know if it could be possible to insert video from other sources, I try to integrate videos from Youtube, Vimeo and Dailymotion. Here are my results:

  • Youtube and Vimeo code use IFRAME tags and are not displayed (like report by Przemyslaw Stencel)
  • But... the videos from Dailymotion, using OBJECT and EMBED tags, are displayed correctly. I use the code propose for the video «Episode 19 : Créer une base de données» without any change and it’s work perfectly (no URLencoding from me).

So, my question is: If the OBJECT and EMBED code from Dailymotion is working fine, why my own code is not working at all. As I can see, it use the same HTML tag.

Any idea is welcome! See you...

JF

 

Forum post used (references)

Average of ratings: -
In reply to JF Dragon

Re: Video in a DB entry

by Itamar Tzadok -

Workarounds depend on how the database is meant to be used.

One workaround is to  put the video code in an html file in the Files area and ebmbed that file in the entry by either one of the embed tags. This approach won't work for students though. smile

Average of ratings: Useful (1)
In reply to Itamar Tzadok

Re: Video in a DB entry

by JF Dragon -

Thank for your reply Itamar,

As I'm a new user of the DB module (and already a fan), I'm not sure I understand well your suggestion. Here is what I understand. Is I'm right?

  1. Import an html file in the Files area of the course with the html embed video code
  2. Create a new entry where I embed this html code using the tags (to you talk about the "add template" of the DB module??).

The problem is that I'm not sure to understand how to embed an HTML document in a DB entry using the tags of the DB template (if that's what you mean).

More precisions

Well, you make me realise that I don't give a lot of info on the way I thought to use the DB module... shy

Here is a topo of the way I whant to use the DB module

  • I wanted to use the DB module to construct each pieces of content of some courses documentation, using the WYSIWYG facilities, and then create all the courses reading book (maybe with the Book module) by integrating the DB entry in each page (probably using IFRAME in the Book module).
    • In fact many of my pieces of content will be used in more than one course reading book.
  • I realise I don't say that no student will submit any entry in the DB module. The editing teacher will do all the integration and then construct the Book module the student will use to consult the information.
  • Not all the pieces of content will have videos. Sometimes, we will have video, audio, images or maybe just text.

Any ideas and suggestions are welcome!

JF

In reply to JF Dragon

Re: Video in a DB entry

by Glenys Hanson -

Hi JF,

Why don't your create your course directly in the Book Module? It also has a WYSIMYG text editor and you can embed videos directly there.

Cheers,

Glenys

Average of ratings: Useful (2)
In reply to Glenys Hanson

Re: Video in a DB entry

by JF Dragon -

Hi Glenys, thanks for your reply... I really appreciate it.

You ask a good question, and here is the reasons why I'm looking at the DB module in conjonction with the Book module.

I want to create multiples textbooks for multiples courses in a program. But the same content don't appear only in one textbook and must be found in a couple of textbook of the program. So, I must cut my piece of content into little parts, and then load them in each textbook where the student can found the info. And one other thing, I want to have only one place where I must change the content of my textbook. My teachers will not be allowed to make any modification and I want to limit the number of modification... to be sure to forget nothing when a change will come.

That's why I look at the DB module, to create my piece of content (a new entry for each piece) and an other tool to integrate all that stuff (using IFRAME tag) with a nice menus.

And a last thing, I must have one instance of each textbook inside of Moodle (I think I'll use the metacourse for that) and I must be abble to give an access to a user from outside my moodle installation without beeing completely open to all users from the Internet (yes, I know, big challenges).

I'm not sure, but I think the Book module will not be abble to help me achieving all this... but my knowledge on that module is realy limited, so if you have more ideas or precisions, I'm open...

Kind regards

JF

In reply to JF Dragon

Re: Video in a DB entry

by Glenys Hanson -

Hi JF,

As I understand it, the function of the Book Module is to present information to students in an organised way. Text can be written in it and anything that is a web page can be added to it (videos, images, audio files, links to websites) even whole websites can be imported into it. Copies of it can be made and taken to other courses with the Sharing Cart block. If you need a "master" book you can create one somewhere (a course) only you have access to - I assume you are the admin. A Book can have an infinite number of "Chapters" - the little parts of your content. For each course you can make a copy of the master book with just selected chapters.

Again as I understand it, the function of the Database Module is mainly for students to upload and present information to teachers and fellow students. Teachers and admins have other ways uploading and presenting documents.

One thing to keep in mind though, is that the Database Module is a Moodle core module and Book is not. For the moment, it hasn't been updated for Moodle 2.0.

Cheers,

Glenys

Average of ratings: Useful (1)
In reply to Glenys Hanson

Re: Video in a DB entry

by Itamar Tzadok -

Glenys I don't think we should limit an activity to this or that function; we may miss an opportunity for creativity. If I need coffee and the only thing I have is a database module but I can make the database make coffee, this can make my day. smile

In reply to Itamar Tzadok

Re: Video in a DB entry

by Glenys Hanson -

Next time I drop by your office, Itamar, you must show me how to make coffee with a database and I'll bring my garden spade to stir it.

In reply to Glenys Hanson

Re: Video in a DB entry

by JF Dragon -

Well, I vote for the coffee to... Our IT staff will probably be happy to know that Moodle can do coffee. We got the same discussion for an other web system some years ago, but it was just possible to order it and send it by Purolator (old technology)... clown

In reply to JF Dragon

Re: Video in a DB entry

by Itamar Tzadok -

JF, the book resource is essentially a set of webpages organized in a two-level hierarchy with a built-in toc. If you have html files you can simply upload them into a book, each file will become a page in the book. So you can create the pieces of content as html file in a decent editor (outside Moodle; with version control) and take it from there. You can also use these files to present some of the information to users outside Moodle.

Admittedly this cannot populate contant updates to the books "automatically" , as would the method you propose above. But your method has its drawbacks too. For instance, to make the iframes transparent you need to add (crossbrowser) javascript to caculate the page's dimensions and adjust the iframe's dimensions accordingly. Otherwise you will get a scrollbar.

hth smile

Average of ratings: Useful (1)
In reply to Itamar Tzadok

Re: Video in a DB entry

by JF Dragon -

Thanks both of you...

As you suppose Glenys, I'm a kind of Admin (not all the settings for the Moodle site administration, but I can do a lot and the IT guy who play the real admin is fast on the reply ;-D).

With your post Itamar, I just realise that I'll not be abble to use the Book module. two-level is not enough for my needs. It was difficult for the expert working on the content of the textbook to limit there structure to 4 levels... so I can't imagine what kind of argument I will be abble to give to fit it in 2 levels.

On an other hand, your thought on the need of JS code for embeding pages with iframe tag let me come back to my first idea, using an external SCORM template (especialy the SCORM-ready template from Ellen from the DesignSpace) and embeding in each page a txt file containing the text of the page (with little HTML code), like if I was using a flat file as kind of database.

In fact, I take a look at the ressources of Moodle because it seemed easier for non-web-designer to create and modify the content of each piece of content. But I just realise that this non-web-designer will still have to know some basics HTML tag to embed video and audio, although we have a WYSIWYG environment to edit the rest of the text... and if you have to learn how to add an <object> tag, is it really more difficult to learn how to insert a <h1> tag?

yth... but if any other ideas and thought... I stay open to them! smile

In reply to JF Dragon

Video in a DB entry - SOLVED

by JF Dragon -

Well, thank you to all of you, but the problem have been solve by our analyst. Here is the solution. Because Moodle cut my URL in the flashvar, I URLencode manually the entire URL like so (present in the begginig post):

 "configxml%3Dhttp%3A%2F%2Fsubdomain.domain.com%3A19850%2FEL2010num00art02%5Fvid016%5F1Mb.xml"  

But the problem was there... I don't have to URLencode all that address. I should leave the "configxml=" exactly like it was and just URLencode the last part of the URL like so:

 "configxml=http%3A%2F%2Fsubdomain.domain.com%3A19850%2FEL2010num00art02_vid016_1Mb.xml"  

Thanks to him and all of you for your help!

JF