Continue with yesterday's topic.
In edit. class. tinymce. the document_base_url attribute is added to init. Its value is set to "/claroline/courses/" + "'. $ _ coursename. '"+"/document ". (This document_base_url is mainly used in the generatepreview () method in media. js during preview)
Today, I found that if the course name I created contains Chinese characters, previewing fails.
After re-debugging, I found that when I set up a course, I entered the course title and CourseCode"," Course title "can be Chinese, and" course code "cannot be Chinese.
When creating a course, the course folder name is "course code.
Therefore, the variable part of document_base_url should use "course code" instead of "Course name ".
In claroline \ document. php, the property officialcode is found.
$ _ Course = claro_get_current_course_data ();
$ _ Coursename = $ _ course ['name'];
$ _ Courseofficialcode =$ _ Course ['officalcode'];
Obtain the course code, replace $ _ coursename in document_base_url with $ _ courseofficialcode, and test again. OK!