parent
e48173c64b
commit
1e1268a225
@ -0,0 +1,9 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
require_once __DIR__.'/AppKernel.php'; |
||||||
|
|
||||||
|
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache; |
||||||
|
|
||||||
|
class AppCache extends HttpCache |
||||||
|
{ |
||||||
|
} |
||||||
@ -0,0 +1,69 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
use Symfony\Component\HttpKernel\Kernel; |
||||||
|
use Symfony\Component\Config\Loader\LoaderInterface; |
||||||
|
|
||||||
|
class AppKernel extends Kernel |
||||||
|
{ |
||||||
|
public function registerBundles() |
||||||
|
{ |
||||||
|
$bundles = array( |
||||||
|
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), |
||||||
|
new Symfony\Bundle\SecurityBundle\SecurityBundle(), |
||||||
|
new Symfony\Bundle\TwigBundle\TwigBundle(), |
||||||
|
new Symfony\Bundle\MonologBundle\MonologBundle(), |
||||||
|
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), |
||||||
|
new Symfony\Bundle\AsseticBundle\AsseticBundle(), |
||||||
|
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), |
||||||
|
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), |
||||||
|
|
||||||
|
new Knp\Bundle\MenuBundle\KnpMenuBundle(), |
||||||
|
// Vendor specifics bundles |
||||||
|
new Sonata\CoreBundle\SonataCoreBundle(), |
||||||
|
new Sonata\BlockBundle\SonataBlockBundle(), |
||||||
|
); |
||||||
|
|
||||||
|
if (in_array($this->getEnvironment(), array('dev', 'test'))) { |
||||||
|
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); |
||||||
|
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); |
||||||
|
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); |
||||||
|
} |
||||||
|
|
||||||
|
$bundles[] = new ChamiloLMS\CoreBundle\ChamiloLMSCoreBundle(); |
||||||
|
$bundles[] = new Braincrafted\Bundle\BootstrapBundle\BraincraftedBootstrapBundle(); |
||||||
|
|
||||||
|
return $bundles; |
||||||
|
} |
||||||
|
|
||||||
|
public function registerContainerConfiguration(LoaderInterface $loader) |
||||||
|
{ |
||||||
|
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); |
||||||
|
} |
||||||
|
|
||||||
|
public function getLogDir() |
||||||
|
{ |
||||||
|
return $this->rootDir.'/../logs/'.$this->environment.'/logs/'; |
||||||
|
} |
||||||
|
|
||||||
|
public function getCacheDir() |
||||||
|
{ |
||||||
|
return $this->rootDir.'/../data/temp/'.$this->environment.'/cache/'; |
||||||
|
} |
||||||
|
|
||||||
|
// Custom |
||||||
|
|
||||||
|
public function getRealRootDir() |
||||||
|
{ |
||||||
|
return realpath($this->rootDir.'/../').'/'; |
||||||
|
} |
||||||
|
|
||||||
|
public function getDataDir() |
||||||
|
{ |
||||||
|
return $this->getRealRootDir().'/data/'; |
||||||
|
} |
||||||
|
|
||||||
|
public function getConfigDir() |
||||||
|
{ |
||||||
|
return $this->getRealRootDir().'/config/'; |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,139 @@ |
|||||||
|
imports: |
||||||
|
- { resource: parameters.yml } |
||||||
|
- { resource: security.yml } |
||||||
|
- { resource: parameters.php } |
||||||
|
|
||||||
|
framework: |
||||||
|
#esi: ~ |
||||||
|
translator: { fallback: "%locale%" } |
||||||
|
secret: "%secret%" |
||||||
|
router: |
||||||
|
resource: "%kernel.root_dir%/config/routing.yml" |
||||||
|
strict_requirements: ~ |
||||||
|
form: ~ |
||||||
|
csrf_protection: ~ |
||||||
|
validation: { 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: ~ |
||||||
|
fragments: ~ |
||||||
|
http_method_override: true |
||||||
|
|
||||||
|
# Twig Configuration |
||||||
|
twig: |
||||||
|
debug: "%kernel.debug%" |
||||||
|
strict_variables: "%kernel.debug%" |
||||||
|
paths: |
||||||
|
"%kernel.root_dir%/../src/ChamiloLMS/CoreBundle/Resources/views/default": template_style |
||||||
|
globals: |
||||||
|
|
||||||
|
show_toolbar: true |
||||||
|
show_footer: true |
||||||
|
software_name: |
||||||
|
version: |
||||||
|
|
||||||
|
session_teachers: 1 |
||||||
|
teachers: 1 |
||||||
|
news_counter: |
||||||
|
news_list: |
||||||
|
messages_count: |
||||||
|
message_link: |
||||||
|
is_profile_editable: |
||||||
|
administrator_name: |
||||||
|
plugin_footer_left: |
||||||
|
plugin_footer_center: |
||||||
|
plugin_content_bottom: |
||||||
|
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: |
||||||
|
welcome_to_course_block: |
||||||
|
|
||||||
|
# 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" |
||||||
|
|
||||||
|
lessphp: |
||||||
|
file: %kernel.root_dir%/../vendor/oyejorge/less.php/lessc.inc.php |
||||||
|
apply_to: "\.less$" |
||||||
|
cssrewrite: ~ |
||||||
|
|
||||||
|
braincrafted_bootstrap: |
||||||
|
less_filter: lessphp |
||||||
|
|
||||||
|
# Doctrine Configuration |
||||||
|
doctrine: |
||||||
|
dbal: |
||||||
|
driver: "%database_driver%" |
||||||
|
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, add the path in parameters.yml |
||||||
|
# e.g. database_path: "%kernel.root_dir%/data/data.db3" |
||||||
|
# path: "%database_path%" |
||||||
|
|
||||||
|
orm: |
||||||
|
auto_generate_proxy_classes: "%kernel.debug%" |
||||||
|
auto_mapping: true |
||||||
|
|
||||||
|
# Swiftmailer Configuration |
||||||
|
swiftmailer: |
||||||
|
transport: "%mailer_transport%" |
||||||
|
host: "%mailer_host%" |
||||||
|
username: "%mailer_user%" |
||||||
|
password: "%mailer_password%" |
||||||
|
spool: { type: memory } |
||||||
|
|
||||||
|
sonata_block: |
||||||
|
default_contexts: [cms] |
||||||
|
blocks: |
||||||
|
sonata.admin.block.admin_list: |
||||||
|
contexts: [admin] |
||||||
|
|
||||||
|
#sonata.admin_doctrine_orm.block.audit: |
||||||
|
# contexts: [admin] |
||||||
|
|
||||||
|
sonata.block.service.text: |
||||||
|
sonata.block.service.rss: |
||||||
|
sonata.block.service.course: |
||||||
|
sonata.block.service.menu: |
||||||
|
|
||||||
|
# Some specific block from the SonataMediaBundle |
||||||
|
#sonata.media.block.media: |
||||||
|
#sonata.media.block.gallery: |
||||||
|
#sonata.media.block.feature_media: |
||||||
|
|
||||||
|
knp_menu: |
||||||
|
twig: # use "twig: false" to disable the Twig extension and the TwigRenderer |
||||||
|
template: knp_menu.html.twig |
||||||
|
templating: false # if true, enables the helper for PHP templates |
||||||
|
default_renderer: twig # The renderer to use, list is also available by default |
||||||
@ -0,0 +1,36 @@ |
|||||||
|
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: false |
||||||
|
|
||||||
|
monolog: |
||||||
|
handlers: |
||||||
|
main: |
||||||
|
type: stream |
||||||
|
path: "%kernel.logs_dir%/%kernel.environment%.log" |
||||||
|
level: debug |
||||||
|
console: |
||||||
|
type: console |
||||||
|
bubble: false |
||||||
|
# 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: true |
||||||
|
|
||||||
|
#swiftmailer: |
||||||
|
# delivery_address: me@example.com |
||||||
@ -0,0 +1,25 @@ |
|||||||
|
imports: |
||||||
|
- { resource: config.yml } |
||||||
|
|
||||||
|
#framework: |
||||||
|
# validation: |
||||||
|
# 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 |
||||||
@ -0,0 +1,16 @@ |
|||||||
|
imports: |
||||||
|
- { resource: config_dev.yml } |
||||||
|
|
||||||
|
framework: |
||||||
|
test: ~ |
||||||
|
session: |
||||||
|
storage_id: session.storage.mock_file |
||||||
|
profiler: |
||||||
|
collect: false |
||||||
|
|
||||||
|
web_profiler: |
||||||
|
toolbar: false |
||||||
|
intercept_redirects: false |
||||||
|
|
||||||
|
swiftmailer: |
||||||
|
disable_delivery: true |
||||||
@ -0,0 +1,14 @@ |
|||||||
|
# This file is auto-generated during the composer install |
||||||
|
parameters: |
||||||
|
database_driver: pdo_mysql |
||||||
|
database_host: 127.0.0.1 |
||||||
|
database_port: null |
||||||
|
database_name: chamilo10 |
||||||
|
database_user: root |
||||||
|
database_password: root |
||||||
|
mailer_transport: smtp |
||||||
|
mailer_host: 127.0.0.1 |
||||||
|
mailer_user: null |
||||||
|
mailer_password: null |
||||||
|
locale: es |
||||||
|
secret: ThisTokenIsNotSoSecretChangeIt |
||||||
@ -0,0 +1,15 @@ |
|||||||
|
parameters: |
||||||
|
database_driver: pdo_mysql |
||||||
|
database_host: 127.0.0.1 |
||||||
|
database_port: ~ |
||||||
|
database_name: symfony |
||||||
|
database_user: root |
||||||
|
database_password: ~ |
||||||
|
|
||||||
|
mailer_transport: smtp |
||||||
|
mailer_host: 127.0.0.1 |
||||||
|
mailer_user: ~ |
||||||
|
mailer_password: ~ |
||||||
|
|
||||||
|
locale: en |
||||||
|
secret: ThisTokenIsNotSoSecretChangeIt |
||||||
@ -0,0 +1,46 @@ |
|||||||
|
security: |
||||||
|
encoders: |
||||||
|
ChamiloLMS\CoreBundle\Entity\User: |
||||||
|
algorithm: sha1 |
||||||
|
encode_as_base64: false |
||||||
|
iterations: 1 |
||||||
|
|
||||||
|
role_hierarchy: |
||||||
|
ROLE_GLOBAL_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] |
||||||
|
|
||||||
|
ROLE_ADMIN: [ROLE_USER, ROLE_QUESTION_MANAGER, ROLE_SESSION_MANAGER, ROLE_TEACHER, ROLE_DIRECTOR, ROLE_JURY_PRESIDENT] |
||||||
|
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_ANONYMOUS: [ROLE_ANONYMOUS] |
||||||
|
|
||||||
|
ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] |
||||||
|
|
||||||
|
providers: |
||||||
|
users_db: |
||||||
|
entity: { class: ChamiloLMSCoreBundle:User, property: username } |
||||||
|
firewalls: |
||||||
|
dev: |
||||||
|
pattern: ^/(_(profiler|wdt)|css|images|js)/ |
||||||
|
security: false |
||||||
|
|
||||||
|
secured: |
||||||
|
pattern: ^/ |
||||||
|
form_login: |
||||||
|
login_path: login |
||||||
|
check_path: login_check |
||||||
|
success_handler: listener.login_success_handler |
||||||
|
logout: |
||||||
|
path: /secured/logout |
||||||
|
target: / |
||||||
|
success_handler: listener.logout_success_handler |
||||||
|
anonymous: ~ |
||||||
|
|
||||||
|
provider: users_db |
||||||
|
#http_basic: |
||||||
|
# realm: "Secured Demo Area" |
||||||
|
|
||||||
|
access_control: |
||||||
|
#- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https } |
||||||
@ -0,0 +1,27 @@ |
|||||||
|
#!/usr/bin/env php |
||||||
|
<?php |
||||||
|
|
||||||
|
// if you don't want to setup permissions the proper way, just uncomment the following PHP line |
||||||
|
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information |
||||||
|
//umask(0000); |
||||||
|
|
||||||
|
set_time_limit(0); |
||||||
|
|
||||||
|
require_once __DIR__.'/bootstrap.php.cache'; |
||||||
|
require_once __DIR__.'/AppKernel.php'; |
||||||
|
|
||||||
|
use Symfony\Bundle\FrameworkBundle\Console\Application; |
||||||
|
use Symfony\Component\Console\Input\ArgvInput; |
||||||
|
use Symfony\Component\Debug\Debug; |
||||||
|
|
||||||
|
$input = new ArgvInput(); |
||||||
|
$env = $input->getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev'); |
||||||
|
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod'; |
||||||
|
|
||||||
|
if ($debug) { |
||||||
|
Debug::enable(); |
||||||
|
} |
||||||
|
|
||||||
|
$kernel = new AppKernel($env, $debug); |
||||||
|
$application = new Application($kernel); |
||||||
|
$application->run($input); |
||||||
@ -0,0 +1,41 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
|
||||||
|
<!-- http://phpunit.de/manual/current/en/appendixes.configuration.html --> |
||||||
|
<phpunit |
||||||
|
backupGlobals = "false" |
||||||
|
backupStaticAttributes = "false" |
||||||
|
colors = "true" |
||||||
|
convertErrorsToExceptions = "true" |
||||||
|
convertNoticesToExceptions = "true" |
||||||
|
convertWarningsToExceptions = "true" |
||||||
|
processIsolation = "false" |
||||||
|
stopOnFailure = "false" |
||||||
|
syntaxCheck = "false" |
||||||
|
bootstrap = "bootstrap.php.cache" > |
||||||
|
|
||||||
|
<testsuites> |
||||||
|
<testsuite name="Project Test Suite"> |
||||||
|
<directory>../src/*/*Bundle/Tests</directory> |
||||||
|
<directory>../src/*/Bundle/*Bundle/Tests</directory> |
||||||
|
</testsuite> |
||||||
|
</testsuites> |
||||||
|
|
||||||
|
<!-- |
||||||
|
<php> |
||||||
|
<server name="KERNEL_DIR" value="/path/to/your/app/" /> |
||||||
|
</php> |
||||||
|
--> |
||||||
|
|
||||||
|
<filter> |
||||||
|
<whitelist> |
||||||
|
<directory>../src</directory> |
||||||
|
<exclude> |
||||||
|
<directory>../src/*/*Bundle/Resources</directory> |
||||||
|
<directory>../src/*/*Bundle/Tests</directory> |
||||||
|
<directory>../src/*/Bundle/*Bundle/Resources</directory> |
||||||
|
<directory>../src/*/Bundle/*Bundle/Tests</directory> |
||||||
|
</exclude> |
||||||
|
</whitelist> |
||||||
|
</filter> |
||||||
|
|
||||||
|
</phpunit> |
||||||
Loading…
Reference in new issue