Actualización

This commit is contained in:
Xes
2025-04-10 12:53:50 +02:00
parent f7a0ba2b2f
commit 2001ceddea
39284 changed files with 991962 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
<?php
/**
* This file holds the configuration constants and variables
* for the add course tool.
*
* @package chamilo.configuration
*/
$firstExpirationDelay = 31536000; // <- 86400*365 // 60*60*24 = 1 jour = 86400
$prefixAntiNumber = 'z';
$DEBUG = false;

242
app/config/assetic.yml Normal file
View File

@@ -0,0 +1,242 @@
assetic:
debug: %kernel.debug%
use_controller: false
read_from: %kernel.root_dir%/../web
write_to: %kernel.root_dir%/../web
bundles: [ChamiloCoreBundle]
filters:
cssrewrite: ~
yui_js: { jar: "%kernel.root_dir%/../bin/yuicompressor.jar" }
yui_css: { jar: "%kernel.root_dir%/../bin/yuicompressor.jar" }
assets:
# chamilo_bootstrap_css:
# inputs:
# - bundles/chamilocore/components/bootstrap/dist/css/bootstrap.min.css
# filters:
# - cssrewrite
# chamilo_font_awesome_css:
# inputs:
# - bundles/chamilocore/components/fontawesome/css/font-awesome.min.css
# filters:
# - cssrewrite
# chamilo_ionicons_css:
# inputs:
# - bundles/chamilocore/components/ionicons/css/ionicons.css
# filters:
# - cssrewrite
#
# chamilo_css:
# inputs:
# - @chamilo_bootstrap_css
# - @chamilo_font_awesome_css
# - @chamilo_ionicons_css
# - bundles/chamilocore/components/fullcalendar/dist/fullcalendar.min.css
# - bundles/chamilocore/components/chosen-bower/chosen.css
# - bundles/chamilocore/components/jquery-ui/themes/cupertino/jquery-ui.min.css
# - bundles/chamilocore/components/bootflat/css/bootflat.css
# - bundles/chamilocore/components/jqgrid/css/ui.jqgrid.css
# - bundles/chamilocore/components/select2/dist/css/select2.css
# - bundles/chamilocore/js/tag/style.css
# - bundles/chamilocore/components/jquery-file-upload/css/jquery.fileupload.css
# - bundles/chamilocore/components/jquery-file-upload/css/jquery.fileupload-ui.css
# - bundles/chamilocore/components/bootstrap-language/languages.css
# - bundles/chamilocore/css/grid.css
#
## - bundles/chamilocore/components/select2/select2-bootstrap.css
## - bundles/chamilocore/components/adminlte/css/jvectormap/*
## - bundles/chamilocore/components/adminlte/css/morris/*
## - bundles/chamilocore/components/adminlte/css/bootstrap-wysihtml5/bootstrap3-wysihtml5.css
## - bundles/chamilocore/components/adminlte/css/bootstrap-slider/slider.css
## - bundles/chamilocore/components/adminlte/css/colorpicker/bootstrap-colorpicker.css
## - bundles/chamilocore/components/adminlte/css/datatables/dataTables.bootstrap.css
## - bundles/chamilocore/components/adminlte/css/daterangepicker/daterangepicker-bs3.css
## - bundles/chamilocore/components/adminlte/css/iCheck/all.css
## - bundles/chamilocore/components/adminlte/css/ionslider/ion.rangeSlider.css
## - bundles/chamilocore/components/adminlte/css/timepicker/bootstrap-timepicker.css
# - bundles/chamilocore/components/bootstrap-daterangepicker/daterangepicker-bs3.css
# - bundles/chamilocore/components/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css
# - bundles/chamilocore/components/adminlte/dist/css/skins/_all-skins.min.css
# - bundles/chamilocore/components/adminlte/dist/css/AdminLTE.css
# filters:
# - cssrewrite
# output: js/chamilo.css
#
# chamilo_js:
# inputs:
# - bundles/chamilocore/components/jquery/dist/jquery.js
# - bundles/chamilocore/components/jquery-ui/jquery-ui.min.js
## - @bootstrap_js
# - bundles/chamilocore/components/bootstrap/dist/js/bootstrap.min.js
# - bundles/chamilocore/components/chosen-bower/chosen.jquery.js
## - @moment_js
# - bundles/chamilocore/components/moment/moment.js
# - bundles/chamilocore/components/fullcalendar/dist/fullcalendar.min.js
# - bundles/chamilocore/components/jqgrid/js/jquery.jqGrid.js
# - bundles/chamilocore/components/select2/dist/js/select2.js
# - bundles/chamilocore/components/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js
# - bundles/chamilocore/components/jquery.scrollbar/jquery.scrollbar.js
# - bundles/chamilocore/components/mediaelement/build/mediaelement-and-player.js
# - bundles/chamilocore/js/upload.js
# - bundles/chamilocore/components/image-map-resizer/js/imageMapResizer.js
#
# - bundles/chamilocore/components/blueimp-load-image/js/load-image.all.min.js
# - bundles/chamilocore/components/blueimp-canvas-to-blob/js/canvas-to-blob.min.js
#
# - bundles/chamilocore/js/tag/jquery.fcbkcomplete.js
#
# - bundles/chamilocore/components/jquery-file-upload/js/jquery.iframe-transport.js
# - bundles/chamilocore/components/jquery-file-upload/js/jquery.fileupload.js
# - bundles/chamilocore/components/jquery-file-upload/js/jquery.fileupload-process.js
# - bundles/chamilocore/components/jquery-file-upload/js/jquery.fileupload-image.js
# - bundles/chamilocore/components/jquery-file-upload/js/jquery.fileupload-audio.js
# - bundles/chamilocore/components/jquery-file-upload/js/jquery.fileupload-video.js
# - bundles/chamilocore/components/jquery-file-upload/js/jquery.fileupload-validate.js
# - bundles/chamilocore/components/bootstrap-daterangepicker/daterangepicker.js
# - bundles/chamilocore/components/adminlte/dist/js/app.js
#
# output: js/chamilo.js
# see https://sonata-project.org/blog/2012/5/15/assetic-package-configuration
#
sonata_jqueryui_js:
inputs:
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.core.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.widget.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.mouse.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.draggable.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.droppable.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.resizable.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.selectable.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.sortable.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.accordion.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.autocomplete.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.button.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.datepicker.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.dialog.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-blind.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-bounce.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-clip.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-drop.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-explode.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-fade.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-fold.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-highlight.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-pulsate.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-scale.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-shake.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-slide.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-transfer.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.menu.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.position.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.progressbar.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.slider.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.spinner.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.tabs.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.tooltip.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/i18n/jquery-ui-i18n.js
# filters:
# - yui_js
sonata_jqueryui_css:
inputs:
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/themes/base/jquery-ui.css
filters:
- cssrewrite
# - yui_css
sonata_formatter_js:
inputs:
# do not uncomment this, ckeditor behave badly when compacted...
#- %kernel.root_dir%/../web/bundles/sonataformatter/vendor/ckeditor/ckeditor.js
- %kernel.root_dir%/../web/bundles/sonataformatter/vendor/markitup-markitup/markitup/jquery.markitup.js
- %kernel.root_dir%/../web/bundles/sonataformatter/markitup/sets/markdown/set.js
- %kernel.root_dir%/../web/bundles/sonataformatter/markitup/sets/html/set.js
- %kernel.root_dir%/../web/bundles/sonataformatter/markitup/sets/textile/set.js
# filters:
# - yui_js
sonata_formatter_css:
inputs:
- %kernel.root_dir%/../web/bundles/sonataformatter/markitup/skins/sonata/style.css
- %kernel.root_dir%/../web/bundles/sonataformatter/markitup/sets/markdown/style.css
- %kernel.root_dir%/../web/bundles/sonataformatter/markitup/sets/html/style.css
- %kernel.root_dir%/../web/bundles/sonataformatter/markitup/sets/textile/style.css
filters:
- cssrewrite
# - yui_css
sonata_admin_js:
inputs:
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/jquery/dist/jquery.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jquery.scrollTo/jquery.scrollTo.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/moment/min/moment.min.js
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/bootstrap/dist/js/bootstrap.js
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jquery-form/jquery.form.js
- %kernel.root_dir%/../web/bundles/sonataadmin/jquery/jquery.confirmExit.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/x-editable/dist/bootstrap3-editable/js/bootstrap-editable.js
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/select2/select2.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/admin-lte/dist/js/app.min.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/iCheck/icheck.min.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/waypoints/lib/jquery.waypoints.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/waypoints/lib/shortcuts/sticky.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/slimScroll/jquery.slimscroll.min.js
- %kernel.root_dir%/../web/bundles/sonatapage/sonata-page.back.js
- %kernel.root_dir%/../web/bundles/sonataadmin/Admin.js
- %kernel.root_dir%/../web/bundles/sonataadmin/treeview.js
# filters:
# - yui_js
sonata_admin_css:
inputs:
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/bootstrap/dist/css/bootstrap.min.css
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/components-font-awesome/css/font-awesome.min.css
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/ionicons/css/ionicons.min.css
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/admin-lte/dist/css/AdminLTE.css
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/iCheck/skins/square/blue.css
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/themes/flick/jquery-ui.min.css
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/select2/select2.css
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/select2/select2-bootstrap.css
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css
- %kernel.root_dir%/../web/bundles/sonataadmin/css/styles.css
- %kernel.root_dir%/../web/bundles/sonataadmin/css/layout.css
- %kernel.root_dir%/../web/bundles/sonataadmin/css/tree.css
- %kernel.root_dir%/../web/bundles/sonatapage/sonata-page.back.css
filters:
- cssrewrite
# - yui_css
sonata_front_js:
inputs:
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/jquery/dist/jquery.js
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/bootstrap/dist/js/bootstrap.js
# - %kernel.root_dir%/../web/bundles/sonataproduct/js/product.js
- %kernel.root_dir%/../web/bundles/sonatacore/js/base.js
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/select2/select2.min.js
# - %kernel.root_dir%/../web/bundles/sonatademo/js/demo.js
# filters:
# - yui_js
sonata_front_css:
inputs:
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/bootstrap/dist/css/bootstrap.min.css
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/select2/select2.css
# - %kernel.root_dir%/../web/bundles/mopabootstrap/css/datepicker.css
# - %kernel.root_dir%/../web/bundles/sonatademo/css/demo.css
filters:
- cssrewrite
# - yui_css

View File

@@ -0,0 +1,167 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Configuration file for all authentication methods.
* Uncomment and configure only the section(s) you need.
* For MultiURL configuration you can override the configuration
* of every variable by defining the same variable in app/config/configuration.php
* The configuration in app/config/configuration.php will replace
* the configuration in this file.
* @package chamilo.conf.auth
*/
/**
* Facebook
*/
/**
* Uncomment those lines and put your facebook app parameters here
* Find them here : https://developers.facebook.com/apps/
*/
/*$facebook_config = array(
'appId' => 'APPID',
'secret' => 'secret app',
'return_url' => api_get_path(WEB_PATH).'?action=fbconnect',
);*/
$facebookConfig = api_get_configuration_value('facebook_config');
if (!empty($facebookConfig)) {
$facebook_config = $facebookConfig;
}
/**
* Shibboleth
*/
// $shibb_login = ...;
$shibbLogin = api_get_configuration_value('shibb_login');
if (!empty($shibbLogin)) {
$shibb_login = $shibbLogin;
}
/**
* LDAP
*/
/**
* Array of connection parameters
**/
$extldap_config = array(
//base domain string
'base_dn' => 'DC=cblue,DC=be',
//admin distinguished name - might be just a term like "elearning" rather than a whole string
'admin_dn' => 'CN=admin,dc=cblue,dc=be',
//admin password
'admin_password' => 'pass',
//ldap host
'host' => array('1.2.3.4', '2.3.4.5', '3.4.5.6'),
// filter
'filter' => '', // no () around the string
//'port' => , default on 389 for LDAP, 636 for LDAPS
'port' => 389,
//protocol version (2 or 3)
'protocol_version' => 3,
// set this to 0 to connect to AD server
'referrals' => 0,
//String used to search the user in ldap. %username will ber replaced by the username.
//See extldap_get_user_search_string() function below
// For Active Directory: 'user_search' => 'sAMAccountName=%username%', // no () around the string
// For OpenLDAP: 'user_search' => 'uid=%username%', // no () around the string
'user_search' => 'uid=%username%',
//encoding used in ldap (most common are UTF-8 and ISO-8859-1
'encoding' => 'UTF-8',
//Set to true if user info have to be update at each login
'update_userinfo' => true,
// Define user_search_import_all_users variable to control main/auth/external_login/ldap.inc.php
// Active Directory: 'user_search_import_all_users' => 'sAMAccountName=$char1$char2*'
// OpenLDAP: 'user_search_import_all_users' => 'uid=*'
'user_search_import_all_users' => 'uid=*'
);
$ldapConfig = api_get_configuration_value('extldap_config');
if (!empty($ldapConfig)) {
$extldap_config = $ldapConfig;
}
/**
* Matching array between chamilo user info and ldap user info
* This array is of this form :
* '<chamilo_field> => <ldap_field>
*
* If <ldap_field> is "func", then the value of <chamilo_field> will be the return value of the function
* extldap_get_<chamilo_field>($ldap_array)
* In this cas you will have to declare the extldap_get_<chamilo_field> function
*
* If <ldap_field> is a string beginning with "!", then the value will be this string without "!"
*
* If <ldap_field> is any other string then the value of <chamilo_field> will be
* $ldap_array[<ldap_field>][0]
*
* If <ldap_field> is an array then its value will be an array of values with the same rules as above
*
* Please Note that Chamilo expects some attributes that might not be present in your user ldap record
*
**/
$extldap_user_correspondance = array(
'firstname' => 'givenName',
'lastname' => 'sn',
'email' => 'mail',
'auth_source' => '!extldap',
'username' => 'uid',
'language' => '!english',
'password' => 'userPassword',
'status' => '!5', // Forcing status to 5; To change this set 'status' => 'func' and implement an extldap_get_status($ldap_array) function
'active' => '!1', // Forcing active to 1; To change this set 'status' => 'func' and implement an extldap_get_active($ldap_array) function
'admin' => 'func' // Using the extldap_get_admin() function (defined in main/auth/external_login/ldap.inc.php) to check if user is an administrator based on some ldap user record value
/* Extras example
'extra' => array(
'title' => 'title',
'globalid' => 'employeeID',
'department' => 'department',
'country' => 'co',
'bu' => 'Company',
'cas_user' => 'uid',
) */
);
$ldapUserCorrespondance = api_get_configuration_value('extldap_user_correspondance');
if (!empty($ldapUserCorrespondance)) {
$extldap_user_correspondance = $ldapUserCorrespondance;
}
/**
* OpenID
*/
$langMainInfo = 'You may login to this site using an OpenID. You may add your OpenId URLs below, and also see a list of any OpenIDs which have already been added.';
$langMainInfoDetail = '<p>OpenID is a secure way to use one user ID and password to log in to many web sites without special software, giving the same password to each site, or losing control over which information is shared with each site that you visit.</p>';
$langMainInfoDetail .= '<p>Users can create accounts using their OpenID, assign one or more OpenIDs to an existing account, and log in using an OpenID. This lowers the barrier to registration, which is good for the site, and offers convenience and security to the users. Logging in via OpenID is far more secure than cross-site logins using drupal.module.</p>';
$langMainInfoDetail .= '<p>More information on OpenID is available at <a href="http://openid.net">OpenID.net</a></p>';
/**
* CAS
*/
$cas = [
'service_base_url' => '', //The base url of your service required by phpCAS since compliance with
//https://github.com/advisories/GHSA-8q72-6qq8-xv64 in version 1.6
//with this https://github.com/apereo/phpCAS/commit/b759361d904a2cb2a3bcee9411fc348cfde5d163
//It should be the URL of you Chamilo or an array of all the URLs in case of a multiURL installation including https and / at the end
'force_redirect' => false,
'replace_login_form' => false,
//'skip_force_redirect_in' => ['/main/webservices'],
// 'verbose' => false,
// 'debug' => '/var/log/cas_debug.log',
'noCasServerValidation' => true, // set to false in production
// 'fixedServiceURL' => false, // false by default, set to either true or to the service URL string if needed
// sites might also need proxy_settings in configuration.php
];
$casConfig = api_get_configuration_value('cas');
if (!empty($casConfig)) {
$cas = $casConfig;
}

292
app/config/config.yml Normal file
View File

@@ -0,0 +1,292 @@
imports:
- { resource: parameters.yml }
- { resource: security.yml }
- { resource: assetic.yml }
- { resource: services.yml }
# - { resource: @ChamiloCoreBundle/Resources/config/admin.yml }
# - { resource: @ChamiloNotebookBundle/Resources/config/admin.yml }
# Mopa Bootstrap
- { resource: mopa/mopa_bootstrap.yml }
# FriendOfSymfony Bundles
#- { resource: fos/fos_comment.yml }
# - { resource: fos/fos_rest.yml }
- { resource: fos/fos_user.yml }
#- { resource: fos/fos_elastica.yml }
# - { resource: fos/fos_message.yml }
# Sonata Core Bundles
- { resource: sonata/sonata_block.yml }
- { resource: sonata/sonata_formatter.yml }
- { resource: sonata/sonata_cache.yml }
- { resource: sonata/sonata_seo.yml }
# - { resource: sonata/sonata_timeline.yml }
- { resource: sonata/sonata_intl.yml }
- { resource: sonata/sonata_core.yml }
- { resource: sonata/sonata_user.yml }
# Sonata Feature Bundles
- { resource: sonata/sonata_admin.yml }
- { resource: sonata/sonata_page.yml }
- { resource: sonata/sonata_media.yml }
- { resource: sonata/sonata_translation.yml }
# - { resource: sonata/sonata_news.yml }
# - { resource: sonata/sonata_user.yml }
# - { resource: sonata/sonata_notification.yml }
- { resource: sonata/sonata_classification.yml }
- { resource: sonata/sonata_timeline.yml }
# - { resource: @CmfBlogBundle/Resources/config/cmf_routing_auto.xml }
# - { resource: @CmfBlogBundle/Resources/config/admin.yml }
- { resource: ivory_ckeditor.yml }
# Put parameters here that don't need to change on each machine where the app is deployed
# http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
locale: en
framework:
#esi: ~
translator: { fallbacks: ["%locale%"] }
secret: "%secret%"
router:
resource: "%kernel.root_dir%/config/routing.yml"
strict_requirements: ~
form: ~
csrf_protection: ~
validation: { enable_annotations: true }
#serializer: { enable_annotations: true }
templating:
engines: ['twig']
#assets_version: SomeVersionScheme
default_locale: "%locale%"
trusted_hosts: ~
trusted_proxies: ~
session:
# handler_id set to null will use default session handler from php.ini
handler_id: ~
name: ch_sid
fragments: ~
http_method_override: true
theodo_evolution_session:
bag_manager_service: theodo_evolution.session.symfony1.bag_manager
bag_configuration_service: theodo_evolution.session.symfony1.bag_manager_configuration
# Twig Configuration
twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
base_template_class: Sonata\CacheBundle\Twig\TwigTemplate14
form:
resources:
- 'bootstrap_3_horizontal_layout.html.twig'
- 'SonataFormatterBundle:Form:formatter.html.twig'
- 'SonataMediaBundle:Form:media_widgets.html.twig'
- 'SonataCoreBundle:Form:datepicker.html.twig'
exception_controller: 'FOS\RestBundle\Controller\ExceptionController::showAction'
# paths:
# "%kernel.root_dir%/../src/Chamilo/CoreBundle/Resources/views/default": template_style
globals:
show_toolbar: true
show_footer: true
software_name: Chamilo
version: 2
session_teachers:
teachers:
news_counter:
news_list:
messages_count:
message_link:
is_profile_editable:
plugin_footer_left:
plugin_footer_center:
plugin_content_bottom:
plugin_header_logo:
plugin_header_left:
plugin_header_center:
plugin_header_right:
plugin_header_main:
plugin_menu_bottom:
plugin_menu_top:
plugin_content_top:
plugin_footer_right:
footer_extra_content:
course_session_block:
show_course_shortcut:
show_course_navigation_menu:
actions:
header:
message:
show_media_element: 1
# Assetic Configuration
assetic:
debug: "%kernel.debug%"
use_controller: false
bundles: [ ]
#java: /usr/bin/java
filters:
cssrewrite: ~
#closure:
# jar: "%kernel.root_dir%/Resources/java/compiler.jar"
#yui_css:
# jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar"
# Doctrine Configuration
doctrine:
dbal:
default_connection: default
connections:
default:
driver: pdo_mysql
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
# if using pdo_sqlite as your database driver:
# 1. add the path in parameters.yml
# e.g. database_path: "%kernel.root_dir%/data/data.db3"
# 2. Uncomment database_path in parameters.yml.dist
# 3. Uncomment next line:
# path: "%database_path%"
types:
json: Sonata\Doctrine\Types\JsonType
orm:
auto_generate_proxy_classes: "%kernel.debug%"
default_entity_manager: default
# auto_mapping: true
entity_managers:
default:
auto_mapping: true
mappings: ~
# Swiftmailer Configuration
swiftmailer:
transport: "%mailer_transport%"
host: "%mailer_host%"
username: "%mailer_user%"
password: "%mailer_password%"
spool: { type: memory }
doctrine_migrations:
dir_name: %kernel.root_dir%/../app/Migrations/Schema/V111
namespace: Application\Migrations\Schema\V111
table_name: version
name: Chamilo Migrations
# Grid default template
#apy_data_grid:
# theme: ChamiloCoreBundle::grid.html.twig
#
stof_doctrine_extensions:
default_locale: "%locale%"
translation_fallback: true
orm:
default:
tree: true
timestampable: true
sluggable: true
sortable: true
#liip_theme:
# themes: ['web', 'tablet', 'phone']
# active_theme: 'web'
# assetic_integration: true
#oneup_flysystem:
# adapters:
# local.adapter:
# local:
# directory: %kernel.root_dir%/courses
## s3.adapter:
## awss3v3:
## client: s3_client # add service "s3_client"
## bucket: ~
## prefix: ~
#
# filesystems:
# course:
# adapter: local.adapter
# cache: ~
# alias: ~
# mount: ~
#jms_translation:
# configs:
# app:
# dirs: [%kernel.root_dir%, %kernel.root_dir%/../src]
# output_dir: %kernel.root_dir%/Resources/translations
# ignored_domains: [routes]
# excluded_names: ["*TestCase.php", "*Test.php"]
# excluded_dirs: [cache, data, logs]
## extractors: [alias_of_the_extractor]
fm_elfinder:
assets_path: /chamilo_master/web/assets
instances:
default:
locale: %locale% # defaults to current request locale
editor: ckeditor # other options are tinymce, tinymce4, form, custom and simple
fullscreen: true # defaults true, applies to simple and ckeditor editors
theme: smoothness # jquery theme
include_assets: true # disable if you want to handle loading of the javascript and css assets yourself
connector:
debug: false # defaults to false
roots: # at least one root must be defined
# uploads:
# show_hidden: false # defaults to false
# driver: LocalFileSystem
# path: uploads
# upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
# upload_deny: ['all']
# upload_max_size: 2M
local:
driver: Flysystem
path: uploads
flysystem:
type: local
options:
local:
path: %kernel.root_dir%/../web/media/
upload_allow: ['all']
#upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
#upload_deny: ['all']
upload_max_size: 2M
#lunetics_locale:
# guessing_order:
# - query
# - router
# - session
# #- browser
# allowed_locales: "%locales%"
knp_menu:
twig: true
#
#hwi_oauth:
# firewall_names: [main]
# resource_owners:
# any_name:
# type: github
# client_id: <client_id>
# client_secret: <client_secret>
#gregwar_captcha:
# Doctrine audit
sonata_doctrine_orm_admin:
audit:
force: false # Audits are set in the admin.yml files with audit:true

58
app/config/config_dev.yml Normal file
View File

@@ -0,0 +1,58 @@
imports:
- { resource: config.yml }
framework:
router:
resource: "%kernel.root_dir%/config/routing_dev.yml"
strict_requirements: true
profiler: { only_exceptions: false }
web_profiler:
toolbar: true
intercept_redirects: true
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: [!event]
console:
type: console
bubble: false
verbosity_levels:
VERBOSITY_VERBOSE: INFO
VERBOSITY_VERY_VERBOSE: DEBUG
channels: ["!doctrine"]
console_very_verbose:
type: console
bubble: false
verbosity_levels:
VERBOSITY_VERBOSE: NOTICE
VERBOSITY_VERY_VERBOSE: NOTICE
VERBOSITY_DEBUG: DEBUG
channels: ["doctrine"]
# uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration
#firephp:
# type: firephp
# level: info
#chromephp:
# type: chromephp
# level: info
assetic:
use_controller: false
#swiftmailer:
# delivery_address: me@example.com
# Bower configuration
#sp_bower:
# bin: "%sp_bower_bin%" # Optional
# assetic: true
# install_on_warmup: false
# bundles:
# ChamiloCoreBundle:
# cache:
# directory: %kernel.root_dir%/cache/public/components/cache

View File

@@ -0,0 +1,28 @@
imports:
- { resource: config.yml }
#framework:
# validation:
# cache: validator.mapping.cache.apc
# serializer:
# cache: serializer.mapping.cache.apc
#doctrine:
# orm:
# metadata_cache_driver: apc
# result_cache_driver: apc
# query_cache_driver: apc
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
console:
type: console

View File

@@ -0,0 +1,10 @@
<?php
/**
* This file holds the configuration constants and variables
* for the course info tool.
*
* @package chamilo.configuration
*/
$course_info_is_editable = true;

View File

@@ -0,0 +1,67 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Events' configuration
* @deprecated to be removed in 2.x
* Used to configure each event and to link them to functions the event'll fire.
* The flow is like the following :
* 1. somewhere in the application an event is fired
* 2. that event is intercepted by the switch EventsDispatcher
* 3. that switch will go all over the "actions" in the event_config initialized beneath us according to the event
* 4. that switch will see if the function actually exists (if not, we get dont do anything)
* 5. then it will see if a filter for that function exists (if it does, the filter is executed)
* 6. if the filter says it's ok, the function linked to the event is executed
* 7. and that function will actually call the truly interesting function with the good require_once
*/
global $event_config;
$event_config = array(
'portal_homepage_edited' => array( // key for "user registration" event
'actions' => array( // we link this event to a bunch of functions that will be triggered when the event is fired
'event_send_mail' // don't forget to actually write this function in the events.lib.php file
),
'self_sent' => false, // this key states that we can't add user to this event through the admin panel
'name_lang_var' => get_lang('PortalHomepageEdited'),
'desc_lang_var' => get_lang('PortalHomepageEdited'),
'available_keyvars' => array (// keys used for the mail template
'url' => 'portal',
'sitename' => 'sitename',
'firstname' => 'firstname',
'lastname' => 'lastname',
'username' => 'username',
'usermail' => 'usermail',
'password' => 'password',
'user_lang' => 'language',
'admin_name' => 'administrator_name',
'admin_surname' => 'administrator_surname',
'admin_phone' => 'administrator_phone',
'admin_email' => 'administrator_email',
)
),
'user_registration' => array( // key for "user registration" event
'actions' => array( // we link this event to a bunch of functions that will be triggered when the event is fired
'event_send_mail' // don't forget to actually write this function in the events.lib.php file
),
'self_sent' => true, // this key states that we can't add user to this event through the admin panel
'name_lang_var' => get_lang('UserRegistrationTitle'),
'desc_lang_var' => get_lang('UserRegistrationComment'),
'available_keyvars' => array (// keys used for the mail template
'url' => 'portal',
'sitename' => 'sitename',
'firstname' => 'firstname',
'lastname' => 'lastname',
'username' => 'username',
'usermail' => 'usermail',
'password' => 'password',
'user_lang' => 'language',
'admin_name' => 'administrator_name',
'admin_surname' => 'administrator_surname',
'admin_phone' => 'administrator_phone',
'admin_email' => 'administrator_email',
)
),
);
@include 'events.conf.local.php';

View File

@@ -0,0 +1,14 @@
fos_user:
db_driver: orm # can be orm or odm
firewall_name: main
# if you change the class configuration, please also alter the sonata_user.yml file
user_class: Chamilo\PageBundle\Entity\User
group:
group_class: Chamilo\UserBundle\Entity\Group
group_manager: sonata.user.orm.group_manager
service:
user_manager: sonata.user.orm.user_manager

View File

@@ -0,0 +1,41 @@
ivory_ck_editor:
autoload: false
base_path: "bundles/ivoryckeditor"
js_path: "bundles/ivoryckeditor/ckeditor.js"
default_config: default
configs:
chamilo:
filebrowserBrowseRoute: elfinder
filebrowserBrowseRouteParameters: []
default:
# default toolbar plus Format button
toolbar:
- [Bold, Italic, Underline, -, Cut, Copy, Paste, PasteText, PasteFromWord, -, Undo, Redo, -, NumberedList, BulletedList, -, Outdent, Indent, -, Blockquote, -, Image, Link, Unlink, Table]
- [Format, Maximize, Source]
filebrowserBrowseRoute: admin_chamilo_media_media_ckeditor_browser
filebrowserImageBrowseRoute: admin_chamilo_media_media_ckeditor_browser
# Display images by default when clicking the image dialog browse button
filebrowserImageBrowseRouteParameters:
provider: sonata.media.provider.image
filebrowserUploadRoute: admin_chamilo_media_media_ckeditor_upload
filebrowserUploadRouteParameters:
provider: sonata.media.provider.file
# Upload file as image when sending a file from the image dialog
filebrowserImageUploadRoute: admin_chamilo_media_media_ckeditor_upload
filebrowserImageUploadRouteParameters:
provider: sonata.media.provider.image
context: my-context # Optional, to upload in a custom context
plugins:
wordcount:
path: "/bundles/chamilocore/ckeditor/plugins/wordcount"
filename: "plugin.js"
# adobeair:
# path: "/bundles/chamilocore/components/ckeditor/plugins/adobeair"
# filename: "plugin.js"
# iframedialog:
# path: "/bundles/chamilocore/components/ckeditor/plugins/iframedialog"
# filename: "plugin.js"
# docprops:
# path: "/bundles/chamilocore/components/ckeditor/plugins/docprops"
# filename: "plugin.js"

View File

@@ -0,0 +1,57 @@
<?php
/**
* This file holds the configuration settings
* for phpmailer Class.
*
* The settings can use an optional index at the first level to represent the ID of the
* URL in case you use multi-url for example: $platform_email[2]['SMTP_HOST'] = 'awesome.mail.server'.
*
* @package chamilo.configuration
*/
$platform_email['SMTP_FROM_EMAIL'] = ''; //See the function __construct() in main/inc/lib/notification.lib.php for more details on how the SMTP FROM email is defined and what to indicate here if needed to override users configuration
$platform_email['SMTP_FROM_NAME'] = '';
$platform_email['SMTP_HOST'] = 'localhost'; // If using SMTP use the domain name example: mywebmail.example.net
$platform_email['SMTP_PORT'] = 25;
$platform_email['SMTP_MAILER'] = 'mail'; // mail, sendmail or smtp (Windows probably only supports smtp)
$platform_email['SMTP_AUTH'] = 0;
$platform_email['SMTP_USER'] = '';
$platform_email['SMTP_PASS'] = '';
$platform_email['SMTP_CHARSET'] = 'UTF-8';
$platform_email['SMTP_UNIQUE_SENDER'] = 0; // to send all mails from the same user
$platform_email['SMTP_DEBUG'] = 0; // change to 1 to enable smtp debug
$platform_email['SMTP_SECURE'] = 'tls'; // if you're using SSL: ssl; or TLS: tls. (only used if SMTP_AUTH==1)
$platform_email['SMTP_UNIQUE_REPLY_TO'] = 0; // to use AWS SMS service, SMTP_UNIQUE_SENDER and this have to be = 1
// If you have certificate problems see:
// https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting#updating-ca-certificates
/*$platform_email['SMTPOptions'] = [
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true,
],
];*/
// DKIM requires the generation of a public/private keypair and the configuration of a TXT record in your DNS
// The TXT record should look like this: chamilo._domainkey.yourdomain.ext IN TXT "v=1; k=rsa; s=chamilo; p=PubKey..."
// to match the following selector
// Also, using SMTP_UNIQUE_SENDER is required if users have e-mails from different domains
$platform_email['DKIM'] = 0; //enable DKIM by setting this to 1
$platform_email['DKIM_SELECTOR'] = 'chamilo'; // an indicator of the application sending the e-mail through this specific DKIM key
$platform_email['DKIM_DOMAIN'] = 'mydomain.com'; //the domain for e-mail sending, not necessarily api_get_path(WEB_PATH)
$platform_email['DKIM_PRIVATE_KEY_STRING'] = ''; //the private key in a string format
$platform_email['DKIM_PRIVATE_KEY'] = ''; //the private key as the path to a file. The file needs to be accessible to PHP!
$platform_email['DKIM_PASSPHRASE'] = ''; //the passohrase for the private key defined in the last 2 lines
// Some e-mail clients do not understand the descriptive LD+JSON format,
// showing it as a loose JSON string to the final user. If this is your case,
// you might want to set the variable below to 'false' to disable this header.
$platform_email['EXCLUDE_JSON'] = false;
// Fill the following only for mail services with OAuth2.0 authentication. Otherwise leave untouched.
$platform_email['XOAUTH2_METHOD'] = false;
$platform_email['XOAUTH2_URL_AUTHORIZE'] = 'https://provider.example/oauth2/auth';
$platform_email['XOAUTH2_URL_ACCES_TOKEN'] = 'https://provider.example/token';
$platform_email['XOAUTH2_URL_RESOURCE_OWNER_DETAILS'] = 'https://provider.example/userinfo';
$platform_email['XOAUTH2_SCOPES'] = '';
$platform_email['XOAUTH2_CLIENT_ID'] = '';
$platform_email['XOAUTH2_CLIENT_SECRET'] = '';
$platform_email['XOAUTH2_REFRESH_TOKEN'] = '';

View File

@@ -0,0 +1,4 @@
name: Chamilo Migrations
migrations_namespace: Application\Migrations\Schema\V111
table_name: version
migrations_directory: app/Migrations/Schema/V111

View File

@@ -0,0 +1,21 @@
# see https://github.com/phiamo/MopaBootstrapBundle/blob/master/Resources/doc/misc/configuration-reference.md
mopa_bootstrap:
# Adds twig form theme support
# horizontal_label_class: 'aa'
# horizontal_input_wrapper_class: 'dd'
menu: ~ # enables twig helpers for menu
form:
show_legend: true # default is true
show_child_legend: false # default is true
error_type: block # or inline which is default
render_optional_text: true
collection:
widget_remove_btn:
icon: trash
attr:
class: btn btn-danger
widget_add_btn:
icon: plus-sign
attr:
class: btn btn-primary

View File

@@ -0,0 +1,35 @@
parameters:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_port: ~
database_name: chamilo111
database_user: root
database_password: root
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: ~
mailer_password: ~
# A secret key that's used to generate certain security-related tokens
secret: ThisTokenIsNotSoSecretChangeIt
password_encryption: sha1
# Activation for multi-url access
multiple_access_urls: false
# Deny the elimination of users
deny_delete_users: false
installed: ~
password_encryption: sha1
sp_bower_bin: '/usr/bin/bower'
url_append: ''
sonata_media.cdn.host: /uploads/media
# If you installed Chamilo in http://localhost/chamilo_master
# you need to setup like this:
# url_append: '/chamilo_master/web/'
# sonata_media.cdn.host: /chamilo_master/web/uploads/media
sonata_page.varnish.command: 'if [ ! -r "/etc/varnish/secret" ]; then echo "VALID ERROR :/"; else varnishadm -S /etc/varnish/secret -T 127.0.0.1:6082 {{ COMMAND }} "{{ EXPRESSION }}"; fi;'
locales: [en, fr, es, de]

View File

@@ -0,0 +1,41 @@
<?php
/**
* This file holds the configuration constants and variables
* for the user profile tool.
*
* @package chamilo.configuration
*/
// Autentication, password
define('CHECK_PASS_EASY_TO_FIND', true);
$profileIsEditable = true;
// User photos
define('PREFIX_IMAGE_FILENAME_WITH_UID', true); // If true, filename of images on server begin with uid of the user.
define('RESIZE_IMAGE_TO_THIS_HEIGTH', 180);
define('IMAGE_THUMBNAIL_WIDTH', 100);
// Replacing user photos
define('KEEP_THE_NAME_WHEN_CHANGE_IMAGE', true);
// true -> the new image have the name of previous.
// false -> a new name is build for each upladed image.
define('KEEP_THE_OLD_IMAGE_AFTER_CHANGE', true);
// true -> if KEEP_THE_NAME_WHEN_CHANGE_IMAGE is true, the previous image is rename before.
// false -> only the last image still on server.
// Official code
// Don't forget to change name of offical code in your organization
// See $langOfficialCode within the language file 'registration'
define('CONFVAL_ASK_FOR_OFFICIAL_CODE', true); // not used but name fixed
define('CONFVAL_CHECK_OFFICIAL_CODE', false);
/* if CONFVAL_CHECK_OFFICIAL_CODE is true, build here the
function personal_check_official_code($code, $valueToReturnIfOk, $valueToReturnIfBad) {
return $stateOfficialCode = true;
}
*/
// For stats
define('NB_LINE_OF_EVENTS', 15);

95
app/config/routing.yml Normal file
View File

@@ -0,0 +1,95 @@
home:
path: ../../index.php
userportal:
path: ../../user_portal.php
#index:
# path: /
#admin_dashboard:
# pattern: /administration/
# defaults:
# _controller: FrameworkBundle:Redirect:redirect
# route: sonata_admin_dashboard
# permanent: true # this for 301
#admin_without_locale:
# pattern: /administration
# defaults:
# _controller: FrameworkBundle:Redirect:redirect
# route: sonata_admin_dashboard
# permanent: true # this for 301
#admin_dashboard_without_locale:
# pattern: /administration/dashboard
# defaults:
# _controller: FrameworkBundle:Redirect:redirect
# route: sonata_admin_dashboard
# permanent: true
admin:
resource: '@SonataAdminBundle/Resources/config/routing/sonata_admin.xml'
prefix: /administration
#hwi_oauth_redirect:
# resource: "@HWIOAuthBundle/Resources/config/routing/redirect.xml"
# prefix: /connect
#
#hwi_oauth_login:
# resource: "@HWIOAuthBundle/Resources/config/routing/login.xml"
# prefix: /login
logout:
path: /logout
sonata_user_admin_security_logout:
path: /logout
#chamilo_course:
# resource: "@ChamiloCourseBundle/Resources/config/routing.yml"
# prefix: /
chamilo_contact:
resource: "@ChamiloContactBundle/Resources/config/routing.yml"
prefix: /contact
#_courses:
# resource: routing_courses.yml
#
_front:
resource: routing_front.yml
_admin:
resource: routing_admin.yml
prefix: /
#_api:
# resource: routing_api.yml
# prefix: /api
elfinder:
resource: "@FMElfinderBundle/Resources/config/routing.yml"
#chamilo_installer:
# resource: "@ChamiloInstallerBundle/Resources/config/routing.yml"
# Always at the end
core_bundle:
resource: "@ChamiloCoreBundle/Resources/config/routing.yml"
page_bundle:
resource: "@ChamiloPageBundle/Resources/config/routing.yml"
#liip_theme:
# resource: "@LiipThemeBundle/Resources/config/routing.xml"
# prefix: /theme
# app/config/routing.yml
fos_js_routing:
resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml"
faq:
resource: "@ChamiloFaqBundle/Resources/config/routing.yml"

View File

@@ -0,0 +1,19 @@
# cross links between kernels
#admin:
# resource: '@SonataAdminBundle/Resources/config/routing/sonata_admin.xml'
_sonata_admin:
resource: .
type: sonata_admin
prefix: /{_locale}/administration
sonata_user_admin_security:
resource: '@SonataUserBundle/Resources/config/routing/admin_security.xml'
sonata_user_admin_resetting:
resource: '@SonataUserBundle/Resources/config/routing/sonata_resetting_1.xml'
prefix: /resetting
sonata_media_pixlr:
resource: '@SonataMediaBundle/Resources/config/routing/pixlr.xml'
prefix: /media

View File

@@ -0,0 +1,23 @@
_wdt:
resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
prefix: /_wdt
_profiler:
resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
prefix: /_profiler
#_configurator:
# resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml"
# prefix: /_configurator
_errors:
resource: "@TwigBundle/Resources/config/routing/errors.xml"
prefix: /_error
#JMSTranslationBundle_ui:
# resource: @JMSTranslationBundle/Controller/
# type: annotation
# prefix: /_trans
_main:
resource: routing.yml

View File

@@ -0,0 +1,73 @@
sonata_user_security:
resource: "@SonataUserBundle/Resources/config/routing/sonata_security_1.xml"
sonata_user_resetting:
resource: "@SonataUserBundle/Resources/config/routing/sonata_resetting_1.xml"
prefix: /resetting
sonata_user_profile:
resource: "@SonataUserBundle/Resources/config/routing/sonata_profile_1.xml"
prefix: /profile
sonata_user_register:
resource: "@SonataUserBundle/Resources/config/routing/sonata_registration_1.xml"
prefix: /register
sonata_user_change_password:
resource: "@SonataUserBundle/Resources/config/routing/sonata_change_password_1.xml"
prefix: /profile
sonata_page_cache:
resource: '@SonataPageBundle/Resources/config/routing/cache.xml'
prefix: /
sonata_page_exceptions:
resource: '@SonataPageBundle/Resources/config/routing/exceptions.xml'
prefix: /page
sonata_media_gallery:
resource: '@SonataMediaBundle/Resources/config/routing/gallery.xml'
prefix: /media/gallery
sonata_media_media:
resource: '@SonataMediaBundle/Resources/config/routing/media.xml'
prefix: /media
#sonata_customer:
# resource: @SonataCustomerBundle/Resources/config/routing/customer.xml
# prefix: /shop/user
#
#sonata_basket:
# resource: @SonataBasketBundle/Resources/config/routing/basket.xml
# prefix: /shop/basket
#
#sonata_order:
# resource: @SonataOrderBundle/Resources/config/routing/order.xml
# prefix: /shop/user/order
#
#sonata_product_catalog:
# resource: @SonataProductBundle/Resources/config/routing/catalog.xml
# prefix: /shop/catalog
#
#sonata_product:
# resource: @SonataProductBundle/Resources/config/routing/product.xml
# prefix: /shop/product
#
#sonata_payment:
# resource: @SonataPaymentBundle/Resources/config/routing/payment.xml
# prefix: /shop/payment
#
#sonata_invoice:
# resource: @SonataInvoiceBundle/Resources/config/routing/invoice.xml
# prefix: /shop/user/invoice
#blog:
# resource: '@SonataNewsBundle/Resources/config/routing/news.xml'
# prefix: /blog
#fos_comment:
# type: rest
# resource: "@FOSCommentBundle/Resources/config/routing.yml"
# prefix: /comments
# defaults: { _format: html }

77
app/config/security.yml Normal file
View File

@@ -0,0 +1,77 @@
# To get started with security, check out the documentation:
# http://symfony.com/doc/current/book/security.html
security:
access_control:
- { path: ^/administrator, role: ROLE_ADMIN }
- { path: ^/efconnect, role: ROLE_USER }
- { path: ^/elfinder, role: ROLE_USER }
encoders:
FOS\UserBundle\Model\UserInterface:
id: chamilo_user.security.encoder
role_hierarchy:
ROLE_SONATA_ADMIN: ROLE_USER
ROLE_ADMIN:
- ROLE_SONATA_ADMIN
- ROLE_QUESTION_MANAGER
- ROLE_SESSION_MANAGER
- ROLE_TEACHER
- ROLE_DIRECTOR
- ROLE_JURY_PRESIDENT
- ROLE_CURRENT_COURSE_TEACHER
- SONATA
ROLE_SUPER_ADMIN: [ROLE_SONATA_ADMIN, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
ROLE_GLOBAL_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
ROLE_RRHH: [ROLE_TEACHER]
ROLE_TEACHER: [ROLE_STUDENT]
ROLE_QUESTION_MANAGER: [ROLE_STUDENT, ROLE_QUESTION_MANAGER]
ROLE_SESSION_MANAGER: [ROLE_STUDENT, ROLE_SESSION_MANAGER, ROLE_ALLOWED_TO_SWITCH]
ROLE_STUDENT: [ROLE_STUDENT]
ROLE_CURRENT_TEACHER: []
ROLE_CURRENT_COURSE_STUDENT: [ROLE_CURRENT_COURSE_STUDENT]
ROLE_CURRENT_COURSE_TEACHER: [ROLE_CURRENT_COURSE_TEACHER, ROLE_CURRENT_COURSE_STUDENT]
SONATA:
- ROLE_SONATA_PAGE_ADMIN_PAGE_EDIT # if you are not using acl then this line must be uncommented
- ROLE_SONATA_PAGE_ADMIN_BLOCK_EDIT
ROLE_ANONYMOUS: [ROLE_ANONYMOUS]
access_decision_manager:
# strategy can be: affirmative, unanimous or consensus
strategy: unanimous
# http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
providers:
fos_userbundle:
id: fos_user.user_manager
firewalls:
# disables authentication for assets and the profiler, adapt it according to your needs
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
pattern: .*
context: user
form_login:
provider: fos_userbundle
login_path: /login
use_forward: false
check_path: /login_check
failure_path: null
default_target_path: /administration
# success_handler: chamilo_core.listener.login_success_handler
logout:
path: /logout
target: /
# success_handler: chamilo_core.listener.logout_success_handler
invalidate_session: false
# handlers: ['sonata.page.cms_manager_selector']
anonymous: ~
switch_user: false

8
app/config/services.yml Normal file
View File

@@ -0,0 +1,8 @@
parameters:
services:
twig.text_extension:
class: Twig_Extensions_Extension_Text
tags:
- name: twig.extension

View File

@@ -0,0 +1,210 @@
sonata_notification:
class:
message: Chamilo\NotificationBundle\Entity\Message
sonata_admin:
# default value, change it to sonata.admin.security.handler.acl to use ACL
security:
handler: sonata.admin.security.handler.role
title: Chamilo #%sonata_admin.title%
title_logo: css/themes/chamilo/images/header-logo.png #%sonata_admin.logo_title%
options:
html5_validate: false # does not use html5 validation
pager_links: 5 # pager max links to display
templates:
# default global templates
# the layout template include javascript/stylesheet to the formatter bundle,
# if you don't need it use the default one: SonataAdminBundle::standard_layout.html.
layout: ChamiloAdminBundle::layout.html.twig
# layout: ApplicationSonataAdminBundle::standard_layout.html.twig
#layout: ApplicationSonataAdminBundle::demo_layout.html.twig
# layout: SonataAdminBundle::standard_layout.html.twig
ajax: SonataAdminBundle::ajax_layout.html.twig
# default value if done set, actions templates, should extends a global templates
list: SonataAdminBundle:CRUD:list.html.twig
show: SonataAdminBundle:CRUD:show.html.twig
edit: SonataAdminBundle:CRUD:edit.html.twig
# user_block: ChamiloCoreBundle:Admin:admin_topnav.html.twig
extensions:
# cmf_core.admin_extension.translatable:
# implements:
# - Symfony\Cmf\Bundle\CoreBundle\Translatable\TranslatableInterface
#
# cmf_core.admin_extension.publish_workflow.publishable:
# implements:
# - Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishableInterface
# cmf_core.admin_extension.publish_workflow.time_period:
# implements:
# - Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishTimePeriodInterface
dashboard:
blocks:
- { position: left, type: sonata.admin.block.admin_list }
# - { position: right, type: sonata.timeline.block.timeline, settings: { context: SONATA_ADMIN, max_per_page: 25, template: 'ChamiloTimelineBundle:Block:timeline.html.twig',}}
# - { position: right, type: sonata.admin_doctrine_orm.block.audit}
# - { position: center, type: sonata.block.service.text, settings: { content: "<h2>Welcome!</h2> You can customize this dashboard by editing the sonata_admin.yml file. The current dashboard presents the recent items from the NewsBundle and a timeline with the latest action"} }
#- { position: center, type: sonata.news.block.recent_posts, settings: { title: Recent Posts, number: 7, mode: admin }}
# - { position: left, type: sonata.block.service.text, settings: { content: "<div class='panel panel-default'><div class='panel-heading'><h3 class='panel-title'>Welcome!</h3></div><div class='panel-body'>You can customize this dashboard by editing the <code>sonata_admin.yml</code> file. The current dashboard presents the recent items from the NewsBundle and a non-statistical e-commerce information.</div></div>"} }
# - { position: center, type: sonata.news.block.recent_comments, settings: { title: Recent Comments, number: 7, mode: admin }}
#- { position: right, type: sonata.order.block.recent_orders, settings: { title: Recent Orders, number: 5, mode: admin }}
#- { position: right, type: sonata.customer.block.recent_customers, settings: { title: Recent Customers, number: 5, mode: admin }}
#- { position: right, type: sonata.block.service.rss, settings: { title: Sonata Project's Feeds, url: http://sonata-project.org/blog/archive.rss }}
groups:
sonata.admin.group.content:
label: Content
label_catalogue: SonataDemoBundle
#icon: '<i class="fa fa-th"></i>'
items:
- sonata.page.admin.page
# - sonata.news.admin.comment
# - sonata.news.admin.post
- sonata.media.admin.media
- sonata.media.admin.gallery
# - sonata.comment.admin.thread
sonata.admin.group.site_builder:
label: Site Builder
label_catalogue: SonataDemoBundle
#icon: '<i class="fa fa-puzzle-piece"></i>'
items:
- sonata.page.admin.page
- sonata.page.admin.site
- sonata.admin.contact_category
sonata.admin.group.faq:
label: FAQ
label_catalogue: Faq
#icon: '<i class="fa fa-puzzle-piece"></i>'
items:
- sonata.admin.faq_category
- sonata.admin.faq_question
sonata.admin.group.classification:
label: sonata_classification
label_catalogue: SonataClassificationBundle
#icon: '<i class="fa fa-sitemap"></i>'
items:
- sonata.classification.admin.category
- sonata.classification.admin.tag
- sonata.classification.admin.collection
sonata.admin.group.administration:
label: sonata_administration
label_catalogue: SonataAdminBundle
#icon: '<i class="fa fa-cogs"></i>'
items:
# - sonata.notification.admin.message
# - sonata.admin.settings_current
# - sonata.admin.tool
sonata.admin.group.user:
label: Users
#icon: '<i class="fa fa-play-circle"></i>'
label_catalogue: SonataAdminBundle
items:
- sonata.user.admin.user
- sonata.user.admin.group
# - sonata.admin.user_group
# - sonata.admin.user_field
# - sonata.admin.user_field_values
# sonata.admin.group.course:
# label: Courses
# #icon: '<i class="fa fa-play-circle"></i>'
# label_catalogue: SonataAdminBundle
# items:
## - sonata.admin.course
# - sonata.admin.course_category
# - sonata.admin.course_request
# - sonata.admin.c_group_info
## - sonata.admin.notebook
# sonata.admin.group.session:
# label: Sessions
# #icon: '<i class="fa fa-play-circle"></i>'
# label_catalogue: SonataAdminBundle
# items:
# - sonata.admin.session
# - sonata.admin.session_category
# - sonata.admin.career
# - sonata.admin.promotion
# sonata.admin.group.url:
# label: URLs
# #icon: '<i class="fa fa-play-circle"></i>'
# label_catalogue: SonataAdminBundle
# items:
# - sonata.admin.access_url
assets:
stylesheets:
# The sandbox includes default pre-optimized version of some css and js
# So you can either use them, and add your custom assets here
# ~ or ~
# tweak the assetic.yml and the following lines
- assetic/sonata_admin_css.css
- assetic/sonata_formatter_css.css
- assetic/sonata_jqueryui_css.css
- bundles/sonataadmin/vendor/admin-lte/dist/css/skins/skin-black.min.css
# Default admin assets
# - bundles/sonatacore/vendor/bootstrap/dist/css/bootstrap.min.css
# - bundles/sonatacore/vendor/components-font-awesome/css/font-awesome.min.css
# - bundles/sonatacore/vendor/ionicons/css/ionicons.min.css
# - bundles/sonataadmin/vendor/admin-lte/dist/css/AdminLTE.min.css
# - bundles/sonataadmin/vendor/iCheck/skins/flat/blue.css
# - bundles/sonatacore/vendor/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css
# - bundles/sonataadmin/vendor/jqueryui/themes/base/jquery-ui.css
# - bundles/sonatacore/vendor/select2/select2.css
# - bundles/sonatacore/vendor/select2-bootstrap-css/select2-bootstrap.min.css
# - bundles/sonataadmin/vendor/x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css
# - bundles/sonataadmin/css/styles.css
# - bundles/sonataadmin/css/layout.css
# - bundles/sonataadmin/css/tree.css
# Formatter assets
# - bundles/sonataformatter/markitup/skins/sonata/style.css
# - bundles/sonataformatter/markitup/sets/markdown/style.css
# - bundles/sonataformatter/markitup/sets/html/style.css
# - bundles/sonataformatter/markitup/sets/textile/style.css
# Page assets
# - bundles/sonatapage/sonata-page.back.min.css
javascripts:
- assetic/sonata_admin_js.js
# - bundles/sonataadmin/Admin.js
# - bundles/sonataadmin/treeview.js
- assetic/sonata_jqueryui_js.js
- assetic/sonata_formatter_js.js
- bundles/sonataformatter/vendor/ckeditor/ckeditor.js
# Default admin assets
# - bundles/sonatacore/vendor/jquery/dist/jquery.min.js
# - bundles/sonataadmin/vendor/jquery.scrollTo/jquery.scrollTo.min.js
# - bundles/sonatacore/vendor/moment/min/moment.min.js
# - bundles/sonatacore/vendor/bootstrap/dist/js/bootstrap.min.js
# - bundles/sonatacore/vendor/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js
# - bundles/sonataadmin/vendor/jqueryui/ui/minified/jquery-ui.min.js
# - bundles/sonataadmin/vendor/jqueryui/ui/minified/i18n/jquery-ui-i18n.min.js
# - bundles/sonataadmin/jquery/jquery.form.js
# - bundles/sonataadmin/jquery/jquery.confirmExit.js
# - bundles/sonataadmin/vendor/x-editable/dist/bootstrap3-editable/js/bootstrap-editable.min.js
# - bundles/sonatacore/vendor/select2/select2.min.js
# - bundles/sonataadmin/vendor/admin-lte/dist/js/app.min.js
# - bundles/sonataadmin/vendor/iCheck/icheck.min.js
# - bundles/sonataadmin/vendor/slimScroll/jquery.slimscroll.min.js
# - bundles/sonataadmin/Admin.js
# - bundles/sonataadmin/treeview.js
# Formatter assets
# - bundles/sonataformatter/vendor/markitup-markitup/markitup/jquery.markitup.js
# - bundles/sonataformatter/markitup/sets/markdown/set.js
# - bundles/sonataformatter/markitup/sets/html/set.js
# - bundles/sonataformatter/markitup/sets/textile/set.js
# Page assets
# - bundles/sonatapage/sonata-page.back.js

View File

@@ -0,0 +1,80 @@
sonata_block:
context_manager: sonata.page.block.context_manager
default_contexts: [sonata_page_bundle]
http_cache:
listener: true
# menus:
# "ChamiloCoreBundle:MainMenuBuilder:mainMenu": "Main Menu"
# #"SonataDemoBundle:Builder:mainMenu": "Main Menu"
blocks:
# Chamilo blocks
chamilo_core.block.breadcrumb: ~
chamilo_core.block.course: ~
chamilo_core.block.skill: ~
sonata.admin.block.stats:
contexts: [admin]
sonata.admin.block.admin_list:
contexts: [admin]
sonata.admin.block.search_result:
contexts: [admin]
sonata.admin_doctrine_orm.block.audit:
contexts: [admin]
# Builtin Block
sonata.block.service.text:
sonata.block.service.container:
sonata.block.service.rss:
sonata.block.service.menu:
sonata.block.service.template:
# PageBundle's Blocks
sonata.page.block.container:
# cache: sonata.cache.memcached
# cache: sonata.cache.predis
# cache: sonata.page.cache.esi # if you are using the PageBundle
# cache: sonata.block.cache.esi # if you are using the BlockBundle without the PageBundle
sonata.page.block.children_pages:
sonata.page.block.breadcrumb:
# MediaBundle's Blocks
sonata.media.block.media:
sonata.media.block.gallery:
sonata.media.block.feature_media:
# NewsBundle's Blocks
sonata.news.block.recent_comments:
sonata.news.block.recent_posts:
# TimelineBundle's Blocks
sonata.timeline.block.timeline:
contexts: [admin]
# UserBundle's Blocks
sonata.user.block.account:
cache: sonata.page.cache.js_async
#cache: sonata.page.cache.esi
contexts: [user]
sonata.user.block.menu:
contexts: [user]
# SeoBundle's Blocks
sonata.seo.block.social.container:
sonata.seo.block.email.share_button:
sonata.seo.block.facebook.like_box:
sonata.seo.block.facebook.like_button:
sonata.seo.block.facebook.send_button:
sonata.seo.block.facebook.share_button:
sonata.seo.block.pinterest.pin_button:
sonata.seo.block.twitter.share_button:
sonata.seo.block.twitter.follow_button:
sonata.seo.block.twitter.hashtag_button:
sonata.seo.block.twitter.mention_button:
sonata.seo.block.twitter.embed:
# Formatter
sonata.formatter.block.formatter:
sonata.seo.block.breadcrumb.homepage:

View File

@@ -0,0 +1,33 @@
#
# more information can be found here http://sonata-project.org/bundles/cache
#
#sonata_cache:
# caches:
# esi:
# servers:
# - varnishadm -T 127.0.0.1:2000 {{ COMMAND }} "{{ EXPRESSION }}"
#
# ssi:
# token: TheToken
#
# mongo:
# database: cache
# collection: cache
# servers:
# - {host: 127.0.0.1, port: 27017, user: username, password: pASS'}
# - {host: 127.0.0.2}
#
# memcached:
# prefix: test # prefix to ensure there is no clash between instances
# servers:
# - {host: 127.0.0.1, port: 11211, weight: 0}
#
# predis:
# servers:
# - {host: 127.0.0.1, port: 11211, database: 6379}
#
# apc:
# token: s3cur3 # token used to clear the related cache
# prefix: test # prefix to ensure there is no clash between instances
# servers:
# - { domain: kooqit.local, ip: 127.0.0.1, port: 80}

View File

@@ -0,0 +1,15 @@
sonata_classification:
class:
tag: Chamilo\ClassificationBundle\Entity\Tag
category: Chamilo\ClassificationBundle\Entity\Category
context: Chamilo\ClassificationBundle\Entity\Context
collection: Chamilo\ClassificationBundle\Entity\Collection
media: Chamilo\MediaBundle\Entity\Media
#doctrine:
# orm:
# entity_managers:
# default:
# mappings:
# ChamiloClassificationBundle: ~

View File

@@ -0,0 +1,35 @@
sonata_core:
form_type: horizontal
flashmessage:
success:
types:
- { type: my_custom_bundle_success }
- { type: my_other_bundle_success }
warning:
types:
- { type: my_custom_bundle_warning }
- { type: my_other_bundle_warning }
error:
css_class: danger # optionally, a CSS class can be defined
types:
- { type: my_custom_bundle }
confirmation: # You can add custom types too
types:
- { type: custom_bundle_type }
confirmation: # You can add custom types too
types:
- { type: custom_bundle_type }
confirm: # You can add custom types too
types:
- { type: custom_bundle_type }
normal:
types:
- { type: custom_bundle_type }
success: # You can add custom types too
types:
- { type: custom_bundle_type }

View File

@@ -0,0 +1,35 @@
#
# more information can be found here http://sonata-project.org/bundles/formatter
#
sonata_formatter:
formatters:
markdown:
service: sonata.formatter.text.markdown
extensions:
- sonata.formatter.twig.control_flow
- sonata.formatter.twig.gist
- sonata.media.formatter.twig
text:
service: sonata.formatter.text.text
extensions:
- sonata.formatter.twig.control_flow
- sonata.formatter.twig.gist
- sonata.media.formatter.twig
rawhtml:
service: sonata.formatter.text.raw
extensions:
- sonata.formatter.twig.control_flow
- sonata.formatter.twig.gist
- sonata.media.formatter.twig
richhtml:
service: sonata.formatter.text.raw
extensions:
- sonata.formatter.twig.control_flow
- sonata.formatter.twig.gist
- sonata.media.formatter.twig
ckeditor:
templates:
browser: 'SonataFormatterBundle:Ckeditor:browser.html.twig'
upload: 'SonataFormatterBundle:Ckeditor:upload.html.twig'

View File

@@ -0,0 +1,12 @@
#
# more information can be found here http://sonata-project.org/bundles/intl
#
sonata_intl:
locale: ~
timezone:
# if service is left blank, the chain detector will be used with detectors
# defined in the dedicated section
service: ~
detectors:
- sonata.intl.timezone_detector.user # default value if SonataUserBundle is available
- sonata.intl.timezone_detector.locale # default value

View File

@@ -0,0 +1,186 @@
sonata_media:
class:
media: Chamilo\MediaBundle\Entity\Media
gallery: Chamilo\MediaBundle\Entity\Gallery
gallery_has_media: Chamilo\MediaBundle\Entity\GalleryHasMedia
category: Chamilo\ClassificationBundle\Entity\Category
db_driver: doctrine_orm # | doctrine_mongodb
default_context: default
contexts:
default: # the default context is mandatory
download:
mode: http # X-Sendfile | http
providers:
- sonata.media.provider.dailymotion
- sonata.media.provider.youtube
- sonata.media.provider.image
- sonata.media.provider.file
- sonata.media.provider.vimeo
formats:
small: { width: 100, quality: 100}
big: { width: 970 , quality: 100}
course:
providers:
- sonata.media.provider.dailymotion
- sonata.media.provider.youtube
- sonata.media.provider.image
- sonata.media.provider.file
- sonata.media.provider.vimeo
formats:
small: { width: 100, quality: 100}
big: { width: 970 , quality: 100}
news:
providers:
- sonata.media.provider.dailymotion
- sonata.media.provider.youtube
- sonata.media.provider.image
formats:
abstract: { width: 100, quality: 100}
wide: { width: 820, quality: 100}
sonata_collection:
providers:
- sonata.media.provider.image
formats:
preview: { width: 100, quality: 100}
wide: { width: 820, quality: 100}
sonata_category:
providers:
- sonata.media.provider.image
formats:
preview: { width: 100, quality: 100}
wide: { width: 820, quality: 100}
user:
providers:
- sonata.media.provider.image
formats:
small: { width: 100, quality: 100}
big: { width: 970 , quality: 100}
cdn:
# define the public base url for the uploaded media
server:
path: %url_append%%sonata_media.cdn.host%
filesystem:
# define where the uploaded file will be stored
local:
directory: %kernel.root_dir%/../web/uploads/media
create: true
providers:
# ...
file:
# the resizer must be set to false, otherwhise this can delete icon files from the fs
resizer: false
image:
thumbnail: sonata.media.thumbnail.format # default value
# thumbnail: sonata.media.thumbnail.consumer.format # can be used to dispatch the resize action to async task
# thumbnail: sonata.media.thumbnail.liip_imagine # use the LiipImagineBundle to resize the image
vimeo:
thumbnail: sonata.media.thumbnail.format # default value
# thumbnail: sonata.media.thumbnail.consumer.format # can be used to dispatch the resize action to async task
# thumbnail: sonata.media.thumbnail.liip_imagine # use the LiipImagineBundle to resize the image
youtube:
thumbnail: sonata.media.thumbnail.format # default value
# thumbnail: sonata.media.thumbnail.consumer.format # can be used to dispatch the resize action to async task
# thumbnail: sonata.media.thumbnail.liip_imagine # use the LiipImagineBundle to resize the image
dailymotion:
thumbnail: sonata.media.thumbnail.format # default value
# thumbnail: sonata.media.thumbnail.consumer.format # can be used to dispatch the resize action to async task
# thumbnail: sonata.media.thumbnail.liip_imagine # use the LiipImagineBundle to resize the image
pixlr:
enabled: true
referrer: App
resizer:
simple:
# mode: outbound
mode: inset
#
# The LiipImagineBundle can be used if you want to convert on demand an image
# to a specific format. (ie a controller render the file)
# more information can be found here : https://github.com/liip/LiipImagineBundle
#
#liip_imagine:
# filter_sets:
#
# # this configuration match the sonata_media configuration format definition
# sonata_product_preview:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [100, 100], mode: outbound }
#
# sonata_product_small:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [200, 100], mode: outbound }
#
# sonata_product_large:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [600, 100], mode: outbound }
#
# news_abstract:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [100, 100], mode: outbound }
#
# news_wide:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [820, 100], mode: outbound }
#
# sonata_collection_preview:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [100, 100], mode: outbound }
#
# sonata_collection_wide:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [820, 100], mode: outbound }
#
# sonata_category_preview:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [100, 100], mode: outbound }
#
# sonata_category_wide:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [820, 100], mode: outbound }
#
# default_small:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [100, 100], mode: outbound }
#
# default_big:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [820, 70], mode: outbound }

View File

@@ -0,0 +1,184 @@
# more information can be found here http://sonata-project.org/bundles/page
cmf_routing:
chain:
routers_by_id:
# enable the DynamicRouter with high priority to allow overwriting configured routes with content
#symfony_cmf_routing_extra.dynamic_router: 200
# enable the symfony default router with a lower priority
router.default: 150 # First chamilo/symfony2 router
sonata.page.router: 100 # then the page router
sonata_page:
class:
page: Chamilo\PageBundle\Entity\Page
site: Chamilo\PageBundle\Entity\Site
block: Chamilo\PageBundle\Entity\Block
snapshot: Chamilo\PageBundle\Entity\Snapshot
multisite: host_with_path_by_locale # host
use_streamed_response: false # set the value to false in debug mode or if the reverse proxy does not handle streamed response
ignore_uri_patterns:
- ^/administration(.*) # sonata admin
- ^/admin(.*) # chamilo admin
- ^/main(.*)
- /(.*)/(.*)administration(.*)/
- ^/api/(.*)
- ^install
- ^/install/(.*)
- ^/packages/(.*)
- ^/package/(.*)
- install.php
- install.php/(.*)
- install.php/packages/(.*)
- install.php/package/(.*)
- install.php/(.*)/(.*)
- ^/bundles/(.*)
- ^/_wdt/(.*)
- ^/_profiler/(.*)
- ^/userportal
- ^/userportal/(.*)
- ^/js/(.*)
- ^/faq/(.*)
- ^/faq
- ^/courses/(.*)
- ^/front/editor
- ^/contact(.*) # sonata admin
- ^/cms/pages/latest
- ^/cms/pages/latest/(.*)
ignore_route_patterns:
- (.*)administration(.*) # ignore admin route, ie route containing 'admin' # sonata admin
- ^_(.*) # ignore symfony routes
- fos_user(.*)
- sylius_flow(.*)
ignore_routes:
- home
- elfinder
- login
- logout
- fos_js_routing_js
- _settings
- main
- sonata_page_cache_esi
- sonata_page_cache_ssi
- sonata_page_js_sync_cache
- sonata_page_js_async_cache
- sonata_cache_esi
- sonata_cache_ssi
- sonata_cache_js_async
- sonata_cache_js_sync
- sonata_cache_apc
- chamilo_installer_flow
- sylius_flow_start
- sylius_flow_display
- sylius_flow_forward
- chamilo_core_user_user_mycourses
- chamilo_page_page_getlatestpages
cache_invalidation:
service: sonata.page.cache.invalidation.simple
recorder: sonata.page.cache.recorder
classes:
"Chamilo\PageBundle\Entity\Block": getId
assets:
stylesheets:
- assetic/sonata_front_css.css
javascripts:
- assetic/sonata_front_js.js
default_template: default
templates:
default:
path: 'ChamiloPageBundle::demo_layout.html.twig'
# path: '::layout.html.twig'
name: 'default'
containers:
header:
name: Header
content_top:
name: Top content
content:
name: Main content
content_bottom:
name: Bottom content
footer:
name: Footer
matrix:
layout: |
HHHHHHHH
TTTTTTTT
CCCCCCCC
BBBBBBBB
FFFFFFFF
mapping:
H: header
T: content_top
C: content
B: content_bottom
F: footer
2columns:
path: 'ChamiloPageBundle::demo_2columns_layout.html.twig'
# path: '::layout.html.twig'
name: '2 columns layout'
containers:
header:
name: Header
content_top:
name: Top content
left_col:
name: Left content
rigth_col:
name: Right content
content_bottom:
name: Bottom content
footer:
name: Footer
matrix:
layout: |
HHHHHHHH
TTTTTTTT
LLLLRRRR
BBBBBBBB
FFFFFFFF
mapping:
H: header
T: content_top
L: left_col
R: rigth_col
B: content_bottom
F: footer
page_defaults:
homepage: { decorate: false, enabled: true }
home: { decorate: false, enabled: true }
caches:
esi:
token: add an unique token here # default is a random value
version: 3 # version 3 is the default on debian wheezy ...
servers:
- %sonata_page.varnish.command% # you need to adapt this line to work with your configuration
ssi:
token: add an unique token here # default is a random value
catch_exceptions:
not_found: [404] # render 404 page with "not_found" key (name generated: _page_internal_error_{key})
fatal: [500] # so you can use the same page for different http errors or specify specific page for each error
# Enable Doctrine to map the provided entities
doctrine:
orm:
entity_managers:
default:
mappings:
ChamiloPageBundle: ~
SonataPageBundle: ~

View File

@@ -0,0 +1,47 @@
sonata_seo:
encoding: UTF-8
page:
default: sonata.seo.page.default
title: Chamilo
metas:
name:
keywords: 'chamilo e-learning'
description: 'chamilo e-learning'
robots: index, follow
viewport: width=device-width,initial-scale=1
apple-mobile-web-app-capable: yes
author: chamilo
Generator: Chamilo 2
property:
# Facebook application settings
#'fb:app_id': XXXXXX
#'fb:admins': admin1, admin2
# Open Graph information
# see http://developers.facebook.com/docs/opengraphprotocol/#types or http://ogp.me/
# 'og:site_name': %sonata_admin.title%
# 'og:description': %sonata_admin.title%
http-equiv:
# 'Content-Type': text/html; charset=utf-8
#'X-Ua-Compatible': IE=EmulateIE7
head:
'xmlns': http://www.w3.org/1999/xhtml
# sitemap:
# services:
# - sonata.product.seo_iterator
# doctrine_orm:
# # media
# - { connection: doctrine.dbal.default_connection, route: sonata_media_view, parameters: {id: null}, query: "SELECT id, updated_at as lastmod, 'weekly' as changefreq, '0.5' as prioriy FROM media__media WHERE enabled = true" }
# # blog post
# - { connection: doctrine.dbal.default_connection, route: sonata_news_view, parameters: {permalink: null}, query: "SELECT CONCAT_WS('/', YEAR(created_at), MONTH(created_at), DAY(created_at), slug) as permalink , updated_at as lastmod, 'weekly' as changefreq, '0.5' as prioriy FROM news__post WHERE enabled = 1 AND (publication_date_start IS NULL OR publication_date_start <= NOW())" }
# # page - works only for one site, please adapt the code if required
# - { connection: doctrine.dbal.default_connection, route: page_slug, parameters: {path: null}, query: "SELECT url as path, updated_at as lastmod, 'weekly' as changefreq, '0.5' as prioriy FROM page__snapshot WHERE route_name = 'page_slug' AND enabled = 1 AND (publication_date_start IS NULL OR publication_date_start <= NOW())" }
# # product categories
# - { connection: doctrine.dbal.default_connection, route: sonata_catalog_category, parameters: {category_id: null, category_slug: null}, query: "SELECT id as category_id, slug as category_slug, updated_at as lastmod, 'weekly' as changefreq, '0.5' as prioriy FROM classification__category WHERE enabled = true" }
# # products
# - { connection: doctrine.dbal.default_connection, route: sonata_product_view, parameters: {productId: null, slug: null}, query: "SELECT id as productId, slug, updated_at as lastmod, 'weekly' as changefreq, '0.5' as prioriy FROM product__product WHERE enabled = true" }

View File

@@ -0,0 +1,28 @@
sonata_timeline:
manager_type: orm
class:
timeline: %spy_timeline.class.timeline%
action: %spy_timeline.class.action%
component: %spy_timeline.class.component%
action_component: %spy_timeline.class.action_component%
spy_timeline:
drivers:
orm:
object_manager: doctrine.orm.entity_manager
classes:
query_builder: ~ # Spy\TimelineBundle\Driver\ORM\QueryBuilder\QueryBuilder
timeline: Chamilo\TimelineBundle\Entity\Timeline
action: Chamilo\TimelineBundle\Entity\Action
component: Chamilo\TimelineBundle\Entity\Component
action_component: Chamilo\TimelineBundle\Entity\ActionComponent
filters:
data_hydrator:
priority: 20
service: spy_timeline.filter.data_hydrator
filter_unresolved: false
locators:
- spy_timeline.filter.data_hydrator.locator.doctrine_orm

View File

@@ -0,0 +1,17 @@
lunetics_locale:
guessing_order:
- session
- query
- router
#- browser
allowed_locales: '%locales%'
a2lix_translation_form:
locale_provider: default # [1]
locales: '%locales%' # [1-a]
default_locale: '%locale%' # [1-b]
required_locales: [en] # [1-c]
manager_registry: doctrine # [2]
templating: "A2lixTranslationFormBundle::default.html.twig" # [3]

View File

@@ -0,0 +1,63 @@
# if you change the class configuration, please also alter the fos_user.yml file
doctrine:
orm:
entity_managers:
default:
mappings:
FOSUserBundle: ~
ChamiloUserBundle: ~
SonataUserBundle: ~
sonata_user:
admin:
user:
class: Chamilo\UserBundle\Admin\UserAdmin
group:
class: Chamilo\UserBundle\Admin\GroupAdmin
class:
# Entity Classes
user: Chamilo\UserBundle\Entity\User
group: Chamilo\UserBundle\Entity\Group
security_acl: false
table:
user_group: fos_user_user_group
impersonating:
route: page_slug
parameters: { path: / }
# google_authenticator:
# server: %sonata_user.google_authenticator.server%
# enabled: true
manager_type: orm
profile:
dashboard:
blocks:
- { position: left, type: sonata.block.service.text, settings: { content: "<h2>Welcome!</h2> <p>This is a sample user profile dashboard, feel free to override it in the configuration! Want to make this text dynamic? For instance display the user's name? Create a dedicated block and edit the configuration!</p>"} }
#- { position: left, type: sonata.order.block.recent_orders, settings: { title: Recent Orders, number: 5, mode: public }}
# - { position: right, type: sonata.timeline.block.timeline, settings: { max_per_page: 15 }}
# - { position: right, type: sonata.news.block.recent_posts, settings: { title: Recent Posts, number: 5, mode: public }}
# - { position: right, type: sonata.news.block.recent_comments, settings: { title: Recent Comments, number: 5, mode: public }}
menu:
- { route: 'sonata_user_profile_show', label: 'sonata_profile_title', domain: 'SonataUserBundle'}
- { route: 'sonata_user_profile_edit', label: 'link_edit_profile', domain: 'SonataUserBundle'}
#- { route: 'sonata_customer_addresses', label: 'link_list_addresses', domain: 'SonataCustomerBundle'}
#- { route: 'sonata_order_index', label: 'order_list', domain: 'SonataOrderBundle'}
form:
type: sonata_user_registration
handler: sonata.user.profile.form.handler.default
name: sonata_user_registration_form
validation_groups:
- Profile
# register:
# form:
# type: chamilo_sonata_user_registration
# handler: sonata.user.registration.form.handler.default
# name: chamilo_sonata_user_registration
# validation_groups:
# - Registration
# - Default