Browse Source

Merge branch 'master' of github.com:chamilo/chamilo-lms

Julio Montoya 11 years ago
parent
commit
41d8cef684

+ 0 - 4
.gitignore

@@ -22,11 +22,7 @@ logs/*
 *.log
 
 # IDE settings
-
 .idea
-.idea/*
-.idea/dictionaries/*
-.idea/cssxfire.xml
 
 *.orig
 nbproject/*

+ 51 - 2
README.md

@@ -1,20 +1,69 @@
 Chamilo LMS
 =============
 
-A next generation Learning Content Management system focused on ease of use, collaboration and sharing.
+A next generation Learning Management system focused on ease of use, collaboration and sharing.
 See documentation/index.html for a complete overview of Chamilo.
 
+Versions differentiation
+------------------------
+
+Beware that the Chamilo Association hosts *two completely different applications*: Chamilo LMS (this software here) and Chamilo LCMS (a more experimental application focused on sharing learning objects, mostly, hosted on Bitbucket, not here).
+https://campus.chamilo.org, https://stable.chamilo.org and the vast majority of Chamilo installations around the world (98%) use Chamilo LMS.
+
+Inside this Chamilo LMS project itself, there are two main "branches":
+* Chamilo LMS 1.9.x offers a stable version of Chamilo that is made more stable with each new version
+* Chamilo LMS HEAD (the default if you download it from Github) is in active development and will soon spawn the new 1.10 version (or v10) of Chamilo LMS. It is NOT to be used in production right now.
+
+If you are in search of the latest patches to your production installation, you should choose 1.9.x. If you are adventurous and look forward to contribute to something that *mostly* works but is still under heavy development, you should stick with the default HEAD branch.
+
+Chamilo LMS v10 should be out around January 2014, so not too far away, and comes with an improved files structure and a lot of new dependencies/packages coming from Symfony and Composer. If you have time on your hands and are looking for long term contributions, that's where we'd like you to help.
+
 Installation
 ------------
 
 You need a working web server + PHP + MySQL setup.
-Refer to documentation/installation_guide.html for instructions.
+
+To install from Git (which means installing an unstable, development version of this application), do the following:
+
+* Create a directory where you will store the Chamilo LMS files (beware, the Git repo is about 600MB in size now)
+* Install git (if that's not already the case)
+* Clone the Chamilo LMS repo from Github:
+```
+git clone https://github.com/chamilo/chamilo-lms.git the-directory-you-created
+```
+
+Once you have downloaded it, you will need to follow the installation instructions. You can get the latest version inside the documentation/ folder of your recently-downloaded Chamilo, or you can see them online for the latest *stable* version at https://stable.chamilo.org/documentation/installation_guide.html
+
+Before you start the installation procedure, if you want to work on Chamilo LMS 1.9.x, you'll need to do this:
+```
+cd the-directory-you-created
+git checkout --track origin/1.9.x
+git config --global push.default current
+```
+
+This way, you'll stick to the 1.9.x branch only in this directory (your installation will be 1.9.x only), and when sending commits, they will automatically be sent to the 1.9.x branch.
+
+Finally, if you are really looking into contributing back to Chamilo, you should (really) create yourself a Github account and "fork this project". You would then download Chamilo from your own Github repository first, then send changes to your repository and finally (once you're sure they're matching our coding conventions), submit a "Pull request" to Chamilo. This is the cleanest, more time-saving way to do it!
 
 Reporting bugs
 --------------
 
 Please submit any bugs, feature requests and non-trivial patches to
 http://support.chamilo.org/
+Always make sure you look for the Chamilo LMS subproject when submittingbug reports, contributing, asking on the forum, IRC, etc.
+
+Contributing
+------------
+
+When contributing patches (which we always welcome, as long as you agree to do that under the GNU/GPLv3 license), please ensure you respect our coding conventions: https://support.chamilo.org/projects/1/wiki/Coding_conventions (mostly PSR-2 with a few additional rules and hints).
+
+Manual testing
+--------------
+
+You can always check the impact of your changes and confirm with other users on the following portals, which are automatically updated every 15 minutes:
+* https://stable.chamilo.org for versions 1.9.x
+* https://unstable.chamilo.org for development version (currently 1.10) - this one doesn't automatically apply database changes, so it is more likely to break often
+These are *NOT* production portals. Your content *WILL* be deleted once every now and then. It is completely public and anyone can enter and delete your content if they want to. DO NOT put important content there.
 
 Learn more
 ----------

+ 0 - 46
config/configuration.dist.yml.php

@@ -1,46 +0,0 @@
-<?php
-/** This script is only use when using the console.php chamilo:install command */
-/**
- * Database settings
- */
-// Your MySQL server
-$_configuration['db_host']     = 'localhost';
-// Your MySQL username
-$_configuration['db_user']     = 'root';
-// Your MySQL password
-$_configuration['db_password'] = 'root';
-
-// Prefix for course tables (IF NOT EMPTY, can be replaced by another prefix, else leave empty)
-/*$_configuration['table_prefix']          = '';
-// prefix all created bases (for courses) with this string
-$_configuration['db_prefix']             = '';*/
-// main Chamilo database
-$_configuration['main_database']         = 'chamilo';
-
-/**
- * Directory settings
- */
-// URL to the root of your Chamilo installation, e.g.: http://www.mychamilo.com/
-// Comment this line if you want to enable multiple URLs
-$_configuration['root_web']       = 'http://localhost/chamilo';
-$_configuration['root_sys']       = '/var/www/chamilo';
-
-/**
- * Misc. settings
- */
-// Security word for password recovery
-$_configuration['security_key']      = md5(uniqid(rand().time()));
-// Hash function method
-$_configuration['password_encryption']      = 'sha1';
-// You may have to restart your web server if you change this
-$_configuration['session_stored_in_db']     = false;
-// Session lifetime
-$_configuration['session_lifetime']         = 3600;
-// Activation for multi-url access
-//$_configuration['multiple_access_urls']   = true;
-//Deny the elimination of users
-$_configuration['deny_delete_users']        = false;
-//Prevent all admins from using the "login_as" feature
-$_configuration['login_as_forbidden_globally'] = false;
-// Version settings
-$_configuration['system_version']           = '1.10.0';

+ 1 - 1
main/inc/global.inc.php

@@ -176,7 +176,7 @@ $app['debug'] = isset($_configuration['debug']) ? $_configuration['debug'] : fal
 $app['show_profiler'] = isset($_configuration['show_profiler']) ? $_configuration['show_profiler'] : false;
 
 // Enables assetic in order to load 1 compressed stylesheet or split files
-$app['assetic.enabled'] = false;
+$app['assetic.enabled'] = $app['debug'];
 // Dumps assets
 $app['assetic.auto_dump_assets'] = false;
 

+ 7 - 3
main/newscorm/learnpath.class.php

@@ -4074,15 +4074,19 @@ class learnpath
      * @param    integer    Learnpath ID
      * @param    string    New visibility
      */
-    public function toggle_visibility($lp_id, $set_visibility = 1)
+    public function toggle_visibility($lp_id, $set_visibility = 1, $course_id = null)
     {
         //if ($this->debug > 0) { error_log('New LP - In learnpath::toggle_visibility()', 0); }
         $action = 'visible';
         if ($set_visibility != 1) {
             $action = 'invisible';
         }
-
-        return api_item_property_update(api_get_course_info(), TOOL_LEARNPATH, $lp_id, $action, api_get_user_id());
+        if (!empty($course_id)) {
+            $course = api_get_course_info_by_id($course_id);
+        } else {
+            $course = api_get_course_info();
+        }
+        return api_item_property_update($course, TOOL_LEARNPATH, $lp_id, $action, api_get_user_id());
     }
 
     /**

+ 2 - 2
main/newscorm/lp_view.php

@@ -444,9 +444,9 @@ if ($show_audioplayer) {
     // hub 26-05-2010 Fullscreen or not fullscreen
     $height = '100%';
     if ($_SESSION['oLP']->mode == 'fullscreen') {
-        echo '<iframe id="content_id_blank" name="content_name_blank" src="blank.php" border="0" frameborder="0" style="width:100%;height:'.$height.'" ></iframe>';
+        echo '<iframe id="content_id_blank" name="content_name_blank" src="blank.php" border="0" frameborder="0" style="width:100%;height:'.$height.'" allowFullScreen></iframe>';
     } else {
-        echo '<iframe id="content_id" name="content_name" src="'.$src.'" border="0" frameborder="0" style="display: block; width:100%;height:'.$height.'"></iframe>';
+        echo '<iframe id="content_id" name="content_name" src="'.$src.'" border="0" frameborder="0" style="display: block; width:100%;height:'.$height.'" allowFullScreen></iframe>';
     }
     ?>
 </div>

+ 7 - 5
src/ChamiloLMS/Command/Template/AsseticDumpCommand.php

@@ -28,7 +28,7 @@ class AsseticDumpCommand extends Command
     /**
      * @param Console\Input\InputInterface $input
      * @param Console\Output\OutputInterface $output
-     * @return int|null|void
+     * @return integer|null|boolean|void
      */
     protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
     {
@@ -49,10 +49,10 @@ class AsseticDumpCommand extends Command
         if (empty($theme)) {
             $dialog = $this->getHelperSet()->get('dialog');
             if (!$dialog->askConfirmation(
-                $output,
-                '<question>Are you sure you want to dump css/js of all themes?</question>(y/N)',
-                false
-            )
+                    $output,
+                    '<question>Are you sure you want to dump css/js of all themes?</question>(y/N)',
+                    false
+                )
             ) {
                 return;
             }
@@ -89,5 +89,7 @@ class AsseticDumpCommand extends Command
             }
         }
         $output->writeln('<info>Dump finished</info>');
+
+        return true;
     }
 }