diff --git a/main/coursecopy/classes/CourseRestorer.class.php b/main/coursecopy/classes/CourseRestorer.class.php index c7bf87b65e..cc7e3b1b22 100755 --- a/main/coursecopy/classes/CourseRestorer.class.php +++ b/main/coursecopy/classes/CourseRestorer.class.php @@ -1131,7 +1131,7 @@ class CourseRestorer $table = Database :: get_course_table(TABLE_AGENDA); $resources = $this->course->resources; foreach ($resources[RESOURCE_EVENT] as $id => $event) { - // check resources inside html from fckeditor tool and copy correct urls into recipient course + // check resources inside html from ckeditor tool and copy correct urls into recipient course $event->content = DocumentManager::replace_urls_inside_content_html_from_copy_course( $event->content, $this->course->code, @@ -1208,7 +1208,7 @@ class CourseRestorer $course_destination=$this->course->destination_path; } - // check resources inside html from fckeditor tool and copy correct urls into recipient course + // check resources inside html from ckeditor tool and copy correct urls into recipient course $description_content = DocumentManager::replace_urls_inside_content_html_from_copy_course( $cd->content, $this->course->code, @@ -1240,7 +1240,7 @@ class CourseRestorer $resources = $this->course->resources; foreach ($resources[RESOURCE_ANNOUNCEMENT] as $id => $announcement) { - // check resources inside html from fckeditor tool and copy correct urls into recipient course + // check resources inside html from ckeditor tool and copy correct urls into recipient course $announcement->content = DocumentManager::replace_urls_inside_content_html_from_copy_course( $announcement->content, $this->course->code, @@ -1342,7 +1342,7 @@ class CourseRestorer } if ($id != -1) { - // check resources inside html from fckeditor tool and copy correct urls into recipient course + // check resources inside html from ckeditor tool and copy correct urls into recipient course $quiz->description = DocumentManager::replace_urls_inside_content_html_from_copy_course( $quiz->description, $this->course->code, @@ -1438,7 +1438,7 @@ class CourseRestorer $table_ans = Database::get_course_table(TABLE_QUIZ_ANSWER); $table_options = Database::get_course_table(TABLE_QUIZ_QUESTION_OPTION); - // check resources inside html from fckeditor tool and copy correct urls into recipient course + // check resources inside html from ckeditor tool and copy correct urls into recipient course $question->description = DocumentManager::replace_urls_inside_content_html_from_copy_course( $question->description, $this->course->code, @@ -1513,7 +1513,7 @@ class CourseRestorer $correct_answers = array(); foreach ($question->answers as $index => $answer) { - // check resources inside html from fckeditor tool and copy correct urls into recipient course + // check resources inside html from ckeditor tool and copy correct urls into recipient course $answer['answer'] = DocumentManager::replace_urls_inside_content_html_from_copy_course( $answer['answer'], $this->course->code, @@ -1717,7 +1717,7 @@ class CourseRestorer $result_check = Database::query($sql_check); - // check resources inside html from fckeditor tool and copy correct urls into recipient course + // check resources inside html from ckeditor tool and copy correct urls into recipient course $survey->title = DocumentManager::replace_urls_inside_content_html_from_copy_course( $survey->title, $this->course->code, @@ -1902,7 +1902,7 @@ class CourseRestorer $table_que = Database :: get_course_table(TABLE_SURVEY_QUESTION); $table_ans = Database :: get_course_table(TABLE_SURVEY_QUESTION_OPTION); - // check resources inside html from fckeditor tool and copy correct urls into recipient course + // check resources inside html from ckeditor tool and copy correct urls into recipient course $question->survey_question = DocumentManager::replace_urls_inside_content_html_from_copy_course( $question->survey_question, $this->course->code, @@ -1927,7 +1927,7 @@ class CourseRestorer $new_id = Database::insert_id(); foreach ($question->answers as $index => $answer) { - // check resources inside html from fckeditor tool and copy correct urls into recipient course + // check resources inside html from ckeditor tool and copy correct urls into recipient course $answer['option_text'] = DocumentManager::replace_urls_inside_content_html_from_copy_course( $answer['option_text'], $this->course->code, @@ -2376,7 +2376,7 @@ class CourseRestorer $condition_session = " , session_id = '$session_id' "; } - // check resources inside html from fckeditor tool and copy correct urls into recipient course + // check resources inside html from ckeditor tool and copy correct urls into recipient course $glossary->description = DocumentManager::replace_urls_inside_content_html_from_copy_course( $glossary->description, $this->course->code, @@ -2429,7 +2429,7 @@ class CourseRestorer foreach ($resources[RESOURCE_WIKI] as $id => $wiki) { // the sql statement to insert the groups from the old course to the new course - // check resources inside html from fckeditor tool and copy correct urls into recipient course + // check resources inside html from ckeditor tool and copy correct urls into recipient course $wiki->content = DocumentManager::replace_urls_inside_content_html_from_copy_course( $wiki->content, $this->course->code, @@ -2478,7 +2478,7 @@ class CourseRestorer $resources = $this->course->resources; foreach ($resources[RESOURCE_THEMATIC] as $id => $thematic) { - // check resources inside html from fckeditor tool and copy correct urls into recipient course + // check resources inside html from ckeditor tool and copy correct urls into recipient course $thematic->content = DocumentManager::replace_urls_inside_content_html_from_copy_course( $thematic->content, $this->course->code, @@ -2533,7 +2533,7 @@ class CourseRestorer $resources = $this->course->resources; foreach ($resources[RESOURCE_ATTENDANCE] as $id => $obj) { - // check resources inside html from fckeditor tool and copy correct urls into recipient course + // check resources inside html from ckeditor tool and copy correct urls into recipient course $obj->params['description'] = DocumentManager::replace_urls_inside_content_html_from_copy_course( $obj->params['description'], $this->course->code, @@ -2576,7 +2576,7 @@ class CourseRestorer $resources = $this->course->resources; foreach ($resources[RESOURCE_WORK] as $obj) { - // check resources inside html from fckeditor tool and copy correct urls into recipient course + // check resources inside html from ckeditor tool and copy correct urls into recipient course $obj->params['description'] = DocumentManager::replace_urls_inside_content_html_from_copy_course( $obj->params['description'], $this->course->code, diff --git a/main/document/showinframesmin.php b/main/document/showinframesmin.php index 14b20f0325..ee1f1eff8f 100755 --- a/main/document/showinframesmin.php +++ b/main/document/showinframesmin.php @@ -65,8 +65,7 @@ if ($is_allowed_in_course == false) { api_not_allowed(true); } -//Check user visibility -//$is_visible = DocumentManager::is_visible_by_id($document_id, $course_info, api_get_session_id(), api_get_user_id()); +// Check user visibility $is_visible = DocumentManager::check_visibility_tree( $document_id, api_get_course_id(), @@ -91,32 +90,31 @@ $browser_display_title = 'Documents - '.Security::remove_XSS($_GET['cidReq']).' $js_glossary_in_documents = ''; if (api_get_setting('show_glossary_in_documents') == 'ismanual') { - $js_glossary_in_documents = ' // $(document).ready(function() { - $.frameReady(function() { - // $("
I am a div courses
").prependTo("body"); - }, "mainFrame", - { load: [ - {type:"script", id:"_fr1", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.min.js"}, - {type:"script", id:"_fr2", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.highlight.js"}, - {type:"script", id:"_fr3", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/ckeditor/plugins/glossary/fck_glossary_manual.js"} - ] - } - ); - //});'; + $js_glossary_in_documents = ' + $.frameReady(function() { + // $("
I am a div courses
").prependTo("body"); + }, "mainFrame", + { load: [ + {type:"script", id:"_fr1", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.min.js"}, + {type:"script", id:"_fr2", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.highlight.js"}, + {type:"script", id:"_fr3", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/ckeditor/plugins/glossary/fck_glossary_manual.js"} + ] + } + ); + '; } elseif (api_get_setting('show_glossary_in_documents') == 'isautomatic') { - $js_glossary_in_documents = '// $(document).ready(function() { - $.frameReady(function(){ - // $("
I am a div courses
").prependTo("body"); - - }, "mainFrame", - { load: [ - {type:"script", id:"_fr1", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.min.js"}, - {type:"script", id:"_fr2", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.highlight.js"}, - {type:"script", id:"_fr3", src:"'.api_get_path(WEB_LIBRARY_PATH).'fckeditor/editor/plugins/glossary/fck_glossary_automatic.js"} - ] - } - ); - // });'; + $js_glossary_in_documents = ' + $.frameReady(function(){ + // $("
I am a div courses
").prependTo("body"); + + }, "mainFrame", + { load: [ + {type:"script", id:"_fr1", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.min.js"}, + {type:"script", id:"_fr2", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.highlight.js"}, + {type:"script", id:"_fr3", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/ckeditor/plugins/glossary/fck_glossary_automatic.js"} + ] + }); + '; } $htmlHeadXtra[] = ''; $htmlHeadXtra[] = ' '; Display::display_reduced_header();