How to stop Moodle hijacking my hyperlink?

How to stop Moodle hijacking my hyperlink?

by Visvanath Ratnaweera -
Number of replies: 11
Picture of Particularly helpful Moodlers Picture of Translators
I put the following HTML formatting on a course page:
and it gets converted to a huge chunk starting with:
which does something completely different from what I want. I just need the text 'Lecture (video)' to appear as a hyperlink to the video.

Which feature exactly is crossing my path? I am not the administrator of the site, therefore need exact instructions which I can forward to the administrator. Or, even better, some kind of a <noembed> tag to keep the offending filter at bay.

Moodle version 2.5, theme is Nimble.
Average of ratings: -
In reply to Visvanath Ratnaweera

Re: How to stop Moodle hijacking my hyperlink?

by Rob Johnson -

You could turn off filters for any individual resource.  This would leave your link intact instead of using the multimedia filter to embed a player.  I doubt you would want to turn it off for the entire course page though.  Are you able to achieve what you want using the "disable auto linking" icon on the editor?

In reply to Rob Johnson

Re: How to stop Moodle hijacking my hyperlink?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Rob

Thanks for the reply!

> You could turn off filters for any individual resource. This would leave your link intact instead of using the multimedia filter to embed a player.

Could you tell me in more detail how to do that? As I mentioned earlier, I am on the course page iteself and have only the "teacher" role in this course.

> I doubt you would want to turn it off for the entire course page though.

Why?

> Are you able to achieve what you want using the "disable auto linking" icon on the editor?

Do you mean the WYSIWYG editor? No, I am working in HTML (in my profile "When editing text" is set to "Use standard web forms".
In reply to Visvanath Ratnaweera

Re: How to stop Moodle hijacking my hyperlink?

by Rob Johnson -

If I upload a video as a file resource, I can edit the settings, and then click "Filters' in the settings block to turn off the multimedia filter.  If you are placing this on your course page, you might need to turn off the multimedia filter at the course level.  My concern with doing this is it will turn off the filter for any media clip.  Some, you might want to stream.

Another option is to paste your code, swirch to the html editor in your profile, and use the disable auto-linking icon.  You can then switch back to standard web forms.

In reply to Visvanath Ratnaweera

Re: How to stop Moodle hijacking my hyperlink?

by Guillermo Madero -

Hi Visvanath,

You can try and use an url shortner.

1. Shorten the link (e.g. Google URL Shortener) that points to the video.

2. At the Page content box, write the original URL and convert it into a link:

2.1 Select the text to be converted.

2.2 Click on the Insert/edit link button.

2.3 In the Link URL box put the shortened URL.

2.4 In the Title box write some title.

3. Save the page.

The code for the link should look like this: 

<p>
<a href="http://goo.gl/9oYXr5"
title="helicopter">http://demo.moodle.net/pluginfile.php/25/mod_resource/content/1/Helicopter.mp4</a>;
</p>

The following image shows how the links looks like:

1. at the page (top section)

2. at the HTML editor in normal mode (middle)

3. at the HTML editor in HTML mode (bottom)

Cheers! 

Attachment url-shortner.png
In reply to Guillermo Madero

Re: How to stop Moodle hijacking my hyperlink?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Guillermo

Many thanks for taking so much time!

Yes, I believe, I can follow it. Still I have some fundamental doubts:
- For a simple hyper-link to a resource in the same server, why such a lengthy work-around?
- Even if _I_ do it, how do I explain/convince/train the others to do the same? (This is team work.)

I'm sure there are reasons for sending the player with the video. But there must be a way to do it without where it is not needed!
In reply to Visvanath Ratnaweera

Re: How to stop Moodle hijacking my hyperlink?

by Guillermo Madero -

Hi Visvanath,

Yes, going against the flow has its issues; most people want a video instead of a link.

As already mentioned, the best solution would be to disable the multimedia filter: Course administration > Filters, Multimedia plugins=Off. This of course, will avoid any multimedia link in the course to be filtered and converted.

The other option would be to open a tracker and ask for the <noembed> tag you originally mentioned smile

Anyway, I wouldn't say the process is that lengthy, one only needs to add the URL shortner step, and one has to do this so the filter doesn't detect that the link refers to a multimedia object.

In reply to Visvanath Ratnaweera

Re: How to stop Moodle hijacking my hyperlink?

by Guillermo Madero -

Hi Visvanath,

All things considered, I would definitely use the filter option (turning multimedia off), and for those particular cases in which the video must actually be displayed, then I would use the <video> tag:

<video>
<source src="http://pathtovideo/demo.mp4" type="video/mp4" />
<source src="http://pathtovideo/demo.webm" type="video/webm" />
</video>
Average of ratings: Useful (2)
In reply to Guillermo Madero

Re: How to stop Moodle hijacking my hyperlink?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
I agree. The multi-media filter is the one which works against me. But if I am not mistaken you can disable it only site-wide, by the Moodle admin. In this particular set-up I don't have that luxury.
In reply to Visvanath Ratnaweera

Re: How to stop Moodle hijacking my hyperlink?

by Guillermo Madero -

Hi Visvanath,

You have access to the course filters as a teacher:

 

Attachment course-filter.png
Average of ratings: Useful (1)
In reply to Guillermo Madero

Re: How to stop Moodle hijacking my hyperlink?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Guillermo and Rob

Excuse me for reporting back so late. Yes, I was slow in understanding what you two were saying. in never versions of Moodle the filters can be turned on and off at the activity level.

Problem solved!