switch ($editor) {
case 'tinymce':
+ $editorlanguage = substr(current_language(), 0, 2);
+ $direction = get_string('thisdirection');
$configuration[] = $CFG->httpswwwroot ."/lib/editor/tinymce/jscripts/tiny_mce/tiny_mce.js";
- $configuration[] = $CFG->httpswwwroot ."/lib/editor/tinymce.js.php?course=". $courseid;
+ $configuration[] = $CFG->httpswwwroot ."/lib/editor/tinymce.js.php?course=$courseid&editorlanguage=$editorlanguage&direction=$direction";
$configured['tinymce'] = true;
break;
<?php
+define('NO_MOODLE_COOKIES', true);
+
require_once('../../config.php');
$courseid = optional_param('course', 0, PARAM_INT);
-$editorlanguage = substr(current_language(), 0, 2);
-$directionality = get_string('thisdirection');
+$editorlanguage = optional_param('editorlanguage', 'en', PARAM_ALPHA);
+$directionality = optional_param('direction', get_string('thisdirection'), PARAM_ALPHA);
/*
* This section configures the TinyMCE toolbar buttons on and off