From 7fbdd2839541fd5b18150e8b581fb117c34186ea Mon Sep 17 00:00:00 2001 From: dongsheng Date: Thu, 7 May 2009 05:30:10 +0000 Subject: [PATCH] "MDL-3729, use forces language for htmleditor" --- lib/editor/htmlarea/lang/en.php | 4 ++++ lib/weblib.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/editor/htmlarea/lang/en.php b/lib/editor/htmlarea/lang/en.php index 41a261bd9af..fa4d0413b51 100644 --- a/lib/editor/htmlarea/lang/en.php +++ b/lib/editor/htmlarea/lang/en.php @@ -10,6 +10,10 @@ // ob_start("ob_gzhandler"); //} + // use course language + $courseid = optional_param('id', 1, PARAM_INT); + course_setup($courseid); + header("Content-type: application/x-javascript; charset: utf-8"); // Correct MIME type header("Last-Modified: " . gmdate("D, d M Y H:i:s", $lastmodified) . " GMT"); header("Expires: " . gmdate("D, d M Y H:i:s", time() + $lifetime) . " GMT"); diff --git a/lib/weblib.php b/lib/weblib.php index 21bfad4f1f1..6c4b15e9f1d 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -4936,7 +4936,7 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v } $str .= ($scriptcount < 1) ? ''."\n" : ''; + $CFG->httpswwwroot .'/lib/editor/htmlarea/lang/en.php?id='.$courseid.'">'."\n" : ''; $scriptcount++; if ($height) { // Usually with legacy calls