diff --git a/CHANGES.txt b/CHANGES.txt index 67d2f7c..ec5b0fd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,7 +1,9 @@ Change List ========= -Version 1.4.05(Build 2018090300) [in progress] + +Version 1.4.05(Build 2018102500) - fixed popup recorder template +- security fix Version 1.4.04(Build 2018090300) -added Cloud Poodll support diff --git a/tts.php b/tts.php deleted file mode 100644 index 0697bac..0000000 --- a/tts.php +++ /dev/null @@ -1,61 +0,0 @@ -. - -/** - * Prints a particular instance of englishcentral - * - * You can have a rather longer description of the file as well, - * if you like, and it can span multiple lines. - * - * @package filter_generico - * @copyright 2015 Justin Hunt - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - - -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); -global $CFG; - -$txt = optional_param('txt','hello', PARAM_TEXT); // course_module ID, or -$lang = optional_param('lang', 'en', PARAM_TEXT); // englishcentral instance ID - it should be named as the first character of the module -$filepath = $CFG->dataroot . '/ttscache/' . $lang . '/' . urlencode($txt); -$writefile=false; -if(!file_exists($filepath)){ - //$qs = http_build_query(array("ie" => "utf-8","tl" => $lang, "q" => $txt)); - $qs = "ie=utf-8&tl=$lang&q=" . urlencode($txt); - $ctx = stream_context_create(array("http"=>array("method"=>"GET","header"=>"Referer: \r\n"))); - $soundfile = file_get_contents("http://translate.google.com/translate_tts?".$qs, false, $ctx); - $writefile=true; -}else{ - $soundfile = file_get_contents($filepath); -} - -header("Content-type: audio/mpeg"); -header("Content-Transfer-Encoding: binary"); -header('Pragma: no-cache'); -header('Expires: 0'); - -echo($soundfile); -if($writefile){ - if(!file_exists($CFG->dataroot . '/ttscache')){ - mkdir($CFG->dataroot . '/ttscache'); - } - if(!file_exists($CFG->dataroot . '/ttscache/' . $lang)){ - mkdir($CFG->dataroot . '/ttscache/' . $lang); - } - file_put_contents($filepath,$soundfile); -} \ No newline at end of file diff --git a/version.php b/version.php index 9aeefdd..1268199 100644 --- a/version.php +++ b/version.php @@ -25,8 +25,8 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2018090300; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2018102500; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2011070100; // Requires this Moodle version $plugin->component = 'filter_generico'; // Full name of the plugin (used for diagnostics) $plugin->maturity = MATURITY_STABLE; -$plugin->release = 'Version 1.4.04(Build 2018090300)'; +$plugin->release = 'Version 1.4.05(Build 2018102500)';