Merge branch 'AngelFQC-ckeditor-vimeo' into 1.11.x

pull/3291/head
Angel Fernando Quiroz Campos 5 years ago
commit 3ea7c0ecee
  1. 9
      composer.json
  2. 240
      main/inc/lib/javascript/ckeditor/plugins/ckeditor_vimeo_embed/dialogs/vimeo_embed.js
  3. BIN
      main/inc/lib/javascript/ckeditor/plugins/ckeditor_vimeo_embed/icons/VimeoEmbed.png
  4. 106
      main/inc/lib/javascript/ckeditor/plugins/ckeditor_vimeo_embed/integration/upload.php
  5. 27
      main/inc/lib/javascript/ckeditor/plugins/ckeditor_vimeo_embed/lang/en.js
  6. 27
      main/inc/lib/javascript/ckeditor/plugins/ckeditor_vimeo_embed/lang/es.js
  7. 22
      main/inc/lib/javascript/ckeditor/plugins/ckeditor_vimeo_embed/plugin.js
  8. 8
      main/install/configuration.dist.php
  9. 1
      main/template/default/layout/main.js.tpl
  10. 2
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Announcements.php
  11. 2
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/AssessmentsIntroduction.php
  12. 32
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Basic.php
  13. 3
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Careers.php
  14. 3
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Documents.php
  15. 2
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/DocumentsStudent.php
  16. 1
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/FAQ.php
  17. 16
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Forum.php
  18. 3
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/IntroductionSection.php
  19. 4
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/LearningPathDocuments.php
  20. 3
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Messages.php
  21. 3
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/NotebookStudent.php
  22. 3
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/PortalNews.php
  23. 3
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Profile.php
  24. 3
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Project.php
  25. 3
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/ProjectComment.php
  26. 1
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Survey.php
  27. 23
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/SurveyQuestion.php
  28. 14
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TestAnswerFeedback.php
  29. 14
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TestFreeAnswer.php
  30. 14
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TestMatching.php
  31. 3
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TestQuestionDescription.php
  32. 2
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Wiki.php
  33. 3
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/WikiTask.php
  34. 5
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Work.php

@ -117,7 +117,8 @@
"zendframework/zend-config": "~2.6|^3.0",
"zendframework/zend-feed": "~2.6|^3.0",
"zendframework/zend-http": "~2.6|^3.0",
"zendframework/zend-soap": "~2.6|^3.0"
"zendframework/zend-soap": "~2.6|^3.0",
"angelfqc/vimeo-api": "2.0.6"
},
"require-dev": {
"behat/behat": "3.5.0",
@ -158,6 +159,12 @@
"symfony-tests-dir": "tests",
"symfony-web-dir": "web"
},
"repositories": [
{
"type": "github",
"url": "https://github.com/AngelFQC/vimeo.php.git"
}
],
"config": {
"component-dir": "web/assets"
}

@ -0,0 +1,240 @@
/* For licensing terms, see /LICENSE */
(function () {
CKEDITOR.dialog.add(
'vimeoEmbedDialog',
function (editor) {
var lang = editor.lang.ckeditor_vimeo_embed;
function post(url, data, callback) {
var xhr = new XMLHttpRequest();
xhr.open( 'POST', url, true );
xhr.onreadystatechange = function() {
if ( xhr.readyState == 4 ) {
callback(xhr.response);
xhr = null;
}
};
xhr.send(data);
return xhr;
}
function setUploadStatus(status) {
var elStatus = document.getElementById('ve-upload-status');
if ('process' === status) {
elStatus.textContent = lang.uploadProcess;
return;
}
if ('end' === status) {
elStatus.textContent = lang.uploadEnd;
return;
}
elStatus.textContent = '';
}
var xhrPost = null;
var stillUploading = false;
var embedHtml = '';
return {
title: 'Vimeo Embed',
minWidth: 600,
minHeight: 400,
contents: [
{
id: 've-basic',
title: lang.upload,
label: lang.upload,
elements: [
{
type: 'text',
id: 'title',
label: lang.title,
},
{
type: 'textarea',
id: 'description',
label: lang.description
},
{
type: 'html',
html: '<input id="ve-file" type="file" accept="video/*">'
},
{
type: 'vbox',
children: [
{
type: 'checkbox',
id: 'privacy-download',
label: lang.privacyDownload
},
{
type: 'hbox',
widths: ['65%', '35%'],
children: [
{
type: 'select',
id: 'privacy-embed',
label: lang.privacyEmbed,
items: [
// [lang.privacyEmbedPrivate, 'private'],
[lang.privacyEmbedPublic, 'public'],
[lang.privacyEmbedWhitelist, 'whitelist'],
],
'default': 'public'
},
{
type: 'text',
id: 'privacy-embed-whitelist',
label: lang.privacyEmbedWhitelistList
},
]
},
{
type: 'select',
id: 'privacy-view',
label: lang.privacyView,
items: [
[lang.privacyViewAnybody, 'anybody'],
[lang.privacyViewContacts, 'contacts'],
[lang.privacyViewDisable, 'disable'],
[lang.privacyViewNobody, 'nobody'],
[lang.privacyViewUnlisted, 'unlisted'],
// [lang.privacyViewPassword, 'password'],
// [lang.privacyViewUsers, 'users'],
],
'default': 'unlisted'
}
]
},
{
type: 'hbox',
widths: ['1%', '100%'],
children: [
{
type: 'button',
id: 'submit',
label: lang.uploadFile,
title: lang.uploadFile,
onClick: function () {
var dialog = this.getDialog();
var title = dialog.getValueOf('ve-basic', 'title').trim();
var description = dialog.getValueOf('ve-basic', 'description').trim();
var privacyDownload = dialog.getValueOf('ve-basic', 'privacy-download');
var privacyEmbed = dialog.getValueOf('ve-basic', 'privacy-embed');
var privacyEmbedWhiteList = dialog.getValueOf('ve-basic', 'privacy-embed-whitelist').trim();
var privacyView = dialog.getValueOf('ve-basic', 'privacy-view');
var files = document.getElementById('ve-file').files;
if (xhrPost) {
return;
}
if (!title || !title.length) {
dialog.getContentElement('ve-basic', 'title').focus();
return;
}
if (!files || files.length !== 1) {
document.getElementById('ve-file').focus();
return;
}
if (privacyEmbed === 'whitelist' && !privacyEmbedWhiteList.length) {
dialog.getContentElement('ve-basic', 'privacy-embed-whitelist').focus();
return;
}
stillUploading = true;
embedHtml = '';
setUploadStatus('process');
var formData = new FormData();
formData.append('title', title);
formData.append('description', description);
formData.append('ve_file', files[0], files[0].name);
formData.append('privacy_download', privacyDownload);
formData.append('privacy_embed', privacyEmbed);
formData.append('privacy_embed_whitelist', privacyEmbedWhiteList);
formData.append('privacy_view', privacyView);
xhrPost = post(
CKEDITOR.plugins.getPath('ckeditor_vimeo_embed') + 'integration/upload.php',
formData,
function (response) {
xhrPost = null;
if (!response) {
return;
}
stillUploading = false;
var json = JSON.parse(response);
if (json.error) {
alert(json.message);
setUploadStatus('');
} else {
embedHtml = json.embed;
setUploadStatus('end');
dialog.disableButton('cancel');
}
}
);
}
},
{
type: 'html',
html: '<span id="ve-upload-status" style="font-weight: bold;font-size: 14px;line-height: 28px;vertical-align: middle;height: 28px;display: table-cell;"></span>'
}
]
},
]
},
],
onShow: function () {
xhrPost = null;
stillUploading = false;
embedHtml = '';
setUploadStatus('');
document.getElementById('ve-file').value = null;
this.enableButton('cancel');
},
onOk: function () {
if (stillUploading) {
alert(lang.alertStillUploading);
return false;
}
if (embedHtml) {
editor.insertHtml(embedHtml);
}
},
onCancel: function (evt) {
if (evt.data.hide && xhrPost) {
xhrPost.abort();
xhrPost = null;
}
}
};
}
);
})();

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

@ -0,0 +1,106 @@
<?php
/* For licensing terms, see /LICENSE */
use Vimeo\Vimeo;
require __DIR__.'/../../../../../../global.inc.php';
$config = api_get_configuration_sub_value('ckeditor_vimeo_embed/config');
if (false === $config ||
empty($config['client_id']) || empty($config['client_secret']) || empty($config['access_token'])
) {
echo json_encode(['error' => true, 'message' => get_lang('NotAllowed')]);
exit;
}
header('Content-Type: application/json');
try {
if (empty($_FILES) ||
empty($_POST) ||
empty($_POST['title']) ||
!isset($_POST['description']) ||
empty($_FILES['ve_file']) ||
!isset($_POST['privacy_download']) ||
empty($_POST['privacy_embed']) ||
!isset($_POST['privacy_embed_whitelist']) ||
empty($_POST['privacy_view'])
) {
throw new Exception('Missing params.');
}
if ($_FILES['ve_file']['error'] !== UPLOAD_ERR_OK) {
throw new Exception("File error ({$_FILES['ve_file']['error']}).");
}
if (empty($config['access_token'])) {
throw new Exception(
'You can not upload a file without an access token. You can find this token on your app page.'
);
}
$vimeo = new Vimeo($config['client_id'], $config['client_secret'], $config['access_token']);
$uri = $vimeo->upload(
$_FILES['ve_file']['tmp_name'],
array(
'name' => $_POST['title'],
'description' => $_POST['description'],
'privacy' => [
'download' => $_POST['privacy_download'] === 'true',
'embed' => $_POST['privacy_embed'],
'view' => $_POST['privacy_view'],
],
)
);
if ('whitelist' === $_POST['privacy_embed'] && !empty($_POST['privacy_embed_whitelist'])) {
$vimeo->request(
"$uri/privacy/domains/{$_POST['privacy_embed_whitelist']}",
[],
'PUT'
);
}
$videoData = $vimeo->request("$uri?fields=link");
$singleUri = str_replace('videos', 'video', $uri);
$embed = '<div class="embeddedContent">
<div style="padding:56.25% 0 0 0;position:relative;">
<iframe allow="autoplay; fullscreen" allowfullscreen frameborder="0"
src="https://player.vimeo.com'.$singleUri.'"
style="position:absolute;top:0;left:0;width:100%;height:100%;"></iframe>
</div>
</div>';
echo json_encode(
[
'uploaded' => true,
'url' => $videoData['body']['link'],
'embed' => $embed,
]
);
} catch (VimeoUploadException $exception) {
echo json_encode(
[
'error' => true,
'message' => $e->getMessage(),
]
);
} catch (VimeoRequestException $exception) {
echo json_encode(
[
'error' => true,
'message' => $exception->getMessage(),
]
);
} catch (Exception $exception) {
echo json_encode(
[
'error' => true,
'message' => $exception->getMessage(),
]
);
}

@ -0,0 +1,27 @@
/* For licensing terms, see /LICENSE */
CKEDITOR.plugins.setLang('ckeditor_vimeo_embed', 'en', {
upload: 'Upload',
privacy: 'Privacy',
title: 'Title',
description: 'Description',
selectFile: 'Select video file from your computer',
uploadFile: 'Upload file',
privacyDownload: 'Whether people can download the video',
privacyEmbed: 'Where the video can be embedded?',
privacyEmbedPrivate: "The video can't be embedded",
privacyEmbedPublic: 'The video can be embedded',
privacyEmbedWhitelist: 'The video can be embedded on the specified domains only',
privacyView: 'Who can view the video on Vimeo?',
privacyViewAnybody: 'Anyone can access the video',
privacyViewContacts: "Only the owner's contacts can access the video",
privacyViewDisable: 'The video is disabled',
privacyViewNobody: 'No one except the owner can access the video',
privacyViewPassword: 'Only those with the password can access the video',
privacyViewUnlisted: 'The video is unlisted. Anyone can access it, but it doesn\'t appear in search',
privacyViewUsers: 'Only Vimeo members can access the video',
privacyEmbedWhitelistList: 'Whitelist (indicate domain)',
alertStillUploading: 'Current video file is uploading…',
uploadEnd: 'Video uploaded ✔',
uploadProcess: 'Uploading video, please wait…',
});

@ -0,0 +1,27 @@
/* For licensing terms, see /LICENSE */
CKEDITOR.plugins.setLang('ckeditor_vimeo_embed', 'es', {
upload: 'Subir',
privacy: 'Privacidad',
title: 'Título',
description: 'Descripción',
selectFile: 'Seleccionar archivo de video de tu computadora',
uploadFile: 'Subir archivo',
privacyDownload: 'Las personas pueden descargar el video',
privacyEmbed: '¿Dónde se puede incrustar el video?',
privacyEmbedPrivate: "El vídeo no se puede insertar",
privacyEmbedPublic: 'El vídeo se puede insertar',
privacyEmbedWhitelist: 'El vídeo se puede insertar sólo en los dominios especificados',
privacyView: '¿Quién puede ver el vídeo en Vimeo?',
privacyViewAnybody: 'Cualquiera puede acceder al video',
privacyViewContacts: "Sólo los contactos del propietario pueden acceder al vídeo",
privacyViewDisable: 'El vídeo está deshabilitado',
privacyViewNobody: 'Nadie, excepto el propietario, puede acceder al vídeo',
privacyViewPassword: 'Sólo aquellos con la contraseña pueden acceder al vídeo',
privacyViewUnlisted: 'El vídeo no está en la lista. Cualquiera puede acceder a él, pero no aparece en la búsqueda',
privacyViewUsers: 'Sólo los miembros de Vimeo pueden acceder al vídeo',
privacyEmbedWhitelistList: 'Lista blanca (indicar dominio)',
alertStillUploading: 'El archivo de video actual se está cargando…',
uploadEnd: 'Vídeo subido ✔',
uploadProcess: 'Subiendo video, por favor espere…',
});

@ -0,0 +1,22 @@
/* For licensing terms, see /LICENSE */
(function () {
CKEDITOR.plugins.add('ckeditor_vimeo_embed', {
lang: ['en', 'es'],
icons: 'VimeoEmbed',
init: function (editor) {
editor.addCommand(
'vimeoEmbed',
new CKEDITOR.dialogCommand('vimeoEmbedDialog')
);
editor.ui.addButton('VimeoEmbed', {
label: 'Embed a Vimeo video',
command: 'vimeoEmbed',
toolbar: 'insert,0'
});
CKEDITOR.dialog.add('vimeoEmbedDialog', this.path + 'dialogs/vimeo_embed.js');
}
});
})();

@ -1343,6 +1343,14 @@ requires extension "php-soap" sudo apt-get install php-soap
// Changes the ck editor enter mode value. Default: CKEDITOR.ENTER_P
// $_configuration['ck_editor_enter_mode_value'] = 'CKEDITOR.ENTER_BR';
// Set CKEDITOR config for Vimeo Embed plugin
//$_configuration['ckeditor_vimeo_embed'] = [
// 'config' => [
// 'client_id' => '',
// 'client_secret' => '',
// 'access_token' => '',
// ],
//];
// CREATE TABLE user_career (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, career_id INT NOT NULL, created_at DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
// ALTER TABLE user_career ADD COLUMN extra_data LONGTEXT;

@ -589,6 +589,7 @@ if (typeof CKEDITOR !== 'undefined') {
'flash',
'inserthtml',
'qmarkersrolls',
'ckeditor_vimeo_embed',
'image2_chamilo'
];

@ -36,7 +36,7 @@ class Announcements extends Basic
return [
['Save', 'Maximize', 'PasteFromWord', '-', 'Undo', 'Redo'],
['Link', 'Unlink', 'Anchor', 'inserthtml'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'VimeoEmbed', 'Audio'],
['Table', 'SpecialChar'],
[
'NumberedList',

@ -36,7 +36,7 @@ class AssessmentsIntroduction extends Basic
return [
['Save', 'Maximize', '-', 'PasteFromWord', '-', 'Undo', 'Redo'],
['Link', 'Unlink', 'Anchor'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'VimeoEmbed', 'Audio'],
['Table', 'SpecialChar'],
['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'TextColor', 'BGColor'],
'/',

@ -81,6 +81,9 @@ class Basic extends Toolbar
$config = [],
$prefix = null
) {
$isAllowedToEdit = api_is_allowed_to_edit();
$isPlatformAdmin = api_is_platform_admin();
// Adding plugins depending of platform conditions
$plugins = [];
@ -91,7 +94,7 @@ class Basic extends Toolbar
if (api_get_setting('youtube_for_students') == 'true') {
$plugins[] = 'youtube';
} else {
if (api_is_allowed_to_edit() || api_is_platform_admin()) {
if ($isAllowedToEdit || $isPlatformAdmin) {
$plugins[] = 'youtube';
}
}
@ -139,6 +142,10 @@ class Basic extends Toolbar
$plugins[] = 'scayt';
}
if (api_get_configuration_sub_value('ckeditor_vimeo_embed/config') && ($isAllowedToEdit || $isPlatformAdmin)) {
$plugins[] = 'ckeditor_vimeo_embed';
}
$this->defaultPlugins = array_unique(array_merge($this->defaultPlugins, $plugins));
parent::__construct($toolbar, $config, $prefix);
@ -240,11 +247,25 @@ class Basic extends Toolbar
return [
$this->getNewPageBlock(),
['Undo', 'Redo'],
['Link', 'Image', 'Video', 'Oembed', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
[
'Link',
'Image',
'Video',
'Oembed',
'Flash',
'Youtube',
'VimeoEmbed',
'Audio',
'Table',
'Asciimath',
'Asciisvg',
],
['BulletedList', 'NumberedList', 'HorizontalRule'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
['Styles', 'Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_formulaEditorChemistry'] : [''],
api_get_setting('enabled_wiris') == 'true'
? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_formulaEditorChemistry']
: [''],
['Toolbarswitch', 'Source'],
];
}
@ -268,6 +289,7 @@ class Basic extends Toolbar
'Oembed',
'Flash',
'Youtube',
'VimeoEmbed',
'Audio',
'leaflet',
'Smiley',
@ -283,7 +305,9 @@ class Basic extends Toolbar
[api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''],
['Styles', 'Format', 'Font', 'FontSize'],
['PageBreak', 'ShowBlocks'],
api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_formulaEditorChemistry'] : [''],
api_get_setting('enabled_wiris') == 'true'
? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_formulaEditorChemistry']
: [''],
['Toolbarswitch', 'Source'],
];
}

@ -45,6 +45,7 @@ class Careers extends Basic
'Video',
'Oembed',
'Youtube',
'VimeoEmbed',
'Flash',
'Audio',
'leaflet',
@ -91,7 +92,7 @@ class Careers extends Basic
return [
$this->getNewPageBlock(),
['Undo', 'Redo'],
['Link', 'Image', 'Video', 'Flash', 'Youtube', 'Audio', 'Table'],
['Link', 'Image', 'Video', 'Flash', 'Youtube', 'VimeoEmbed', 'Audio', 'Table'],
['BulletedList', 'NumberedList', 'HorizontalRule'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],

@ -64,6 +64,7 @@ class Documents extends Basic
'Flash',
'Oembed',
'Youtube',
'VimeoEmbed',
'Audio',
'Asciimath',
'Asciisvg',
@ -108,6 +109,7 @@ class Documents extends Basic
'Oembed',
'Flash',
'Youtube',
'VimeoEmbed',
'Audio',
'leaflet',
'Smiley',
@ -156,6 +158,7 @@ class Documents extends Basic
'Video',
'Flash',
'Youtube',
'VimeoEmbed',
'Audio',
'Table',
'Asciimath',

@ -48,6 +48,7 @@ class DocumentsStudent extends Basic
'Video',
'Oembed',
'Youtube',
'VimeoEmbed',
'Flash',
'Audio',
'leaflet',
@ -104,6 +105,7 @@ class DocumentsStudent extends Basic
'Flash',
'Oembed',
'Youtube',
'VimeoEmbed',
'Audio',
'Asciimath',
],

@ -46,6 +46,7 @@ class FAQ extends Basic
'Video',
'Oembed',
'Youtube',
'VimeoEmbed',
'Flash',
'Audio',
'leaflet',

@ -36,7 +36,7 @@ class Forum extends Basic
return [
['Save', 'Maximize', 'PasteFromWord', '-', 'Undo', 'Redo'],
['Link', 'Unlink', 'Anchor'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'VimeoEmbed', 'Audio'],
['Table', 'SpecialChar'],
[
'NumberedList',
@ -71,7 +71,19 @@ class Forum extends Basic
return [
$this->getNewPageBlock(),
['Undo', 'Redo'],
['Link', 'Image', 'Video', 'Oembed', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
[
'Link',
'Image',
'Video',
'Oembed',
'Flash',
'Youtube',
'VimeoEmbed',
'Audio',
'Table',
'Asciimath',
'Asciisvg',
],
['BulletedList', 'NumberedList', 'HorizontalRule'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight'],
['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],

@ -64,6 +64,7 @@ class IntroductionSection extends Basic
'Flash',
'Oembed',
'Youtube',
'VimeoEmbed',
'Audio',
'Asciimath',
'Asciisvg',
@ -107,6 +108,7 @@ class IntroductionSection extends Basic
'Video',
'Flash',
'Youtube',
'VimeoEmbed',
'Audio',
'Table',
'Asciimath',
@ -151,6 +153,7 @@ class IntroductionSection extends Basic
'Oembed',
'Flash',
'Youtube',
'VimeoEmbed',
'Audio',
'leaflet',
'Smiley',

@ -47,6 +47,7 @@ class LearningPathDocuments extends Basic
'Video',
'Oembed',
'Youtube',
'VimeoEmbed',
'Flash',
'Audio',
'leaflet',
@ -83,6 +84,7 @@ class LearningPathDocuments extends Basic
'Flash',
'Oembed',
'Youtube',
'VimeoEmbed',
'Audio',
'Asciimath',
'Asciisvg',
@ -117,7 +119,7 @@ class LearningPathDocuments extends Basic
return [
$this->getNewPageBlock(),
['Undo', 'Redo'],
['Link', 'Image', 'Video', 'Youtube', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
['Link', 'Image', 'Video', 'Youtube', 'VimeoEmbed', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
['BulletedList', 'NumberedList', 'HorizontalRule'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
['Toolbarswitch'],

@ -48,6 +48,7 @@ class Messages extends Basic
'Video',
'Oembed',
'Youtube',
'VimeoEmbed',
'Flash',
'Audio',
'leaflet',
@ -78,7 +79,7 @@ class Messages extends Basic
{
return [
['Link', 'Unlink'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'VimeoEmbed', 'Audio'],
['Table', 'Smiley'],
['TextColor', 'BGColor'],
['Source'],

@ -45,6 +45,7 @@ class NotebookStudent extends Basic
'Video',
'Oembed',
'Youtube',
'VimeoEmbed',
'Flash',
'Audio',
'leaflet',
@ -75,7 +76,7 @@ class NotebookStudent extends Basic
return [
['Save', 'Maximize', 'PasteFromWord', '-', 'Undo', 'Redo'],
['Link', 'Unlink', 'Anchor'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'VimeoEmbed', 'Audio'],
['Table', 'SpecialChar'],
['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'TextColor', 'BGColor'],
'/',

@ -45,6 +45,7 @@ class PortalNews extends Basic
'Video',
'Oembed',
'Youtube',
'VimeoEmbed',
'Flash',
'Audio',
'leaflet',
@ -76,7 +77,7 @@ class PortalNews extends Basic
return [
['Save', 'Maximize', 'PasteFromWord', '-', 'Undo', 'Redo'],
['Link', 'Unlink', 'Anchor'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'VimeoEmbed', 'Audio'],
['Table', 'SpecialChar'],
['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'TextColor', 'BGColor', '-', 'Source'],
'/',

@ -45,6 +45,7 @@ class Profile extends Basic
'Video',
'Oembed',
'Youtube',
'VimeoEmbed',
'Flash',
'Audio',
'leaflet',
@ -73,7 +74,7 @@ class Profile extends Basic
return [
['Maximize', '-', 'PasteFromWord', '-', 'Undo', 'Redo'],
['Link', 'Unlink', 'Anchor'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'VimeoEmbed', 'Audio'],
['Table', 'Smiley'],
'/',
['Font', 'FontSize'],

@ -45,6 +45,7 @@ class Project extends Basic
'Video',
'Oembed',
'Youtube',
'VimeoEmbed',
'Flash',
'Audio',
'leaflet',
@ -74,7 +75,7 @@ class Project extends Basic
return [
['Maximize', '-', 'PasteFromWord', '-', 'Undo', 'Redo'],
['Link', 'Unlink', 'Anchor'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'VimeoEmbed', 'Audio'],
['Table', 'leaflet'],
['Font', 'FontSize'],
['Bold', 'Italic', 'Underline'],

@ -45,6 +45,7 @@ class ProjectComment extends Basic
'Video',
'Oembed',
'Youtube',
'VimeoEmbed',
'Flash',
'Audio',
'leaflet',
@ -74,7 +75,7 @@ class ProjectComment extends Basic
return [
['Maximize', '-', 'PasteFromWord', '-', 'Undo', 'Redo'],
['Link', 'Unlink'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'VimeoEmbed', 'Audio'],
['Table', 'leaflet'],
['Bold', 'Italic', 'Underline'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', '-', 'NumberedList', 'BulletedList', '-', 'TextColor', 'BGColor'],

@ -45,6 +45,7 @@ class Survey extends Basic
'Video',
'Oembed',
'Youtube',
'VimeoEmbed',
'Flash',
'Audio',
'leaflet',

@ -46,6 +46,7 @@ class SurveyQuestion extends Basic
'Oembed',
'Flash',
'Youtube',
'VimeoEmbed',
'Audio',
'leaflet',
'Smiley',
@ -73,7 +74,9 @@ class SurveyQuestion extends Basic
[api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''],
['Styles', 'Format', 'Font', 'FontSize'],
['PageBreak', 'ShowBlocks'],
api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_formulaEditorChemistry'] : [''],
api_get_setting('enabled_wiris') == 'true'
? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_formulaEditorChemistry']
: [''],
['Toolbarswitch', 'Source'],
];
}
@ -88,7 +91,19 @@ class SurveyQuestion extends Basic
return [
$this->getNewPageBlock(),
['Undo', 'Redo'],
['Link', 'Image', 'Video', 'Oembed', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
[
'Link',
'Image',
'Video',
'Oembed',
'Flash',
'Youtube',
'VimeoEmbed',
'Audio',
'Table',
'Asciimath',
'Asciisvg',
],
['BulletedList', 'NumberedList', 'HorizontalRule'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
[
@ -103,7 +118,9 @@ class SurveyQuestion extends Basic
'BGColor',
api_get_configuration_value('translate_html') ? 'Language' : '',
],
api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_formulaEditorChemistry'] : [''],
api_get_setting('enabled_wiris') == 'true'
? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_formulaEditorChemistry']
: [''],
['Toolbarswitch', 'Source'],
];
}

@ -67,7 +67,19 @@ class TestAnswerFeedback extends Basic
['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
['Link', 'Unlink', 'Anchor', 'Glossary'],
['Image', 'Mapping', 'Video', 'Oembed', 'Youtube', 'Flash', 'Audio', 'leaflet', 'Smiley', 'SpecialChar'],
[
'Image',
'Mapping',
'Video',
'Oembed',
'Youtube',
'VimeoEmbed',
'Flash',
'Audio',
'leaflet',
'Smiley',
'SpecialChar',
],
'/',
['Table', '-', 'CreateDiv'],
['BulletedList', 'NumberedList', 'HorizontalRule', '-', 'Outdent', 'Indent', 'Blockquote'],

@ -56,7 +56,19 @@ class TestFreeAnswer extends Basic
['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
['Link', 'Unlink', 'Anchor', 'Glossary'],
['Image', 'Mapping', 'Video', 'Oembed', 'Youtube', 'Flash', 'Audio', 'leaflet', 'Smiley', 'SpecialChar'],
[
'Image',
'Mapping',
'Video',
'Oembed',
'Youtube',
'VimeoEmbed',
'Flash',
'Audio',
'leaflet',
'Smiley',
'SpecialChar',
],
['Asciimath', 'Asciisvg'],
'/',
['Table', '-', 'CreateDiv'],

@ -54,7 +54,19 @@ class TestMatching extends Basic
['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
['Link', 'Unlink', 'Anchor', 'Glossary'],
['Image', 'Mapping', 'Video', 'Oembed', 'Youtube', 'Flash', 'Audio', 'leaflet', 'Smiley', 'SpecialChar'],
[
'Image',
'Mapping',
'Video',
'Oembed',
'Youtube',
'VimeoEmbed',
'Flash',
'Audio',
'leaflet',
'Smiley',
'SpecialChar',
],
['Asciimath', 'Asciisvg'],
'/',
['Table', '-', 'CreateDiv'],

@ -77,6 +77,7 @@ class TestQuestionDescription extends Basic
'Video',
'Flash',
'Youtube',
'VimeoEmbed',
'Oembed',
'Audio',
'leaflet',
@ -119,7 +120,7 @@ class TestQuestionDescription extends Basic
return [
['Maximize', '-', 'PasteFromWord', '-', 'Undo', 'Redo'],
['Link', 'Unlink'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'VimeoEmbed', 'Audio'],
['Table', 'SpecialChar'],
[
'NumberedList',

@ -58,7 +58,7 @@ class Wiki extends Basic
'Find',
],
['Wikilink', 'Link', 'Unlink', 'Anchor'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio', 'Asciimath'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'VimeoEmbed', 'Audio', 'Asciimath'],
['Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'leaflet'],
['Format', 'Font', 'FontSize'],
['Bold', 'Italic', 'Underline'],

@ -45,6 +45,7 @@ class WikiTask extends Basic
'Video',
'Oembed',
'Youtube',
'VimeoEmbed',
'Flash',
'Audio',
'leaflet',
@ -74,7 +75,7 @@ class WikiTask extends Basic
return [
['Maximize', '-', 'PasteFromWord', '-', 'Undo', 'Redo'],
['Link', 'Unlink'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'VimeoEmbed', 'Audio'],
['Table'],
['Bold', 'Italic', 'Underline'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', '-', 'NumberedList', 'BulletedList', '-', 'TextColor', 'BGColor'],

@ -48,6 +48,7 @@ class Work extends Basic
'Video',
'Oembed',
'Youtube',
'VimeoEmbed',
'Flash',
'Audio',
'leaflet',
@ -77,7 +78,7 @@ class Work extends Basic
return [
['Maxmize', '-', 'PasteFromWord', '-', 'Undo', 'Redo'],
['Link', 'Unlink', 'Anchor'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'VimeoEmbed', 'Audio'],
['Table', 'Smiley'],
'/',
['Font', 'FontSize'],
@ -97,7 +98,7 @@ class Work extends Basic
return [
$this->getNewPageBlock(),
['Undo', 'Redo'],
['Link', 'Image', 'Video', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath'],
['Link', 'Image', 'Video', 'Flash', 'Youtube', 'VimeoEmbed', 'Audio', 'Table', 'Asciimath'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight'],
['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'TextColor', 'BGColor'],
['Toolbarswitch'],

Loading…
Cancel
Save