我无法将CkEditor与Moodle 2.9.1+集成。 (我怀疑这个问题适用于任何文本编辑器,而不仅仅是CkEditor。)
根据README instructions,我将moodle-ckeditor
从https://github.com/electrolinux/moodle-ckeditor克隆到我管理的moodle安装的lib/editor
目录中。
我将下载的目录从moodle-ckeditor
重命名为ckeditor
。
我将此行添加到根moodle目录中的config.php
:
$CFG->texteditors='ckeditor,tinymce,htmlarea';
当我导航到Admin>插件>文字编辑器>管理编辑器,我只看到原来的3个编辑器:TinyMCS HTML编辑器,纯文本区域和Atto HTML编辑器。
FWIW,当我从显示的"tinymce,"
行中实验性地删除config.php
时,它仍然显示在"管理编辑器"页。这让我觉得$CFG->texteditors
没有被使用。我知道它正在被阅读,因为我在"管理编辑"如果我在该行中输入语法错误。
我已经附加了一个控制台会话,以便引起注意或排除由于拼写错误,权限等导致的错误:
[~/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编辑器"几天后开始在Admin>中显示插件>文字编辑器>管理编辑。不幸的是,当我点击设置[http://mills-cs.org/admin/settings.php?section=editorsettingsckeditor]时,我会得到一个Section error。
答案 0 :(得分:3)
使用Moodle 2.7为我工作,这就是我做的事情
git clone https://github.com/electrolinux/moodle-ckeditor.git
将文件夹/ moodle-ckeditor /复制并粘贴到moodlewww / lib / editor /
将moodlewww / lib / editor / moodle-ckeditor /重命名为moodlewww / lib / editor / ckeditor /
登录我的网站并点击网站管理员 - >通知安装ckeditor
我跳过$ CFG-> texteditors =' 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)