From 7b6f4f9c1fa53df04fb64e0cd336ee08c9799eec Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sat, 5 Nov 2005 16:19:23 +0000 Subject: [PATCH] Fixed encoding of page title of framed IMS CP resources (mimic of skodak's work in other frames) --- mod/resource/type/ims/resource.class.php | 35 +++++++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/mod/resource/type/ims/resource.class.php b/mod/resource/type/ims/resource.class.php index a59c9a95c54..65eca6593db 100644 --- a/mod/resource/type/ims/resource.class.php +++ b/mod/resource/type/ims/resource.class.php @@ -346,12 +346,26 @@ class resource_ims extends resource_base { if (empty($frameset)) { + /// Select encoding + if (!empty($CFG->unicode)) { + $encoding = 'utf-8'; + } else { + $encoding = get_string('thischarset'); + } + + /// Select direction + if (get_string('thisdirection') == 'rtl') { + $direction = ' dir="rtl"'; + } else { + $direction = ' dir="ltr"'; + } + /// The frameset output starts echo "\n"; - echo "\n"; + echo "\n"; echo ''; - echo ''; + echo ''; echo "{$course->shortname}: ".strip_tags(format_string($resource->name,true))."\n"; echo "resource_framesize,*\">"; //Main frameset echo "id}&type={$resource->type}&frameset=top\" />"; //Top frame @@ -404,13 +418,26 @@ class resource_ims extends resource_base { } } + /// Select encoding + if (!empty($CFG->unicode)) { + $encoding = 'utf-8'; + } else { + $encoding = get_string('thischarset'); + } + + /// Select direction + if (get_string('thisdirection') == 'rtl') { + $direction = ' dir="rtl"'; + } else { + $direction = ' dir="ltr"'; + } /// The frameset output starts echo "\n"; - echo "\n"; + echo "\n"; echo ''; - echo ''; + echo ''; echo "{$course->shortname}: ".strip_tags(format_string($resource->name,true))."\n"; if (!empty($this->parameters->navigationbuttons)) { echo ""; //Ims frameset with navigation buttons