Adding mathjax plugin + db change "enabled_mathjax" see #7517

1.10.x
Julio Montoya 11 years ago
parent 5942630a1c
commit fc6cbb5f7d
  1. 78
      main/inc/lib/javascript/ckeditor/plugins/mathjax/dialogs/mathjax.js
  2. BIN
      main/inc/lib/javascript/ckeditor/plugins/mathjax/icons/hidpi/mathjax.png
  3. BIN
      main/inc/lib/javascript/ckeditor/plugins/mathjax/icons/mathjax.png
  4. BIN
      main/inc/lib/javascript/ckeditor/plugins/mathjax/images/loader.gif
  5. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/af.js
  6. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ar.js
  7. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ca.js
  8. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/cs.js
  9. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/cy.js
  10. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/da.js
  11. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/de.js
  12. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/el.js
  13. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/en-gb.js
  14. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/en.js
  15. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/eo.js
  16. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/es.js
  17. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fa.js
  18. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fi.js
  19. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fr.js
  20. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/gl.js
  21. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/he.js
  22. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/hr.js
  23. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/hu.js
  24. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/it.js
  25. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ja.js
  26. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/km.js
  27. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ku.js
  28. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/lt.js
  29. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/nb.js
  30. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/nl.js
  31. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/no.js
  32. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pl.js
  33. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pt-br.js
  34. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pt.js
  35. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ro.js
  36. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ru.js
  37. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sk.js
  38. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sl.js
  39. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sq.js
  40. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sv.js
  41. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/tr.js
  42. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/tt.js
  43. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/uk.js
  44. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/vi.js
  45. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/zh-cn.js
  46. 13
      main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/zh.js
  47. 460
      main/inc/lib/javascript/ckeditor/plugins/mathjax/plugin.js
  48. 7
      main/install/database.sql
  49. 8
      main/install/migrate-db-1.9.0-1.10.0-pre.sql
  50. 1
      main/template/default/layout/head.tpl
  51. 5
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Basic.php

@ -0,0 +1,78 @@
/**
* @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
'use strict';
CKEDITOR.dialog.add( 'mathjax', function( editor ) {
var preview,
lang = editor.lang.mathjax;
return {
title: lang.title,
minWidth: 350,
minHeight: 100,
contents: [
{
id: 'info',
elements: [
{
id: 'equation',
type: 'textarea',
label: lang.dialogInput,
onLoad: function() {
var that = this;
if ( !( CKEDITOR.env.ie && CKEDITOR.env.version == 8 ) ) {
this.getInputElement().on( 'keyup', function() {
// Add \( and \) for preview.
preview.setValue( '\\(' + that.getInputElement().getValue() + '\\)' );
} );
}
},
setup: function( widget ) {
// Remove \( and \).
this.setValue( CKEDITOR.plugins.mathjax.trim( widget.data.math ) );
},
commit: function( widget ) {
// Add \( and \) to make TeX be parsed by MathJax by default.
widget.setData( 'math', '\\(' + this.getValue() + '\\)' );
}
},
{
id: 'documentation',
type: 'html',
html:
'<div style="width:100%;text-align:right;margin:-8px 0 10px">' +
'<a class="cke_mathjax_doc" href="' + lang.docUrl + '" target="_black" style="cursor:pointer;color:#00B2CE;text-decoration:underline">' +
lang.docLabel +
'</a>' +
'</div>'
},
( !( CKEDITOR.env.ie && CKEDITOR.env.version == 8 ) ) && {
id: 'preview',
type: 'html',
html:
'<div style="width:100%;text-align:center;">' +
'<iframe style="border:0;width:0;height:0;font-size:20px" scrolling="no" frameborder="0" allowTransparency="true" src="' + CKEDITOR.plugins.mathjax.fixSrc + '"></iframe>' +
'</div>',
onLoad: function() {
var iFrame = CKEDITOR.document.getById( this.domId ).getChild( 0 );
preview = new CKEDITOR.plugins.mathjax.frameWrapper( iFrame, editor );
},
setup: function( widget ) {
preview.setValue( widget.data.math );
}
}
]
}
]
};
} );

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 B

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'af', {
title: 'Wiskunde in TeX',
button: 'Wiskunde',
dialogInput: 'Skryf you Tex hier',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX dokument',
loading: 'laai...',
pathName: 'wiskunde'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'ar', {
title: 'Mathematics in TeX', // MISSING
button: 'Math', // MISSING
dialogInput: 'Write your TeX here', // MISSING
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX documentation', // MISSING
loading: 'تحميل',
pathName: 'math' // MISSING
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'ca', {
title: 'Matemàtiques a TeX',
button: 'Matemàtiques',
dialogInput: 'Escriu el TeX aquí',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'Documentació TeX',
loading: 'carregant...',
pathName: 'matemàtiques'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'cs', {
title: 'Matematika v TeXu',
button: 'Matematika',
dialogInput: 'Zde napište TeXový kód',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'Dokumentace k TeXu',
loading: 'Nahrává se...',
pathName: 'Matematika'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'cy', {
title: 'Mathemateg mewn TeX',
button: 'Math',
dialogInput: 'Ysgrifennwch eich TeX yma',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'Dogfennaeth TeX',
loading: 'llwytho...',
pathName: 'math'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'da', {
title: 'Matematik i TeX',
button: 'Matematik',
dialogInput: 'Write your TeX here', // MISSING
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX dokumentation',
loading: 'loading...', // MISSING
pathName: 'matematik'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'de', {
title: 'Mathematik in Tex',
button: 'Rechnung',
dialogInput: 'Schreiben Sie hier in Tex',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'Tex Dokumentation',
loading: 'lädt...',
pathName: 'rechnen'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'el', {
title: 'Μαθηματικά με τη γλώσσα TeX',
button: 'Μαθηματικά',
dialogInput: 'Γράψτε κώδικα TeX εδώ',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'Τεκμηρίωση TeX',
loading: 'γίνεται φόρτωση...',
pathName: 'μαθηματικά'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'en-gb', {
title: 'Mathematics in TeX',
button: 'Math',
dialogInput: 'Write you TeX here',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX documentation',
loading: 'loading...',
pathName: 'math'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'en', {
title: 'Mathematics in TeX',
button: 'Math',
dialogInput: 'Write your TeX here',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX documentation',
loading: 'loading...',
pathName: 'math'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'eo', {
title: 'Matematiko en TeX',
button: 'Matematiko',
dialogInput: 'Skribu vian TeX tien',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX dokumentado',
loading: 'estas ŝarganta',
pathName: 'matematiko'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'es', {
title: 'Matemáticas en TeX',
button: 'Matemáticas',
dialogInput: 'Escribe tu TeX aquí',
docUrl: 'http://es.wikipedia.org/wiki/TeX',
docLabel: 'Documentación de TeX',
loading: 'cargando...',
pathName: 'matemáticas'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'fa', {
title: 'ریاضیات در تک',
button: 'ریاضی',
dialogInput: 'فرمول خود را اینجا بنویسید',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'مستندسازی فرمول نویسی',
loading: 'بارگیری',
pathName: 'ریاضی'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'fi', {
title: 'Matematiikkaa TeX:llä',
button: 'Matematiikka',
dialogInput: 'Kirjoita TeX:iä tähän',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX dokumentaatio',
loading: 'lataa...',
pathName: 'matematiikka'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'fr', {
title: 'Mathématiques au format TeX',
button: 'Math',
dialogInput: 'Saisir la formule TeX ici',
docUrl: 'http://fr.wikibooks.org/wiki/LaTeX/Math%C3%A9matiques',
docLabel: 'Documentation du format TeX',
loading: 'chargement...',
pathName: 'math'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'gl', {
title: 'Matemáticas en TeX',
button: 'Matemáticas',
dialogInput: 'Escriba o seu TeX aquí',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'Documentación de TeX',
loading: 'cargando...',
pathName: 'matemáticas'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'he', {
title: 'מתמטיקה בTeX',
button: 'מתמטיקה',
dialogInput: 'כתוב את הTeX שלך כאן',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'תיעוד TeX',
loading: 'טוען...',
pathName: 'מתמטיקה'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'hr', {
title: 'Matematika u TeXu',
button: 'Matematika',
dialogInput: 'Napiši svoj TeX ovdje',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX dokumentacija',
loading: 'učitavanje...',
pathName: 'matematika'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'hu', {
title: 'Matematika a TeX-ben',
button: 'Matek',
dialogInput: 'Írd a TeX-ed ide',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX dokumentáció',
loading: 'töltés...',
pathName: 'matek'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'it', {
title: 'Formule in TeX',
button: 'Formule',
dialogInput: 'Scrivere qui il proprio TeX',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'Documentazione TeX',
loading: 'caricamento…',
pathName: 'formula'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'ja', {
title: 'TeX形式の数式',
button: '数式',
dialogInput: 'TeX形式の数式を入力してください',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeXの解説',
loading: '読み込み中…',
pathName: 'math'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'km', {
title: 'គណង TeX',
button: 'គណត',
dialogInput: 'សរសរ TeX របសនក',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'ឯកសអតថបទ TeX',
loading: 'កក..',
pathName: 'គណត'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'ku', {
title: 'بیرکاری لە TeX',
button: 'بیرکاری',
dialogInput: 'TeXەکەت لێرە بنووسە',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'بەڵگەنامەکردنی TeX',
loading: 'بارکردن...',
pathName: 'بیرکاری'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'lt', {
title: 'Matematika per TeX',
button: 'Matematika',
dialogInput: 'Parašyk savo TeX čia',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX žinynas',
loading: 'kraunasi...',
pathName: 'matematika'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'nb', {
title: 'Matematikk i TeX',
button: 'Matte',
dialogInput: 'Skriv TeX-koden her',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX-dokumentasjon',
loading: 'laster...',
pathName: 'matte'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'nl', {
title: 'Wiskunde in TeX',
button: 'Wiskunde',
dialogInput: 'Typ hier uw TeX',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX documentatie',
loading: 'laden...',
pathName: 'wiskunde'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'no', {
title: 'Matematikk i TeX',
button: 'Matte',
dialogInput: 'Skriv TeX-koden her',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX-dokumentasjon',
loading: 'laster...',
pathName: 'matte'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'pl', {
title: 'Wzory matematyczne w TeX',
button: 'Wzory matematyczne',
dialogInput: 'Wpisz wyrażenie w TeX',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'Dokumentacja TeX',
loading: 'ładowanie...',
pathName: 'matematyka'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'pt-br', {
title: 'Matemática em TeX',
button: 'Matemática',
dialogInput: 'Escreva seu TeX aqui',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'Documentação TeX',
loading: 'carregando...',
pathName: 'Matemática'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'pt', {
title: 'Matemática em TeX',
button: 'Matemática',
dialogInput: 'Escreva aqui o seu Tex',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'Documentação TeX',
loading: 'a carregar ...',
pathName: 'matemática'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'ro', {
title: 'Matematici in TeX',
button: 'Matematici',
dialogInput: 'Scrie TeX-ul aici',
docUrl: 'http://ro.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'Documentatie TeX',
loading: 'încarcă...',
pathName: 'matematici'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'ru', {
title: 'Математика в TeX-системе',
button: 'Математика',
dialogInput: 'Введите здесь TeX',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX документация',
loading: 'загрузка...',
pathName: 'мат.'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'sk', {
title: 'Matematika v TeX',
button: 'Matika',
dialogInput: 'Napíšte svoj TeX sem',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'Dokumentácia TeX',
loading: 'načítavanie...',
pathName: 'matika'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'sl', {
title: 'Matematika v TeX',
button: 'Matematika',
dialogInput: 'Napišite svoj TeX tukaj',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX dokumentacija',
loading: 'nalaganje...',
pathName: 'matematika'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'sq', {
title: 'Matematikë në TeX',
button: 'Matematikë',
dialogInput: 'Shkruani TeX-in tuaj këtu',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'Tex dokumentimi',
loading: 'duke u hapur...',
pathName: 'matematikë'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'sv', {
title: 'Mattematik i TeX',
button: 'Matte',
dialogInput: 'Skriv din TeX här',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX dokumentation',
loading: 'laddar',
pathName: 'matte'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'tr', {
title: 'TeX ile Matematik',
button: 'Matematik',
dialogInput: 'TeX kodunuzu buraya yazın',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX yardım dökümanı',
loading: 'yükleniyor...',
pathName: 'matematik'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'tt', {
title: 'TeX\'та математика',
button: 'Математика',
dialogInput: 'Биредә TeX форматында аңлатмагызны языгыз',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX турыдна документлар',
loading: 'йөкләнә...',
pathName: 'математика'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'uk', {
title: 'Математика у TeX',
button: 'Математика',
dialogInput: 'Наберіть тут на TeX\'у',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'Документація про TeX',
loading: 'завантажується…',
pathName: 'математика'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'vi', {
title: 'Toán học bằng TeX',
button: 'Toán',
dialogInput: 'Nhập mã TeX ở đây',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'Tài liệu TeX',
loading: 'đang nạp...',
pathName: 'toán'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'zh-cn', {
title: 'TeX 语法的数学公式编辑器',
button: '数学公式',
dialogInput: '在此编写您的 TeX 指令',
docUrl: 'http://zh.wikipedia.org/wiki/TeX',
docLabel: 'TeX 语法(可以参考维基百科自身关于数学公式显示方式的帮助)',
loading: '正在加载...',
pathName: '数字公式'
} );

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'mathjax', 'zh', {
title: '以 TeX 表示數學',
button: '數學',
dialogInput: '請輸入 TeX',
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
docLabel: 'TeX 說明文件',
loading: '載入中…',
pathName: '數學'
} );

@ -0,0 +1,460 @@
/**
* @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
/**
* @fileOverview [Mathematical Formulas](http://ckeditor.com/addon/mathjax) plugin.
*/
'use strict';
( function() {
var cdn = 'http:\/\/cdn.mathjax.org\/mathjax\/2.2-latest\/MathJax.js?config=TeX-AMS_HTML';
CKEDITOR.plugins.add( 'mathjax', {
lang: 'af,ar,ca,cs,cy,da,de,el,en,en-gb,eo,es,fa,fi,fr,gl,he,hr,hu,it,ja,km,ku,lt,nb,nl,no,pl,pt,pt-br,ro,ru,sk,sl,sq,sv,tr,tt,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
requires: 'widget,dialog',
icons: 'mathjax',
hidpi: true, // %REMOVE_LINE_CORE%
init: function( editor ) {
var cls = editor.config.mathJaxClass || 'math-tex';
editor.widgets.add( 'mathjax', {
inline: true,
dialog: 'mathjax',
button: editor.lang.mathjax.button,
mask: true,
allowedContent: 'span(!' + cls + ')',
// Allow style classes only on spans having mathjax class.
styleToAllowedContentRules: function( style ) {
var classes = style.getClassesArray();
if ( !classes )
return null;
classes.push( '!' + cls );
return 'span(' + classes.join( ',' ) + ')';
},
pathName: editor.lang.mathjax.pathName,
template: '<span class="' + cls + '" style="display:inline-block" data-cke-survive=1></span>',
parts: {
span: 'span'
},
defaults: {
math: '\\(x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}\\)'
},
init: function() {
var iframe = this.parts.span.getChild( 0 );
// Check if span contains iframe and create it otherwise.
if ( !iframe || iframe.type != CKEDITOR.NODE_ELEMENT || !iframe.is( 'iframe' ) ) {
iframe = new CKEDITOR.dom.element( 'iframe' );
iframe.setAttributes( {
style: 'border:0;width:0;height:0',
scrolling: 'no',
frameborder: 0,
allowTransparency: true,
src: CKEDITOR.plugins.mathjax.fixSrc
} );
this.parts.span.append( iframe );
}
// Wait for ready because on some browsers iFrame will not
// have document element until it is put into document.
// This is a problem when you crate widget using dialog.
this.once( 'ready', function() {
// Src attribute must be recreated to fix custom domain error after undo
// (see iFrame.removeAttribute( 'src' ) in frameWrapper.load).
if ( CKEDITOR.env.ie )
iframe.setAttribute( 'src', CKEDITOR.plugins.mathjax.fixSrc );
this.frameWrapper = new CKEDITOR.plugins.mathjax.frameWrapper( iframe, editor );
this.frameWrapper.setValue( this.data.math );
} );
},
data: function() {
if ( this.frameWrapper )
this.frameWrapper.setValue( this.data.math );
},
upcast: function( el, data ) {
if ( !( el.name == 'span' && el.hasClass( cls ) ) )
return;
if ( el.children.length > 1 || el.children[ 0 ].type != CKEDITOR.NODE_TEXT )
return;
data.math = CKEDITOR.tools.htmlDecode( el.children[ 0 ].value );
// Add style display:inline-block to have proper height of widget wrapper and mask.
var attrs = el.attributes;
if ( attrs.style )
attrs.style += ';display:inline-block';
else
attrs.style = 'display:inline-block';
// Add attribute to prevent deleting empty span in data processing.
attrs[ 'data-cke-survive' ] = 1;
el.children[ 0 ].remove();
return el;
},
downcast: function( el ) {
el.children[ 0 ].replaceWith( new CKEDITOR.htmlParser.text( CKEDITOR.tools.htmlEncode( this.data.math ) ) );
// Remove style display:inline-block.
var attrs = el.attributes;
attrs.style = attrs.style.replace( /display:\s?inline-block;?\s?/, '' );
if ( attrs.style === '' )
delete attrs.style;
return el;
}
} );
// Add dialog.
CKEDITOR.dialog.add( 'mathjax', this.path + 'dialogs/mathjax.js' );
// Add MathJax script to page preview.
editor.on( 'contentPreview', function( evt ) {
evt.data.dataValue = evt.data.dataValue.replace( /<\/head>/,
'<script src="' + ( editor.config.mathJaxLib ? CKEDITOR.getUrl( editor.config.mathJaxLib ) : cdn ) + '"><\/script><\/head>' );
} );
editor.on( 'paste', function( evt ) {
// Firefox does remove iFrame elements from pasted content so this event do the same on other browsers.
// Also iFrame in paste content is reason of "Unspecified error" in IE9 (#10857).
var regex = new RegExp( '<span[^>]*?' + cls + '.*?<\/span>', 'ig' );
evt.data.dataValue = evt.data.dataValue.replace( regex, function( match ) {
return match.replace( /(<iframe.*?\/iframe>)/i, '' );
} );
} );
}
} );
/**
* @private
* @singleton
* @class CKEDITOR.plugins.mathjax
*/
CKEDITOR.plugins.mathjax = {};
/**
* A variable to fix problems with `iframe`. This variable is global
* because it is used in both the widget and the dialog window.
*
* @private
* @property {String} fixSrc
*/
CKEDITOR.plugins.mathjax.fixSrc =
// In Firefox src must exist and be different than about:blank to emit load event.
CKEDITOR.env.gecko ? 'javascript:true' : // jshint ignore:line
// Support for custom document.domain in IE.
CKEDITOR.env.ie ? 'javascript:' + // jshint ignore:line
'void((function(){' + encodeURIComponent(
'document.open();' +
'(' + CKEDITOR.tools.fixDomain + ')();' +
'document.close();'
) + '})())' :
// In Chrome src must be undefined to emit load event.
'javascript:void(0)'; // jshint ignore:line
/**
* Loading indicator image generated by http://preloaders.net.
*
* @private
* @property {String} loadingIcon
*/
CKEDITOR.plugins.mathjax.loadingIcon = CKEDITOR.plugins.get( 'mathjax' ).path + 'images/loader.gif';
/**
* Computes predefined styles and copies them to another element.
*
* @private
* @param {CKEDITOR.dom.element} from Copy source.
* @param {CKEDITOR.dom.element} to Copy target.
*/
CKEDITOR.plugins.mathjax.copyStyles = function( from, to ) {
var stylesToCopy = [ 'color', 'font-family', 'font-style', 'font-weight', 'font-variant', 'font-size' ];
for ( var i = 0; i < stylesToCopy.length; i++ ) {
var key = stylesToCopy[ i ],
val = from.getComputedStyle( key );
if ( val )
to.setStyle( key, val );
}
};
/**
* Trims MathJax value from '\(1+1=2\)' to '1+1=2'.
*
* @private
* @param {String} value String to trim.
* @returns {String} Trimed string.
*/
CKEDITOR.plugins.mathjax.trim = function( value ) {
var begin = value.indexOf( '\\(' ) + 2,
end = value.lastIndexOf( '\\)' );
return value.substring( begin, end );
};
/**
* FrameWrapper is responsible for communication between the MathJax library
* and the `iframe` element that is used for rendering mathematical formulas
* inside the editor.
* It lets you create visual mathematics by using the
* {@link CKEDITOR.plugins.mathjax.frameWrapper#setValue setValue} method.
*
* @private
* @class CKEDITOR.plugins.mathjax.frameWrapper
* @constructor Creates a class instance.
* @param {CKEDITOR.dom.element} iFrame The `iframe` element to be wrapped.
* @param {CKEDITOR.editor} editor The editor instance.
*/
if ( !( CKEDITOR.env.ie && CKEDITOR.env.version == 8 ) ) {
CKEDITOR.plugins.mathjax.frameWrapper = function( iFrame, editor ) {
var buffer, preview, value, newValue,
doc = iFrame.getFrameDocument(),
// Is MathJax loaded and ready to work.
isInit = false,
// Is MathJax parsing Tex.
isRunning = false,
// Function called when MathJax is loaded.
loadedHandler = CKEDITOR.tools.addFunction( function() {
preview = doc.getById( 'preview' );
buffer = doc.getById( 'buffer' );
isInit = true;
if ( newValue )
update();
// Private! For test usage only.
CKEDITOR.fire( 'mathJaxLoaded', iFrame );
} ),
// Function called when MathJax finish his job.
updateDoneHandler = CKEDITOR.tools.addFunction( function() {
CKEDITOR.plugins.mathjax.copyStyles( iFrame, preview );
preview.setHtml( buffer.getHtml() );
editor.fire( 'lockSnapshot' );
iFrame.setStyles( {
height: 0,
width: 0
} );
// Set iFrame dimensions.
var height = Math.max( doc.$.body.offsetHeight, doc.$.documentElement.offsetHeight ),
width = Math.max( preview.$.offsetWidth, doc.$.body.scrollWidth );
iFrame.setStyles( {
height: height + 'px',
width: width + 'px'
} );
editor.fire( 'unlockSnapshot' );
// Private! For test usage only.
CKEDITOR.fire( 'mathJaxUpdateDone', iFrame );
// If value changed in the meantime update it again.
if ( value != newValue )
update();
else
isRunning = false;
} );
iFrame.on( 'load', load );
load();
function load() {
doc = iFrame.getFrameDocument();
if ( doc.getById( 'preview' ) )
return;
// Because of IE9 bug in a src attribute can not be javascript
// when you undo (#10930). If you have iFrame with javascript in src
// and call insertBefore on such element then IE9 will see crash.
if ( CKEDITOR.env.ie )
iFrame.removeAttribute( 'src' );
doc.write( '<!DOCTYPE html>' +
'<html>' +
'<head>' +
'<meta charset="utf-8">' +
'<script type="text/x-mathjax-config">' +
// MathJax configuration, disable messages.
'MathJax.Hub.Config( {' +
'showMathMenu: false,' +
'messageStyle: "none"' +
'} );' +
// Get main CKEDITOR form parent.
'function getCKE() {' +
'if ( typeof window.parent.CKEDITOR == \'object\' ) {' +
'return window.parent.CKEDITOR;' +
'} else {' +
'return window.parent.parent.CKEDITOR;' +
'}' +
'}' +
// Run MathJax.Hub with its actual parser and call callback function after that.
// Because MathJax.Hub is asynchronous create MathJax.Hub.Queue to wait with callback.
'function update() {' +
'MathJax.Hub.Queue(' +
'[ \'Typeset\', MathJax.Hub, this.buffer ],' +
'function() {' +
'getCKE().tools.callFunction( ' + updateDoneHandler + ' );' +
'}' +
');' +
'}' +
// Run MathJax for the first time, when the script is loaded.
// Callback function will be called then it's done.
'MathJax.Hub.Queue( function() {' +
'getCKE().tools.callFunction(' + loadedHandler + ');' +
'} );' +
'</script>' +
// Load MathJax lib.
'<script src="' + ( editor.config.mathJaxLib || cdn ) + '"></script>' +
'</head>' +
'<body style="padding:0;margin:0;background:transparent;overflow:hidden">' +
'<span id="preview"></span>' +
// Render everything here and after that copy it to the preview.
'<span id="buffer" style="display:none"></span>' +
'</body>' +
'</html>' );
}
// Run MathJax parsing Tex.
function update() {
isRunning = true;
value = newValue;
editor.fire( 'lockSnapshot' );
buffer.setHtml( value );
// Set loading indicator.
preview.setHtml( '<img src=' + CKEDITOR.plugins.mathjax.loadingIcon + ' alt=' + editor.lang.mathjax.loading + '>' );
iFrame.setStyles( {
height: '16px',
width: '16px',
display: 'inline',
'vertical-align': 'middle'
} );
editor.fire( 'unlockSnapshot' );
// Run MathJax.
doc.getWindow().$.update( value );
}
return {
/**
* Sets the TeX value to be displayed in the `iframe` element inside
* the editor. This function will activate the MathJax
* library which interprets TeX expressions and converts them into
* their representation that is displayed in the editor.
*
* @param {String} value TeX string.
*/
setValue: function( value ) {
newValue = CKEDITOR.tools.htmlEncode( value );
if ( isInit && !isRunning )
update();
}
};
};
} else {
// In IE8 MathJax does not work stable so instead of using standard
// frame wrapper it is replaced by placeholder to show pure TeX in iframe.
CKEDITOR.plugins.mathjax.frameWrapper = function( iFrame, editor ) {
iFrame.getFrameDocument().write( '<!DOCTYPE html>' +
'<html>' +
'<head>' +
'<meta charset="utf-8">' +
'</head>' +
'<body style="padding:0;margin:0;background:transparent;overflow:hidden">' +
'<span style="white-space:nowrap;" id="tex"></span>' +
'</body>' +
'</html>' );
return {
setValue: function( value ) {
var doc = iFrame.getFrameDocument(),
tex = doc.getById( 'tex' );
tex.setHtml( CKEDITOR.plugins.mathjax.trim( CKEDITOR.tools.htmlEncode( value ) ) );
CKEDITOR.plugins.mathjax.copyStyles( iFrame, tex );
editor.fire( 'lockSnapshot' );
iFrame.setStyles( {
width: Math.min( 250, tex.$.offsetWidth ) + 'px',
height: doc.$.body.offsetHeight + 'px',
display: 'inline',
'vertical-align': 'middle'
} );
editor.fire( 'unlockSnapshot' );
}
};
};
}
} )();
/**
* Sets the path to the MathJax library. It can be both a local
* resource and a location different than the default CDN.
*
* Please note that this must be a full or absolute path.
*
* config.mathJaxLib = 'http:\/\/example.com\/libs\/MathJax.js';
*
* @cfg {String} [mathJaxLib='http:\/\/cdn.mathjax.org\/mathjax\/2.2-latest\/MathJax.js?config=TeX-AMS_HTML']
* @member CKEDITOR.config
*/
/**
* Sets the default class for `span` elements that will be
* converted into [Mathematical Formulas](http://ckeditor.com/addon/mathjax)
* widgets.
*
* If you set it to the following:
*
* config.mathJaxClass = 'my-math';
*
* The code below will be recognized as a Mathematical Formulas widget.
*
* <span class="my-math">\( \sqrt{4} = 2 \)</span>
*
* @cfg {String} [mathJaxClass='math-tex']
* @member CKEDITOR.config
*/

@ -885,6 +885,7 @@ VALUES
('tool_visible_by_default_at_creation','gradebook','checkbox','Tools','true','ToolVisibleByDefaultAtCreationTitle','ToolVisibleByDefaultAtCreationComment',NULL,'Gradebook', 1),
('prevent_session_admins_to_manage_all_users', NULL, 'radio', 'Session', 'false', 'PreventSessionAdminsToManageAllUsersTitle', 'PreventSessionAdminsToManageAllUsersComment', NULL, NULL, 1),
('documents_default_visibility_defined_in_course', NULL,'radio','Tools','false','DocumentsDefaultVisibilityDefinedInCourseTitle','DocumentsDefaultVisibilityDefinedInCourseComment',NULL, NULL, 1),
('enabled_mathjax', NULL, 'radio', 'Editor', 'false', 'EnableMathJaxTitle', 'EnableMathJaxComment', NULL, NULL, 0),
('chamilo_database_version', NULL, 'textfield',NULL, '0', 'DatabaseVersion','', NULL, NULL, 0);
UNLOCK TABLES;
/*!40000 ALTER TABLE settings_current ENABLE KEYS */;
@ -1229,7 +1230,9 @@ VALUES
('prevent_session_admins_to_manage_all_users', 'true', 'Yes'),
('prevent_session_admins_to_manage_all_users', 'false', 'No'),
('documents_default_visibility_defined_in_course', 'true', 'Yes'),
('documents_default_visibility_defined_in_course', 'false', 'No');
('documents_default_visibility_defined_in_course', 'false', 'No'),
('enabled_mathjax','true','Yes'),
('enabled_mathjax','false','No');
UNLOCK TABLES;
@ -4725,5 +4728,5 @@ CREATE TABLE c_attendance_calendar_rel_group (
-- Version
LOCK TABLES settings_current WRITE;
UPDATE settings_current SET selected_value = '1.10.0.24' WHERE variable = 'chamilo_database_version';
UPDATE settings_current SET selected_value = '1.10.0.25' WHERE variable = 'chamilo_database_version';
UNLOCK TABLES;

@ -87,10 +87,14 @@ INSERT INTO settings_options (variable, value, display_text) VALUES ('show_gloss
INSERT INTO settings_options (variable, value, display_text) VALUES ('show_glossary_in_extra_tools', 'exercise_and_lp', 'ExerciseAndLearningPath');
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('documents_default_visibility_defined_in_course', NULL,'radio','Tools','false','DocumentsDefaultVisibilityDefinedInCourseTitle','DocumentsDefaultVisibilityDefinedInCourseComment',NULL, NULL, 1);
INSERT INTO settings_options (variable, value, display_text) VALUES ('documents_default_visibility_defined_in_course', 'true', 'Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('documents_default_visibility_defined_in_course', 'false', 'No');
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('enabled_mathjax', NULL, 'radio', 'Editor', 'false', 'EnableMathJaxTitle', 'EnableMathJaxComment', NULL, NULL, 0);
INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_mathjax', 'true', 'Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_mathjax', 'false', 'No');
-- xxCOURSExx
ALTER TABLE c_survey ADD COLUMN visible_results INT UNSIGNED DEFAULT 0;
@ -107,4 +111,4 @@ CREATE TABLE IF NOT EXISTS c_student_publication_comment (id INT PRIMARY KEY NOT
CREATE TABLE IF NOT EXISTS c_attendance_calendar_rel_group (id int NOT NULL auto_increment PRIMARY KEY, c_id INT NOT NULL, group_id INT NOT NULL, calendar_id INT NOT NULL);
-- Do not move this query
UPDATE settings_current SET selected_value = '1.10.0.24' WHERE variable = 'chamilo_database_version';
UPDATE settings_current SET selected_value = '1.10.0.25' WHERE variable = 'chamilo_database_version';

@ -28,6 +28,7 @@ var plugins = [
'leaflet',
'mapping',
'maximize',
'mathjax',
'oembed',
'toolbar',
'toolbarswitch',

@ -61,7 +61,10 @@ class Basic extends Toolbar
if (api_get_setting('math_asciimathML') == 'true') {
$plugins[] = 'asciimath';
}
$plugins[] = 'asciimath';
if (api_get_setting('enabled_mathjax') == 'true') {
$plugins[] = 'mathjax';
}
if (api_get_setting('enabled_asciisvg') == 'true') {
$plugins[] = 'asciisvg';

Loading…
Cancel
Save