Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Julio Montoya 806785dfb6 Add security fixes from 1.11.x 4 years ago
.github Allow PHP 8.0 installation - Add gh PHP 8.0 worflow 4 years ago
.yarn/releases Add yarn-2.4.0.cjs 4 years ago
assets Minor - format code + add CSS style 4 years ago
bin Internal: Update console and .htaccess from symfony, remove unused code 4 years ago
config Fix logout, and redirect loops. 4 years ago
public Add security fixes from 1.11.x 4 years ago
src Minor - format code 4 years ago
tests Fix PHPStan 4 years ago
translations Internal: Add translations in po format and using the iso code 4 years ago
var Remove unused code 5 years ago
.codeclimate.yml Minor - Remove phan check 4 years ago
.editorconfig Internal: Update .editorconfig 4 years ago
.env Add JWT token auth (for the api calls) 4 years ago
.eslintrc.json JS/CSS updates 4 years ago
.flintci.yml Minor - fix CI path 6 years ago
.gitattributes Add phpstan/phpstan to check PHP fatal/warning errors 5 years ago
.gitignore Update .gitignore 4 years ago
.php_cs Add CI files 7 years ago
.php_cs.dist Minor - format code 4 years ago
.postcssrc.js JS/CSS updates 4 years ago
.scrutinizer.yml Update CI chamilo paths 5 years ago
.yamllint_config Update CI chamilo paths 5 years ago
.yarnrc.yml Update yarn libs. 4 years ago
CODE_OF_CONDUCT.md Added code of conduct (contributor-covenant.org) 6 years ago
CONTRIBUTING.md Minor - Format code, update docs, update tpls, remove comment 6 years ago
LICENSE Add LICENSE 6 years ago
README.md Add JWT token auth (for the api calls) 4 years ago
composer.json Update composer.json 4 years ago
ecs.php Fix php errors (reported by gh actions) 4 years ago
index.php Add warning page. 5 years ago
license.txt Minor - partial merge with 1.11.x 6 years ago
package.json JS/CSS updates 4 years ago
phpstan.neon Update ecs, phpstan, rector settings 4 years ago
psalm.xml Fix psalm.xml 4 years ago
rector.php Update ecs.php rector.php 4 years ago
ruleset.xml Minor - rename CI file, flint fixes 6 years ago
tailwind.config.js JS/CSS updates 4 years ago
tsconfig.json JS/CSS updates 4 years ago
webpack.config.js JS/CSS updates 4 years ago
yarn.lock JS/CSS updates 4 years ago

README.md

Chamilo 2.x

PHP Composer Scrutinizer Code Quality Bountysource Code Consistency CII Best Practices Codacy Badge

Chamilo is an e-learning platform, also called "LMS" or "LCMS" published under GNU/GPLv3+. It is or has been used by more than 20M people worldwide.

Quick install

Chamilo 2.0 is still in development stage. This installation procedure is for reference only. For a stable Chamilo, please install Chamilo 1.11.x. See the 1.11.x branch README.md for details.

We assume you already have:

On a fresh Ubuntu, you can prepare your server by issuing an apt command like the following:

apt update && apt -y upgrade && apt install apache2 libapache2-mod-php mariadb-client mariadb-server php-pear php-dev php-gd php-curl php-intl php-mysql php-mbstring php-zip php-xml php-cli php-apcu php-bcmath php-soap yarn git unzip npm

Otherwise, you can use the following directly:

git clone https://github.com/chamilo/chamilo-lms.git chamilo2
cd chamilo2
composer install
# *important*: when composer asks to accept recipes, about 11 times, press enter or "n"
php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
yarn set version berry
yarn install
yarn run encore dev
chmod -R 777 .

Note: on Ubuntu Groovy, the yarn package has been replaced by yarnpkg. In this case, replace yarn by yarnpkg in all commands above.

Then enter the main/install/index.php and follow the UI instructions (database, admin user settings, etc).

After the web install process, change the permissions back to a reasonably safe state:

chmod -R 755 .
chown -R www-data: public/ var/

Quick update

If you have already installed it and just want to update it from Git, do:

git pull
composer update
php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
    
yarn up
yarn run encore dev

This will update the JS (yarn) and PHP (composer) dependencies in the public/build folder.

Quick re-install

If you have it installed in a dev environment and feel like you should clean it up completely (might be necessary after changes to the database), you can do so by:

  • Removing the .env.local
  • Load the {url}/main/install/index.php script again

The database should be automatically destroyed, table by table. In some extreme cases (a previous version created a table that is not necessary anymore and creates issues), you might want to clean it completely by just dropping it, but this shouldn't be necessary most of the time.

Installation guide (Dev environment, stable environment not yet available)

If you are a developer and want to contribute to Chamilo in the current development branch (not stable yet), then please follow the instructions below. Please bear in mind that the development version is NOT COMPLETE at this time, and many features are just not working yet. This is because we are working on root components that require massive changes to the structure of the code, files and database. As such, to get a working version, you might need to completely uninstall and re-install from time to time. You've been warned.

First, apply the procedure described here: Managing CSS and JavaScript in Chamilo (in particular, make sure you follow the given links to install all the necessary components on your computer).

Then make sure your database supports large prefixes (see this Stack Overflow thread if you use MySQL < 5.7 or MariaDB < 10.2.2).

Load the (your-domain)/main/install/index.php URL to start the installer (which is very similar to the installer in previous versions). If the installer is pure-HTML and doesn't appear with a clean layout, that's because you didn't follow these instructions carefully. Go back to the beginning of this section and try again.

Changes from 1.x

  • app/Resources/public/assets moved to public/assets
  • main/inc/lib/javascript moved to public/js
  • main/img/ moved to public/img
  • main/template/default moved to src/CoreBundle/Resources/views
  • src/Chamilo/XXXBundle moved to src/CoreBundle or src/CourseBundle
  • bin/doctrine.php removed use bin/console doctrine:xyz options
  • Plugin images, css and js libs are loaded inside the public/plugins folder (composer update copies the content inside plugin_name/public inside web/plugins/plugin_name
  • Plugins templates use asset() function instead of using "_p.web_plugin"
  • Remove main/inc/local.inc.php

Libraries

  • Integration with Symfony 5
  • PHPMailer replaced with Swift Mailer
  • bower replaced by yarn

JWT Authentication

  • php bin/console lexik:jwt:generate-keypair
  • In Apache setup Bearer with:

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

Get the token:

curl -k -X POST -H "Content-Type: application/json" https://example.com/api/authentication_token -d '{"username":"admin","password":"admin"}'

The result should be the something like:

{"token":"MyTokenABC"}

Go to:

https://example.com/api

Click in "Authorize" and write

Bearer MyTokenABC

Then you can make queries using the JWT token.

Todo

See https://github.com/chamilo/chamilo-lms/projects/3

Contributing

If you want to submit new features or patches to Chamilo 2, please follow the Github contribution guide https://guides.github.com/activities/contributing-to-open-source/ and our CONTRIBUTING.md file. In short, we ask you to send us Pull Requests based on a branch that you create with this purpose into your repository forked from the original Chamilo repository.

Documentation

For more information on Chamilo, visit https://campus.chamilo.org/documentation/index.html

Notes

You can install Yarn on Ubuntu following the instructions at https://linuxize.com/post/how-to-install-yarn-on-ubuntu-18-04/ You can install Composer on Ubuntu following the instructions at https://getcomposer.org/download/