Commit f6e9c605 authored by Nigel McNie's avatar Nigel McNie
Browse files

Gave the externalfeed blocktype a more detailed description.

It now lists the sites from which users can embed videos. It also explicitly states you can use the 'embed code' the sites provide. You always could, but now everyone will know.
parent eb60de8e
......@@ -29,7 +29,7 @@ defined('INTERNAL') || die();
$string['title'] = 'External Video';
$string['description'] = 'Embed Youtube/Google videos';
$string['videourl'] = 'Video URL';
$string['videourldescription'] = 'Paste the URL of the page where the video is located';
$string['videourldescription2'] = 'Paste the embed code or the URL of the page where the video is located. You can embed videos from the following sites:';
$string['width'] = 'Width';
$string['height'] = 'Height';
......
......@@ -86,7 +86,7 @@ class PluginBlocktypeExternalvideo extends SystemBlocktype {
'videoid' => array(
'type' => 'text',
'title' => get_string('videourl','blocktype.externalvideo'),
'description' => get_string('videourldescription','blocktype.externalvideo'),
'description' => get_string('videourldescription2','blocktype.externalvideo') . self::get_html_of_supported_websites(),
'width' => '90%',
'defaultvalue' => $configdata['videoid'],
'rules' => array(
......@@ -155,6 +155,21 @@ class PluginBlocktypeExternalvideo extends SystemBlocktype {
}
// TODO handle failure case
}
/**
* Returns a block of HTML that the external video block can use to list
* which video sites are supported.
*/
private static function get_html_of_supported_websites() {
return <<<EOF
<ul style="list-style-type: none;">
<li><a href="http://www.youtube.com/"><img src="http://www.youtube.com/favicon.ico" alt="YouTube"> youtube.com</a></li>
<li><a href="http://video.google.com/"><img src="http://video.google.com/favicon.ico" alt="Google Video"> video.google.com</a></li>
<li><a href="http://www.teachertube.com/"><img src="http://www.teachertube.com/images/favicon.ico" alt="TeacherTube"> teachertube.com</a></li>
<li><a href="http://www.scivee.tv/"><img src="http://www.scivee.tv/favicon.ico" alt="SciVee"> scivee.tv</a></li>
</ul>';
EOF;
}
}
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment