Browse Source

Minor - adding license + cleaning white spaces.

Julio Montoya 11 years ago
parent
commit
89b57c8968

+ 1 - 1
src/ChamiloLMS/Command/Template/AsseticDumpCommand.php

@@ -1,5 +1,5 @@
 <?php
 <?php
-
+/* For licensing terms, see /license.txt */
 namespace ChamiloLMS\Command\Template;
 namespace ChamiloLMS\Command\Template;
 
 
 use Symfony\Component\Console\Input\ArrayInput;
 use Symfony\Component\Console\Input\ArrayInput;

+ 1 - 0
src/ChamiloLMS/Component/Auth/LoginListener.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+/* For licensing terms, see /license.txt */
 namespace ChamiloLMS\Component\Auth;
 namespace ChamiloLMS\Component\Auth;
 
 
 use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
 use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;

+ 1 - 1
src/ChamiloLMS/Component/Auth/LoginSuccessHandler.php

@@ -1,5 +1,5 @@
 <?php
 <?php
-
+/* For licensing terms, see /license.txt */
 namespace ChamiloLMS\Component\Auth;
 namespace ChamiloLMS\Component\Auth;
 
 
 use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface;
 use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface;

+ 2 - 2
src/ChamiloLMS/Component/Auth/LogoutSuccessHandler.php

@@ -1,5 +1,5 @@
 <?php
 <?php
-
+/* For licensing terms, see /license.txt */
 namespace ChamiloLMS\Component\Auth;
 namespace ChamiloLMS\Component\Auth;
 
 
 use Symfony\Component\Security\Http\Logout\LogoutSuccessHandlerInterface;
 use Symfony\Component\Security\Http\Logout\LogoutSuccessHandlerInterface;
@@ -35,7 +35,7 @@ class LogoutSuccessHandler implements LogoutSuccessHandlerInterface
     {
     {
         $session = $request->getSession();
         $session = $request->getSession();
         \ChamiloSession::setSession($session);
         \ChamiloSession::setSession($session);
-        
+
         // Chamilo logout
         // Chamilo logout
         $userId = api_get_user_id();
         $userId = api_get_user_id();
         \Online::logout($userId, false);
         \Online::logout($userId, false);

+ 1 - 0
src/ChamiloLMS/Component/Auth/Role.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+/* For licensing terms, see /license.txt */
 namespace ChamiloLMS\Component\Auth;
 namespace ChamiloLMS\Component\Auth;
 /**
 /**
  * Class Role
  * Class Role

+ 1 - 1
src/ChamiloLMS/Component/Console/Output/BufferedOutput.php

@@ -1,5 +1,5 @@
 <?php
 <?php
-
+/* For licensing terms, see /license.txt */
 namespace ChamiloLMS\Component\Console\Output;
 namespace ChamiloLMS\Component\Console\Output;
 
 
 use Symfony\Component\Console\Output\Output;
 use Symfony\Component\Console\Output\Output;

+ 1 - 1
src/ChamiloLMS/Component/DataFilesystem/DataFilesystem.php

@@ -1,5 +1,5 @@
 <?php
 <?php
-
+/* For licensing terms, see /license.txt */
 namespace ChamiloLMS\Component\DataFilesystem;
 namespace ChamiloLMS\Component\DataFilesystem;
 
 
 use Symfony\Component\Finder\Finder;
 use Symfony\Component\Finder\Finder;

+ 6 - 35
src/ChamiloLMS/Component/Editor/Connector.php

@@ -1,5 +1,5 @@
 <?php
 <?php
-
+/* For licensing terms, see /license.txt */
 namespace ChamiloLMS\Component\Editor;
 namespace ChamiloLMS\Component\Editor;
 
 
 /**
 /**
@@ -19,8 +19,10 @@ class Connector
      * Simple function to demonstrate how to control file access using "accessControl" callback.
      * Simple function to demonstrate how to control file access using "accessControl" callback.
      * This method will disable accessing files/folders starting from  '.' (dot)
      * This method will disable accessing files/folders starting from  '.' (dot)
      *
      *
-     * @param  string  $attr  attribute name (read|write|locked|hidden)
-     * @param  string  $path  file path relative to volume root directory started with directory separator
+     * @param string $attr  attribute name (read|write|locked|hidden)
+     * @param string $path  file path relative to volume root directory started with directory separator
+     * @param string $data
+     * @param string $volume
      * @return bool|null
      * @return bool|null
      **/
      **/
     public function access($attr, $path, $data, $volume) {
     public function access($attr, $path, $data, $volume) {
@@ -42,8 +44,7 @@ class Connector
     function logger($cmd, $result, $args, $elfinder)
     function logger($cmd, $result, $args, $elfinder)
     {
     {
         // do something here
         // do something here
-        //echo $cmd;
-
+        // echo $cmd;
         $courseInfo = api_get_course_info();
         $courseInfo = api_get_course_info();
 
 
         /*error_log($cmd);
         /*error_log($cmd);
@@ -66,7 +67,6 @@ class Connector
                     foreach ($result['added'] as $file) {
                     foreach ($result['added'] as $file) {
                         $name = $file['name'];
                         $name = $file['name'];
                         $webalized = \URLify::filter($file['name'], 80);
                         $webalized = \URLify::filter($file['name'], 80);
-                        //error_log($webalized);
                         if (strcmp($name, $webalized) != 0) {
                         if (strcmp($name, $webalized) != 0) {
                             $arg = array('target' => $file['hash'], 'name' => $webalized);
                             $arg = array('target' => $file['hash'], 'name' => $webalized);
                             $elfinder->exec('rename', $arg);
                             $elfinder->exec('rename', $arg);
@@ -83,16 +83,6 @@ class Connector
                             $root = $volume->root();
                             $root = $volume->root();
                             //var/www/chamilogits/data/courses/NEWONE/document
                             //var/www/chamilogits/data/courses/NEWONE/document
                             $realPathRoot = $elfinder->realpath($root);
                             $realPathRoot = $elfinder->realpath($root);
-                            /*
-                            $defaultPath = $volume->defaultPath();
-                            error_log($defaultPath);
-                            $driverId= $volume->driverId();
-                            error_log($root);
-                            error_log($driverId);*/
-
-                            //error_log(print_r($info, 1));
-                            //error_log($realPathRoot);
-                            //error_log($realPath);
                             // Removing course path
                             // Removing course path
                             $realPath = str_replace($realPathRoot, '', $realPath);
                             $realPath = str_replace($realPathRoot, '', $realPath);
                             \FileManager::add_document($courseInfo, $realPath, 'file', intval($file['size']), $file['name']);
                             \FileManager::add_document($courseInfo, $realPath, 'file', intval($file['size']), $file['name']);
@@ -105,23 +95,6 @@ class Connector
                     foreach ($result['removed'] as $file) {
                     foreach ($result['removed'] as $file) {
                         $realFilePath = $file['realpath'];
                         $realFilePath = $file['realpath'];
                         $filePath = str_replace($courseInfo['course_sys_data'].'document', '', $realFilePath);
                         $filePath = str_replace($courseInfo['course_sys_data'].'document', '', $realFilePath);
-                        /*error_log($filePath);
-                        error_log($courseInfo['course_sys_data'].'document');*/
-
-                        /*
-                        $info = $elfinder->exec('file', array('target' => $file['phash']));
-                        error_log(print_r($info,1));
-
-                        $volume = $info['volume'];
-                        $root = $volume->root();
-                        //var/www/chamilogits/data/courses/NEWONE/document
-                        $realPathRoot = $elfinder->realpath($root);
-                        error_log($realPathRoot);
-
-                        $realPath = $file['realpath'];
-                        $realPath = str_replace($realPathRoot, '', $realPath);
-                        error_log($realPath);
-                        error_log($realPathRoot);*/
                         \DocumentManager::delete_document($courseInfo, $filePath, $courseInfo['course_sys_data'].'document');
                         \DocumentManager::delete_document($courseInfo, $filePath, $courseInfo['course_sys_data'].'document');
                     }
                     }
                 }
                 }
@@ -187,9 +160,7 @@ class Connector
                 'locked' => false
                 'locked' => false
             )
             )
         );
         );
-
         /*
         /*
-
         var defaultCommands = [
         var defaultCommands = [
             'open', 'reload', 'home', 'up', 'back', 'forward', 'getfile', 'quicklook',
             'open', 'reload', 'home', 'up', 'back', 'forward', 'getfile', 'quicklook',
             'download', 'rm', 'duplicate', 'rename', 'mkdir', 'mkfile', 'upload', 'copy',
             'download', 'rm', 'duplicate', 'rename', 'mkdir', 'mkfile', 'upload', 'copy',

+ 1 - 1
src/ChamiloLMS/Component/Editor/Editor.php

@@ -1,5 +1,5 @@
 <?php
 <?php
-
+/* For licensing terms, see /license.txt */
 namespace ChamiloLMS\Component\Editor;
 namespace ChamiloLMS\Component\Editor;
 
 
 class Editor
 class Editor

+ 1 - 1
src/ChamiloLMS/Component/Editor/Toolbar/Basic.php

@@ -1,5 +1,5 @@
 <?php
 <?php
-
+/* For licensing terms, see /license.txt */
 namespace ChamiloLMS\Component\Editor\Toolbar;
 namespace ChamiloLMS\Component\Editor\Toolbar;
 
 
 class Basic
 class Basic

+ 6 - 6
src/ChamiloLMS/Component/Editor/Toolbar/Documents.php

@@ -8,13 +8,13 @@ class Documents extends Basic
     public function getConfig()
     public function getConfig()
     {
     {
         $config['toolbarGroups'] = array(
         $config['toolbarGroups'] = array(
-            array('name' => 'document',  'groups' =>array('document', 'doctools')),
-            array('name' => 'clipboard',    'groups' =>array('clipboard', 'undo', )),
-            array('name' => 'editing',    'groups' =>array('clipboard', 'undo', )),
-            //array('name' => 'forms',    'groups' =>array('clipboard', 'undo', )),
+            array('name' => 'document',  'groups' => array('document', 'doctools')),
+            array('name' => 'clipboard', 'groups' => array('clipboard', 'undo')),
+            array('name' => 'editing',   'groups' => array('clipboard', 'undo')),
+            //array('name' => 'forms',   'groups' =>array('clipboard', 'undo')),
             '/',
             '/',
-            array('name' => 'basicstyles',    'groups' =>array('basicstyles', 'cleanup', )),
-            array('name' => 'paragraph',    'groups' =>array('list', 'indent', 'blocks', 'align' )),
+            array('name' => 'basicstyles', 'groups' => array('basicstyles', 'cleanup')),
+            array('name' => 'paragraph',   'groups' => array('list', 'indent', 'blocks', 'align')),
             array('name' => 'links'),
             array('name' => 'links'),
             array('name' => 'insert'),
             array('name' => 'insert'),
             '/',
             '/',

+ 1 - 1
src/ChamiloLMS/Component/Editor/Toolbar/IntroductionTool.php

@@ -1,5 +1,5 @@
 <?php
 <?php
-
+/* For licensing terms, see /license.txt */
 namespace ChamiloLMS\Component\Editor\Toolbar;
 namespace ChamiloLMS\Component\Editor\Toolbar;
 
 
 class IntroductionTool extends Basic
 class IntroductionTool extends Basic

+ 1 - 1
src/ChamiloLMS/Component/Editor/Toolbar/LearningPathDocuments.php

@@ -1,5 +1,5 @@
 <?php
 <?php
-
+/* For licensing terms, see /license.txt */
 namespace ChamiloLMS\Component\Editor\Toolbar;
 namespace ChamiloLMS\Component\Editor\Toolbar;
 
 
 class LearningPathDocuments extends Basic
 class LearningPathDocuments extends Basic

+ 3 - 7
src/ChamiloLMS/Component/Editor/Toolbar/Message.php

@@ -1,5 +1,5 @@
 <?php
 <?php
-
+/* For licensing terms, see /license.txt */
 namespace ChamiloLMS\Component\Editor\Toolbar;
 namespace ChamiloLMS\Component\Editor\Toolbar;
 
 
 class Message extends Basic
 class Message extends Basic
@@ -8,13 +8,9 @@ class Message extends Basic
     public function getConfig()
     public function getConfig()
     {
     {
         $config['toolbarGroups'] = array(
         $config['toolbarGroups'] = array(
-//            array('name' => 'document',  'groups' =>array('mode', 'document', 'doctools')),
-//            array('name' => 'clipboard',    'groups' =>array('clipboard', 'undo', )),
-            //array('name' => 'editing',    'groups' =>array('clipboard', 'undo', )),
-            //array('name' => 'forms',    'groups' =>array('clipboard', 'undo', )),
             '/',
             '/',
-            array('name' => 'basicstyles',    'groups' =>array('basicstyles', 'cleanup', )),
-            array('name' => 'paragraph',    'groups' =>array('list', 'indent', 'blocks', 'align' )),
+            array('name' => 'basicstyles',  'groups' =>array('basicstyles', 'cleanup')),
+            array('name' => 'paragraph',    'groups' =>array('list', 'indent', 'blocks', 'align')),
             array('name' => 'links'),
             array('name' => 'links'),
             array('name' => 'insert'),
             array('name' => 'insert'),
             '/',
             '/',

+ 1 - 6
src/ChamiloLMS/Component/Editor/Toolbar/TestFreeAnswer.php

@@ -1,17 +1,12 @@
 <?php
 <?php
-
+/* For licensing terms, see /license.txt */
 namespace ChamiloLMS\Component\Editor\Toolbar;
 namespace ChamiloLMS\Component\Editor\Toolbar;
 
 
 class TestFreeAnswer extends Basic
 class TestFreeAnswer extends Basic
 {
 {
-
     public function getConfig()
     public function getConfig()
     {
     {
         $config['toolbarGroups'] = array(
         $config['toolbarGroups'] = array(
-//            array('name' => 'document',  'groups' =>array('mode', 'document', 'doctools')),
-//            array('name' => 'clipboard',    'groups' =>array('clipboard', 'undo', )),
-            //array('name' => 'editing',    'groups' =>array('clipboard', 'undo', )),
-            //array('name' => 'forms',    'groups' =>array('clipboard', 'undo', )),
             '/',
             '/',
             array('name' => 'basicstyles',    'groups' =>array('basicstyles', 'cleanup', )),
             array('name' => 'basicstyles',    'groups' =>array('basicstyles', 'cleanup', )),
             array('name' => 'paragraph',    'groups' =>array('list', 'indent', 'blocks', 'align' )),
             array('name' => 'paragraph',    'groups' =>array('list', 'indent', 'blocks', 'align' )),

+ 1 - 1
src/ChamiloLMS/Component/Editor/Toolbar/TestFreeAnswerStrict.php

@@ -1,5 +1,5 @@
 <?php
 <?php
-
+/* For licensing terms, see /license.txt */
 namespace ChamiloLMS\Component\Editor\Toolbar;
 namespace ChamiloLMS\Component\Editor\Toolbar;
 
 
 class TestFreeAnswerStrict extends Basic
 class TestFreeAnswerStrict extends Basic

+ 1 - 2
src/ChamiloLMS/Component/Editor/Toolbar/TestProposedAnswer.php

@@ -1,5 +1,5 @@
 <?php
 <?php
-
+/* For licensing terms, see /license.txt */
 namespace ChamiloLMS\Component\Editor\Toolbar;
 namespace ChamiloLMS\Component\Editor\Toolbar;
 
 
 class TestProposedAnswer
 class TestProposedAnswer
@@ -7,7 +7,6 @@ class TestProposedAnswer
 
 
     public function getConfig()
     public function getConfig()
     {
     {
-
         $config['toolbarGroups'] = array(
         $config['toolbarGroups'] = array(
             //array('name' => 'document'),
             //array('name' => 'document'),
             array('name' => 'clipboard',    'groups' =>array('clipboard', 'undo', )),
             array('name' => 'clipboard',    'groups' =>array('clipboard', 'undo', )),

+ 1 - 1
src/ChamiloLMS/Component/Editor/Toolbar/TestQuestionDescription.php

@@ -1,5 +1,5 @@
 <?php
 <?php
-
+/* For licensing terms, see /license.txt */
 namespace ChamiloLMS\Component\Editor\Toolbar;
 namespace ChamiloLMS\Component\Editor\Toolbar;
 
 
 class TestQuestionDescription
 class TestQuestionDescription

+ 1 - 6
src/ChamiloLMS/Component/Editor/Toolbar/UniqueAnswerImage.php

@@ -1,17 +1,12 @@
 <?php
 <?php
-
+/* For licensing terms, see /license.txt */
 namespace ChamiloLMS\Component\Editor\Toolbar;
 namespace ChamiloLMS\Component\Editor\Toolbar;
 
 
 class UniqueAnswerImage extends Basic
 class UniqueAnswerImage extends Basic
 {
 {
-
     public function getConfig()
     public function getConfig()
     {
     {
         $config['toolbarGroups'] = array(
         $config['toolbarGroups'] = array(
-//            array('name' => 'document',  'groups' =>array('mode', 'document', 'doctools')),
-//            array('name' => 'clipboard',    'groups' =>array('clipboard', 'undo', )),
-            //array('name' => 'editing',    'groups' =>array('clipboard', 'undo', )),
-            //array('name' => 'forms',    'groups' =>array('clipboard', 'undo', )),
             '/',
             '/',
             array('name' => 'basicstyles',    'groups' =>array('basicstyles', 'cleanup', )),
             array('name' => 'basicstyles',    'groups' =>array('basicstyles', 'cleanup', )),
             array('name' => 'paragraph',    'groups' =>array('list', 'indent', 'blocks', 'align' )),
             array('name' => 'paragraph',    'groups' =>array('list', 'indent', 'blocks', 'align' )),