Ckeditor 无法将文本编辑器集成到Moodle 2中

Ckeditor 无法将文本编辑器集成到Moodle 2中,ckeditor,moodle,Ckeditor,Moodle,我无法将CkEditor与Moodle 2.9.1+集成。(我怀疑这个问题适用于任何文本编辑器,而不仅仅是CkEditor。) 根据,我将moodle ckeditor从克隆到我管理的moodle安装的lib/editor目录中 我将下载的目录从moodle-ckeditor重命名为ckeditor 我将这一行添加到根moodle目录中的config.php: $CFG->texteditors='ckeditor,tinymce,htmlarea'; 当我导航到Admin>Plugin

我无法将CkEditor与Moodle 2.9.1+集成。(我怀疑这个问题适用于任何文本编辑器,而不仅仅是CkEditor。)

根据,我将
moodle ckeditor
从克隆到我管理的moodle安装的
lib/editor
目录中

我将下载的目录从
moodle-ckeditor
重命名为
ckeditor

我将这一行添加到根moodle目录中的
config.php

$CFG->texteditors='ckeditor,tinymce,htmlarea';
当我导航到Admin>Plugins>Text editors>manageeditors时,我只看到原来的3个编辑器:TinyMCS HTML编辑器、纯文本区域和Atto HTML编辑器

FWIW,当我实验性地从
config.php
的显示行中删除
“tinymce”
时,它仍然显示在“管理编辑器”页面上。这让我觉得
$CFG->textdeditors
没有被使用。我确实知道它正在被读取,因为如果我在“ManageEditor”页面的那一行中输入语法错误,就会在该页面上出现错误

我附加了一个控制台会话,以提醒注意或排除由于打字错误、权限等导致的错误:

[~/public_html]# grep ckeditor config.php
$CFG->texteditors='ckeditor,tinymce,htmlarea';
[~/public_html]# ls -l lib/editor
total 28
drwxr-xr-x  7 millscso millscso 4096 Jul 23 16:09 ./
drwxr-xr-x 48 millscso millscso 4096 Jul 16 02:16 ../
drwxr-xr-x  9 millscso millscso 4096 Jul 16 02:16 atto/
drwxr-xr-x  5 millscso millscso 4096 Jul 23 16:09 ckeditor/
drwxr-xr-x  7 millscso millscso 4096 Jul 23 15:59 ckeditor-/
-rw-r--r--  1 millscso millscso    0 Jul 16 02:16 index.html
drwxr-xr-x  3 millscso millscso 4096 Jul 16 02:16 textarea/
drwxr-xr-x  9 millscso millscso 4096 Jul 16 02:16 tinymce/
更新


在将更改恢复为
config.php
几天后,“CKEditor HTML editor”开始出现在Admin>Plugins>Text editors>Manage editors中。不幸的是,当我点击Settings[设置]时,我得到了一个答案。

适用于我的Moodle 2.7,下面是我所做的

  • git克隆

  • 将文件夹/moodle ckeditor/复制并粘贴到moodlewww/lib/editor中/

  • 将moodlewww/lib/editor/moodle ckeditor/重命名为moodlewww/lib/editor/ckeditor/

  • 登录到我的网站并单击站点管理->通知以安装ckeditor

  • 我跳过了$CFG->textdeditors='ckeditor,tinymce,htmlarea'

  • 而是转到站点管理->插件->编辑器->管理编辑器,然后启用ckeditor-这可能是您的问题所在

  • 然后将ckeditor向上移动到列表中,使其成为第一个

  • 更新:

    我尝试安装2.9,但失败了,因为version.php文件丢失了-我猜这是2.9中的一个要求

    我总是在开发中使用调试器。您可能会发现它也很有用,请在
    config.php

    // Developer settings - not for production!
    error_reporting(E_ALL & ~E_STRICT);
    ini_set('display_errors', 1);
    
    $CFG->debug = E_ALL & ~E_STRICT;
    $CFG->debugdisplay = true;
    
    因此,我用下面的内容创建了缺少的文件
    /lib/editor/ckeditor/version.php
    ,并在2.9中正确安装了它

    <?php
    // This file is part of Moodle - http://moodle.org/
    //
    // Moodle is free software: you can redistribute it and/or modify
    // it under the terms of the GNU General Public License as published by
    // the Free Software Foundation, either version 3 of the License, or
    // (at your option) any later version.
    //
    // Moodle is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    // GNU General Public License for more details.
    //
    // You should have received a copy of the GNU General Public License
    // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
    
    /**
     * CKEditor text editor integration version file.
     *
     * @package    editor_ckeditor
     * @copyright  
     * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
     */
    
    defined('MOODLE_INTERNAL') || die();
    
    $plugin->version   = 2015073000;        // The current plugin version (Date: YYYYMMDDXX)
    $plugin->requires  = 2015051100;        // Requires this Moodle version
    $plugin->component = 'editor_ckeditor';  // Full name of the plugin (used for diagnostics)
    

    我已经很久没有用Moodle做任何事情了,但是有没有地方可以“清除缓存”或“刷新所有插件”或者类似的东西?Moodle控制面板内的管理按钮?@rlb.usa感谢您的回复。我不知道有刷新功能,但我尝试将网站置于维护模式,然后退出维护模式,但没有效果。非常感谢您的回复。我没有执行步骤4,但是,当我刚刚执行时,它没有显示任何内容ng关于ckeditor。我确实验证了一切都是最新的。我已经启用了ckeditor,并且再次启用了。我仍然收到了部分错误。为您更新了答案:)非常感谢。您不仅赢得了100个名副其实的声誉,而且还赢得了老师和学生的感谢。您想向ckeditor提出拉入请求,还是should I?一点问题也没有:)很高兴能提供帮助-如果您愿意,您可以提出拉取请求,如果您发现了错误;)您可以继续。如果您想做出更大的贡献,请将其更新到最新版本的CKEditor.:-)