diff --git a/main/document/document_with_glossary_terms.php b/main/document/document_with_glossary_terms.php
new file mode 100644
index 0000000000..6cc4da98a4
--- /dev/null
+++ b/main/document/document_with_glossary_terms.php
@@ -0,0 +1,62 @@
+0) {
+ foreach ($array_glossary as $index_glossary => $value_glossary) {
+ $to_be_replaced[]=$str_href=''.$value_glossary['name'].'';
+ $to_replaced[]=$value_glossary['name'];
+ }
+}
+
+$new_file=str_replace($to_replaced,$to_be_replaced,$content_html);
+$new_file=str_replace('
','',$new_file);
+echo $new_file;
+?>
diff --git a/main/document/headerpage.php b/main/document/headerpage.php
index 06f1800fd8..676397a0e7 100644
--- a/main/document/headerpage.php
+++ b/main/document/headerpage.php
@@ -29,6 +29,8 @@ $interbreadcrumb[]= array ("url"=>"showinframes.php?file=".$header_file, "name"=
Display::display_header(null,"Doc");
echo "";
+$file_url_web='document_with_glossary_terms.php?file='.urlencode(Security::remove_XSS($_GET['file']));
+$file_origin_url_web=api_get_path('WEB_COURSE_PATH').$_course['path'].'/document'.$header_file."?".api_get_cidreq();
+echo "".$lang_cut_paste_link."";
?>
\ No newline at end of file
diff --git a/main/document/showinframes.php b/main/document/showinframes.php
index 5baf27523d..8687fe0a10 100644
--- a/main/document/showinframes.php
+++ b/main/document/showinframes.php
@@ -1,4 +1,4 @@
-'./document.php', 'name'=> get_lang('Documents'));
$nameTools = get_lang('Documents');
$file = Security::remove_XSS(urldecode($_GET['file']));
-
/*
==============================================================================
Main section
@@ -92,15 +91,17 @@ if($is_courseAdmin)
{
$frameheight = 165;
}
-$file_root=$_course['path'].'/document'.str_replace('%2F', '/',$file);
-$file_url_sys=api_get_path('SYS_COURSE_PATH').$file_root;
-$file_url_web=api_get_path('WEB_COURSE_PATH').$file_root;
-
+$file_root=$_course['path'].'/document'.str_replace('%2F', '/',$file);
+$file_url_sys=api_get_path(SYS_COURSE_PATH).$file_root;
+$file_url_web=api_get_path(WEB_COURSE_PATH).$file_root;
+$file_url_web='document_with_glossary_terms.php?file='.urlencode($_GET['file']);
?>
-
+
+
+