pull/2487/head
Julio 9 years ago
commit 9ae5ec3519
  1. 5
      .htaccess
  2. 29
      .scrutinizer.yml
  3. 35
      .travis.yml
  4. 2
      README.md
  5. 4
      app/Migrations/Schema/V111/Version111.php
  6. 92
      app/Migrations/Schema/V111/Version20160610142700.php
  7. 36
      app/Migrations/Schema/V111/Version20160623143200.php
  8. 25
      app/Resources/public/assets/ckeditor/plugins/scayt/README.md
  9. 592
      app/Resources/public/assets/ckeditor/plugins/scayt/dialogs/options.js
  10. BIN
      app/Resources/public/assets/ckeditor/plugins/scayt/icons/hidpi/scayt.png
  11. BIN
      app/Resources/public/assets/ckeditor/plugins/scayt/icons/scayt.png
  12. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/af.js
  13. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/ar.js
  14. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/bg.js
  15. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/bn.js
  16. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/bs.js
  17. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/ca.js
  18. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/cs.js
  19. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/cy.js
  20. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/da.js
  21. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/de.js
  22. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/el.js
  23. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/en-au.js
  24. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/en-ca.js
  25. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/en-gb.js
  26. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/en.js
  27. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/eo.js
  28. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/es.js
  29. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/et.js
  30. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/eu.js
  31. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/fa.js
  32. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/fi.js
  33. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/fo.js
  34. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/fr-ca.js
  35. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/fr.js
  36. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/gl.js
  37. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/gu.js
  38. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/he.js
  39. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/hi.js
  40. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/hr.js
  41. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/hu.js
  42. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/is.js
  43. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/it.js
  44. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/ja.js
  45. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/ka.js
  46. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/km.js
  47. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/ko.js
  48. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/ku.js
  49. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/lt.js
  50. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/lv.js
  51. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/mk.js
  52. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/mn.js
  53. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/ms.js
  54. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/nb.js
  55. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/nl.js
  56. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/no.js
  57. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/pl.js
  58. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/pt-br.js
  59. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/pt.js
  60. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/ro.js
  61. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/ru.js
  62. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/sk.js
  63. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/sl.js
  64. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/sr-latn.js
  65. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/sr.js
  66. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/sv.js
  67. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/th.js
  68. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/tr.js
  69. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/ug.js
  70. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/uk.js
  71. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/vi.js
  72. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/zh-cn.js
  73. 13
      app/Resources/public/assets/ckeditor/plugins/scayt/lang/zh.js
  74. 1877
      app/Resources/public/assets/ckeditor/plugins/scayt/plugin.js
  75. 12
      app/Resources/public/css/base.css
  76. 204
      app/Resources/public/css/chat.css
  77. 2
      app/Resources/public/css/scorm.css
  78. 15
      app/Resources/public/css/themes/chamilo/default.css
  79. 18
      app/bootstrap.php.cache
  80. 2
      app/check.php
  81. 5
      app/config/config.yml
  82. 4
      cli-config.php
  83. 6
      composer.json
  84. 42
      documentation/changelog.html
  85. 4
      documentation/installation_guide.html
  86. 4
      documentation/installation_guide_es_ES.html
  87. 4
      documentation/installation_guide_fr_FR.html
  88. 75
      documentation/optimization.html
  89. 1
      index.php
  90. 1
      main/admin/access_url_check_user_session.php
  91. 6
      main/admin/add_courses_to_usergroup.php
  92. 10
      main/admin/add_sessions_to_usergroup.php
  93. 4
      main/admin/add_users_to_usergroup.php
  94. 17
      main/admin/course_add.php
  95. 7
      main/admin/course_import.php
  96. 87
      main/admin/course_information.php
  97. 2
      main/admin/extra_field_options.php
  98. 28
      main/admin/index.php
  99. 467
      main/admin/settings.lib.php
  100. 24
      main/admin/settings.php
  101. Some files were not shown because too many files have changed in this diff Show More

@ -45,3 +45,8 @@ RewriteRule ^badge/(\d{1,}) main/badge/issued.php?issue=$1 [L]
RewriteRule ^skill/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [L]
# Support deprecated URL (avoid 404)
RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [L]
# Support old URLs using the exercice (with a c) folder rather than exercise
RewriteRule ^main/exercice/(.*)$ main/exercise/$1 [QSA,L]
# Support old URLs using the newscorm folder rather than lp
RewriteRule ^main/newscorm/(.*)$ main/lp/$1 [QSA,L]

@ -3,6 +3,7 @@
# Chamilo includes but that we cannot update without patching upstream.
build:
environment:
mysql: 5.5
php:
version: 5.6.0
ini:
@ -11,8 +12,10 @@ build:
hosts:
my.chamilodev.net: '127.0.0.1'
dependencies:
override:
- true
before:
- php -d memory_limit=-1 /usr/local/bin/composer -v update
- php -d memory_limit=2G /usr/bin/composer.phar -v update
filter:
excluded_paths:
- tests/*
@ -27,18 +30,18 @@ filter:
- main/inc/lib/browser/*
- main/inc/lib/elfinder/*
- main/inc/lib/freemindflashbrowser/*
- main/inc/lib/kses-0.2.2
- main/inc/lib/mimetex
- main/inc/lib/nanogong
- main/inc/lib/pclzip
- main/inc/lib/pear
- main/inc/lib/phpmailer
- main/inc/lib/phpseclib
- main/inc/lib/svg-edit
- main/inc/lib/swfobject
- main/inc/lib/wami-recorder
- main/inc/lib/xajax
- main/auth/cas/lib/CAS
- main/inc/lib/kses-0.2.2/*
- main/inc/lib/mimetex/*
- main/inc/lib/nanogong/*
- main/inc/lib/pclzip/*
- main/inc/lib/pear/*
- main/inc/lib/phpmailer/*
- main/inc/lib/phpseclib/*
- main/inc/lib/svg-edit/*
- main/inc/lib/swfobject/*
- main/inc/lib/wami-recorder/*
- main/inc/lib/xajax/*
- main/auth/cas/lib/CAS/*
checks:
php:
code_rating: true

@ -12,6 +12,18 @@ before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq mysql-server
- sudo apt-get install -qq apache2 libapache2-mod-fastcgi
# enable php-fpm
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- sudo a2enmod rewrite actions fastcgi alias
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "memory_limit = 2G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "phar.readonly = 0" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "date.timezone = Europe/Paris" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
# configure apache virtual hosts
- sudo cp -f tests/travis-apache /etc/apache2/sites-available/default
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
- sudo service apache2 restart
# Install additional PHP packages (check http://docs.travis-ci.com/user/ci-environment/#CI-environment-OS
# for pre-installed packages)
#- sudo apt-get install -qq php5-imagick
@ -19,12 +31,12 @@ before_install:
# php is compiled with --enable-fpm, so no install of FPM is needed.
# However, not installing it generates errors with service php5-fpm restart
# further down (need to use php-fpm without 5)
- sudo apt-get install -qq php5-cli php5-fpm
#- sudo apt-get install -qq php5-cli php5-fpm
before_script:
- php5 -v
- php5 -m
- composer self-update
#- which composer
#- php -d memory_limit=2G /usr/bin/composer update
#- php -d memory_limit=2G /home/travis/.phpenv/shims/composer update
# Previously, fxp/composer-asset-plugin was required but was causing a lot of trouble updating. Now it's disabled.
#- composer global require "fxp/composer-asset-plugin:1.0.3"
# You can either use the composer install method and face the Github limit
@ -43,23 +55,14 @@ before_script:
# Continue...
- phpenv config-add tests/travis-php-config.ini
# enable php-fpm
- sudo /etc/init.d/php5-fpm stop
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- sudo a2enmod rewrite actions fastcgi alias
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
# configure apache virtual hosts
- sudo cp -f tests/travis-apache /etc/apache2/sites-available/default
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
- sudo service apache2 restart
- sudo service php5-fpm restart
- php5 -v
- php -v
# install Chash, a database, and then install Chamilo
- git clone https://github.com/chamilo/chash
- cd chash
- composer install
- composer update
- php5 -d phar.readonly=0 createPhar.php
- php -d phar.readonly=0 createPhar.php
- chmod +x chash.phar
- sudo mv chash.phar /usr/local/bin/chash
#- cd ..
@ -74,7 +77,7 @@ before_script:
- cd /home/travis/build/chamilo/chamilo-lms
# There's an issue with Chash, starting in version 1.10, whereby PHP CLI on Travis-ci is PHP5.3, whatever the version you ask for.
# This effectively breaks the installer and renders these tests useless. We are looking for a solution (for example using containers)
- sudo chash chash:chamilo_install --no-interaction --sitename="Chamilo" --site_url="http://localhost/" --institution="Chamilo" --institution_url="https://chamilo.org" --encrypt_method="sha1" --firstname="John" --lastname="Doe" --language="english" --driver="mysqlnd" --host="localhost" --port="3306" --dbname="chamilo" --dbuser="root" --permissions_for_new_directories="0777" --permissions_for_new_files="0666" --linux-user="www-data" --linux-group="www-data" --username="admin" --password="admin" --email="admin@example.com" --phone="555-5555" 1.10.x
- sudo chash chash:chamilo_install --no-interaction --sitename="Chamilo" --site_url="http://localhost/" --institution="Chamilo" --institution_url="https://chamilo.org" --encrypt_method="sha1" --firstname="John" --lastname="Doe" --language="english" --driver="pdo_mysql" --host="localhost" --port="3306" --dbname="chamilo" --dbuser="root" --permissions_for_new_directories="0777" --permissions_for_new_files="0666" --linux-user="www-data" --linux-group="www-data" --username="admin" --password="admin" --email="admin@example.com" --phone="555-5555" 1.10.x
script:
# - phpunit -c tests/phpunit

@ -165,7 +165,7 @@ php bin/doctrine.php migrations:execute 20150527120703 --up --configuration=app/
You can also print the differences between your database and what it should be by issuing the following command from the Chamilo base folder:
```
php bin/doctrine.php orm:schema:update --dump-sql
php bin/doctrine.php orm:schema-tool:update --dump-sql
```
## Contributing

@ -288,6 +288,10 @@ class Version111 extends AbstractMigrationChamilo
$this->addSql('ALTER TABLE user ADD profile_completed TINYINT(1) DEFAULT NULL;');
$this->addSql('ALTER TABLE extra_field_options CHANGE display_text display_text VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE extra_field CHANGE variable variable VARCHAR(255) NOT NULL');
if (!$schema->hasTable('version')) {
$this->addSql('CREATE TABLE version (version varchar(255), PRIMARY KEY(version));');
}
}
/**

@ -0,0 +1,92 @@
<?php
/* For licensing terms, see /license.txt */
namespace Application\Migrations\Schema\V111;
use Application\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Type;
/**
* Class Version20160610142700
* Integrate the Skype plugin and create new settings current to enable it
* @package Application\Migrations\Schema\V111
*/
class Version20160610142700 extends AbstractMigrationChamilo
{
/**
* @param Schema $schema
* @throws \Doctrine\DBAL\DBALException
* @throws \Doctrine\DBAL\Schema\SchemaException
*/
public function up(Schema $schema)
{
$dataList = $this
->connection
->executeQuery("
SELECT id FROM extra_field
WHERE variable = 'skype' AND extra_field_type = 1
")
->fetchAll();
if (empty($dataList)) {
$this->addSql("
INSERT INTO extra_field (extra_field_type, field_type, variable, display_text, visible, changeable, created_at)
VALUES (1, 1, 'skype', 'Skype', 1, 1, now())
");
}
$this->addSql("
INSERT INTO extra_field (extra_field_type, field_type, variable, display_text, visible, changeable, created_at)
VALUES (1, 1, 'linkedin_url', 'LinkedInUrl', 1, 1, now())
");
$this->addSettingCurrent(
'allow_show_skype_account',
null,
'radio',
'Platform',
'true',
'AllowShowSkypeAccountTitle',
'AllowShowSkypeAccountComment',
null,
null,
1,
true,
false,
[
['value' => 'false', 'text' => 'No'],
['value' => 'true', 'text' => 'Yes']
]
);
$this->addSettingCurrent(
'allow_show_linkedin_url',
null,
'radio',
'Platform',
'true',
'AllowShowLinkedInUrlTitle',
'AllowShowLinkedInUrlComment',
null,
null,
1,
true,
false,
[
['value' => 'false', 'text' => 'No'],
['value' => 'true', 'text' => 'Yes']
]
);
}
/**
* @param Schema $schema
* @throws \Doctrine\DBAL\DBALException
* @throws \Doctrine\DBAL\Schema\SchemaException
*/
public function down(Schema $schema)
{
}
}

@ -0,0 +1,36 @@
<?php
/* For licensing terms, see /license.txt */
namespace Application\Migrations\Schema\V111;
use Application\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Type;
/**
* Class Version20160623143200
* Remove chatcall_date, chatcall_text, chatcall_user_id from User table
* @package Application\Migrations\Schema\V111
*/
class Version20160623143200 extends AbstractMigrationChamilo
{
/**
* @param Schema $schema
* @throws \Doctrine\DBAL\Schema\SchemaException
*/
public function up(Schema $schema)
{
$schema
->getTable('user')
->dropColumn('chatcall_user_id')
->dropColumn('chatcall_date')
->dropColumn('chatcall_text');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema)
{
}
}

@ -0,0 +1,25 @@
CKEditor SCAYT Plugin
=====================
This plugin brings Spell Check As You Type (SCAYT) into up to CKEditor 4+.
SCAYT is a "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution.
Installation
------------
1. Clone/copy this repository contents in a new "plugins/scayt" folder in your CKEditor installation.
2. Enable the "scayt" plugin in the CKEditor configuration file (config.js):
config.extraPlugins = 'scayt';
That's all. SCAYT will appear on the editor toolbar and will be ready to use.
License
-------
Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html).
See LICENSE.md for more information.
Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/).

@ -1,19 +1,573 @@
CKEDITOR.dialog.add("scaytDialog",function(c){var f=c.scayt,q='\x3cp\x3e\x3cimg src\x3d"'+f.getLogo()+'" /\x3e\x3c/p\x3e\x3cp\x3e'+f.getLocal("version")+f.getVersion()+"\x3c/p\x3e\x3cp\x3e"+f.getLocal("text_copyrights")+"\x3c/p\x3e",r=CKEDITOR.document,n={isChanged:function(){return null===this.newLang||this.currentLang===this.newLang?!1:!0},currentLang:f.getLang(),newLang:null,reset:function(){this.currentLang=f.getLang();this.newLang=null},id:"lang"},q=[{id:"options",label:f.getLocal("tab_options"),
onShow:function(){},elements:[{type:"vbox",id:"scaytOptions",children:function(){var a=f.getApplicationConfig(),b=[],g={"ignore-all-caps-words":"label_allCaps","ignore-domain-names":"label_ignoreDomainNames","ignore-words-with-mixed-cases":"label_mixedCase","ignore-words-with-numbers":"label_mixedWithDigits"},e;for(e in a)a={type:"checkbox"},a.id=e,a.label=f.getLocal(g[e]),b.push(a);return b}(),onShow:function(){this.getChild();for(var a=c.scayt,b=0;b<this.getChild().length;b++)this.getChild()[b].setValue(a.getApplicationConfig()[this.getChild()[b].id])}}]},
{id:"langs",label:f.getLocal("tab_languages"),elements:[{id:"leftLangColumn",type:"vbox",align:"left",widths:["100"],children:[{type:"html",id:"langBox",style:"overflow: hidden; white-space: normal;margin-bottom:15px;",html:'\x3cdiv\x3e\x3cdiv style\x3d"float:left;width:45%;margin-left:5px;" id\x3d"left-col-'+c.name+'"\x3e\x3c/div\x3e\x3cdiv style\x3d"float:left;width:45%;margin-left:15px;" id\x3d"right-col-'+c.name+'"\x3e\x3c/div\x3e\x3c/div\x3e',onShow:function(){var a=c.scayt.getLang();r.getById("scaytLang_"+
c.name+"_"+a).$.checked=!0}},{type:"html",id:"graytLanguagesHint",html:'\x3cdiv style\x3d"margin:5px auto; width:95%;white-space:normal;" id\x3d"'+c.name+'graytLanguagesHint"\x3e\x3cspan style\x3d"width:10px;height:10px;display: inline-block; background:#02b620;vertical-align:top;margin-top:2px;"\x3e\x3c/span\x3e - This languages are supported by Grammar As You Type(GRAYT).\x3c/div\x3e',onShow:function(){var a=r.getById(c.name+"graytLanguagesHint");c.config.grayt_autoStartup||(a.$.style.display="none")}}]}]},
{id:"dictionaries",label:f.getLocal("tab_dictionaries"),elements:[{type:"vbox",id:"rightCol_col__left",children:[{type:"html",id:"dictionaryNote",html:""},{type:"text",id:"dictionaryName",label:f.getLocal("label_fieldNameDic")||"Dictionary name",onShow:function(a){var b=a.sender,g=c.scayt;setTimeout(function(){b.getContentElement("dictionaries","dictionaryNote").getElement().setText("");null!=g.getUserDictionaryName()&&""!=g.getUserDictionaryName()&&b.getContentElement("dictionaries","dictionaryName").setValue(g.getUserDictionaryName())},
0)}},{type:"hbox",id:"notExistDic",align:"left",style:"width:auto;",widths:["50%","50%"],children:[{type:"button",id:"createDic",label:f.getLocal("btn_createDic"),title:f.getLocal("btn_createDic"),onClick:function(){var a=this.getDialog(),b=p,g=c.scayt,e=a.getContentElement("dictionaries","dictionaryName").getValue();g.createUserDictionary(e,function(d){d.error||b.toggleDictionaryButtons.call(a,!0);d.dialog=a;d.command="create";d.name=e;c.fire("scaytUserDictionaryAction",d)},function(d){d.dialog=
a;d.command="create";d.name=e;c.fire("scaytUserDictionaryActionError",d)})}},{type:"button",id:"restoreDic",label:f.getLocal("btn_restoreDic"),title:f.getLocal("btn_restoreDic"),onClick:function(){var a=this.getDialog(),b=c.scayt,g=p,e=a.getContentElement("dictionaries","dictionaryName").getValue();b.restoreUserDictionary(e,function(d){d.dialog=a;d.error||g.toggleDictionaryButtons.call(a,!0);d.command="restore";d.name=e;c.fire("scaytUserDictionaryAction",d)},function(d){d.dialog=a;d.command="restore";
d.name=e;c.fire("scaytUserDictionaryActionError",d)})}}]},{type:"hbox",id:"existDic",align:"left",style:"width:auto;",widths:["50%","50%"],children:[{type:"button",id:"removeDic",label:f.getLocal("btn_deleteDic"),title:f.getLocal("btn_deleteDic"),onClick:function(){var a=this.getDialog(),b=c.scayt,g=p,e=a.getContentElement("dictionaries","dictionaryName"),d=e.getValue();b.removeUserDictionary(d,function(b){e.setValue("");b.error||g.toggleDictionaryButtons.call(a,!1);b.dialog=a;b.command="remove";
b.name=d;c.fire("scaytUserDictionaryAction",b)},function(b){b.dialog=a;b.command="remove";b.name=d;c.fire("scaytUserDictionaryActionError",b)})}},{type:"button",id:"renameDic",label:f.getLocal("btn_renameDic"),title:f.getLocal("btn_renameDic"),onClick:function(){var a=this.getDialog(),b=c.scayt,g=a.getContentElement("dictionaries","dictionaryName").getValue();b.renameUserDictionary(g,function(b){b.dialog=a;b.command="rename";b.name=g;c.fire("scaytUserDictionaryAction",b)},function(b){b.dialog=a;b.command=
"rename";b.name=g;c.fire("scaytUserDictionaryActionError",b)})}}]},{type:"html",id:"dicInfo",html:'\x3cdiv id\x3d"dic_info_editor1" style\x3d"margin:5px auto; width:95%;white-space:normal;"\x3e'+f.getLocal("text_descriptionDic")+"\x3c/div\x3e"}]}]},{id:"about",label:f.getLocal("tab_about"),elements:[{type:"html",id:"about",style:"margin: 5px 5px;",html:'\x3cdiv\x3e\x3cdiv id\x3d"scayt_about_"\x3e'+q+"\x3c/div\x3e\x3c/div\x3e"}]}];c.on("scaytUserDictionaryAction",function(a){var b=SCAYT.prototype.UILib,
g=a.data.dialog,e=g.getContentElement("dictionaries","dictionaryNote").getElement(),d=a.editor.scayt,c;void 0===a.data.error?(c=d.getLocal("message_success_"+a.data.command+"Dic"),c=c.replace("%s",a.data.name),e.setText(c),b.css(e.$,{color:"blue"})):(""===a.data.name?e.setText(d.getLocal("message_info_emptyDic")):(c=d.getLocal("message_error_"+a.data.command+"Dic"),c=c.replace("%s",a.data.name),e.setText(c)),b.css(e.$,{color:"red"}),null!=d.getUserDictionaryName()&&""!=d.getUserDictionaryName()?g.getContentElement("dictionaries",
"dictionaryName").setValue(d.getUserDictionaryName()):g.getContentElement("dictionaries","dictionaryName").setValue(""))});c.on("scaytUserDictionaryActionError",function(a){var b=SCAYT.prototype.UILib,c=a.data.dialog,e=c.getContentElement("dictionaries","dictionaryNote").getElement(),d=a.editor.scayt,f;""===a.data.name?e.setText(d.getLocal("message_info_emptyDic")):(f=d.getLocal("message_error_"+a.data.command+"Dic"),f=f.replace("%s",a.data.name),e.setText(f));b.css(e.$,{color:"red"});null!=d.getUserDictionaryName()&&
""!=d.getUserDictionaryName()?c.getContentElement("dictionaries","dictionaryName").setValue(d.getUserDictionaryName()):c.getContentElement("dictionaries","dictionaryName").setValue("")});var p={title:f.getLocal("text_title"),resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:340,minHeight:260,onLoad:function(){if(0!=c.config.scayt_uiTabs[1]){var a=p,b=a.getLangBoxes.call(this);b.getParent().setStyle("white-space","normal");a.renderLangList(b);this.definition.minWidth=this.getSize().width;this.resize(this.definition.minWidth,
this.definition.minHeight)}},onCancel:function(){n.reset()},onHide:function(){c.unlockSelection()},onShow:function(){c.fire("scaytDialogShown",this);if(0!=c.config.scayt_uiTabs[2]){var a=c.scayt,b=this.getContentElement("dictionaries","dictionaryName"),g=this.getContentElement("dictionaries","existDic").getElement().getParent(),e=this.getContentElement("dictionaries","notExistDic").getElement().getParent();g.hide();e.hide();null!=a.getUserDictionaryName()&&""!=a.getUserDictionaryName()?(this.getContentElement("dictionaries",
"dictionaryName").setValue(a.getUserDictionaryName()),g.show()):(b.setValue(""),e.show())}},onOk:function(){var a=p,b=c.scayt;this.getContentElement("options","scaytOptions");a=a.getChangedOption.call(this);b.commitOption({changedOptions:a})},toggleDictionaryButtons:function(a){var b=this.getContentElement("dictionaries","existDic").getElement().getParent(),c=this.getContentElement("dictionaries","notExistDic").getElement().getParent();a?(b.show(),c.hide()):(b.hide(),c.show())},getChangedOption:function(){var a=
{};if(1==c.config.scayt_uiTabs[0])for(var b=this.getContentElement("options","scaytOptions").getChild(),g=0;g<b.length;g++)b[g].isChanged()&&(a[b[g].id]=b[g].getValue());n.isChanged()&&(a[n.id]=c.config.scayt_sLang=n.currentLang=n.newLang);return a},buildRadioInputs:function(a,b,g){var e=new CKEDITOR.dom.element("div"),d="scaytLang_"+c.name+"_"+b,f=CKEDITOR.dom.element.createFromHtml('\x3cinput id\x3d"'+d+'" type\x3d"radio" value\x3d"'+b+'" name\x3d"scayt_lang" /\x3e'),m=new CKEDITOR.dom.element("label"),
k=c.scayt;e.setStyles({"white-space":"normal",position:"relative","padding-bottom":"2px"});f.on("click",function(a){n.newLang=a.sender.getValue()});m.appendText(a);m.setAttribute("for",d);g&&c.config.grayt_autoStartup&&m.setStyles({color:"#02b620"});e.append(f);e.append(m);b===k.getLang()&&(f.setAttribute("checked",!0),f.setAttribute("defaultChecked","defaultChecked"));return e},renderLangList:function(a){var b=a.find("#left-col-"+c.name).getItem(0);a=a.find("#right-col-"+c.name).getItem(0);var g=
f.getScaytLangList(),e=f.getGraytLangList(),d={},l=[],m=0,k=!1,h;for(h in g.ltr)d[h]=g.ltr[h];for(h in g.rtl)d[h]=g.rtl[h];for(h in d)l.push([h,d[h]]);l.sort(function(a,b){var c=0;a[1]>b[1]?c=1:a[1]<b[1]&&(c=-1);return c});d={};for(k=0;k<l.length;k++)d[l[k][0]]=l[k][1];l=Math.round(l.length/2);for(h in d)m++,k=h in e.ltr||h in e.rtl,this.buildRadioInputs(d[h],h,k).appendTo(m<=l?b:a)},getLangBoxes:function(){return this.getContentElement("langs","langBox").getElement()},contents:function(a,b){var c=
[],e=b.config.scayt_uiTabs;if(e){for(var d in e)1==e[d]&&c.push(a[d]);c.push(a[a.length-1])}else return a;return c}(q,c)};return p});
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.dialog.add( 'scaytDialog', function( editor ) {
var scayt_instance = editor.scayt;
var aboutTabDefinition = '<p><img src="' + scayt_instance.getLogo() + '" /></p>' +
'<p>' + scayt_instance.getLocal('version') + scayt_instance.getVersion() + '</p>' +
'<p>' + scayt_instance.getLocal('text_copyrights') + '</p>';
var doc = CKEDITOR.document;
var optionGenerator = function() {
var scayt_instance_ = editor.scayt,
applicationConfig = scayt_instance.getApplicationConfig(),
optionArrayUiCheckboxes = [],
optionLocalizationList = {
"ignore-all-caps-words" : "label_allCaps",
"ignore-domain-names" : "label_ignoreDomainNames",
"ignore-words-with-mixed-cases" : "label_mixedCase",
"ignore-words-with-numbers" : "label_mixedWithDigits"
};
for(var option in applicationConfig) {
var checkboxConfig = {
type: "checkbox"
};
checkboxConfig.id = option;
checkboxConfig.label = scayt_instance.getLocal(optionLocalizationList[option]);
optionArrayUiCheckboxes.push(checkboxConfig);
}
return optionArrayUiCheckboxes;
};
var languageModelState = {
isChanged : function() {
return (this.newLang === null || this.currentLang === this.newLang) ? false : true;
},
currentLang: scayt_instance.getLang(),
newLang: null,
reset: function() {
this.currentLang = scayt_instance.getLang();
this.newLang = null;
},
id: 'lang'
};
var generateDialogTabs = function(tabsList, editor) {
var tabs = [],
uiTabs = editor.config.scayt_uiTabs;
if(!uiTabs) {
return tabsList;
} else {
for(var i in uiTabs) {
(uiTabs[i] == 1) && tabs.push(tabsList[i]);
}
tabs.push(tabsList[tabsList.length - 1]);
}
return tabs;
};
var dialogTabs = [{
id : 'options',
label : scayt_instance.getLocal('tab_options'),
onShow: function() {
// console.log("tab show");
},
elements : [
{
type: 'vbox',
id: 'scaytOptions',
children: optionGenerator(),
onShow: function() {
var optionsTab = this.getChild(),
scayt_instance = editor.scayt;
for(var i = 0; i < this.getChild().length; i++) {
this.getChild()[i].setValue(scayt_instance.getApplicationConfig()[this.getChild()[i].id]);
}
}
}
]
},
{
id : 'langs',
label : scayt_instance.getLocal('tab_languages'),
elements : [
{
id: "leftLangColumn",
type: 'vbox',
align: 'left',
widths: ['100'],
children: [
{
type: 'html',
id: 'langBox',
style: 'overflow: hidden; white-space: normal;margin-bottom:15px;',
html: '<div><div style="float:left;width:45%;margin-left:5px;" id="left-col-' + editor.name + '"></div><div style="float:left;width:45%;margin-left:15px;" id="right-col-' + editor.name + '"></div></div>',
onShow: function() {
var scayt_instance = editor.scayt;
var lang = scayt_instance.getLang(),
prefix_id = "scaytLang_",
radio = doc.getById(prefix_id + editor.name + '_' + lang);
radio.$.checked = true;
}
},
{
type: 'html',
id: 'graytLanguagesHint',
html: '<div style="margin:5px auto; width:95%;white-space:normal;" id="' + editor.name + 'graytLanguagesHint"><span style="width:10px;height:10px;display: inline-block; background:#02b620;vertical-align:top;margin-top:2px;"></span> - This languages are supported by Grammar As You Type(GRAYT).</div>',
onShow: function() {
var graytLanguagesHint = doc.getById(editor.name + 'graytLanguagesHint');
if (!editor.config.grayt_autoStartup) {
graytLanguagesHint.$.style.display = 'none';
}
}
}
]
}
]
},
{
id : 'dictionaries',
label : scayt_instance.getLocal('tab_dictionaries'),
elements : [
{
type: 'vbox',
id: 'rightCol_col__left',
children: [
{
type: 'html',
id: 'dictionaryNote',
html: ''
},
{
type: 'text',
id: 'dictionaryName',
label: scayt_instance.getLocal('label_fieldNameDic') || 'Dictionary name',
onShow: function(data) {
var dialog = data.sender,
scayt_instance = editor.scayt;
// IE7 specific fix
setTimeout(function() {
// clear dictionaryNote field
dialog.getContentElement("dictionaries", "dictionaryNote").getElement().setText('');
// restore/clear dictionaryName field
if(scayt_instance.getUserDictionaryName() != null && scayt_instance.getUserDictionaryName() != '') {
dialog.getContentElement("dictionaries", "dictionaryName").setValue(scayt_instance.getUserDictionaryName());
}
}, 0);
}
},
{
type: 'hbox',
id: 'notExistDic',
align: 'left',
style: 'width:auto;',
widths: [ '50%', '50%' ],
children: [
{
type: 'button',
id: 'createDic',
label: scayt_instance.getLocal('btn_createDic'),
title: scayt_instance.getLocal('btn_createDic'),
onClick: function() {
var dialog = this.getDialog(),
self = dialogDefinition,
scayt_instance = editor.scayt,
name = dialog.getContentElement("dictionaries", "dictionaryName").getValue();
scayt_instance.createUserDictionary(name, function(response) {
if(!response.error) {
self.toggleDictionaryButtons.call(dialog, true);
}
response.dialog = dialog;
response.command = "create";
response.name = name;
editor.fire("scaytUserDictionaryAction", response);
}, function(error) {
error.dialog = dialog;
error.command = "create";
error.name = name;
editor.fire("scaytUserDictionaryActionError", error);
});
}
},
{
type: 'button',
id: 'restoreDic',
label: scayt_instance.getLocal('btn_restoreDic'),
title: scayt_instance.getLocal('btn_restoreDic'),
onClick: function() {
var dialog = this.getDialog(),
scayt_instance = editor.scayt,
self = dialogDefinition,
name = dialog.getContentElement("dictionaries", "dictionaryName").getValue();
scayt_instance.restoreUserDictionary(name, function(response) {
response.dialog = dialog;
if(!response.error) {
self.toggleDictionaryButtons.call(dialog, true);
}
response.command = "restore";
response.name = name;
editor.fire("scaytUserDictionaryAction", response);
}, function(error) {
error.dialog = dialog;
error.command = "restore";
error.name = name;
editor.fire("scaytUserDictionaryActionError", error);
});
}
}
]
},
{
type: 'hbox',
id: 'existDic',
align: 'left',
style: 'width:auto;',
widths: [ '50%', '50%' ],
children: [
{
type: 'button',
id: 'removeDic',
label: scayt_instance.getLocal('btn_deleteDic'),
title: scayt_instance.getLocal('btn_deleteDic'),
onClick: function() {
var dialog = this.getDialog(),
scayt_instance = editor.scayt,
self = dialogDefinition,
dictionaryNameField = dialog.getContentElement("dictionaries", "dictionaryName"),
name = dictionaryNameField.getValue();
scayt_instance.removeUserDictionary(name, function(response) {
dictionaryNameField.setValue("");
if(!response.error) {
self.toggleDictionaryButtons.call(dialog, false);
}
response.dialog = dialog;
response.command = "remove";
response.name = name;
editor.fire("scaytUserDictionaryAction", response);
}, function(error) {
error.dialog = dialog;
error.command = "remove";
error.name = name;
editor.fire("scaytUserDictionaryActionError", error);
});
}
},
{
type: 'button',
id: 'renameDic',
label: scayt_instance.getLocal('btn_renameDic'),
title: scayt_instance.getLocal('btn_renameDic'),
onClick: function() {
var dialog = this.getDialog(),
scayt_instance = editor.scayt,
name = dialog.getContentElement("dictionaries", "dictionaryName").getValue();
scayt_instance.renameUserDictionary(name, function(response) {
response.dialog = dialog;
response.command = "rename";
response.name = name;
editor.fire("scaytUserDictionaryAction", response);
}, function(error) {
error.dialog = dialog;
error.command = "rename";
error.name = name;
editor.fire("scaytUserDictionaryActionError", error);
});
}
}
]
},
{
type: 'html',
id: 'dicInfo',
html: '<div id="dic_info_editor1" style="margin:5px auto; width:95%;white-space:normal;">' + scayt_instance.getLocal('text_descriptionDic') + '</div>'
}
]
}
]
},
{
id : 'about',
label : scayt_instance.getLocal('tab_about'),
elements : [
{
type : 'html',
id : 'about',
style : 'margin: 5px 5px;',
html : '<div><div id="scayt_about_">' +
aboutTabDefinition +
'</div></div>'
}
]
}];
editor.on("scaytUserDictionaryAction", function(event) {
var UILib = SCAYT.prototype.UILib,
dialog = event.data.dialog,
dictionaryNote = dialog.getContentElement("dictionaries", "dictionaryNote").getElement(),
scayt_instance = event.editor.scayt,
messageTemplate;
if(event.data.error === undefined) {
// success message
messageTemplate = scayt_instance.getLocal("message_success_" + event.data.command + "Dic");
messageTemplate = messageTemplate.replace('%s', event.data.name);
dictionaryNote.setText(messageTemplate);
UILib.css(dictionaryNote.$, {color: 'blue'});
} else {
// error message
if(event.data.name === '') {
// empty dictionary name
dictionaryNote.setText(scayt_instance.getLocal('message_info_emptyDic'));
} else {
messageTemplate = scayt_instance.getLocal("message_error_" + event.data.command + "Dic");
messageTemplate = messageTemplate.replace('%s', event.data.name);
dictionaryNote.setText(messageTemplate);
}
UILib.css(dictionaryNote.$, {color: 'red'});
if(scayt_instance.getUserDictionaryName() != null && scayt_instance.getUserDictionaryName() != '') {
dialog.getContentElement("dictionaries", "dictionaryName").setValue(scayt_instance.getUserDictionaryName());
} else {
dialog.getContentElement("dictionaries", "dictionaryName").setValue("");
}
}
});
editor.on("scaytUserDictionaryActionError", function(event) {
var UILib = SCAYT.prototype.UILib,
dialog = event.data.dialog,
dictionaryNote = dialog.getContentElement("dictionaries", "dictionaryNote").getElement(),
scayt_instance = event.editor.scayt,
messageTemplate;
if(event.data.name === '') {
// empty dictionary name
dictionaryNote.setText(scayt_instance.getLocal('message_info_emptyDic'));
} else {
messageTemplate = scayt_instance.getLocal("message_error_" + event.data.command + "Dic");
messageTemplate = messageTemplate.replace('%s', event.data.name);
dictionaryNote.setText(messageTemplate);
}
UILib.css(dictionaryNote.$, {color: 'red'});
if(scayt_instance.getUserDictionaryName() != null && scayt_instance.getUserDictionaryName() != '') {
dialog.getContentElement("dictionaries", "dictionaryName").setValue(scayt_instance.getUserDictionaryName());
} else {
dialog.getContentElement("dictionaries", "dictionaryName").setValue("");
}
});
var plugin = CKEDITOR.plugins.scayt;
var dialogDefinition = {
title: scayt_instance.getLocal('text_title'),
resizable: CKEDITOR.DIALOG_RESIZE_BOTH,
minWidth: 340,
minHeight: 260,
onLoad: function() {
if(editor.config.scayt_uiTabs[1] == 0) {
return;
}
var dialog = this,
self = dialogDefinition,
langBoxes = self.getLangBoxes.call(dialog);
langBoxes.getParent().setStyle("white-space", "normal");
//dialog.data = editor.fire( 'scaytDialog', {} );
self.renderLangList(langBoxes);
var scayt_instance = editor.scayt;
this.definition.minWidth = this.getSize().width;
this.resize(this.definition.minWidth, this.definition.minHeight);
},
onCancel: function() {
languageModelState.reset();
},
onHide: function() {
editor.unlockSelection();
},
onShow: function() {
editor.fire("scaytDialogShown", this);
if(editor.config.scayt_uiTabs[2] == 0) {
return;
}
var scayt_instance = editor.scayt,
self = dialogDefinition,
dialog = this,
dictionaryNameField = dialog.getContentElement("dictionaries", "dictionaryName"),
existance = dialog.getContentElement("dictionaries", "existDic").getElement().getParent(),
notExistance = dialog.getContentElement("dictionaries", "notExistDic").getElement().getParent();
existance.hide();
notExistance.hide();
if(scayt_instance.getUserDictionaryName() != null && scayt_instance.getUserDictionaryName() != '') {
dialog.getContentElement("dictionaries", "dictionaryName").setValue(scayt_instance.getUserDictionaryName());
existance.show();
} else {
dictionaryNameField.setValue("");
notExistance.show();
}
},
onOk: function() {
var dialog = this,
self = dialogDefinition,
scayt_instance = editor.scayt,
scaytOptions = dialog.getContentElement("options", "scaytOptions"),
changedOptions = self.getChangedOption.call(dialog);
scayt_instance.commitOption({ changedOptions: changedOptions });
},
toggleDictionaryButtons: function(exist) {
var existance = this.getContentElement("dictionaries", "existDic").getElement().getParent(),
notExistance = this.getContentElement("dictionaries", "notExistDic").getElement().getParent();
if(exist) {
existance.show();
notExistance.hide();
} else {
existance.hide();
notExistance.show();
}
},
getChangedOption: function() {
var changedOption = {};
if(editor.config.scayt_uiTabs[0] == 1) {
var dialog = this,
scaytOptions = dialog.getContentElement("options", "scaytOptions").getChild();
for(var i = 0; i < scaytOptions.length; i++) {
if(scaytOptions[i].isChanged()) {
changedOption[scaytOptions[i].id] = scaytOptions[i].getValue();
}
}
}
if(languageModelState.isChanged()) {
changedOption[languageModelState.id] = editor.config.scayt_sLang = languageModelState.currentLang = languageModelState.newLang;
}
return changedOption;
},
buildRadioInputs: function(key, value, isSupportedByGrayt) {
var divContainer = new CKEDITOR.dom.element( 'div' ),
doc = CKEDITOR.document,
id = "scaytLang_" + editor.name + '_' + value,
radio = CKEDITOR.dom.element.createFromHtml( '<input id="' +
id + '" type="radio" ' +
' value="' + value + '" name="scayt_lang" />' ),
radioLabel = new CKEDITOR.dom.element( 'label' ),
scayt_instance = editor.scayt;
divContainer.setStyles({
"white-space": "normal",
'position': 'relative',
'padding-bottom': '2px'
});
radio.on( 'click', function(data) {
languageModelState.newLang = data.sender.getValue();
});
radioLabel.appendText(key);
radioLabel.setAttribute("for", id);
if(isSupportedByGrayt && editor.config.grayt_autoStartup) {
radioLabel.setStyles({
'color': '#02b620'
});
}
divContainer.append(radio);
divContainer.append(radioLabel);
if(value === scayt_instance.getLang()) {
radio.setAttribute("checked", true);
radio.setAttribute('defaultChecked', 'defaultChecked');
}
return divContainer;
},
renderLangList: function(langBoxes) {
var dialog = this,
leftCol = langBoxes.find('#left-col-' + editor.name).getItem(0),
rightCol = langBoxes.find('#right-col-' + editor.name).getItem(0),
scaytLangList = scayt_instance.getScaytLangList(),
graytLangList = scayt_instance.getGraytLangList(),
mergedLangList = {},
sortable = [],
counter = 0,
isSupportedByGrayt = false,
half, lang;
for(lang in scaytLangList.ltr) {
mergedLangList[lang] = scaytLangList.ltr[lang];
}
for(lang in scaytLangList.rtl) {
mergedLangList[lang] = scaytLangList.rtl[lang];
}
// sort alphabetically lang list
for(lang in mergedLangList) {
sortable.push([lang, mergedLangList[lang]]);
}
sortable.sort(function(a, b) {
var result = 0;
if(a[1] > b[1]) {
result = 1;
} else if(a[1] < b[1]) {
result = -1;
}
return result;
});
mergedLangList = {};
for(var i = 0; i < sortable.length; i++) {
mergedLangList[sortable[i][0]] = sortable[i][1];
}
half = Math.round(sortable.length / 2);
for(lang in mergedLangList) {
counter++;
isSupportedByGrayt = (lang in graytLangList.ltr) || (lang in graytLangList.rtl);
dialog.buildRadioInputs(mergedLangList[lang], lang, isSupportedByGrayt).appendTo(counter <= half ? leftCol : rightCol);
}
},
getLangBoxes: function() {
var dialog = this,
langboxes = dialog.getContentElement("langs", "langBox").getElement();
return langboxes;
},
contents: generateDialogTabs(dialogTabs, editor)
};
return dialogDefinition;
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'af', {
btn_about: 'SCAYT info',
btn_dictionaries: 'Woordeboeke',
btn_disable: 'SCAYT af',
btn_enable: 'SCAYT aan',
btn_langs:'Tale',
btn_options: 'Opsies',
text_title: 'Speltoets terwyl u tik'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'ar', {
btn_about: 'عن SCAYT',
btn_dictionaries: 'قواميس',
btn_disable: 'تعطيل SCAYT',
btn_enable: 'تفعيل SCAYT',
btn_langs:'لغات',
btn_options: 'خيارات',
text_title: 'تدقيق إملائي أثناء الكتابة'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'bg', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Речници',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'bn', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'bs', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'ca', {
btn_about: 'Quant a l\'SCAYT',
btn_dictionaries: 'Diccionaris',
btn_disable: 'Deshabilita SCAYT',
btn_enable: 'Habilitat l\'SCAYT',
btn_langs:'Idiomes',
btn_options: 'Opcions',
text_title: 'Spell Check As You Type'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'cs', {
btn_about: 'O aplikaci SCAYT',
btn_dictionaries: 'Slovníky',
btn_disable: 'Vypnout SCAYT',
btn_enable: 'Zapnout SCAYT',
btn_langs:'Jazyky',
btn_options: 'Nastavení',
text_title: 'Kontrola pravopisu během psaní (SCAYT)'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'cy', {
btn_about: 'Ynghylch SCAYT',
btn_dictionaries: 'Geiriaduron',
btn_disable: 'Analluogi SCAYT',
btn_enable: 'Galluogi SCAYT',
btn_langs:'Ieithoedd',
btn_options: 'Opsiynau',
text_title: 'Gwirio\'r Sillafu Wrth Deipio'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'da', {
btn_about: 'Om SCAYT',
btn_dictionaries: 'Ordbøger',
btn_disable: 'Deaktivér SCAYT',
btn_enable: 'Aktivér SCAYT',
btn_langs:'Sprog',
btn_options: 'Indstillinger',
text_title: 'Stavekontrol mens du skriver'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'de', {
btn_about: 'Über SCAYT',
btn_dictionaries: 'Wörterbücher',
btn_disable: 'SCAYT ausschalten',
btn_enable: 'SCAYT einschalten',
btn_langs:'Sprachen',
btn_options: 'Optionen',
text_title: 'Rechtschreibprüfung während der Texteingabe (SCAYT)'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'el', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Λεξικά',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Γλώσσες',
btn_options: 'Επιλογές',
text_title: 'Spell Check As You Type'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'en-au', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'en-ca', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'en-gb', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'en', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'eo', {
btn_about: 'Pri OKDVT',
btn_dictionaries: 'Vortaroj',
btn_disable: 'Malebligi OKDVT',
btn_enable: 'Ebligi OKDVT',
btn_langs:'Lingvoj',
btn_options: 'Opcioj',
text_title: 'OrtografiKontrolado Dum Vi Tajpas (OKDVT)'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'es', {
btn_about: 'Acerca de Corrector',
btn_dictionaries: 'Diccionarios',
btn_disable: 'Desactivar Corrector',
btn_enable: 'Activar Corrector',
btn_langs:'Idiomas',
btn_options: 'Opciones',
text_title: 'Comprobar Ortografía Mientras Escribe'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'et', {
btn_about: 'SCAYT-ist lähemalt',
btn_dictionaries: 'Sõnaraamatud',
btn_disable: 'SCAYT keelatud',
btn_enable: 'SCAYT lubatud',
btn_langs:'Keeled',
btn_options: 'Valikud',
text_title: 'Õigekirjakontroll kirjutamise ajal'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'eu', {
btn_about: 'SCAYTi buruz',
btn_dictionaries: 'Hiztegiak',
btn_disable: 'Desgaitu SCAYT',
btn_enable: 'Gaitu SCAYT',
btn_langs:'Hizkuntzak',
btn_options: 'Aukerak',
text_title: 'Ortografia Zuzenketa Idatzi Ahala (SCAYT)'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'fa', {
btn_about: 'درباره SCAYT',
btn_dictionaries: 'دیکشنریها',
btn_disable: 'غیرفعالسازی SCAYT',
btn_enable: 'فعالسازی SCAYT',
btn_langs:'زبانها',
btn_options: 'گزینهها',
text_title: 'بررسی املای تایپ شما'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'fi', {
btn_about: 'Tietoja oikoluvusta kirjoitetaessa',
btn_dictionaries: 'Sanakirjat',
btn_disable: 'Poista käytöstä oikoluku kirjoitetaessa',
btn_enable: 'Ota käyttöön oikoluku kirjoitettaessa',
btn_langs:'Kielet',
btn_options: 'Asetukset',
text_title: 'Oikolue kirjoitettaessa'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'fo', {
btn_about: 'Um SCAYT',
btn_dictionaries: 'Orðabøkur',
btn_disable: 'Nokta SCAYT',
btn_enable: 'Loyv SCAYT',
btn_langs:'Tungumál',
btn_options: 'Uppseting',
text_title: 'Kanna stavseting, meðan tú skrivar'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'fr-ca', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'fr', {
btn_about: 'A propos de SCAYT',
btn_dictionaries: 'Dictionnaires',
btn_disable: 'Désactiver SCAYT',
btn_enable: 'Activer SCAYT',
btn_langs:'Langues',
btn_options: 'Options',
text_title: 'Vérification de l\'Orthographe en Cours de Frappe (SCAYT)'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'gl', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'gu', {
btn_about: 'SCAYT વિ',
btn_dictionaries: 'શબદકશ',
btn_disable: 'SCAYT ડિબલ કરવ',
btn_enable: 'SCAYT એનબલ કરવ',
btn_langs:'ભઓ',
btn_options: 'વિકલ',
text_title: 'ટઈપ કરતલ તપ'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'he', {
btn_about: 'אודות SCAYT',
btn_dictionaries: 'מילון',
btn_disable: 'בטל SCAYT',
btn_enable: 'אפשר SCAYT',
btn_langs:'שפות',
btn_options: 'אפשרויות',
text_title: 'בדיקת איות בזמן כתיבה (SCAYT)'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'hi', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'hr', {
btn_about: 'O SCAYT',
btn_dictionaries: 'Rječnici',
btn_disable: 'Onemogući SCAYT',
btn_enable: 'Omogući SCAYT',
btn_langs:'Jezici',
btn_options: 'Opcije',
text_title: 'Provjeri pravopis tijekom tipkanja (SCAYT)'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'hu', {
btn_about: 'SCAYT névjegy',
btn_dictionaries: 'Szótár',
btn_disable: 'SCAYT letiltása',
btn_enable: 'SCAYT engedélyezése',
btn_langs:'Nyelvek',
btn_options: 'Beállítások',
text_title: 'Helyesírás ellenőrzés gépelés közben'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'is', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'it', {
btn_about: 'About COMS',
btn_dictionaries: 'Dizionari',
btn_disable: 'Disabilita COMS',
btn_enable: 'Abilita COMS',
btn_langs:'Lingue',
btn_options: 'Opzioni',
text_title: 'Controllo Ortografico Mentre Scrivi'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'ja', {
btn_about: 'SCAYTバージョン',
btn_dictionaries: '辞書',
btn_disable: 'SCAYT無効',
btn_enable: 'SCAYT有効',
btn_langs:'言語',
btn_options: 'オプション',
text_title: 'スペルチェック設定(SCAYT)'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'ka', {
btn_about: 'SCAYT-ის შესახებ',
btn_dictionaries: 'ლექსიკონები',
btn_disable: 'SCAYT-ის გამორთვა',
btn_enable: 'SCAYT-ის ჩართვა',
btn_langs:'ენები',
btn_options: 'პარამეტრები',
text_title: 'მართლწერის შემოწმება კრეფისას'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'km', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'ko', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'ku', {
btn_about: 'دهربارهی SCAYT',
btn_dictionaries: 'فهرههنگهکان',
btn_disable: 'ناچالاککردنی SCAYT',
btn_enable: 'چالاککردنی SCAYT',
btn_langs:'زمانهکان',
btn_options: 'ههڵبژارده',
text_title: 'پشکنینی نووسه لهکاتی نووسین'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'lt', {
btn_about: 'Apie SCAYT',
btn_dictionaries: 'Žodynai',
btn_disable: 'Išjungti SCAYT',
btn_enable: 'Įjungti SCAYT',
btn_langs:'Kalbos',
btn_options: 'Parametrai',
text_title: 'Tikrinti klaidas kai rašoma'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'lv', {
btn_about: 'Par SCAYT',
btn_dictionaries: 'Vārdnīcas',
btn_disable: 'Atslēgt SCAYT',
btn_enable: 'Ieslēgt SCAYT',
btn_langs:'Valodas',
btn_options: 'Uzstādījumi',
text_title: 'Pārbaudīt gramatiku rakstot'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'mk', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'mn', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Толь бичгүүд',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Хэлүүд',
btn_options: 'Сонголт',
text_title: 'Spell Check As You Type'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'ms', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type' // MISSING
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'nb', {
btn_about: 'Om SCAYT',
btn_dictionaries: 'Ordbøker',
btn_disable: 'Slå av SCAYT',
btn_enable: 'Slå på SCAYT',
btn_langs:'Språk',
btn_options: 'Valg',
text_title: 'Stavekontroll mens du skriver'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'nl', {
btn_about: 'Over SCAYT',
btn_dictionaries: 'Woordenboeken',
btn_disable: 'SCAYT uitschakelen',
btn_enable: 'SCAYT inschakelen',
btn_langs:'Talen',
btn_options: 'Opties',
text_title: 'Controleer de spelling tijdens het typen'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'no', {
btn_about: 'Om SCAYT',
btn_dictionaries: 'Ordbøker',
btn_disable: 'Slå av SCAYT',
btn_enable: 'Slå på SCAYT',
btn_langs:'Språk',
btn_options: 'Valg',
text_title: 'Stavekontroll mens du skriver'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'pl', {
btn_about: 'Informacje o SCAYT',
btn_dictionaries: 'Słowniki',
btn_disable: 'Wyłącz SCAYT',
btn_enable: 'Włącz SCAYT',
btn_langs:'Języki',
btn_options: 'Opcje',
text_title: 'Sprawdź pisownię podczas pisania (SCAYT)'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'pt-br', {
btn_about: 'Sobre a correção ortográfica durante a digitação',
btn_dictionaries: 'Dicionários',
btn_disable: 'Desabilitar correção ortográfica durante a digitação',
btn_enable: 'Habilitar correção ortográfica durante a digitação',
btn_langs:'Idiomas',
btn_options: 'Opções',
text_title: 'Correção ortográfica durante a digitação'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'pt', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type' // MISSING
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'ro', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type' // MISSING
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'ru', {
btn_about: 'О SCAYT',
btn_dictionaries: 'Словари',
btn_disable: 'Отключить SCAYT',
btn_enable: 'Включить SCAYT',
btn_langs:'Языки',
btn_options: 'Настройки',
text_title: 'Проверка орфографии по мере ввода (SCAYT)'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'sk', {
btn_about: 'O KPPP (Kontrola pravopisu počas písania)',
btn_dictionaries: 'Slovníky',
btn_disable: 'Zakázať KPPP (Kontrola pravopisu počas písania)',
btn_enable: 'Povoliť KPPP (Kontrola pravopisu počas písania)',
btn_langs:'Jazyky',
btn_options: 'Možnosti',
text_title: 'Kontrola pravopisu počas písania'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'sl', {
btn_about: 'O storitvi SCAYT',
btn_dictionaries: 'Slovarji',
btn_disable: 'Onemogoči SCAYT',
btn_enable: 'Omogoči SCAYT',
btn_langs:'Jeziki',
btn_options: 'Možnosti',
text_title: 'Črkovanje med tipkanjem'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'sr-latn', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type' // MISSING
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'sr', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type' // MISSING
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'sv', {
btn_about: 'Om SCAYT',
btn_dictionaries: 'Ordlistor',
btn_disable: 'Inaktivera SCAYT',
btn_enable: 'Aktivera SCAYT',
btn_langs:'Språk',
btn_options: 'Inställningar',
text_title: 'Stavningskontroll medan du skriver'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'th', {
btn_about: 'About SCAYT',
btn_dictionaries: 'Dictionaries',
btn_disable: 'Disable SCAYT',
btn_enable: 'Enable SCAYT',
btn_langs:'Languages',
btn_options: 'Options',
text_title: 'Spell Check As You Type' // MISSING
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'tr', {
btn_about: 'SCAYT\'ı hakkında',
btn_dictionaries: 'Sözlükler',
btn_disable: 'SCAYT\'ı pasifleştir',
btn_enable: 'SCAYT\'ı etkinleştir',
btn_langs:'Diller',
btn_options: 'Seçenekler',
text_title: 'Girmiş olduğunuz kelime denetimi'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'ug', {
btn_about: 'شۇئان ئىملا تەكشۈرۈش ھەققىدە',
btn_dictionaries: 'لۇغەت',
btn_disable: 'شۇئان ئىملا تەكشۈرۈشنى چەكلە',
btn_enable: 'شۇئان ئىملا تەكشۈرۈشنى قوزغات',
btn_langs:'تىل',
btn_options: 'تاللانما',
text_title: 'شۇئان ئىملا تەكشۈر'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'uk', {
btn_about: 'Про SCAYT',
btn_dictionaries: 'Словники',
btn_disable: 'Вимкнути SCAYT',
btn_enable: 'Ввімкнути SCAYT',
btn_langs:'Мови',
btn_options: 'Опції',
text_title: 'Перефірка орфографії по мірі набору'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'vi', {
btn_about: 'Thông tin về SCAYT',
btn_dictionaries: 'Từ điển',
btn_disable: 'Tắt SCAYT',
btn_enable: 'Bật SCAYT',
btn_langs:'Ngôn ngữ',
btn_options: 'Tùy chọn',
text_title: 'Kiểm tra chính tả ngay khi gõ chữ (SCAYT)'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'zh-cn', {
btn_about: '关于即时拼写检查',
btn_dictionaries: '字典',
btn_disable: '禁用即时拼写检查',
btn_enable: '启用即时拼写检查',
btn_langs:'语言',
btn_options: '选项',
text_title: '即时拼写检查'
});

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'scayt', 'zh', {
btn_about: '關於即時拼寫檢查',
btn_dictionaries: '字典',
btn_disable: '關閉即時拼寫檢查',
btn_enable: '啟用即時拼寫檢查',
btn_langs: '語言',
btn_options: '選項',
text_title: '即時拼寫檢查'
});

File diff suppressed because it is too large Load Diff

@ -128,6 +128,14 @@ a.thumbnail:hover{
padding-top: 10px;
margin-top: 5px;
}
#toolbar-admin.navbar{
margin-bottom: 0;
border-radius: 0;
border: none;
}
header{
padding-top: 20px;
}
.blackboard_show {
float:left;
position:absolute;
@ -5972,3 +5980,7 @@ a.sessionView {
font-size: 120%;
margin-bottom: 0;
}
#upload_form .fa-plus-square-o, #upload_form .fa-minus-square-o {
cursor:pointer;
}

@ -1,13 +1,5 @@
body{
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
line-height: 18px;
color: #333333;
margin: 0;
padding: 0;
}
.page-chat{
padding: 10px;
padding: 10px 0;
background:#ffffff;
}
.message-form-chat .nav{
@ -16,48 +8,7 @@ body{
.message-form-chat .nav-tabs .active a{
background-color: #f6f6f6;
}
#clear-chat{
width:140px;
padding: 13px;
font-size: 14px;
float:right;
}
#clear-chat img{
width: 20px;
float: left;
margin-right: 5px;
}
#clear-chat a{
text-decoration: none;
}
#clear-chat a:hover{
opacity: 0.7;
}
#content-chat{
background:#ffffff;
padding: 30px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
}
textarea {
width: 52%;
padding: 3%;
height: 100px;
float: left;
border: 0;
background-color: #ffffff;
font-family: Helvetica, arial, sans-serif;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
border: 1px solid #EEEEEE;
color: #666;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35) inset;
}
.message-student .chat-image, .message-teacher .chat-image{
width: 80px;
height: auto;
@ -85,7 +36,7 @@ textarea {
font-size: 13px;
padding: 15px;
vertical-align: top;
width: 310px;
width: calc(100% - 100px);
}
.message-teacher .icon-message{
display: inline-block;
@ -121,7 +72,7 @@ textarea {
font-size: 13px;
padding: 15px;
vertical-align: top;
width: 360px;
width: calc(100% - 100px);
}
.message-teacher .message-date{
color: #666;
@ -138,121 +89,30 @@ textarea {
text-align: right;
margin-top: 10px;
}
.user-online .profile{
list-style: none;
padding: 0;
margin:0;
}
.chat-message-block-name {
font-style: italic;
color: #666;
}
.user-online .profile li{
margin-bottom: 5px;
}
.user-online .profile li a{
color: #0088AA;
text-decoration: none;
}
.user-online .title{
background: url(chat.png) no-repeat 0 center;
color: #0088AA;
padding-top: 5px;
padding-left: 30px;
font-weight: bold;
font-size: 16px;
margin-bottom: 15px;
width: 90%;
}
.delete-chat{
background: #F8F8F8;
padding-bottom: 15px;
}
.list-group {
margin-bottom: 20px;
padding-left: 0;
}
.list-group-item {
position: relative;
display: block;
padding-top: 5px;
padding-bottom: 10px;
padding-left: 10px;
padding-right: 10px;
margin-bottom: -1px;
background-color: #EEEEEE;
border: 1px solid #E2E2E2;
-webkit-border-radius: 10px;
.chat-user {
background-color: #EEEEEE;
border: 1px solid #E2E2E2;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
color: #666;
margin-bottom: -1px;
padding: 10px;
}
.user-connected{
border-right: 1px dashed #cccccc;
margin-right: 5px;
}
li.list-group-item:hover, li.list-group-item:focus {
text-decoration: none;
background-color: #E2E2E2;
cursor: pointer;
border: 1px solid #EEEEEE;
}
li.list-group-item:hover a{
color: #000;
}
.user-image-chat{
width: 40px;
height: auto;
max-height: 40px;
display: inline-block;
vertical-align: top;
-webkit-border-radius: 10px;
.chat-user .user-image-chat {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border: 2px solid #FFF;
border-radius: 10px;
border:2px solid #ffffff;
display: inline-block;
height: auto;
margin-right: 10px;
max-height: 40px;
float: left;
margin-right: 5px;
}
.noSelect {
user-select: none;
-o-user-select: none;
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
}
.btn-send {
background: #87e0fd; /* Old browsers */
background: -moz-linear-gradient(top, #87e0fd 0%, #53cbf1 40%, #05abe0 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#87e0fd), color-stop(40%,#53cbf1), color-stop(100%,#05abe0)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #87e0fd 0%,#53cbf1 40%,#05abe0 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #87e0fd 0%,#53cbf1 40%,#05abe0 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #87e0fd 0%,#53cbf1 40%,#05abe0 100%); /* IE10+ */
background: linear-gradient(to bottom, #87e0fd 0%,#53cbf1 40%,#05abe0 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#87e0fd', endColorstr='#05abe0',GradientType=0 ); /* IE6-9 */
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
border:1px solid #53cbf1;
display:inline-block;
color:#ffffff;
font-family:Arial;
font-size:22px;
font-weight:bold;
font-style:normal;
height:80px;
line-height:80px;
width:131px;
text-decoration:none;
text-align:center;
cursor: pointer;
}
.btn-send:hover {
opacity: 0.8;
}
.btn-send:active {
position:relative;
top:1px;
width: 40px;
}
.emoticons-chat img{
width: 24px;
border: none;
@ -267,21 +127,17 @@ li.list-group-item:hover a{
}
.emoji-menu {
margin-left: 0px;
width:468px;
left: 11px !important;
margin-left: -234px;
margin-top: -224px;
width: 468px;
}
.emoji-wysiwyg-editor-preview,
.emoji-wysiwyg-editor {
width: 454px;
padding: 3%;
height: 50px;
float: left;
border: 0;
background-color: #ffffff;
font-family: Helvetica, arial, sans-serif;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
@ -289,3 +145,19 @@ li.list-group-item:hover a{
color: #666;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35) inset;
}
#chat-tabs .tab-content{
margin-top: 15px;
}
.chat-history {
height: 400px;
overflow: auto;
}
#chat-users {
margin-left: 0;
}
#chat-users div.chat-user > div {
padding: 5px;
}

@ -109,7 +109,7 @@ See https://support.chamilo.org/issues/6976
}
.inner_lp_toc .scorm_item_section .scorm_item:before {
content : url('../../main/img/lp_section.png'); /* path from main/newscorm/lp_controller.php file */
content : url('../../main/img/lp_section.png'); /* path from main/lp/lp_controller.php file */
vertical-align: text-top;
margin-right : 5px;
}

@ -56,7 +56,7 @@ a:focus {
overflow: hidden !important;
}
.navbar-default {
background: #3C8DBC;
background: #337AB7;
-webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
}
@ -68,7 +68,7 @@ a:focus {
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus{
color: #fff;
background-color:#367FA9;
background-color:#2C5B8E;
}
.navbar-default .navbar-nav > li > a{
color: #ffffff;
@ -76,7 +76,7 @@ a:focus {
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus{
background: #367FA9;
background: #18477A;
color: #ffffff;
}
.navbar-nav > li > .dropdown-menu{
@ -140,13 +140,8 @@ a:focus {
}
/* End Jquery UI */
footer{
background-color:#2C3E50;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff54b4eb', endColorstr='#ff1d9ce5', GradientType=0);
border-bottom: 1px solid #2C3E50;
-webkit-filter: none;
filter: none;
-webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
background-color:#1A2226;
border-top: 2px solid #D2D6DE;
}
footer{
color: #ffffff;

@ -1358,7 +1358,7 @@ const HTTP_REQUEST_URI_TOO_LONG = 414;
const HTTP_UNSUPPORTED_MEDIA_TYPE = 415;
const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
const HTTP_EXPECTATION_FAILED = 417;
const HTTP_I_AM_A_TEAPOT = 418; const HTTP_MISDIRECTED_REQUEST = 421; const HTTP_UNPROCESSABLE_ENTITY = 422; const HTTP_LOCKED = 423; const HTTP_FAILED_DEPENDENCY = 424; const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425; const HTTP_UPGRADE_REQUIRED = 426; const HTTP_PRECONDITION_REQUIRED = 428; const HTTP_TOO_MANY_REQUESTS = 429; const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451;
const HTTP_I_AM_A_TEAPOT = 418; const HTTP_UNPROCESSABLE_ENTITY = 422; const HTTP_LOCKED = 423; const HTTP_FAILED_DEPENDENCY = 424; const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425; const HTTP_UPGRADE_REQUIRED = 426; const HTTP_PRECONDITION_REQUIRED = 428; const HTTP_TOO_MANY_REQUESTS = 429; const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451;
const HTTP_INTERNAL_SERVER_ERROR = 500;
const HTTP_NOT_IMPLEMENTED = 501;
const HTTP_BAD_GATEWAY = 502;
@ -1407,7 +1407,7 @@ public static $statusTexts = array(
415 =>'Unsupported Media Type',
416 =>'Range Not Satisfiable',
417 =>'Expectation Failed',
418 =>'I\'m a teapot', 421 =>'Misdirected Request', 422 =>'Unprocessable Entity', 423 =>'Locked', 424 =>'Failed Dependency', 425 =>'Reserved for WebDAV advanced collections expired proposal', 426 =>'Upgrade Required', 428 =>'Precondition Required', 429 =>'Too Many Requests', 431 =>'Request Header Fields Too Large', 451 =>'Unavailable For Legal Reasons', 500 =>'Internal Server Error',
418 =>'I\'m a teapot', 422 =>'Unprocessable Entity', 423 =>'Locked', 424 =>'Failed Dependency', 425 =>'Reserved for WebDAV advanced collections expired proposal', 426 =>'Upgrade Required', 428 =>'Precondition Required', 429 =>'Too Many Requests', 431 =>'Request Header Fields Too Large', 451 =>'Unavailable For Legal Reasons', 500 =>'Internal Server Error',
501 =>'Not Implemented',
502 =>'Bad Gateway',
503 =>'Service Unavailable',
@ -2204,10 +2204,6 @@ if ($e instanceof InactiveScopeException && self::EXCEPTION_ON_INVALID_REFERENCE
return;
}
throw $e;
} catch (\Throwable $e) {
unset($this->loading[$id]);
unset($this->services[$id]);
throw $e;
}
unset($this->loading[$id]);
return $service;
@ -2432,11 +2428,11 @@ protected $booted = false;
protected $name;
protected $startTime;
protected $loadClassCache;
const VERSION ='2.8.7';
const VERSION_ID = 20807;
const VERSION ='2.8.6';
const VERSION_ID = 20806;
const MAJOR_VERSION = 2;
const MINOR_VERSION = 8;
const RELEASE_VERSION = 7;
const RELEASE_VERSION = 6;
const EXTRA_VERSION ='';
const END_OF_MAINTENANCE ='11/2018';
const END_OF_LIFE ='11/2019';
@ -3325,10 +3321,6 @@ $response = parent::handle($request, $type, $catch);
$this->container->set('request', null,'request');
$this->container->leaveScope('request');
throw $e;
} catch (\Throwable $e) {
$this->container->set('request', null,'request');
$this->container->leaveScope('request');
throw $e;
}
$this->container->set('request', null,'request');
$this->container->leaveScope('request');

@ -12,7 +12,7 @@ echo '> PHP is using the following php.ini file:'.PHP_EOL;
if ($iniPath) {
echo_style('green', ' '.$iniPath);
} else {
echo_style('warning', ' WARNING: No configuration file (php.ini) used by PHP!');
echo_style('yellow', ' WARNING: No configuration file (php.ini) used by PHP!');
}
echo PHP_EOL.PHP_EOL;

@ -74,9 +74,8 @@ framework:
http_method_override: true
theodo_evolution_session:
bag_manager:
class: Theodo\Evolution\Bundle\SessionBundle\Manager\Symfony1\BagManager
configuration_class: Theodo\Evolution\Bundle\SessionBundle\Manager\Symfony1\BagConfiguration
bag_manager_service: theodo_evolution.session.symfony1.bag_manager
bag_configuration_service: theodo_evolution.session.symfony1.bag_manager_configuration
# Twig Configuration
twig:

@ -35,10 +35,10 @@ $dbParams = array(
);
$database->connect($dbParams, realpath(__DIR__).'/', realpath(__DIR__).'/');
$entityManager = $database->getManager();
$entityManager = $database::getManager();
$helperSet = ConsoleRunner::createHelperSet($entityManager);
$dialogHelper = new Symfony\Component\Console\Helper\DialogHelper();
$dialogHelper = new Symfony\Component\Console\Helper\QuestionHelper();
$helperSet->set($dialogHelper);
return $helperSet;

@ -22,9 +22,9 @@
"main/cron/lang",
"main/course_description",
"main/dropbox",
"main/exercice",
"main/exercise",
"main/gradebook/lib",
"main/newscorm",
"main/lp",
"main/inc/lib",
"plugin",
"main/install",
@ -119,7 +119,7 @@
"ezyang/htmlpurifier": "4.6.0",
"szymach/c-pchart": "1.*",
"aferrandini/phpqrcode": "1.0.1",
"mpdf/mpdf": "5.7.4",
"mpdf/mpdf": "6.1.*",
"barryvdh/elfinder-builds": "2.1.0.3",
"jbroadway/urlify": "1.0.3-stable",
"monolog/monolog": "~1.0",

@ -47,6 +47,48 @@
<p><i>Note: most #wxyz references are issue numbers you can find in <a href="http://support.chamilo.org/projects/chamilo-18/issues" target="_blank">our public bug tracking system</a>. Some references marked BT#xyz are developments made externally for BeezNest customers and integrated into Chamilo. The details of these tasks cannot be seen for confidentiality reasons, but the code change is public and can be reviewed by anyone.</i></p>
<p>&nbsp;</p>
<a name="1.11.0"></a>
<h1>Chamilo 1.11.0 - tobenamed, xxth of July 2016</h1>
<h3>Release notes - summary</h3>
<p>Chamilo 1.11.0 is a major release of the 1.11.x branch. It is meant as a transition between 1.10 and 2.0 versions.</p>
<h3>Release name</h3>
<p><a href="http://www.openstreetmap.org/#map="></a> </p>
<h3>Security fixes</h3>
<p>None in this version.</p>
<h3>Possibly breaking changes</h3>
<p>None in this version.</p>
<h3>Notable new Features</h3>
<h4>For end-users, teachers and Chamilo admins</h4>
<ul>
</ul>
<h4>For developers and sysadmins</h4>
<ul>
</ul>
<h3>Stylesheets and theming</h3>
<ul>
</ul>
<h3>Files structure</h3>
<ul>
<li>The main/exercice/ folder has been renamed main/exercise/</li>
<li>The main/newscorm/ folder has been renamed main/lp/ (for Learning Path)</li>
</ul>
<h3>Web services</h3>
<ul>
</ul>
<h3>Removals</h3>
<ul>
</ul>
<h3>Known issues</h3>
<ul>
<li>IMS/QTI import/export has issues</li>
<li>In Internet Explorer 9, learning paths might not show other pages than the first to be opened. We lacked computers with IE9 at the time of release of 1.10.4. Guaranteeing IE9 support will likely require additional services. See <a href="https://support.chamilo.org/issues/8075">the corresponding bug report</a></li>
<li>The text-to-speech converter based on Google now requires an API key</li>
<li>The Xapian search module is broken. We'll fix that soon, but not a lot of people use it</li>
<li>Encoding issues when importing accentuated characters from MS-Office-generated .xlsx files (for example when importing exercises). This isn't really a Chamilo issue, but since some users might have issues with that, we've decided to report it to avoid any surprise.</li>
</ul>
<a name="1.10.6"></a>
<h1>Chamilo 1.10.6 - Zacatecas, 24th of May 2016</h1>

@ -680,6 +680,8 @@ If you have issues with files taking a long time to download, make sure you reco
RewriteRule ^courses/([^/]+)/course-pic.png$ app/courses/$1/course-pic.png [QSA,L]
RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [L]
RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/badge/issued.php?skill=$1&user=$2 [L]
RewriteRule ^main/exercice/(.+)$ main/exercise/$1 [QSA,L]
RewriteRule ^main/newscorm/(.*)$ main/lp/$1 [QSA,L]
&lt;/Directory&gt;
</pre>
<h3>Nginx</h3>
@ -718,6 +720,8 @@ If you have issues with files taking a long time to download, make sure you reco
rewrite ^/courses/([^/]+)/$ /main/course_home/course_home.php?cDir=$1 last;
rewrite ^/courses/([^/]+)/index.php$ /main/course_home/course_home.php?cDir=$1 last;
rewrite ^/session/([^/]+)/about/?$ /main/session/about.php?session_id=$1 last;
rewrite ^/main/exercice/(.+)$ /main/exercise/$1 last;
rewrite ^/main/newscorm/(.+)$ /main/lp/$1 last;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;

@ -711,6 +711,8 @@ por ejemplo. El efecto debería ser inmediato.
rewrite ^/courses/([^/]+)/$ /main/course_home/course_home.php?cDir=$1 last;
rewrite ^/courses/([^/]+)/index.php$ /main/course_home/course_home.php?cDir=$1 last;
rewrite ^/session/([^/]+)/about/?$ /main/session/about.php?session_id=$1 last;
rewrite ^/main/exercice/(.+)$ /main/exercise/$1 last;
rewrite ^/main/newscorm/(.+)$ /main/lp/$1 last;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
@ -777,6 +779,8 @@ Apache2: La configuración para nuestro sitio de ejemplo my.chamilo10.net sería
RewriteRule ^courses/([^/]+)/course-pic.png$ app/courses/$1/course-pic.png [QSA,L]
RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [L]
RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/badge/issued.php?skill=$1&user=$2 [L]
RewriteRule ^main/exercice/(.+)$ main/exercise/$1 [QSA,L]
RewriteRule ^main/newscorm/(.*)$ main/lp/$1 [QSA,L]
&lt;/Directory&gt;
php_value display_errors Off

@ -739,6 +739,8 @@ ou, si vous travaillez avec Apache 2.4, la syntaxe est légèrement différente
RewriteRule ^courses/([^/]+)/course-pic.png$ app/courses/$1/course-pic.png [QSA,L]
RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [L]
RewriteRule "^badge/(\d{1,})/user/(\d{1,})$" main/badge/issued.php?skill=$1&user=$2 [L]
RewriteRule ^main/exercice/(.+)$ main/exercise/$1 [QSA,L]
RewriteRule ^main/newscorm/(.*)$ main/lp/$1 [QSA,L]
&lt;/Directory&gt;
</pre>
<h3>Nginx</h3>
@ -777,6 +779,8 @@ Ce sont uniquement les redirections à placer dans un bloc server{}, comme les a
rewrite ^/courses/([^/]+)/$ /main/course_home/course_home.php?cDir=$1 last;
rewrite ^/courses/([^/]+)/index.php$ /main/course_home/course_home.php?cDir=$1 last;
rewrite ^/session/([^/]+)/about/?$ /main/session/about.php?session_id=$1 last;
rewrite ^/main/exercice/(.+)$ /main/exercise/$1 last;
rewrite ^/main/newscorm/(.+)$ /main/lp/$1 last;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;

@ -171,9 +171,9 @@ An optional additional caching mechanism you may use is the realpath_cache_size
See <a href="http://php.net/manual/en/ini.core.php">the PHP documentation</a>
for more details.
<br />
<br />
<br />
<h3>APC</h3>
If you prefer using <a href="http://php.net/manual/en/book.apc.php">APC</a>,
If you prefer using <a href="http://php.net/manual/en/book.apc.php">APC</a>,
you can use the same kind of trick as above, just changing the code a little:
<pre>
$xc = function_exists('apc_exists');
@ -209,6 +209,77 @@ If you prefer using <a href="http://php.net/manual/en/book.apc.php">APC</a>,
}
...
</pre>
<br />
<br />
<h3>APCu</h3>
In PHP 5.5 and above, APC is rendered practically obsolete by the presence of ZendOPCache by default.
However, APC does not cover the "user cache", like the caching of specific variables in memory.
Considering this, you can <a href="http://php.net/manual/en/book.apcu.php">APCu</a> to add the same level of variable caching as described above, just changing the code a little:
On a local computer, this lead to an increase of RAM consumption and a decrease of 20% of CPU time (for just one user). This has been included in 1.11.x, so this section is only there for historical purposes.
<pre>
function return_notification_menu()
{
$_course = api_get_course_info();
$course_id = 0;
if (!empty($_course)) {
$course_id = $_course['code'];
}
$user_id = api_get_user_id();
$html = '';
$cacheEnabled = function_exists('apcu_exists');
if ((api_get_setting('showonline', 'world') == 'true' && !$user_id) ||
(api_get_setting('showonline', 'users') == 'true' && $user_id) ||
(api_get_setting('showonline', 'course') == 'true' && $user_id && $course_id)
) {
if ($cacheEnabled) {
$apc = apcu_cache_info(null,true);
$apc_end = $apc['start_time']+$apc['ttl'];
if (apcu_exists('my_campus_whoisonline_count_simple') AND (time() < $apc_end) AND apcu_fetch('my_campus_whoisonline_count_simple') > 0 ) {
$number = apcu_fetch('my_campus_whoisonline_count_simple');
} else {
$number = who_is_online_count(api_get_setting('time_limit_whosonline'));
apcu_clear_cache();
apcu_store('my_campus_whoisonline_count_simple',$number,15);
}
} else {
$number = who_is_online_count(api_get_setting('time_limit_whosonline'));
}
$number_online_in_course = 0;
if (!empty($_course['id'])) {
if ($cacheEnabled) {
$apc = apcu_cache_info(null,true);
$apc_end = $apc['start_time']+$apc['ttl'];
if (apcu_exists('my_campus_whoisonline_count_simple_'.$_course['id']) AND (time() < $apc_end) AND apcu_fetch('my_campus_whoisonline_count_simple_'.$_course['id']) > 0) {
$number_online_in_course = apcu_fetch('my_campus_whoisonline_count_simple_'.$_course['id']);
} else {
$number_online_in_course = who_is_online_in_this_course_count($user_id, api_get_setting('time_limit_whosonline'), $_course['id']);
apcu_store('my_campus_whoisonline_count_simple_'.$_course['id'],$number_online_in_course,15);
}
} else {
$number_online_in_course = who_is_online_in_this_course_count(
$user_id,
api_get_setting('time_limit_whosonline'),
$_course['id']
);
}
}
// Display the who's online of the platform
if ($number) {
if ((api_get_setting('showonline', 'world') == 'true' && !$user_id) ||
(api_get_setting('showonline', 'users') == 'true' && $user_id)
) {
$html .= '<li><a href="'.api_get_path(WEB_PATH).'whoisonline.php" target="_self" title="'.get_lang('UsersOnline').'" >'.
Display::return_icon('user.png', get_lang('UsersOnline'), array(), ICON_SIZE_TINY).' '.$number.'</a></li>';
}
}
...
</pre>
<br />
<h3>Memcached</h3>
If you use php5-memcached (different set of functions than php5-memcache!),

@ -14,7 +14,6 @@ define('CHAMILO_LOAD_WYSIWYG', false);
$cidReset = true;
require_once 'main/inc/global.inc.php';
require_once 'main/chat/chat_functions.lib.php';
//require_once 'main/auth/external_login/facebook.inc.php';
// The section (for the tabs).

@ -107,7 +107,6 @@ foreach($session_list as $session_item) {
</tr>';
}
$html .= '</table>';
} else {
}
}
echo $html;

@ -147,12 +147,10 @@ function search($needle,$type)
$xajax_response = new xajaxResponse();
$return = '';
if (!empty($needle) && !empty($type)) {
if ($type == 'single') {
} else {
if ($type != 'single') {
$list = CourseManager::get_courses_list(0, 0, 2, 'ASC', -1, $needle);
}
if ($type=='single') {
} else {
if ($type != 'single') {
$return .= '<select id="elements_not_in" name="elements_not_in_name[]" multiple="multiple" size="15" style="width:360px;">';
foreach ($list as $row) {

@ -125,13 +125,6 @@ function search_sessions($needle,$type) {
$return = '';
if (!empty($needle) && !empty($type)) {
if ($type == 'single') {
// search users where username or firstname or lastname begins likes $needle
/* $sql = 'SELECT user.user_id, username, lastname, firstname FROM '.$tbl_user.' user
WHERE (username LIKE "'.$needle.'%"
OR firstname LIKE "'.$needle.'%"
OR lastname LIKE "'.$needle.'%") AND user.user_id<>"'.$user_anonymous.'" AND user.status<>'.DRH.''.
$order_clause.
' LIMIT 11';*/
} else if ($type == 'searchbox') {
$session_list = SessionManager::get_sessions_list(
array('s.name' => array('operator' => 'LIKE', 'value' => "%$needle%"))
@ -142,8 +135,7 @@ function search_sessions($needle,$type) {
);
}
$i=0;
if ($type=='single') {
} else {
if ($type != 'single') {
$return .= '<select id="elements_not_in" name="elements_not_in_name[]" multiple="multiple" size="15" style="width:360px;">';
foreach ($session_list as $row ) {

@ -318,9 +318,7 @@ if (!empty($user_list)) {
).' ('.$item['username'].') ';
}
if (in_array($item['user_id'], $list_in)) {
//$elements_in[$item['user_id']] = $person_name;
} else {
if (!in_array($item['user_id'], $list_in)) {
$elements_not_in[$item['user_id']] = $person_name;
}
}

@ -100,8 +100,21 @@ $form->applyFilter('department_name', 'trim');
$form->addText('department_url', get_lang('CourseDepartmentURL'), false, array ('size' => '60'));
$form->applyFilter('department_url', 'html_filter');
$form->addElement('select_language', 'course_language', get_lang('CourseLanguage'));
$form->applyFilter('select_language', 'html_filter');
// Course language.
$languages = api_get_languages();
if (count($languages['name']) === 1) {
// If there's only one language available, there's no point in asking
$form->addElement('hidden', 'course_language', $languages['folder'][0]);
} else {
$form->addElement(
'select_language',
'course_language',
get_lang('Ln'),
array(),
array('style' => 'width:150px')
);
$form->applyFilter('select_language', 'html_filter');
}
if (api_get_setting('teacher_can_select_course_template') === 'true') {
$form->addElement(

@ -55,16 +55,11 @@ function validate_data($courses)
if (empty($teacherInfo)) {
$course['error'] = get_lang('UnknownTeacher').' ('.$teacher.')';
$errors[] = $course;
} else {
/*if ($teacherInfo['status'] != COURSEMANAGER) {
$course['error'] = get_lang('UserIsNotATeacher').' ('.$teacher.')';
$errors[] = $course;
}*/
}
}
}
if(!empty($course['CourseCategory'])) {
if (!empty($course['CourseCategory'])) {
$categoryInfo = CourseCategory::getCategory($course['CourseCategory']);
if (empty($categoryInfo)) {
CourseCategory::addNode($course['CourseCategory'], $course['CourseCategoryName'] ? $course['CourseCategoryName'] : $course['CourseCategory'], 'TRUE', null);

@ -10,80 +10,77 @@ require_once '../inc/global.inc.php';
$this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();
/**
*
*/
function get_course_usage($course_code, $session_id = 0)
if (!isset($_GET['code'])) {
api_not_allowed(true);
}
$courseInfo = api_get_course_info($_GET['code']);
if (empty($courseInfo)) {
api_not_allowed(true);
}
$sessionId = isset($_GET['id_session']) ? (int) $_GET['id_session'] : 0;
function get_course_usage($course, $session_id = 0)
{
$table = Database::get_main_table(TABLE_MAIN_COURSE);
$course_code = Database::escape_string($course_code);
$sql = "SELECT * FROM $table WHERE code='".$course_code."'";
$res = Database::query($sql);
$course = Database::fetch_object($res);
$courseId = $course['real_id'];
// Learnpaths
$table = Database :: get_course_table(TABLE_LP_MAIN);
$usage[] = array(
get_lang(ucfirst(TOOL_LEARNPATH)),
CourseManager::count_rows_course_table($table, $session_id, $course->id)
CourseManager::count_rows_course_table($table, $session_id, $courseId)
);
// Forums
$table = Database :: get_course_table(TABLE_FORUM);
$usage[] = array(get_lang('Forums'), CourseManager::count_rows_course_table($table, $session_id, $course->id));
$usage[] = array(get_lang('Forums'), CourseManager::count_rows_course_table($table, $session_id, $courseId));
// Quizzes
$table = Database :: get_course_table(TABLE_QUIZ_TEST);
$usage[] = array(
get_lang(ucfirst(TOOL_QUIZ)),
CourseManager::count_rows_course_table($table, $session_id, $course->id)
CourseManager::count_rows_course_table($table, $session_id, $courseId)
);
// Documents
$table = Database :: get_course_table(TABLE_DOCUMENT);
$usage[] = array(
get_lang(ucfirst(TOOL_DOCUMENT)),
CourseManager::count_rows_course_table($table, $session_id, $course->id)
CourseManager::count_rows_course_table($table, $session_id, $courseId)
);
// Groups
$table = Database :: get_course_table(TABLE_GROUP);
$usage[] = array(
get_lang(ucfirst(TOOL_GROUP)),
CourseManager::count_rows_course_table($table, $session_id, $course->id)
CourseManager::count_rows_course_table($table, $session_id, $courseId)
);
// Calendar
$table = Database :: get_course_table(TABLE_AGENDA);
$usage[] = array(
get_lang(ucfirst(TOOL_CALENDAR_EVENT)),
CourseManager::count_rows_course_table($table, $session_id, $course->id)
CourseManager::count_rows_course_table($table, $session_id, $courseId)
);
// Link
$table = Database::get_course_table(TABLE_LINK);
$usage[] = array(
get_lang(ucfirst(TOOL_LINK)),
CourseManager::count_rows_course_table($table, $session_id, $course->id)
CourseManager::count_rows_course_table($table, $session_id, $courseId)
);
// Announcements
$table = Database::get_course_table(TABLE_ANNOUNCEMENT);
$usage[] = array(
get_lang(ucfirst(TOOL_ANNOUNCEMENT)),
CourseManager::count_rows_course_table($table, $session_id, $course->id)
CourseManager::count_rows_course_table($table, $session_id, $courseId)
);
return $usage;
}
if (!isset ($_GET['code'])) {
api_not_allowed();
}
$interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
$interbreadcrumb[] = array("url" => 'course_list.php', "name" => get_lang('Courses'));
$table_course = Database :: get_main_table(TABLE_MAIN_COURSE);
$code = Database::escape_string($_GET['code']);
$sql = "SELECT * FROM $table_course WHERE code = '".$code."'";
$res = Database::query($sql);
$course = Database::fetch_object($res);
$courseId = $course->id;
$tool_name = $course->title.' ('.$course->visual_code.')';
$courseId = $courseInfo['real_id'];
$tool_name = $courseInfo['title'].' ('.$courseInfo['visual_code'].')';
Display::display_header($tool_name);
?>
<div class="actions">
<a href="<?php echo api_get_path(WEB_COURSE_PATH).$course->directory; ?>">
<a href="<?php echo $courseInfo['course_public_url']; ?>">
<?php Display::display_icon('home.png', get_lang('CourseHomepage'), array(), ICON_SIZE_MEDIUM); ?>
</a>
</div>
@ -91,9 +88,9 @@ Display::display_header($tool_name);
echo Display::page_header(get_lang('CourseUsage'));
$id_session = isset($_GET['id_session']) ? $_GET['id_session'] : 0;
$table = new SortableTableFromArray(get_course_usage($course->code, $id_session), 0, 20, 'usage_table');
$table->set_additional_parameters(array('code' => Security::remove_XSS($_GET['code'])));
$table = new SortableTableFromArray(get_course_usage($courseInfo, $sessionId), 0, 20, 'usage_table');
$table->set_additional_parameters(array('code' => $courseInfo['code']));
$table->set_other_tables(array('user_table', 'class_table'));
$table->set_header(0, get_lang('Tool'), true);
$table->set_header(1, get_lang('NumberOfItems'), true);
@ -103,14 +100,16 @@ $table->display();
* Show all users subscribed in this course
*/
echo Display::page_header(get_lang('Users'));
$table_course_user = Database :: get_main_table(TABLE_MAIN_COURSE_USER);
$table_user = Database :: get_main_table(TABLE_MAIN_USER);
$table_course_user = Database:: get_main_table(TABLE_MAIN_COURSE_USER);
$table_user = Database:: get_main_table(TABLE_MAIN_USER);
$sql = "SELECT *, cu.status as course_status
FROM $table_course_user cu, $table_user u";
if (api_is_multiple_url_enabled()) {
$sql .= " INNER JOIN ".Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER)." url_rel_user
ON u.user_id = url_rel_user.user_id
AND url_rel_user.access_url_id = ".intval(api_get_current_access_url_id());
ON
u.user_id = url_rel_user.user_id AND
url_rel_user.access_url_id = ".api_get_current_access_url_id();
}
$sql .= " WHERE
cu.user_id = u.user_id AND
@ -130,13 +129,14 @@ if (Database::num_rows($res) > 0) {
$user[] = $obj->lastname;
$user[] = $obj->firstname;
}
$user[] = Display :: encrypted_mailto_link($obj->email, $obj->email);
$user[] = $obj->course_status == 5 ? get_lang('Student') : get_lang('Teacher');
$user[] = '<a href="user_information.php?user_id='.$obj->user_id.'">'.Display::return_icon('synthese_view.gif', get_lang('UserInfo')).'</a>';
$user[] = Display:: encrypted_mailto_link($obj->email, $obj->email);
$user[] = $obj->course_status == 5 ? get_lang('Student') : get_lang('Teacher');
$user[] = '<a href="user_information.php?user_id='.$obj->user_id.'">'.
Display::return_icon('synthese_view.gif', get_lang('UserInfo')).'</a>';
$users[] = $user;
}
$table = new SortableTableFromArray($users, 0, 20, 'user_table');
$table->set_additional_parameters(array('code' => $code));
$table->set_additional_parameters(array('code' => $courseInfo['code']));
$table->set_other_tables(array('usage_table', 'class_table'));
$table->set_header(0, get_lang('OfficialCode'), true);
if ($is_western_name_order) {
@ -154,11 +154,11 @@ if (Database::num_rows($res) > 0) {
echo get_lang('NoUsersInCourse');
}
$session_list = SessionManager::get_session_by_course($course->id);
$sessionList = SessionManager::get_session_by_course($courseInfo['real_id']);
$url = api_get_path(WEB_CODE_PATH);
if (!empty($session_list)) {
foreach ($session_list as &$session) {
if (!empty($sessionList)) {
foreach ($sessionList as &$session) {
$session[0] = Display::url($session[0], $url.'admin/resume_session.php?id_session='.$session['id']);
unset($session[1]);
}
@ -167,7 +167,4 @@ if (!empty($session_list)) {
$table->display();
}
/*$group = new UserGroup();
$usegroups = $group->get_usergroup_by_course($course->id);*/
Display::display_footer();

@ -172,7 +172,7 @@ switch ($action) {
if ($check) {
$values = $form->exportValues();
$res = $obj->update($values);
Display::display_confirmation_message(sprintf(get_lang('ItemUpdated'), $values['name']), false);
Display::display_confirmation_message(sprintf(get_lang('ItemUpdated'), $values['display_text']), false);
}
$obj->display();
} else {

@ -402,6 +402,34 @@ if (api_is_platform_admin()) {
$blocks['skills']['search_form'] = null;
}
/* Plugins */
global $_plugins;
if (isset($_plugins['menu_administrator']) && count($_plugins['menu_administrator']) > 0) {
$blocks['plugins']['icon'] = Display::return_icon(
'plugins.png',
get_lang('Plugins'),
array(),
ICON_SIZE_MEDIUM,
false
);
$blocks['plugins']['label'] = api_ucfirst(get_lang('Plugins'));
$blocks['plugins']['class'] = 'block-admin-platform';
$blocks['plugins']['editable'] = true;
$plugin_obj = new AppPlugin();
$items = array();
foreach ($_plugins['menu_administrator'] as $plugin_name) {
$plugin_info = $plugin_obj->getPluginInfo($plugin_name);
$items[] = array(
'url' => api_get_path(WEB_CODE_PATH) . '../plugin/'.$plugin_name.'/start.php',
'label' => $plugin_info['title']
);
}
$blocks['plugins']['items'] = $items;
$blocks['plugins']['extra'] = null;
}
/* Chamilo.org */
$blocks['chamilo']['icon'] = Display::return_icon('logo.png', 'Chamilo.org', array(), ICON_SIZE_MEDIUM, false);

@ -19,10 +19,10 @@ use Symfony\Component\Filesystem\Filesystem;
* This function allows easy activating and inactivating of regions
* @author Julio Montoya <gugli100@gmail.com> Beeznest 2012
*/
function handle_regions()
function handleRegions()
{
if (isset($_POST['submit_plugins'])) {
store_regions();
storeRegions();
// Add event to the system log.
$user_id = api_get_user_id();
$category = $_GET['category'];
@ -93,7 +93,7 @@ function handle_regions()
echo '<button class="btn btn-success" type="submit" name="submit_plugins">'.get_lang('EnablePlugins').'</button></form>';
}
function handle_extensions()
function handleExtensions()
{
echo Display::page_subheader(get_lang('ConfigureExtensions'));
echo '<a class="btn btn-success" href="configure_extensions.php?display=ppt2lp" role="button">'.get_lang('Ppt2lp').'</a>';
@ -106,12 +106,12 @@ function handle_extensions()
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @author Julio Montoya <gugli100@gmail.com> Beeznest 2012
*/
function handle_plugins()
function handlePlugins()
{
$plugin_obj = new AppPlugin();
$token = Security::get_token();
if (isset($_POST['submit_plugins'])) {
store_plugins();
storePlugins();
// Add event to the system log.
$user_id = api_get_user_id();
$category = $_GET['category'];
@ -222,24 +222,14 @@ function handle_plugins()
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @author Julio Montoya <gugli100@gmail.com>, Chamilo
*/
function handle_stylesheets()
function handleStylesheets()
{
global $_configuration;
// Current style.
$currentstyle = api_get_setting('stylesheets');
$is_style_changeable = false;
if ($_configuration['access_url'] != 1) {
$style_info = api_get_settings('stylesheets', '', 1, 0);
$url_info = api_get_access_url($_configuration['access_url']);
if ($style_info[0]['access_url_changeable'] == 1 && $url_info['active'] == 1) {
$is_style_changeable = true;
}
} else {
$is_style_changeable = true;
}
$is_style_changeable = isStyleChangeable();
$form = new FormValidator(
'stylesheet_upload',
@ -250,21 +240,7 @@ function handle_stylesheets()
array('size' => '40', 'maxlength' => '40'));
$form->addRule('name_stylesheet', get_lang('ThisFieldIsRequired'), 'required');
$form->addElement('file', 'new_stylesheet', get_lang('UploadNewStylesheet'));
$allowed_file_types = array(
'css',
'zip',
'jpeg',
'jpg',
'png',
'gif',
'ico',
'psd',
'xcf',
'svg',
'webp',
'woff',
'woff2'
);
$allowed_file_types = getAllowedFileTypes();
$form->addRule('new_stylesheet', get_lang('InvalidExtension') . ' (' . implode(',', $allowed_file_types) . ')',
'filetype', $allowed_file_types);
@ -293,7 +269,7 @@ function handle_stylesheets()
$values = $form->exportValues();
$picture_element = $form->getElement('new_stylesheet');
$picture = $picture_element->getValue();
$result = upload_stylesheet($values, $picture);
$result = uploadStylesheet($values, $picture);
// Add event to the system log.
$user_id = api_get_user_id();
@ -375,22 +351,11 @@ function handle_stylesheets()
if ($form_change->validate()) {
// Submit stylesheets.
if (isset($_POST['save'])) {
store_stylesheets();
storeStylesheets();
Display::display_normal_message(get_lang('Saved'));
}
if (isset($_POST['download'])) {
$arch = api_get_path(SYS_ARCHIVE_PATH).$safe_style_dir.'.zip';
$dir = api_get_path(SYS_CSS_PATH).'themes/'.$safe_style_dir;
if (is_dir($dir)) {
$zip = new PclZip($arch);
// Remove path prefix except the style name and put file on disk
$zip->create($dir, PCLZIP_OPT_REMOVE_PATH, substr($dir,0,-strlen($safe_style_dir)));
//@TODO: use more generic script to download.
$str = '<a class="btn btn-primary btn-large" href="' . api_get_path(WEB_CODE_PATH) . 'course_info/download.php?archive=' . str_replace(api_get_path(SYS_ARCHIVE_PATH), '', $arch) . '">'.get_lang('ClickHereToDownloadTheFile').'</a>';
Display::display_normal_message($str, false);
} else {
Display::addFlash(Display::return_message(get_lang('FileNotFound'), 'warning'));
}
generateCSSDownloadLink($safe_style_dir);
}
}
@ -502,15 +467,14 @@ function handle_stylesheets()
/**
* Creates the folder (if needed) and uploads the stylesheet in it
*
* @param array $values the values of the form
* @param array $picture the values of the uploaded file
*
* @return bool
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
* @version May 2008
* @since Dokeos 1.8.5
* @since v1.8.5
*/
function upload_stylesheet($values, $picture)
function uploadStylesheet($values, $picture)
{
$result = false;
// Valid name for the stylesheet folder.
@ -535,20 +499,7 @@ function upload_stylesheet($values, $picture)
$single_directory = true;
$invalid_files = array();
$allowedFiles = array(
'jpg',
'jpeg',
'png',
'gif',
'css',
'ico',
'psd',
'woff',
'woff2',
'xcf',
'svg',
'webp'
);
$allowedFiles = getAllowedFileTypes();
for ($i = 0; $i < $num_files; $i++) {
$file = $zip->statIndex($i);
@ -632,7 +583,7 @@ function upload_stylesheet($values, $picture)
/**
* Store plugin regions.
*/
function store_regions()
function storeRegions()
{
$plugin_obj = new AppPlugin();
@ -670,7 +621,7 @@ function store_regions()
* This function allows easy activating and inactivating of plugins
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
*/
function store_plugins()
function storePlugins()
{
$appPlugin = new AppPlugin();
@ -701,10 +652,10 @@ function store_plugins()
* This function allows the platform admin to choose which should be the default stylesheet
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
*/
function store_stylesheets()
function storeStylesheets()
{
// Insert the stylesheet.
if (is_style($_POST['style'])) {
if (isStyle($_POST['style'])) {
api_set_setting(
'stylesheets',
$_POST['style'],
@ -722,7 +673,7 @@ function store_stylesheets()
* @param string Style
* @return bool True if this style is recognized, false otherwise
*/
function is_style($style)
function isStyle($style)
{
$dir = CSS_UPLOAD_PATH;
$dirs = scandir($dir);
@ -738,7 +689,7 @@ function is_style($style)
* TODO: support for multiple site. aka $_configuration['access_url'] == 1
* @author Marco Villegas <marvil07@gmail.com>
*/
function handle_search()
function handleSearch()
{
global $SettingsStored, $_configuration;
@ -749,37 +700,25 @@ function handle_search()
$values = api_get_settings_options('search_enabled');
$form->addElement('header', null, get_lang('SearchEnabledTitle'));
$group = array ();
if (is_array($values)) {
foreach ($values as $key => $value) {
$element = & $form->createElement('radio', 'search_enabled', '', $value['display_text'], $value['value']);
$group[] = $element;
}
}
$group = formGenerateElementsGroup($form, $values, 'search_enabled');
//SearchEnabledComment
$form->addGroup($group, 'search_enabled', array(get_lang('SearchEnabledTitle'), get_lang('SearchEnabledComment')), '<br />', false);
$search_enabled = api_get_setting('search_enabled');
if ($form->validate()) {
$formvalues = $form->exportValues();
$r = api_set_settings_category('Search', 'false', $_configuration['access_url']);
// Save the settings.
foreach ($formvalues as $key => $value) {
$result = api_set_setting($key, $value, null, null);
}
$search_enabled = $formvalues['search_enabled'];
$formValues = $form->exportValues();
setConfigurationSettingsInDatabase($formValues, $_configuration['access_url']);
$search_enabled = $formValues['search_enabled'];
Display::display_confirmation_message($SettingsStored);
}
$specific_fields = get_specific_field_list();
if ($search_enabled == 'true') {
$values = api_get_settings_options('search_show_unlinked_results');
$group = array ();
foreach ($values as $key => $value) {
$element = & $form->createElement('radio', 'search_show_unlinked_results', '', $value['display_text'], $value['value']);
$group[] = $element;
}
$group = formGenerateElementsGroup($form, $values, 'search_show_unlinked_results');
$form->addGroup($group, 'search_show_unlinked_results', array(get_lang('SearchShowUnlinkedResultsTitle'),get_lang('SearchShowUnlinkedResultsComment')), '', false);
$default_values['search_show_unlinked_results'] = api_get_setting('search_show_unlinked_results');
@ -787,7 +726,6 @@ function handle_search()
foreach ($specific_fields as $sf) {
$sf_values[$sf['code']] = $sf['name'];
}
$group = array();
$url = Display::div(Display::url(get_lang('AddSpecificSearchField'), 'specific_fields.php'), array('class'=>'sectioncomment'));
if (empty($sf_values)) {
$form->addElement('label', [get_lang('SearchPrefilterPrefix'), $url]);
@ -807,33 +745,33 @@ function handle_search()
echo '</div>';
if ($search_enabled == 'true') {
$xapian_path = api_get_path(SYS_UPLOAD_PATH).'plugins/xapian/searchdb';
$xapianPath = api_get_path(SYS_UPLOAD_PATH).'plugins/xapian/searchdb';
/*
@todo Test the Xapian connection
if (extension_loaded('xapian')) {
require_once 'xapian.php';
try {
$db = new XapianDatabase($xapian_path.'/');
$db = new XapianDatabase($xapianPath.'/');
} catch (Exception $e) {
var_dump($e->getMessage());
}
require_once api_get_path(LIBRARY_PATH) . 'search/DokeosIndexer.class.php';
require_once api_get_path(LIBRARY_PATH) . 'search/ChamiloIndexer.class.php';
require_once api_get_path(LIBRARY_PATH) . 'search/IndexableChunk.class.php';
require_once api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php';
$indexable = new IndexableChunk();
$indexable->addValue("content", 'Test');
$di = new DokeosIndexer();
$di = new ChamiloIndexer();
$di->connectDb(NULL, NULL, 'english');
$di->addChunk($indexable);
$did = $di->index();
}
*/
$xapian_loaded = Display::return_icon('bullet_green.png', get_lang('Ok'));
$xapianLoaded = Display::return_icon('bullet_green.png', get_lang('Ok'));
$dir_exists = Display::return_icon('bullet_green.png', get_lang('Ok'));
$dir_is_writable = Display::return_icon('bullet_green.png', get_lang('Ok'));
$specific_fields_exists = Display::return_icon('bullet_green.png', get_lang('Ok'));
@ -844,58 +782,25 @@ function handle_search()
}
//Testing xapian extension
if (!extension_loaded('xapian')) {
$xapian_loaded = Display::return_icon('bullet_red.png', get_lang('Error'));
$xapianLoaded = Display::return_icon('bullet_red.png', get_lang('Error'));
}
//Testing xapian searchdb path
if (!is_dir($xapian_path)) {
if (!is_dir($xapianPath)) {
$dir_exists = Display::return_icon('bullet_red.png', get_lang('Error'));
}
//Testing xapian searchdb path is writable
if (!is_writable($xapian_path)) {
if (!is_writable($xapianPath)) {
$dir_is_writable = Display::return_icon('bullet_red.png', get_lang('Error'));
}
$data[] = array(get_lang('XapianModuleInstalled'),$xapian_loaded);
$data[] = array(get_lang('DirectoryExists').' - '.$xapian_path,$dir_exists);
$data[] = array(get_lang('IsWritable').' - '.$xapian_path,$dir_is_writable);
$data[] = array(get_lang('SpecificSearchFieldsAvailable') ,$specific_fields_exists);
$data = array();
$data[] = array(get_lang('XapianModuleInstalled'), $xapianLoaded);
$data[] = array(get_lang('DirectoryExists').' - '.$xapianPath, $dir_exists);
$data[] = array(get_lang('IsWritable').' - '.$xapianPath, $dir_is_writable);
$data[] = array(get_lang('SpecificSearchFieldsAvailable'), $specific_fields_exists);
echo Display::tag('h3', get_lang('Settings'));
$table = new SortableTableFromArray($data);
$table->set_header(0, get_lang('Setting'), false);
$table->set_header(1, get_lang('Status'), false);
echo $table->display();
//@todo windows support
if (api_is_windows_os() == false) {
$list_of_programs = array('pdftotext','ps2pdf', 'catdoc','html2text','unrtf', 'catppt', 'xls2csv');
foreach($list_of_programs as $program) {
$output = [];
$ret_val = null;
exec("which $program", $output, $ret_val);
if (!$output) {
$output[] = '';
}
$icon = Display::return_icon('bullet_red.png', get_lang('NotInstalled'));
if (!empty($output[0])) {
$icon = Display::return_icon('bullet_green.png', get_lang('Installed'));
}
$data2[]= array($program, $output[0], $icon);
}
echo Display::tag('h3', get_lang('ProgramsNeededToConvertFiles'));
$table = new SortableTableFromArray($data2);
$table->set_header(0, get_lang('Program'), false);
$table->set_header(1, get_lang('Path'), false);
$table->set_header(2, get_lang('Status'), false);
echo $table->display();
} else {
Display::display_warning_message(
get_lang('YouAreUsingChamiloInAWindowsPlatformSadlyYouCantConvertDocumentsInOrderToSearchTheContentUsingThisTool')
);
}
showSearchSettingsTable($data);
showSearchToolsStatusTable();
}
}
@ -905,9 +810,9 @@ function handle_search()
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
* @author Julio Montoya.
* @version August 2008
* @since Dokeos 1.8.6
* @since v1.8.6
*/
function handle_templates()
function handleTemplates()
{
/* Drive-by fix to avoid undefined var warnings, without repeating
* isset() combos all over the place. */
@ -921,7 +826,7 @@ function handle_templates()
}
if ($action == 'add' || ($action == 'edit' && is_numeric($_GET['id']))) {
add_edit_template();
addEditTemplate();
// Add event to the system log.
$user_id = api_get_user_id();
@ -935,7 +840,7 @@ function handle_templates()
);
} else {
if ($action == 'delete' && is_numeric($_GET['id'])) {
delete_template($_GET['id']);
deleteTemplate($_GET['id']);
// Add event to the system log
$user_id = api_get_user_id();
@ -948,7 +853,7 @@ function handle_templates()
$user_id
);
}
display_templates();
displayTemplates();
}
}
@ -957,17 +862,17 @@ function handle_templates()
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
* @version August 2008
* @since Dokeos 1.8.6
* @since v1.8.6
*/
function display_templates()
function displayTemplates()
{
$table = new SortableTable('templates', 'get_number_of_templates', 'get_template_data', 1);
$table = new SortableTable('templates', 'getNumberOfTemplates', 'getTemplateData', 1);
$table->set_additional_parameters(array('category' => Security::remove_XSS($_GET['category'])));
$table->set_header(0, get_lang('Image'), true, array('style' => 'width: 101px;'));
$table->set_header(1, get_lang('Title'));
$table->set_header(2, get_lang('Actions'), false, array('style' => 'width:50px;'));
$table->set_column_filter(2, 'actions_filter');
$table->set_column_filter(0, 'image_filter');
$table->set_column_filter(2, 'actionsFilter');
$table->set_column_filter(0, 'searchImageFilter');
$table->display();
}
@ -978,9 +883,9 @@ function display_templates()
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
* @version August 2008
* @since Dokeos 1.8.6
* @since v1.8.6
*/
function get_number_of_templates()
function getNumberOfTemplates()
{
// Database table definition.
$table_system_template = Database :: get_main_table('system_template');
@ -1005,9 +910,9 @@ function get_number_of_templates()
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
* @version August 2008
* @since Dokeos 1.8.6
* @since v1.8.6
*/
function get_template_data($from, $number_of_items, $column, $direction)
function getTemplateData($from, $number_of_items, $column, $direction)
{
// Database table definition.
$table_system_template = Database :: get_main_table('system_template');
@ -1034,9 +939,9 @@ function get_template_data($from, $number_of_items, $column, $direction)
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
* @version August 2008
* @since Dokeos 1.8.6
* @since v1.8.6
*/
function actions_filter($id) {
function actionsFilter($id) {
$return = '<a href="settings.php?category=Templates&action=edit&id='.Security::remove_XSS($id).'">'.Display::return_icon('edit.png', get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>';
$return .= '<a href="settings.php?category=Templates&action=delete&id='.Security::remove_XSS($id).'" onClick="javascript:if(!confirm('."'".get_lang('ConfirmYourChoice')."'".')) return false;">'.Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>';
return $return;
@ -1050,9 +955,9 @@ function actions_filter($id) {
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
* @version August 2008
* @since Dokeos 1.8.6
* @since v1.8.6
*/
function image_filter($image)
function searchImageFilter($image)
{
if (!empty($image)) {
return '<img src="'.api_get_path(WEB_APP_PATH).'home/default_platform_document/template_thumb/'.$image.'" alt="'.get_lang('TemplatePreview').'"/>';
@ -1067,9 +972,9 @@ function image_filter($image)
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
* @version August 2008
* @since Dokeos 1.8.6
* @since v1.8.6
*/
function add_edit_template()
function addEditTemplate()
{
// Initialize the object.
$id = isset($_GET['id']) ? '&id='.Security::remove_XSS($_GET['id']) : '';
@ -1195,7 +1100,7 @@ function add_edit_template()
}
}
Security::clear_token();
display_templates();
displayTemplates();
} else {
$token = Security::get_token();
$form->addElement('hidden','sec_token');
@ -1212,9 +1117,9 @@ function add_edit_template()
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
* @version August 2008
* @since Dokeos 1.8.6
* @since v1.8.6
*/
function delete_template($id)
function deleteTemplate($id)
{
// First we remove the image.
$table_system_template = Database :: get_main_table('system_template');
@ -1257,45 +1162,37 @@ function select_gradebook_number_decimals() {
return array('0', '1', '2');
}
/**
* Get the options for a select element to select gradebook default grade model
* @return array
*/
function select_gradebook_default_grade_model_id()
{
$grade_model = new GradeModel();
$models = $grade_model->get_all();
$options = array();
$options[-1] = get_lang('None');
if (!empty($models)) {
foreach ($models as $model) {
$options[$model['id']] = $model['name'];
}
}
return $options;
}
/**
* Updates the gradebook score custom values using the scoredisplay class of the
* gradebook module
* @param array $settings
* @param array $settings_by_access_list
*
* @param array List of gradebook score custom values
* @return FormValidator
*
* @author Guillaume Viguier <guillaume.viguier@beeznest.com>
* @throws \Doctrine\ORM\ORMException
* @throws \Doctrine\ORM\OptimisticLockException
* @throws \Doctrine\ORM\TransactionRequiredException
*/
function update_gradebook_score_display_custom_values($values)
{
$scoredisplay = ScoreDisplay::instance();
$scores = $values['gradebook_score_display_custom_values_endscore'];
$displays = $values['gradebook_score_display_custom_values_displaytext'];
$nr_displays = count($displays);
$final = array();
for ($i = 1; $i < $nr_displays; $i++) {
if (!empty($scores[$i]) && !empty($displays[$i])) {
$final[$i]['score'] = $scores[$i];
$final[$i]['display'] = $displays[$i];
}
}
$scoredisplay->update_custom_score_display_settings($final);
}
function generate_settings_form($settings, $settings_by_access_list)
function generateSettingsForm($settings, $settings_by_access_list)
{
global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
$em = Database::getManager();
@ -1303,8 +1200,11 @@ function generate_settings_form($settings, $settings_by_access_list)
$form = new FormValidator('settings', 'post', 'settings.php?category='.Security::remove_XSS($_GET['category']));
$form->addElement('hidden', 'search_field',
(!empty($_GET['search_field']) ? Security::remove_XSS($_GET['search_field']) : null));
$form->addElement(
'hidden',
'search_field',
(!empty($_GET['search_field']) ? Security::remove_XSS($_GET['search_field']) : null)
);
$url_id = api_get_current_access_url_id();
@ -1335,19 +1235,31 @@ function generate_settings_form($settings, $settings_by_access_list)
if ($row['access_url_locked'] == 0) {
if ($url_id == 1) {
if ($row['access_url_changeable'] == '1') {
$form->addElement('html', '<div style="float: right;"><a class="share_this_setting" data_status = "0" data_to_send = "'.$row['variable'].'" href="javascript:void(0);">'.
Display::return_icon('shared_setting.png', get_lang('ChangeSharedSetting')).'</a></div>');
$form->addElement(
'html',
'<div style="float: right;"><a class="share_this_setting" data_status = "0" data_to_send = "'.$row['variable'].'" href="javascript:void(0);">'.
Display::return_icon('shared_setting.png', get_lang('ChangeSharedSetting')).'</a></div>'
);
} else {
$form->addElement('html', '<div style="float: right;"><a class="share_this_setting" data_status = "1" data_to_send = "'.$row['variable'].'" href="javascript:void(0);">'.
Display::return_icon('shared_setting_na.png', get_lang('ChangeSharedSetting')).'</a></div>');
$form->addElement(
'html',
'<div style="float: right;"><a class="share_this_setting" data_status = "1" data_to_send = "'.$row['variable'].'" href="javascript:void(0);">'.
Display::return_icon('shared_setting_na.png', get_lang('ChangeSharedSetting')).'</a></div>'
);
}
} else {
if ($row['access_url_changeable'] == '1') {
$form->addElement('html', '<div style="float: right;">'.
Display::return_icon('shared_setting.png', get_lang('ChangeSharedSetting')).'</div>');
$form->addElement(
'html',
'<div style="float: right;">'.
Display::return_icon('shared_setting.png', get_lang('ChangeSharedSetting')).'</div>'
);
} else {
$form->addElement('html', '<div style="float: right;">'.
Display::return_icon('shared_setting_na.png', get_lang('ChangeSharedSetting')).'</div>');
$form->addElement(
'html',
'<div style="float: right;">'.
Display::return_icon('shared_setting_na.png', get_lang('ChangeSharedSetting')).'</div>'
);
}
}
}
@ -1393,7 +1305,7 @@ function generate_settings_form($settings, $settings_by_access_list)
array(
get_lang($row['title']),
get_lang($row['comment']),
get_lang('MB'),
get_lang('MB')
),
array('maxlength' => '8')
);
@ -1422,7 +1334,7 @@ function generate_settings_form($settings, $settings_by_access_list)
$row['variable'],
array(
get_lang($row['title']),
get_lang($row['comment']),
get_lang($row['comment'])
),
$hideme
);
@ -1461,7 +1373,7 @@ function generate_settings_form($settings, $settings_by_access_list)
'radio',
$row['variable'],
'',
$value['display_text'],
get_lang($value['display_text']),
$value['value']
);
if ($hide_element) {
@ -1479,7 +1391,7 @@ function generate_settings_form($settings, $settings_by_access_list)
);
$default_values[$row['variable']] = $row['selected_value'];
break;
case 'checkbox';
case 'checkbox':
// 1. We collect all the options of this variable.
$sql = "SELECT * FROM $table_settings_current
WHERE variable='".$row['variable']."' AND access_url = 1";
@ -1489,13 +1401,13 @@ function generate_settings_form($settings, $settings_by_access_list)
while ($rowkeys = Database::fetch_array($result)) {
// Profile tab option should be hidden when the social tool is enabled.
if (api_get_setting('allow_social_tool') == 'true') {
if ($rowkeys['variable'] == 'show_tabs' && $rowkeys['subkey'] == 'my_profile') {
if ($rowkeys['variable'] === 'show_tabs' && $rowkeys['subkey'] === 'my_profile') {
continue;
}
}
// Hiding the gradebook option.
if ($rowkeys['variable'] == 'show_tabs' && $rowkeys['subkey'] == 'my_gradebook') {
if ($rowkeys['variable'] === 'show_tabs' && $rowkeys['subkey'] === 'my_gradebook') {
continue;
}
@ -1520,11 +1432,11 @@ function generate_settings_form($settings, $settings_by_access_list)
access_url = $access_url";
$result_access = Database::query($sql);
$row_access = Database::fetch_array($result_access);
if ($row_access['selected_value'] == 'true' && !$form->isSubmitted()) {
if ($row_access['selected_value'] === 'true' && !$form->isSubmitted()) {
$element->setChecked(true);
}
} else {
if ($rowkeys['selected_value'] == 'true' && !$form->isSubmitted()) {
if ($rowkeys['selected_value'] === 'true' && !$form->isSubmitted()) {
$element->setChecked(true);
}
}
@ -1536,7 +1448,7 @@ function generate_settings_form($settings, $settings_by_access_list)
$form->addGroup(
$group,
$row['variable'],
array(get_lang($row['title']), get_lang($row['comment'])),
array(get_lang($row['title']), get_lang($row['comment']) . 'aaaaaa'),
''
);
break;
@ -1549,7 +1461,13 @@ function generate_settings_form($settings, $settings_by_access_list)
* To populate the list of options, the select type dynamically calls a function that must be called select_ + the name of the variable being displayed.
* The functions being called must be added to the file settings.lib.php.
*/
$form->addElement('select', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])), call_user_func('select_'.$row['variable']), $hideme);
$form->addElement(
'select',
$row['variable'],
array(get_lang($row['title']), get_lang($row['comment'])),
call_user_func('select_'.$row['variable']),
$hideme
);
$default_values[$row['variable']] = $row['selected_value'];
break;
case 'custom':
@ -1612,7 +1530,7 @@ function generate_settings_form($settings, $settings_by_access_list)
* @param string $search
* @return array
*/
function search_setting($search)
function searchSetting($search)
{
if (empty($search)) {
return array();
@ -1655,3 +1573,146 @@ function search_setting($search)
}
return $settings;
}
/**
* Helper function to generates a form elements group
* @param object $form The form where the elements group has to be added
* @param array $values Values to browse through
* @return array
*/
function formGenerateElementsGroup($form, $values = array(), $elementName)
{
$group = array();
if (is_array($values)) {
foreach ($values as $key => $value) {
$element = &$form->createElement('radio', $elementName, '', get_lang($value['display_text']), $value['value']);
$group[] = $element;
}
}
return $group;
}
/**
* Helper function with allowed file types for CSS
* @return array Array of file types (no indexes)
*/
function getAllowedFileTypes()
{
$allowedFiles = array(
'css',
'zip',
'jpeg',
'jpg',
'png',
'gif',
'ico',
'psd',
'xcf',
'svg',
'webp',
'woff',
'woff2'
);
return $allowedFiles;
}
/**
* Helper function to set settings in the database
* @param array $parameters List of values
* @param int $accessUrl The current access URL
* @return void
*/
function setConfigurationSettingsInDatabase($parameters, $accessUrl)
{
$r = api_set_settings_category('Search', 'false', $accessUrl);
// Save the settings.
foreach ($parameters as $key => $value) {
$result = api_set_setting($key, $value, null, null);
}
}
/**
* Helper function to show the status of the search settings table
* @param array $data Data to show
* @return void
*/
function showSearchSettingsTable($data)
{
echo Display::tag('h3', get_lang('Settings'));
$table = new SortableTableFromArray($data);
$table->set_header(0, get_lang('Setting'), false);
$table->set_header(1, get_lang('Status'), false);
echo $table->display();
}
/**
* Helper function to show status table for each command line tool installed
* @return void
*/
function showSearchToolsStatusTable()
{
//@todo windows support
if (api_is_windows_os() == false) {
$list_of_programs = array('pdftotext', 'ps2pdf', 'catdoc', 'html2text', 'unrtf', 'catppt', 'xls2csv');
foreach($list_of_programs as $program) {
$output = [];
$ret_val = null;
exec("which $program", $output, $ret_val);
if (!$output) {
$output[] = '';
}
$icon = Display::return_icon('bullet_red.png', get_lang('NotInstalled'));
if (!empty($output[0])) {
$icon = Display::return_icon('bullet_green.png', get_lang('Installed'));
}
$data2[]= array($program, $output[0], $icon);
}
echo Display::tag('h3', get_lang('ProgramsNeededToConvertFiles'));
$table = new SortableTableFromArray($data2);
$table->set_header(0, get_lang('Program'), false);
$table->set_header(1, get_lang('Path'), false);
$table->set_header(2, get_lang('Status'), false);
echo $table->display();
} else {
Display::display_warning_message(
get_lang('YouAreUsingChamiloInAWindowsPlatformSadlyYouCantConvertDocumentsInOrderToSearchTheContentUsingThisTool')
);
}
}
/**
* Helper function to generate and show CSS Zip download message
* @param string $style Style path
* @return void
*/
function generateCSSDownloadLink($style)
{
$arch = api_get_path(SYS_ARCHIVE_PATH).$style.'.zip';
$dir = api_get_path(SYS_CSS_PATH).'themes/'.$style;
if (is_dir($dir)) {
$zip = new PclZip($arch);
// Remove path prefix except the style name and put file on disk
$zip->create($dir, PCLZIP_OPT_REMOVE_PATH, substr($dir,0,-strlen($style)));
//@TODO: use more generic script to download.
$str = '<a class="btn btn-primary btn-large" href="' . api_get_path(WEB_CODE_PATH) . 'course_info/download.php?archive=' . str_replace(api_get_path(SYS_ARCHIVE_PATH), '', $arch) . '">'.get_lang('ClickHereToDownloadTheFile').'</a>';
Display::display_normal_message($str, false);
} else {
Display::addFlash(Display::return_message(get_lang('FileNotFound'), 'warning'));
}
}
/**
* Helper function to tell if the style is changeable in the current URL
* @return bool $changeable Whether the style can be changed in this URL or not
*/
function isStyleChangeable() {
global $_configuration;
$changeable = false;
if ($_configuration['access_url'] != 1) {
$style_info = api_get_settings('stylesheets', '', 1, 0);
$url_info = api_get_access_url($_configuration['access_url']);
if ($style_info[0]['access_url_changeable'] == 1 && $url_info['active'] == 1) {
$changeable = true;
}
} else {
$changeable = true;
}
return $changeable;
}

@ -124,7 +124,7 @@ function get_settings($category = null)
if (isset($category) && $category== 'search_setting') {
if (!empty($_REQUEST['search_field'])) {
$settings = search_setting($_REQUEST['search_field']);
$settings = searchSetting($_REQUEST['search_field']);
}
}
@ -142,7 +142,7 @@ if (!empty($_GET['category']) &&
$settings_array = get_settings($my_category);
$settings = $settings_array['settings'];
$settings_by_access_list = $settings_array['settings_by_access_list'];
$form = generate_settings_form($settings, $settings_by_access_list);
$form = generateSettingsForm($settings, $settings_by_access_list);
if ($form->validate()) {
$values = $form->exportValues();
@ -193,7 +193,7 @@ if (!empty($_GET['category']) &&
$settings_array = get_settings($my_category);
$settings = $settings_array['settings'];
$settings_by_access_list = $settings_array['settings_by_access_list'];
$form = generate_settings_form(
$form = generateSettingsForm(
$settings,
$settings_by_access_list
);
@ -469,7 +469,7 @@ echo $form_search_html;
if (!empty($_GET['category'])) {
switch ($_GET['category']) {
case 'Regions':
handle_regions();
handleRegions();
break;
case 'Plugins':
// Displaying the extensions: Plugins.
@ -505,7 +505,7 @@ if (!empty($_GET['category'])) {
echo '</ul>';
echo '<div id="tabs-1">';
handle_plugins();
handlePlugins();
echo '</div>';
echo '<div id="tabs-2">';
@ -513,30 +513,30 @@ if (!empty($_GET['category'])) {
echo '</div>';
echo '<div id="tabs-3">';
handle_extensions();
handleExtensions();
echo '</div>';
echo '</div>';
break;
case 'Stylesheets':
// Displaying the extensions: Stylesheets.
handle_stylesheets();
handleStylesheets();
break;
case 'Search':
handle_search();
handleSearch();
break;
case 'Templates':
handle_templates();
handleTemplates();
break;
case 'search_setting':
if (isset($_REQUEST['search_field'])) {
search_setting($_REQUEST['search_field']);
searchSetting($_REQUEST['search_field']);
$form->display();
}
break;
default:
if (isset($form))
if (isset($form)) {
$form->display();
}
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save