How do I create a link to a YouTube video without having a player appear on the page?

Valid for Moodle 2.5.  Updated on 11/1/2013.Some times you want to direct students to a YouTube video but don’t want to take the space on your page for a media player interface. The way you solve this problem is to create a URL resource that uses the short form of the URL. There are several ways to find this form depending on what you have to work with.

If you go to youtube.com and find the video you want, clicking on the Share link will bring up the short form of the URL.

Youtube interface

Alternately, if you found the video within Moodle, say as part of a page, you can have Moodle show you the URL for the link that it displays by editing the text box. Then determine the URL for the link. (The best way to make sure you select the link text correctly is to double click it.  This will select the link text and only the link text).

Finding URL from editor

In this example, the link is given a http://www.youtube.com/v/_ZSbC09qgLI.  Convert this to the short form by changing www.youtube.com to youtu.be and removing /v to get http://youtu.be/_ZSbC09qgLI.

Finally, if you have a URL in the form of http://www.youtube.com/watch?v=_ZSbC09qgLI convert it to the same short form by changing the server name and removing watch?v=.

Once you have the short form, you can use it as the URL for a URL resource or use it to build a link in another text field.