ÿØÿà JFIF    ÿÛ „  ( %!1"%)+...383-7(-.+  -%%--------+------------/----------------------------ÿÀ  ¶" ÿÄ     ÿÄ @    !1AQaq‘¡"±ÁÑð2’BRráS‚ñ3b¢CT²Ò #cÿÄ    ÿÄ '   1!AQ2a"‘±#ÿÚ   ? ò(/p‘—–¢·,M|¯G»R£üešT. ôŸEoCFñ‡ 4ÔkåóxR|µÁ¨ÓDà!Ç´µ˜‡p ÍQ‹§!þž^õWsŒy  åÁ§$á«%ºq˜™JyyË0y«^Ϗ -3ÃÏËÈ£Æ\P’ä„s&•‹Üs üô'àWt¹pñCp$bÚF`·7.^)¾!)ÒÙ˜–ÅÏš^h¾ø³·ìe±ŒaeÖ—Í,e=B}Jéߦ$$½—šÙÜCC¯¶è8β–Åkèwx LÉngT±æ¹£Ócœ¿Í/©Éÿ ‰ÚCÒ­mq;Tt¶–}0"zÖPcd1š­¤tˆ„ÐÓâqú[™öUCŠ2޿د­É(¸ßúçšmW,Ò ºf‹Ån™ÄLêÁ8üÁkÁ€L¥ÍuJ1œôrÂSŒÓöt!7EUíïb)AËi¬â-ÙHk8òÁiXYwÅ)O^"ÇØriÛô{»wRUKÙÏÚlÓ¬€‚’שT ] ªb—ÊîKC^×M“xùäñz¬zJ× {4[¹M'IÆeH1LCWÕ]œûº WDæà°OÅ‚¹c²ÞuA–rL`HšpCez‡V’— Ž‚Ë„–ñ­'µR0ÕÖ=À:±G»C\nÆÉ5*¢ †3šhQ4ýÒi$Õ1"Ü]¢p-q3zcQ$ªö¨¥æf›‘»´ÝÚHá„e²JÇ–iÊ:·à¬Øc5Åk»Laª*wi [0Ówk ¦a¦0Õ²ÅÅ‚T¸’³q:Æ<¹ú Ò˜Æ}2VE•Ѐp¡Ô3Úº …h³^LJºçì¥Ánó|˜ÖˆÎˆ+« ¦dø‘Mº–d\ªDðÛ„Ì×LÝ——Ð9Ç|•FèçVm™¨€™3õS–9Äå¢<̉Ìm¢±`·º˜&Z²ž Ë®D«¶»6™‰©­HÈ Àá«h­i³04æ’hxœi3ï¨(ÓL·†‹¶ËpŒ ƒÜÒ? :õdsÀ –3æÓ·Üjâ¬9—]8n¼&]I F£¼…ì–—Œ0v°LǐÅfÛ2TÖ’aµ˜N@ÖBSÏ^à´4-±°b×nÈÈœÆD=KdŒø…ÄÈK,›ÖR§fjü$^ÔÎ!„6^ s:Üun\ôkCÞò÷<—Lúl Í›G¹ÀPá¼Nc¡šÒ…ÙWͳœ±vÊáЄ×9‹P‰cEØ‘™›µŸP<×g1 º©Ø¬wiÁ^l5× I/';Ë+´Z‡ÓÄFÕp[Èð’ HÄ ó 9¬Dl4“é±Ï”V=^Hð;žLädÉa‚°Ë,#/Ž~²BÔÛ QãñQtIeórVB,ÏÂf‹4#Μc‹É3ZIÖ Œ¢¥·üxa‡Ãçè„jŠ[5 Ä!U?,3žÎ×…ðdÓ÷háŠA‰ìÄ4÷ÃÜZÃE{‰®+W\ZÍE[‰»µk»MÝ­`¢©†˜ÃV‹-f¢¡†¢a«eŠ%«Y¨©q%jâd,Ôq`) ¤¦…šˆ ¦E>0Ùb²t–Ÿ  ÷jsςҒKÈcø(é›;k(’#ôŒQ ™C> õ³M9óºÆµ¤çâ;uÀ)5>RÔ¸fÓ~Ȧ—’-$fe«"FâUˆÊwµPÏu w+"åÉó¨6s™Û9(À¨ù©hE°½†n`m~“@©›p!Vkhµ Á1šbEqqÊ@ºèl›2 –Yã%‘‚hÛ{a¶‡ÅÞM²¬çL34®Çl]®‹ŽØŒm'RÜe35æöˆ­Á­ cP9šeÁköo´L³Ì=p8]”‡B¶,šº|ɏdzXˆØk*ÇÚ{#ñ‰pã(€¶‡9ý'šÜ³½¯kƒ†Â’ëSOƒ•Å®H6+a¢µˆ‹Y¨b˜b+XˆÖ!°u!¢"µˆˆn2ˆ Å0Ä`Å Ô®c(ÓÜGº•Ä»Œ âWî%q.áÐÄ÷î%umÍ£+ÜQ,Vn¦-GphU¸¢X­&,Gt ·K¢ÅÅ·¥RÄÊÉbKn N­R2g$VµÕó Qr#–ÓZUÏð0ÎtÙÀœz ëöo“Îk¯n„T°"SÞ+³/…€½"ižãO%Í%&Δâ‘ËØ´IˆÓ°Ë‰ÞM3.™yçÁzit›`4C`k¢¼á!álÄï sÂ[×!¤l¾æo"ƒIÔ'@ªu)3›ô®“@Z à¾] üœ'‡4¸PÞkÁ-qÄH‰ÓÍBd´ÿ —¹°ÄA&ÊUC„öz‚‚RæŠtf¬>˜ÑidšEçÑL÷áý¡V±h§­c¿¥¨ƒ@g¼…Ýö^ÞËc.ž„æ“I[ ª+·zÐÒÚ,½Ð»¶€C›7jk$๖€Ž¾ÅÙpp¶ÍþéΤ ½ØÎŒq ñpæžÅ¥#Øâ49ÃÂK^MYV“,¶Éz_òæ:…;Õ«¦I3âJ£¤û5$7Èxün\â]Êe¯(Ÿ&Ž‹¶2<6Ćf× æ¢ƱqWı[(ÙÂŽç‚T7¨@ÈÉÍß‚ïÙ"&3TYlGށ†)†#5ŠA©^T2ÆÁ†)©†©†¤yGXÁ†©"†)©¼ÅV WS†#©]R–r‹q5ÕbâWþBh¯u+ªÅÄ×ü„nÑ^êkªÁj‰jeœWˆÕÕ`µDµ2Ì+Ä µDµµ5Ô{¤Þ0RF’H÷AÛ<ÊÁ§ ƈæ0Ñ£ê4 öÚµ[¬/1²€â<-¬šö²r×0o×w ´xÐÒË„ g01¬„åEM蛇Ã\6µE›‘fÙO k÷CºnÓ1`iîÒ² áÂ!ÑLÄÿ ³¬\õ*:M=Ç»c‹2[‰ØsÕLò\ŒK L^™üÄN\¶#» Ç\……ßïIœÉ$¸ÎñÍ®ÔHÇ Ûí/´>Li”„†g^$ 7NÍÑÑ2M2ªNg=k½Ð}Ÿl6‡ —JWˆ”ÞéT·+µ¦üÂFè¢Vs6ýÆ4»2+2IÝ9ô9®ÇGÙÇ1+Ä8;*Õ§ž½D*îÑWÚçá3Ma¤·ˆ¥t}š²Ü…Q+Æüµ8HíS”üxGéÁˆ¦Ël„éÈ 5 µÄƒ6äÜ(kIš¯S†fÖ&¸®×v|Äyˆ*禌Éù@7-®Ä[]ÎÖ¿ê`º…=:…žJVnݳvðÖKE¼‚ »mà ÷f®:Ë ™–4rð¡4` ܹçž~‹C=œ…¾Ïj|VDtK.ƒ"9 Ï ­–éXá³6WÒïIL-Ї Ç PK \alang/en/media_vimeo.phpnu[. /** * Strings for plugin 'media_vimeo' * * @package media_vimeo * @copyright 2016 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['pluginname'] = 'Vimeo'; $string['pluginname_help'] = 'The video-sharing website vimeo.com.'; $string['privacy:metadata'] = 'The Vimeo media plugin does not store any personal data.'; $string['donottrack'] = 'Enable do not track Vimeo links'; $string['donottrack_desc'] = 'If enabled, the player will not track any session data, including all cookies and analytics.'; PK \CY pix/icon.pngnu[PNG  IHDRa OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3-bKGD pHYs  tIME 넼IDAT8˝ka?ϓشpHQ(BE4[ 88مcJAqHAC87m(yis8$n'*C`x%&ϜEWNयtRihEV1mȸm2gmuW7g6}o,4.+siHA3(ͳ,β8I:= [9ʗ.ϯ9PYōDwf-&%?PFo W,$ >X 3wBl9"Oc|Ѣ4<<aY3{0]u{;Йk ڒף[#SLHǔ5#LHeLsonB*/ i[i*;b-} &+/%PIdTWrk@s;-z%@HdIENDB`PK \kk version.phpnu[. /** * Version details * * @package media_vimeo * @copyright 2016 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); $plugin->version = 2025041400; // The current plugin version (Date: YYYYMMDDXX). $plugin->requires = 2025040800; // Requires this Moodle version. $plugin->component = 'media_vimeo'; // Full name of the plugin (used for diagnostics). PK \+ + wsplayer.phpnu[. /** * A script to embed vimeo videos via the site (so vimeo privacy restrictions by domain will work in the mobile app). * * The site is doing a double frame embedding: * - First, the media player replaces the vimeo link with an iframe pointing to vimeo. * - Second, the app replaces the previous iframe link with a link to this file that includes again the iframe to vimeo. * Thanks to these changes, the video is embedded in a page in the site server so the privacy restrictions will work. * * Note 1: Vimeo privacy restrictions seems to be based on the Referer HTTP header. * Note 2: This script works even if the plugin is disabled (some users could be using the vimeo embedding code). * * @package media_vimeo * @copyright 2017 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define('NO_MOODLE_COOKIES', true); require_once(__DIR__ . '/../../../config.php'); require_once($CFG->dirroot . '/webservice/lib.php'); global $OUTPUT; $token = required_param('token', PARAM_ALPHANUM); $video = required_param('video', PARAM_ALPHANUM); // Video ids are numeric, but it's more solid to expect things like 00001. $width = optional_param('width', 0, PARAM_INT); $height = optional_param('height', 0, PARAM_INT); $h = optional_param('h', '', PARAM_ALPHANUM); // Security hash for restricted videos. // Authenticate the user. $webservicelib = new webservice(); $webservicelib->authenticate_user($token); $params = ['lang' => current_language()]; if (!empty($h)) { $params['h'] = $h; } // Add do not track parameter. if (get_config('media_vimeo', 'donottrack')) { $params['dnt'] = 1; } $embedurl = new moodle_url("https://player.vimeo.com/video/$video", $params); $context = ['embedurl' => $embedurl->out(false)]; // Template context. if (empty($width) && empty($height)) { // Use the full page. The video will keep the ratio. $context['style'] = "position:absolute; top:0; left:0; width:100%; height:100%;"; } else { $context['width'] = $width; $context['height'] = $height; } // Output the rendered template. echo $OUTPUT->render_from_template('media_vimeo/appembed', $context); PK \:fclasses/privacy/provider.phpnu[. /** * Privacy provider implementation for media_vimeo. * * @package media_vimeo * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace media_vimeo\privacy; defined('MOODLE_INTERNAL') || die(); /** * Privacy provider implementation for media_vimeo. * * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class provider implements \core_privacy\local\metadata\null_provider { /** * Get the language string identifier with the component's language * file to explain why this plugin stores no data. * * @return string */ public static function get_reason(): string { return 'privacy:metadata'; } } PK \L< classes/plugin.phpnu[. /** * Main class for plugin 'media_vimeo' * * @package media_vimeo * @copyright 2016 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); /** * Player that embeds Vimeo links. * * @package media_vimeo * @copyright 2016 Marina Glancy * @author 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class media_vimeo_plugin extends core_media_player_external { protected function embed_external(moodle_url $url, $name, $width, $height, $options) { global $OUTPUT; $donottrack = get_config('media_vimeo', 'donottrack'); $videoid = $this->get_video_id(); $info = s($name); $params = []; // Note: resizing via url is not supported, user can click the fullscreen // button instead. iframe embedding is not xhtml strict but it is the only // option that seems to work on most devices. self::pick_video_size($width, $height); // Add do not track parameter. if ($donottrack) { $params['dnt'] = 1; } $embedurl = new moodle_url("https://player.vimeo.com/video/$videoid", $params); // Template context. $context = [ 'width' => $width, 'height' => $height, 'title' => $info, 'embedurl' => $embedurl->out(false), ]; // Return the rendered template. return $OUTPUT->render_from_template('media_vimeo/embed', $context); } /** * Get Vimeo video ID. * @return string */ protected function get_video_id(): string { return $this->get_video_id_with_code() ?? $this->matches[1] ?? ''; } /** * Get video id with code. * @return string|null If NULL then the URL does not contain the code. */ protected function get_video_id_with_code(): ?string { $id = $this->matches[2] ?? null; if (!empty($id)) { $code = $this->matches[3] ?? null; if (!empty($code)) { return "{$id}?h={$code}"; } return $id; } return null; } /** * Returns regular expression to match vimeo URLs. * @return string */ protected function get_regex() { // Initial part of link. $start = '~^https?://vimeo\.com/'; // Middle bit: either 123456789 or 123456789/abdef12345. $middle = '(([0-9]+)/([0-9a-f]+)|[0-9]+)'; return $start . $middle . core_media_player_external::END_LINK_REGEX_PART; } public function get_embeddable_markers() { return array('vimeo.com/'); } /** * Default rank * @return int */ public function get_rank() { return 1010; } } PK \Btemplates/appembed.mustachenu[{{! This file is part of Moodle - http://moodle.org/ Moodle is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Moodle is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Moodle. If not, see . }} {{! @template media_vimeo/embed This template will render the Vimeo embeded player in a special format for the Moodle mobile app. Variables required for this template: * lang: The language of the user. * width: The width of the video. * height: The height of the video. * style: The style info for iframe. * embedurl: The URL to the video. Example context (json): { "lang": "en", "width": 640, "height": 360, "style": "position:absolute; top:0; left:0; width:100%; height:100%;", "embedurl": "https://player.vimeo.com/video/226053498" } }} {{#str}} pluginname, media_vimeo {{/str}} PK \``templates/embed.mustachenu[{{! This file is part of Moodle - http://moodle.org/ Moodle is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Moodle is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Moodle. If not, see . }} {{! @template media_vimeo/embed This template will render the Vimeo embeded player. Variables required for this template: * title: The title of the video. * width: The width of the video. * height: The height of the video. * embedurl: The URL to the video. Example context (json): { "title": "Vimeo video", "width": 640, "height": 360, "embedurl": "https://player.vimeo.com/video/226053498" } }} PK \;$ZH+H+tests/player_test.phpnu[. namespace media_vimeo; use core_media_manager; /** * Test script for media embedding. * * @package media_vimeo * @copyright 2016 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ final class player_test extends \advanced_testcase { /** * Pre-test setup. Preserves $CFG. */ public function setUp(): void { parent::setUp(); // Reset $CFG and $SERVER. $this->resetAfterTest(); // Consistent initial setup: all players disabled. \core\plugininfo\media::set_enabled_plugins('vimeo'); // Pretend to be using Firefox browser (must support ogg for tests to work). \core_useragent::instance(true, 'Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0 '); } /** * Test that plugin is returned as enabled media plugin. */ public function test_is_installed(): void { $sortorder = \core\plugininfo\media::get_enabled_plugins(); $this->assertEquals(['vimeo' => 'vimeo'], $sortorder); } /** * Test embedding without media filter (for example for displaying URL resorce). */ public function test_embed_url(): void { global $CFG; $url = new \moodle_url('http://vimeo.com/1176321'); $manager = core_media_manager::instance(); $embedoptions = array( core_media_manager::OPTION_TRUSTED => true, core_media_manager::OPTION_BLOCK => true, ); $this->assertTrue($manager->can_embed_url($url, $embedoptions)); $content = $manager->embed_url($url, 'Test & file', 0, 0, $embedoptions); $this->assertMatchesRegularExpression('~mediaplugin_vimeo~', $content); $this->assertMatchesRegularExpression('~~', $content); $this->assertMatchesRegularExpression('~width="' . $CFG->media_default_width . '" height="' . $CFG->media_default_height . '"~', $content); // Repeat sending the specific size to the manager. $content = $manager->embed_url($url, 'New file', 123, 50, $embedoptions); $this->assertMatchesRegularExpression('~width="123" height="50"~', $content); } /** * Test that mediaplugin filter replaces a link to the supported file with media tag. * * filter_mediaplugin is enabled by default. */ public function test_embed_link(): void { global $CFG; $url = new \moodle_url('http://vimeo.com/1176321'); $text = \html_writer::link($url, 'Watch this one'); $content = format_text($text, FORMAT_HTML); $this->assertMatchesRegularExpression('~mediaplugin_vimeo~', $content); $this->assertMatchesRegularExpression('~~', $content); $this->assertMatchesRegularExpression('~width="' . $CFG->media_default_width . '" height="' . $CFG->media_default_height . '"~', $content); } /** * Test that mediaplugin filter adds player code on top of ~', $content); $this->assertDoesNotMatchRegularExpression('~assertDoesNotMatchRegularExpression('~Unsupported text~', $content); $this->assertDoesNotMatchRegularExpression('~ tag. $text = ''; $content = format_text($text, FORMAT_HTML); $this->assertMatchesRegularExpression('~mediaplugin_vimeo~', $content); $this->assertMatchesRegularExpression('~~', $content); $this->assertMatchesRegularExpression('~width="123" height="35"~', $content); } /** * Test embedding without media filter (for example for displaying URL resorce) * and test that player plugin is parsing the URL with the code. */ public function test_embed_url_with_code(): void { global $CFG; $url = new \moodle_url('https://vimeo.com/1176321/abcdef12345'); $manager = core_media_manager::instance(); $embedoptions = array( core_media_manager::OPTION_TRUSTED => true, core_media_manager::OPTION_BLOCK => true, ); $this->assertTrue($manager->can_embed_url($url, $embedoptions)); $content = $manager->embed_url($url, 'Test & file', 0, 0, $embedoptions); // Video source URL is contains the new vimeo embedded URL format. $this->assertStringContainsString('player.vimeo.com/video/1176321?h=abcdef12345', $content); $this->assertMatchesRegularExpression('~mediaplugin_vimeo~', $content); $this->assertMatchesRegularExpression('~~', $content); $this->assertMatchesRegularExpression('~width="' . $CFG->media_default_width . '" height="' . $CFG->media_default_height . '"~', $content); // Repeat sending the specific size to the manager. $content = $manager->embed_url($url, 'New file', 123, 50, $embedoptions); $this->assertMatchesRegularExpression('~width="123" height="50"~', $content); } /** * Test that mediaplugin filter replaces a link to the supported file with media tag * and test that player plugin is parsing the URL with the code. * * filter_mediaplugin is enabled by default. */ public function test_embed_link_with_code(): void { global $CFG; $url = new \moodle_url('https://vimeo.com/1176321/abcdef12345'); $text = \html_writer::link($url, 'Watch this one'); $content = format_text($text, FORMAT_HTML); // Video source URL is contains the new vimeo embedded URL format. $this->assertStringContainsString('player.vimeo.com/video/1176321?h=abcdef12345', $content); $this->assertMatchesRegularExpression('~mediaplugin_vimeo~', $content); $this->assertMatchesRegularExpression('~~', $content); $this->assertMatchesRegularExpression('~width="' . $CFG->media_default_width . '" height="' . $CFG->media_default_height . '"~', $content); } /** * Test that mediaplugin filter adds player code on top of ~', $content); $this->assertDoesNotMatchRegularExpression('~assertDoesNotMatchRegularExpression('~Unsupported text~', $content); $this->assertDoesNotMatchRegularExpression('~ tag. $text = ''; $content = format_text($text, FORMAT_HTML); $this->assertMatchesRegularExpression('~mediaplugin_vimeo~', $content); $this->assertMatchesRegularExpression('~~', $content); $this->assertMatchesRegularExpression('~width="123" height="35"~', $content); } /** * Test that mediaplugin filter skip the process when the URL is invalid. */ public function test_skip_invalid_url_format_with_code(): void { $url = new \moodle_url('https://vimeo.com/_________/abcdef12345s'); $text = \html_writer::link($url, 'Invalid Vimeo URL'); $content = format_text($text, FORMAT_HTML); $this->assertStringNotContainsString('player.vimeo.com/video/_________?h=abcdef12345s', $content); $this->assertDoesNotMatchRegularExpression('~mediaplugin_vimeo~', $content); $this->assertDoesNotMatchRegularExpression('~~', $content); } /** * Test that Vimeo media plugin renders embed code correctly * when the "do not track" config options is set to true. * * @covers \media_vimeo_plugin::embed_external */ public function test_vimeo_donottrack(): void { // Turn on the do not track option. set_config('donottrack', true, 'media_vimeo'); // Test that the embed code contains the do not track param in the url. $url = new \moodle_url('https://vimeo.com/226053498'); $text = \html_writer::link($url, 'Watch this one'); $content = format_text($text, FORMAT_HTML); $this->assertMatchesRegularExpression('~dnt=1~', $content); } } PK \< settings.phpnu[. /** * Settings file for plugin 'media_vimeo' * * @package media_vimeo * @copyright 2023 Matt Porritt fulltree) { // Add a settings checkbox to enable or disable do not track vimeo links. $settings->add(new admin_setting_configcheckbox('media_vimeo/donottrack', new lang_string('donottrack', 'media_vimeo'), new lang_string('donottrack_desc', 'media_vimeo'), 0)); } PK \alang/en/media_vimeo.phpnu[PK \CY #pix/icon.pngnu[PK \kk version.phpnu[PK \+ + wsplayer.phpnu[PK \:f"classes/privacy/provider.phpnu[PK \L< 6(classes/plugin.phpnu[PK \B36templates/appembed.mustachenu[PK \``v=templates/embed.mustachenu[PK \;$ZH+H+Ctests/player_test.phpnu[PK \< nsettings.phpnu[PK <s