Browse Source

Merge branch '1.10.x' into bootstrap

aragonc 9 years ago
parent
commit
cb6d3fda03
100 changed files with 1227 additions and 524 deletions
  1. 1 1
      README.md
  2. 178 0
      app/Migrations/Schema/V110/Version20150821150000.php
  3. 67 0
      app/Migrations/Schema/V110/Version20150825141100.php
  4. 5 0
      app/Resources/public/css/base.css
  5. 3 1
      index.php
  6. 1 1
      main/admin/add_courses_to_usergroup.php
  7. 1 1
      main/admin/add_users_to_usergroup.php
  8. 1 1
      main/admin/class_list.php
  9. 0 1
      main/admin/dashboard_add_users_to_user.php
  10. 0 3
      main/admin/index.php
  11. 1 1
      main/admin/user_add.php
  12. 10 4
      main/admin/user_edit.php
  13. 4 1
      main/auth/sso/sso.Drupal.class.php
  14. 1 4
      main/exercice/Draggable.php
  15. 1 3
      main/exercice/MatchingDraggable.php
  16. 7 0
      main/exercice/admin.php
  17. 2 1
      main/exercice/answer.class.php
  18. 4 2
      main/exercice/calculated_answer.class.php
  19. 7 6
      main/exercice/exercise_admin.php
  20. 1 1
      main/exercice/exercise_submit.php
  21. 3 5
      main/exercice/fill_blanks.class.php
  22. 4 4
      main/exercice/freeanswer.class.php
  23. 3 3
      main/exercice/global_multiple_answer.class.php
  24. 54 50
      main/exercice/multiple_answer_combination.class.php
  25. 7 2
      main/exercice/multiple_answer_combination_true_false.class.php
  26. 32 19
      main/exercice/multiple_answer_true_false.class.php
  27. 1 0
      main/exercice/oral_expression.class.php
  28. 15 5
      main/exercice/overview.php
  29. 2 2
      main/exercice/result.php
  30. 1 3
      main/exercice/unique_answer.class.php
  31. 2 3
      main/gradebook/gradebook_edit_all.php
  32. 10 7
      main/gradebook/lib/be/exerciselink.class.php
  33. 0 6
      main/group/import.php
  34. 1 1
      main/inc/global_error_message.inc.php
  35. 3 0
      main/inc/lib/course_category.lib.php
  36. 6 7
      main/inc/lib/display.lib.php
  37. 14 10
      main/inc/lib/events.lib.php
  38. 6 1
      main/inc/lib/exercise.lib.php
  39. 1 0
      main/inc/lib/exercise_show_functions.lib.php
  40. 22 2
      main/inc/lib/formvalidator/Element/DatePicker.php
  41. 22 2
      main/inc/lib/formvalidator/Element/DateTimePicker.php
  42. 14 9
      main/inc/lib/formvalidator/Element/HtmlEditor.php
  43. 13 2
      main/inc/lib/formvalidator/FormValidator.class.php
  44. 10 4
      main/inc/lib/myspace.lib.php
  45. 4 4
      main/inc/lib/nusoap/class.nusoap_base.php
  46. 8 7
      main/inc/lib/nusoap/class.soap_server.php
  47. 147 147
      main/inc/lib/nusoap/class.wsdl.php
  48. 5 5
      main/inc/lib/pdf.lib.php
  49. 14 6
      main/inc/lib/plugin.lib.php
  50. 7 2
      main/inc/lib/skill.lib.php
  51. 15 3
      main/inc/lib/template.lib.php
  52. 5 2
      main/inc/lib/usermanager.lib.php
  53. 2 1
      main/inc/lib/userportal.lib.php
  54. 7 1
      main/inc/local.inc.php
  55. 13 11
      main/install/data.sql
  56. 22 5
      main/install/index.php
  57. 2 2
      main/install/install.lib.php
  58. 47 0
      main/install/profiles/dev.json
  59. 116 0
      main/install/profiles/hr.json
  60. 23 0
      main/install/profiles/open.json
  61. 41 0
      main/install/profiles/prod.json
  62. 0 1
      main/lang/arabic/trad4all.inc.php
  63. 0 1
      main/lang/asturian/trad4all.inc.php
  64. 0 2
      main/lang/basque/trad4all.inc.php
  65. 0 2
      main/lang/brazilian/trad4all.inc.php
  66. 0 2
      main/lang/bulgarian/trad4all.inc.php
  67. 70 2
      main/lang/catalan/trad4all.inc.php
  68. 0 1
      main/lang/croatian/trad4all.inc.php
  69. 0 2
      main/lang/dutch/trad4all.inc.php
  70. 6 3
      main/lang/english/trad4all.inc.php
  71. 15 5
      main/lang/french/trad4all.inc.php
  72. 0 2
      main/lang/galician/trad4all.inc.php
  73. 0 2
      main/lang/german/trad4all.inc.php
  74. 0 2
      main/lang/greek/trad4all.inc.php
  75. 0 1
      main/lang/hungarian/trad4all.inc.php
  76. 0 2
      main/lang/italian/trad4all.inc.php
  77. 0 2
      main/lang/latvian/trad4all.inc.php
  78. 0 1
      main/lang/lithuanian/trad4all.inc.php
  79. 0 1
      main/lang/macedonian/trad4all.inc.php
  80. 0 2
      main/lang/polish/trad4all.inc.php
  81. 0 1
      main/lang/portuguese/trad4all.inc.php
  82. 0 1
      main/lang/quechua_cusco/trad4all.inc.php
  83. 1 3
      main/lang/romanian/trad4all.inc.php
  84. 0 1
      main/lang/russian/trad4all.inc.php
  85. 0 2
      main/lang/slovak/trad4all.inc.php
  86. 0 2
      main/lang/slovenian/trad4all.inc.php
  87. 62 60
      main/lang/spanish/trad4all.inc.php
  88. 0 1
      main/lang/swedish/trad4all.inc.php
  89. 0 1
      main/lang/trad_chinese/trad4all.inc.php
  90. 1 4
      main/mySpace/course.php
  91. 12 10
      main/mySpace/myStudents.php
  92. 6 3
      main/mySpace/session.php
  93. 0 1
      main/mySpace/student.php
  94. 15 8
      main/mySpace/teachers.php
  95. 2 2
      main/newscorm/learnpath.class.php
  96. 5 2
      main/newscorm/learnpathItem.class.php
  97. 1 1
      main/newscorm/lp_add_audio.php
  98. 1 1
      main/newscorm/lp_ajax_save_item.php
  99. 1 1
      main/session/session_user_edit.php
  100. 10 8
      main/social/home.php

+ 1 - 1
README.md

@@ -53,7 +53,7 @@ git config --global push.default current
 From the Chamilo folder (in which you should be now if you followed the previous steps), launch:
 
 ```
-composer global require "fxp/composer-asset-plugin:1.0.0"
+composer global require "fxp/composer-asset-plugin:1.0.3"
 composer update
 ```
 

+ 178 - 0
app/Migrations/Schema/V110/Version20150821150000.php

@@ -0,0 +1,178 @@
+<?php
+/* For licensing terms, see /license.txt */
+
+namespace Application\Migrations\Schema\V110;
+
+use Application\Migrations\AbstractMigrationChamilo;
+use Doctrine\DBAL\Schema\Schema;
+
+/**
+ * Class Version20150821150000
+ *
+ * @package Application\Migrations\Schema\V11010
+ */
+class Version20150821150000 extends AbstractMigrationChamilo
+{
+
+    /**
+     * @param Schema $schema
+     */
+    public function up(Schema $schema)
+    {
+        $entityManage = $this->getEntityManager();
+
+        $deleteOptions = $entityManage->createQueryBuilder();
+        $deleteSettings = $entityManage->createQueryBuilder();
+
+        $deleteOptions->delete('ChamiloCoreBundle:SettingsOptions', 'o')
+            ->andWhere(
+                $deleteOptions->expr()->in(
+                    'o.variable',
+                    [
+                        'display_mini_month_calendar'
+                    ]
+                )
+            );
+        $deleteOptions->getQuery()->execute();
+
+        $deleteSettings->delete('ChamiloCoreBundle:SettingsCurrent', 's')
+            ->andWhere(
+                $deleteSettings->expr()->in(
+                    's.variable',
+                    [
+                        'display_mini_month_calendar'
+                    ]
+                )
+            );
+        $deleteSettings->getQuery()->execute();
+        $deleteOptions->delete('ChamiloCoreBundle:SettingsOptions', 'o')
+            ->andWhere(
+                $deleteOptions->expr()->in(
+                    'o.variable',
+                    [
+                        'display_upcoming_events'
+                    ]
+                )
+            );
+        $deleteOptions->getQuery()->execute();
+
+        $deleteSettings->delete('ChamiloCoreBundle:SettingsCurrent', 's')
+            ->andWhere(
+                $deleteSettings->expr()->in(
+                    's.variable',
+                    [
+                        'display_upcoming_events'
+                    ]
+                )
+            );
+        $deleteSettings->getQuery()->execute();
+        $deleteSettings->delete('ChamiloCoreBundle:SettingsCurrent', 's')
+            ->andWhere(
+                $deleteSettings->expr()->in(
+                    's.variable',
+                    [
+                        'number_of_upcoming_events'
+                    ]
+                )
+            );
+        $deleteSettings->getQuery()->execute();
+
+        $deleteOptions->delete('ChamiloCoreBundle:SettingsOptions', 'o')
+            ->andWhere(
+                $deleteOptions->expr()->in(
+                    'o.variable',
+                    [
+                        'allow_reservation'
+                    ]
+                )
+            );
+        $deleteOptions->getQuery()->execute();
+
+        $deleteSettings->delete('ChamiloCoreBundle:SettingsCurrent', 's')
+            ->andWhere(
+                $deleteSettings->expr()->in(
+                    's.variable',
+                    [
+                        'allow_reservation'
+                    ]
+                )
+            );
+        $deleteSettings->getQuery()->execute();
+    }
+
+    /**
+     * @param Schema $schema
+     */
+    public function down(Schema $schema)
+    {
+        $this->addSettingCurrent(
+            'display_mini_month_calendar',
+            null,
+            'radio',
+            'Tools',
+            'true',
+            'DisplayMiniMonthCalendarTitle',
+            'DisplayMiniMonthCalendarComment',
+            null,
+            null,
+            1,
+            false,
+            false,
+            [
+                0 => ['value' => 'true', 'text' => 'Yes'],
+                1 => ['value' => 'false', 'text' => 'No']
+            ]
+        );
+        $this->addSettingCurrent(
+            'display_upcoming_events',
+            null,
+            'radio',
+            'Tools',
+            'true',
+            'DisplayUpcomingEventsTitle',
+            'DisplayUpcomingEventsComment',
+            null,
+            null,
+            1,
+            false,
+            false,
+            [
+                0 => ['value' => 'true', 'text' => 'Yes'],
+                1 => ['value' => 'false', 'text' => 'No']
+            ]
+        );
+        $this->addSettingCurrent(
+            'number_of_upcoming_events',
+            null,
+            'textfield',
+            'Tools',
+            '1',
+            'NumberOfUpcomingEventsTitle',
+            'NumberOfUpcomingEventsComment',
+            null,
+            null,
+            1,
+            false,
+            false
+        );
+        $this->addSettingCurrent(
+            'allow_reservation',
+            null,
+            'radio',
+            'Tools',
+            'false',
+            'AllowReservationTitle',
+            'AllowReservationComment',
+            null,
+            null,
+            1,
+            true,
+            false,
+            [
+                0 => ['value' => 'true', 'text' => 'Yes'],
+                1 => ['value' => 'false', 'text' => 'No']
+            ]
+        );
+    }
+
+}

+ 67 - 0
app/Migrations/Schema/V110/Version20150825141100.php

@@ -0,0 +1,67 @@
+<?php
+/* For licensing terms, see /license.txt */
+
+namespace Application\Migrations\Schema\V110;
+
+use Application\Migrations\AbstractMigrationChamilo;
+use Doctrine\DBAL\Schema\Schema;
+
+/**
+ * Calendar color
+ */
+class Version20150825141100 extends AbstractMigrationChamilo
+{
+    /**
+     * @param Schema $schema
+     */
+    public function up(Schema $schema)
+    {
+        $this->addSettingCurrent(
+            'show_full_skill_name_on_skill_wheel',
+            null,
+            'radio',
+            'Platform',
+            'false',
+            'ShowFullSkillNameOnSkillWheelTitle',
+            'ShowFullSkillNameOnSkillWheelComment',
+            null,
+            null,
+            1,
+            false,
+            true,
+            [
+                ['value' => 'true', 'text' => 'Yes'],
+                ['value' => 'false', 'text' => 'No']
+            ]
+        );
+    }
+
+    /**
+     * @param Schema $schema
+     */
+    public function down(Schema $schema)
+    {
+        $entityManage = $this->getEntityManager();
+
+        $deleteOptions = $entityManage->createQueryBuilder();
+        $deleteSettings = $entityManage->createQueryBuilder();
+
+        $deleteOptions->delete('ChamiloCoreBundle:SettingsOptions', 'o')
+            ->andWhere(
+                $deleteOptions->expr()->in(
+                    'o.variable',
+                    ['show_full_skill_name_on_skill_wheel']
+                )
+            );
+        $deleteOptions->getQuery()->execute();
+
+        $deleteSettings->delete('ChamiloCoreBundle:SettingsCurrent', 's')
+            ->andWhere(
+                $deleteSettings->expr()->in(
+                    's.variable',
+                    ['show_full_skill_name_on_skill_wheel']
+                )
+            );
+        $deleteSettings->getQuery()->execute();
+    }
+}

+ 5 - 0
app/Resources/public/css/base.css

@@ -947,6 +947,7 @@ button.next.disabled {
     border-radius: 10px;
     border-width: 1px;
     border-style: solid;
+    border-color: #999;
     padding:6px;
 }
 .confirmation-message img, .error-message img, .normal-message img, .warning-message img {
@@ -5675,6 +5676,10 @@ div#chat-remote-video video {
   font-size: 12px;
   color: #666666;
 }
+.install-steps-menu li.current-step{
+    font-weight: bold;
+}
+
 #about-session .description-course{
   padding: 10px;
   color: #666666;

+ 3 - 1
index.php

@@ -35,9 +35,11 @@ $controller = new IndexManager($header_title);
 $loginFailed = isset($_GET['loginFailed']) ? true : isset($loginFailed);
 
 if (!empty($_GET['logout'])) {
-    $controller->logout();
+    $redirect = !empty($_GET['no_redirect']) ? false : true;
+    $controller->logout($redirect);
 }
 
+
 /* Table definitions */
 
 /* Constants and CONFIGURATION parameters */

+ 1 - 1
main/admin/add_courses_to_usergroup.php

@@ -102,7 +102,7 @@ $searchForm->addElement('hidden', 'id', $id);
 foreach ($filters as $param) {
     $searchForm->addElement($param['type'], $param['name'], $param['label']);
 }
-$searchForm->addElement('button', 'submit', get_lang('Search'));
+$searchForm->addButtonSearch();
 
 $filterData = array();
 if ($searchForm->validate()) {

+ 1 - 1
main/admin/add_users_to_usergroup.php

@@ -202,7 +202,7 @@ $searchForm->addElement('hidden', 'id', $id);
 foreach ($filters as $param) {
     $searchForm->addElement($param['type'], $param['name'], $param['label']);
 }
-$searchForm->addElement('button', 'submit', get_lang('Search'));
+$searchForm->addButtonSearch();
 
 $filterData = array();
 if ($searchForm->validate()) {

+ 1 - 1
main/admin/class_list.php

@@ -103,7 +103,7 @@ $renderer =& $form->defaultRenderer();
 $renderer->setCustomElementTemplate('<span>{element}</span> ');
 $form->addElement('text', 'keyword', get_lang('Keyword'));
 $form->addElement('button', 'submit', get_lang('Search'));
-$content .= $form->return_form();
+$content .= $form->returnForm();
 
 // Create the sortable table with class information
 $table = new SortableTable('classes', 'get_number_of_classes', 'get_class_data', 1);

+ 0 - 1
main/admin/dashboard_add_users_to_user.php

@@ -261,7 +261,6 @@ foreach ($filters as $param) {
     $searchForm->addElement($param['type'], $param['name'], $param['label']);
 }
 $searchForm->addButtonSearch(get_lang('Search'));
-//$searchForm->addElement('button', 'submit', get_lang('Search'));
 
 $filterData = array();
 if ($searchForm->validate()) {

+ 0 - 3
main/admin/index.php

@@ -248,9 +248,6 @@ if (api_is_platform_admin()) {
         }
     }
 
-    if (api_get_setting('allow_reservation') == 'true') {
-        $items[] = array('url' => '../reservation/m_category.php', 'label' => get_lang('BookingSystem'));
-    }
     if (api_get_setting('allow_terms_conditions') == 'true') {
         $items[] = array('url' => 'legal_add.php', 'label' => get_lang('TermsAndConditions'));
     }

+ 1 - 1
main/admin/user_add.php

@@ -260,7 +260,7 @@ $form->addGroup($group, 'mail', get_lang('SendMailToNewUser'), '&nbsp;');
 // Expiration Date
 $form->addElement('radio', 'radio_expiration_date', get_lang('ExpirationDate'), get_lang('NeverExpires'), 0);
 $group = array ();
-$group[] = $form->createElement('radio', 'radio_expiration_date', null, get_lang('On'), 1);
+$group[] = $form->createElement('radio', 'radio_expiration_date', null, get_lang('Enabled'), 1);
 $group[] = $form->createElement(
     'DateTimePicker',
     'expiration_date',

+ 10 - 4
main/admin/user_edit.php

@@ -17,6 +17,8 @@ api_protect_super_admin($user_id, null, true);
 
 $is_platform_admin = api_is_platform_admin() ? 1 : 0;
 
+$userInfo = api_get_user_info($user_id);
+
 $htmlHeadXtra[] = '
 <script>
 var is_platform_id = "'.$is_platform_admin.'";
@@ -169,6 +171,13 @@ if (api_get_setting('login_is_email') != 'true') {
     $form->addRule('username', get_lang('UserTaken'), 'username_available', $user_data['username']);
 }
 
+if (isset($extAuthSource) && !empty($extAuthSource) && count($extAuthSource) > 0) {
+    $form->addLabel(
+        get_lang('ExternalAuthentication'),
+        $userInfo['auth_source']
+    );
+}
+
 // Password
 $form->addElement('radio', 'reset_password', get_lang('Password'), get_lang('DontResetPassword'), 0);
 $nb_ext_auth_source_added = 0;
@@ -202,7 +211,6 @@ $group[] = $form->createElement(
     array('onkeydown' => 'javascript: password_switch_radio_button();')
 );
 $form->addGroup($group, 'password', null, '', false);
-//$form->addGroupRule('password', 'password', 'required', null, 1);
 
 // Status
 $status = array();
@@ -258,7 +266,7 @@ if (!$user_data['platform_admin']) {
 	// Expiration Date
 	$form->addElement('radio', 'radio_expiration_date', get_lang('ExpirationDate'), get_lang('NeverExpires'), 0);
 	$group = array ();
-	$group[] = $form->createElement('radio', 'radio_expiration_date', null, get_lang('On'), 1);
+	$group[] = $form->createElement('radio', 'radio_expiration_date', null, get_lang('Enabled'), 1);
 	$group[] = $form->createElement('DateTimePicker', 'expiration_date', null, array('onchange' => 'javascript: enable_expiration_date();'));
 	$form->addGroup($group, 'max_member_group', null, '', false);
 
@@ -311,7 +319,6 @@ if ($form->validate()) {
 	if ($user['status'] == DRH && $is_user_subscribed_in_course) {
 		$error_drh = true;
 	} else {
-        $userInfo = api_get_user_info($user_id);
 		$picture_element = $form->getElement('picture');
 		$picture = $picture_element->getValue();
 
@@ -414,7 +421,6 @@ $bigImage = Usermanager::getUserPicture(api_get_user_id(), USER_IMAGE_SIZE_BIG);
 $normalImage = Usermanager::getUserPicture(api_get_user_id(), USER_IMAGE_SIZE_ORIGINAL);
 $content .= '<a class="expand-image" href="'.$bigImage.'" /><img src="'.$normalImage.'"></a>';
 
-
 // Display form
 $content .= $form->returnForm();
 

+ 4 - 1
main/auth/sso/sso.Drupal.class.php

@@ -53,8 +53,11 @@ class ssoDrupal
      */
     public function logout()
     {
+        // no_redirect means Drupal sent the signal to logout. When redirecting to Drupal, the $_GET['stop'] param is
+        // set to 1, to allow Drupal to know that this is it, the logout is already done in Chamilo and there's no
+        // need to do it again
         if (empty($_GET['no_redirect'])) {
-            header('Location: '.$this->deauth_url);
+            header('Location: '.$this->deauth_url.'&stop=1');
         } else {
             header('Location: '.$this->protocol.$this->domain);
         }

+ 1 - 4
main/exercice/Draggable.php

@@ -1,5 +1,4 @@
 <?php
-
 /* For licensing terms, see /license.txt */
 
 /**
@@ -61,7 +60,7 @@ class Draggable extends Question
 
             if (count($answer->nbrAnswers) > 0) {
                 $nb_matches = $nb_options = 0;
-                
+
                 for ($i = 1; $i <= $answer->nbrAnswers; $i++) {
                     if ($answer->isCorrect($i)) {
                         $nb_matches++;
@@ -134,7 +133,6 @@ class Draggable extends Question
         }
 
         $form->addHtml('</tbody></table>');
-        $group = array();
 
         $renderer->setElementTemplate(
             '<div class="form-group"><div class="col-sm-offset-2">{element}',
@@ -220,5 +218,4 @@ class Draggable extends Question
 
         return $header;
     }
-
 }

+ 1 - 3
main/exercice/MatchingDraggable.php

@@ -1,5 +1,4 @@
 <?php
-
 /* For licensing terms, see /license.txt */
 
 /**
@@ -205,7 +204,7 @@ class MatchingDraggable extends Question
 
     /**
      * Process the creation of answers
-     * @param type $form
+     * @param FormValidator $form
      */
     public function processAnswersCreation($form)
     {
@@ -258,5 +257,4 @@ class MatchingDraggable extends Question
 
         return $header;
     }
-
 }

+ 7 - 0
main/exercice/admin.php

@@ -336,6 +336,13 @@ function multiple_answer_true_false_onchange(variable) {
 
 </script>';
 
+$htmlHeadXtra[] = api_get_js('jquery.jsPlumb.all.js');
+
+$template = new Template();
+
+$htmlHeadXtra[] = $template->fetch('default/exercise/submit.js.tpl');
+$htmlHeadXtra[] = api_get_js('d3/jquery.xcolor.js');
+
 $htmlHeadXtra[] = "<script type=\"text/javascript\" src=\"../plugin/hotspot/JavaScriptFlashGateway.js\"></script>
 <script src=\"../plugin/hotspot/hotspot.js\" type=\"text/javascript\"></script>
 <script language=\"JavaScript\" type=\"text/javascript\">

+ 2 - 1
main/exercice/answer.class.php

@@ -748,7 +748,8 @@ class Answer
      * Get the necessary JavaScript for some answers
      * @return string
      */
-    public function getJs() {
+    public function getJs()
+    {
         //if ($this->questionId == 2)
         return "<script>
                 jsPlumb.ready(function() {

+ 4 - 2
main/exercice/calculated_answer.class.php

@@ -1,5 +1,6 @@
 <?php
 /* For licensing terms, see /license.txt */
+
 /**
  *  Class CalculatedAnswer
  *  This class contains calculated answer form and answer processing functions
@@ -24,7 +25,7 @@ class CalculatedAnswer extends Question
 
     /**
      * function which redefines Question::createAnswersForm
-     * @param the formvalidator instance
+     * @param FormValidator $form
      */
     function createAnswersForm($form)
     {
@@ -161,7 +162,7 @@ class CalculatedAnswer extends Question
         $form->addRule('answerVariations', get_lang('GiveAnswerVariations'),'required');
         $form->setDefaults(array('answerVariations' => '1'));
 
-        global $text, $class;
+        global $text;
         // setting the save button here and not in the question class.php
         $form->addButtonSave($text, 'submitQuestion');
 
@@ -273,6 +274,7 @@ class CalculatedAnswer extends Question
                 )
             )
         );
+
         return empty($result) ? false : true;
     }
 }

+ 7 - 6
main/exercice/exercise_admin.php

@@ -92,8 +92,6 @@ $(document).ready(function () {
 });
 </script>';
 
-// INIT EXERCISE
-
 $objExercise = new Exercise();
 $course_id = api_get_course_int_id();
 
@@ -139,17 +137,20 @@ if ($form->validate()) {
     echo '<div class="actions">';
 
     if ($objExercise->id != 0) {
-        echo '<a href="admin.php?'.api_get_cidReq().'&exerciseId='.$objExercise->id.'">' . Display :: return_icon('back.png', get_lang('GoBackToQuestionList'),'',ICON_SIZE_MEDIUM).'</a>';
+        echo '<a href="admin.php?'.api_get_cidReq().'&exerciseId='.$objExercise->id.'">' .
+            Display :: return_icon('back.png', get_lang('GoBackToQuestionList'), '', ICON_SIZE_MEDIUM).'</a>';
     } else {
         if (!empty($_GET['lp_id']) || !empty($_POST['lp_id'])){
             if (!empty($_POST['lp_id'])){
-                $lp_id = Security::remove_XSS($_POST['lp_id']);//TODO:this remains to be implemented after press the first post
+                $lp_id = intval($_POST['lp_id']);//TODO:this remains to be implemented after press the first post
             } else {
-                $lp_id = Security::remove_XSS($_GET['lp_id']);
+                $lp_id = intval($_GET['lp_id']);
             }
             echo "<a href=\"../newscorm/lp_controller.php?".api_get_cidreq()."&gradebook=&action=add_item&type=step&lp_id=".$lp_id."#resource_tab-2\">".Display::return_icon('back.png', get_lang("BackTo").' '.get_lang("LearningPaths"),'',ICON_SIZE_MEDIUM)."</a>";
         } else {
-            echo '<a href="exercise.php">' . Display :: return_icon('back.png', get_lang('BackToExercisesList'),'',ICON_SIZE_MEDIUM).'</a>';
+            echo '<a href="exercise.php">' .
+                Display :: return_icon('back.png', get_lang('BackToExercisesList'),'',ICON_SIZE_MEDIUM).
+                '</a>';
         }
     }
     echo '</div>';

+ 1 - 1
main/exercice/exercise_submit.php

@@ -734,7 +734,7 @@ if (!empty($objExercise->description)) {
             });
          });
         </script>";
-    echo Display::generate_accordion(array(array('title' => get_lang('ExerciseDescriptionLabel'), 'content' => null)), 'jquery', 'description_content');
+    echo Display::generate_accordion(array(array('title' => get_lang('ExerciseDescriptionLabel'), 'content' => $objExercise->description)), 'jquery', 'description_content');
 }
 
 if ($origin != 'learnpath') {

+ 3 - 5
main/exercice/fill_blanks.class.php

@@ -288,8 +288,6 @@ class FillBlanks extends Question
      */
     public function processAnswersCreation($form)
     {
-        global $charset;
-
         $answer = $form->getSubmitValue('answer');
         // Due the ckeditor transform the elements to their HTML value
 
@@ -342,9 +340,9 @@ class FillBlanks extends Question
         <p>I use a [computer] and a [pen].</p>
         becomes
         <p>I use a [computer] and a [pen].</p>::100,50:100,50@1
-                                              ++++++++-------**
-                                                --- -- --- -- -
-                                                  A B  (C) (D)(E)
+            ++++++++-------**
+            --- -- --- -- -
+            A B  (C) (D)(E)
         +++++++ : required, weighting of each words
         ------- : optional, input width to display, 200 if not present
         ** : equal @1 if "Allow answers order switches" has been checked, @ otherwise

+ 4 - 4
main/exercice/freeanswer.class.php

@@ -25,11 +25,11 @@ class FreeAnswer extends Question
 
     /**
      * function which redifines Question::createAnswersForm
-     * @param the formvalidator instance
+     * @param formvalidator $form
      */
     function createAnswersForm($form)
     {
-        $form->addElement('text', 'weighting', get_lang('Weighting'), array('class' => 'span1'));
+        $form->addElement('text', 'weighting', get_lang('Weighting'));
         global $text, $class;
         // setting the save button here and not in the question class.php
         $form->addButtonSave($text, 'submitQuestion');
@@ -43,8 +43,8 @@ class FreeAnswer extends Question
     }
 
     /**
-     * abstract function which creates the form to create / edit the answers of the question
-     * @param FormValidator
+     * abstract function which creates the form to create/edit the answers of the question
+     * @param FormValidator $form
      */
     function processAnswersCreation($form)
     {

+ 3 - 3
main/exercice/global_multiple_answer.class.php

@@ -21,7 +21,7 @@ class GlobalMultipleAnswer extends Question
 
     /**
      * function which redefines Question::createAnswersForm
-     * @param the FormValidator
+     * @param FormValidator $form
      */
     public function createAnswersForm($form)
     {
@@ -81,7 +81,7 @@ class GlobalMultipleAnswer extends Question
                 $defaults['comment[' . $i . ']'] = $answer->comment[$i];
                 $defaults['correct[' . $i . ']'] = $answer->correct[$i];
 
-                //------------- D�but
+                // start
                 $scoreA = $answer->weighting[$i];
             }
             if ($scoreA > 0) {
@@ -162,7 +162,7 @@ class GlobalMultipleAnswer extends Question
 
     /**
      * abstract function which creates the form to create / edit the answers of the question
-     * @param the FormValidator instance
+     * @param FormValidator $form
      */
     function processAnswersCreation($form)
     {

+ 54 - 50
main/exercice/multiple_answer_combination.class.php

@@ -1,9 +1,11 @@
 <?php
 /* For licensing terms, see /license.txt */
+
 /**
- * Class MultipleAnswer
+ * Class MultipleAnswerCombination
  *
- *	This class allows to instantiate an object of type MULTIPLE_ANSWER (MULTIPLE CHOICE, MULTIPLE ANSWER),
+ *	This class allows to instantiate an object of type
+ *  MULTIPLE_ANSWER (MULTIPLE CHOICE, MULTIPLE ANSWER),
  *	extending the class question
  *
  *	@author Eric Marguin
@@ -11,7 +13,6 @@
  **/
 class MultipleAnswerCombination extends Question
 {
-
 	static $typePicture = 'mcmac.png';
 	static $explanationLangVar = 'MultipleSelectCombination';
 
@@ -26,9 +27,8 @@ class MultipleAnswerCombination extends Question
 	}
 
 	/**
-     * function which redifines Question::createAnswersForm
-     * @param $form FormValidator
-     * @param the answers number to display
+     * function which redefines Question::createAnswersForm
+     * @param FormValidator $form
      */
     function createAnswersForm($form)
     {
@@ -135,20 +135,22 @@ class MultipleAnswerCombination extends Question
                 array(),
                 array('ToolbarSet' => 'TestProposedAnswer', 'Width' => '100%', 'Height' => '100')
             );
-            //only 1 answer the all deal ...
-            //$form->addElement('text', 'weighting['.$i.']',null, 'style="vertical-align:middle;margin-left: 0em;" size="5" value="10"');
 
             $form->addHtml('</tr>');
         }
 
         $form->addElement('html', '</tbody></table>');
 
-        $form->add_multiple_required_rule($boxes_names, get_lang('ChooseAtLeastOneCheckbox'), 'multiple_required');
+        $form->add_multiple_required_rule(
+            $boxes_names,
+            get_lang('ChooseAtLeastOneCheckbox'),
+            'multiple_required'
+        );
 
         //only 1 answer the all deal ...
         $form->addText('weighting[1]', get_lang('Score'), false, ['value' => 10]);
 
-        global $text, $class;
+        global $text;
         //ie6 fix
         if ($obj_ex->edit_exercise_in_lp == true) {
 
@@ -176,60 +178,62 @@ class MultipleAnswerCombination extends Question
     }
 
     /**
-	 * abstract function which creates the form to create / edit the answers of the question
-	 * @param the formvalidator instance
-	 * @param the answers number to display
+	 * abstract function which creates the form to create/edit the answers of the question
+	 * @param FormValidator $form
 	 */
-	function processAnswersCreation($form)
+    public function processAnswersCreation($form)
     {
-		$questionWeighting = $nbrGoodAnswers = 0;
-
-		$objAnswer = new Answer($this->id);
-
-		$nb_answers = $form -> getSubmitValue('nb_answers');
+        $questionWeighting = $nbrGoodAnswers = 0;
+        $objAnswer = new Answer($this->id);
+        $nb_answers = $form->getSubmitValue('nb_answers');
+
+        for ($i = 1; $i <= $nb_answers; $i++) {
+            $answer = trim($form->getSubmitValue('answer['.$i.']'));
+            $comment = trim($form->getSubmitValue('comment['.$i.']'));
+            if ($i == 1) {
+                $weighting = trim($form->getSubmitValue('weighting['.$i.']'));
+            } else {
+                $weighting = 0;
+            }
+            $goodAnswer = trim($form->getSubmitValue('correct['.$i.']'));
 
-		for($i=1 ; $i <= $nb_answers ; $i++)
-        {
-        	$answer = trim($form -> getSubmitValue('answer['.$i.']'));
-            $comment = trim($form -> getSubmitValue('comment['.$i.']'));
-            if ($i == 1)
-            	$weighting = trim($form -> getSubmitValue('weighting['.$i.']'));
-            else {
-            	$weighting = 0;
+            if ($goodAnswer) {
+                $weighting = abs($weighting);
+            } else {
+                $weighting = abs($weighting);
+                //	$weighting = -$weighting;
             }
-            $goodAnswer = trim($form -> getSubmitValue('correct['.$i.']'));
-
-			if($goodAnswer){
-    			$weighting = abs($weighting);
-			} else {
-				$weighting = abs($weighting);
-			//	$weighting = -$weighting;
-			}
-    		if($weighting > 0)
-            {
+            if ($weighting > 0) {
                 $questionWeighting += $weighting;
             }
-        	$objAnswer -> createAnswer($answer,$goodAnswer,$comment,$weighting,$i);
+            $objAnswer->createAnswer(
+                $answer,
+                $goodAnswer,
+                $comment,
+                $weighting,
+                $i
+            );
         }
 
-    	// saves the answers into the data base
-        $objAnswer -> save();
+        // saves the answers into the data base
+        $objAnswer->save();
 
         // sets the total weighting of the question
-        $this -> updateWeighting($questionWeighting);
-        $this -> save();
+        $this->updateWeighting($questionWeighting);
+        $this->save();
 	}
 
-	function return_header($feedback_type = null, $counter = null, $score = null)
+    function return_header($feedback_type = null, $counter = null, $score = null)
     {
-	    $header = parent::return_header($feedback_type, $counter, $score);
-	    $header .= '<table class="'.$this->question_table_class .'">
-			<tr>
-				<th>'.get_lang("Choice").'</th>
-				<th>'. get_lang("ExpectedChoice").'</th>
-				<th>'. get_lang("Answer").'</i></th>';
+        $header = parent::return_header($feedback_type, $counter, $score);
+        $header .= '<table class="'.$this->question_table_class .'">
+            <tr>
+                <th>'.get_lang("Choice").'</th>
+                <th>'. get_lang("ExpectedChoice").'</th>
+                <th>'. get_lang("Answer").'</i></th>';
         $header .= '<th>'.get_lang("Comment").'</th>';
         $header .= '</tr>';
+
         return $header;
-	}
+    }
 }

+ 7 - 2
main/exercice/multiple_answer_combination_true_false.class.php

@@ -1,7 +1,8 @@
 <?php
 /* For licensing terms, see /license.txt */
+
 /**
- * 	Class MultipleAnswer
+ * 	Class MultipleAnswerCombinationTrueFalse
  *
  *	This class allows to instantiate an object of type MULTIPLE_ANSWER (MULTIPLE CHOICE, MULTIPLE ANSWER),
  *	extending the class question
@@ -23,6 +24,10 @@ class MultipleAnswerCombinationTrueFalse extends MultipleAnswerCombination
 		parent::__construct();
 		$this -> type = MULTIPLE_ANSWER_COMBINATION_TRUE_FALSE;
 		$this -> isContent = $this-> getIsContent();
-        $this->options = array('1'=>get_lang('True'),'0' =>get_lang('False'), '2' =>get_lang('DontKnow'));
+		$this->options = array(
+			'1' => get_lang('True'),
+			'0' => get_lang('False'),
+			'2' => get_lang('DontKnow'),
+		);
 	}
 }

+ 32 - 19
main/exercice/multiple_answer_true_false.class.php

@@ -34,7 +34,7 @@ class MultipleAnswerTrueFalse extends Question
     {
         $nb_answers = isset($_POST['nb_answers']) ? $_POST['nb_answers'] : 4;
         // The previous default value was 2. See task #1759.
-        $nb_answers += (isset($_POST['lessAnswers']) ? -1 : (isset($_POST['moreAnswers']) ? 1 : 0));
+        $nb_answers += isset($_POST['lessAnswers']) ? -1 : isset($_POST['moreAnswers']) ? 1 : 0;
 
         $course_id = api_get_course_int_id();
         $obj_ex = $_SESSION['objExercise'];
@@ -104,14 +104,18 @@ class MultipleAnswerTrueFalse extends Question
                 'comment[' . $i . ']'
             );
 
-            $answer_number = $form->addElement('text', 'counter[' . $i . ']', null, 'value="' . $i . '"');
+            $answer_number = $form->addElement(
+                'text',
+                'counter['.$i.']',
+                null,
+                'value="'.$i.'"'
+            );
+
             $answer_number->freeze();
 
             if (is_object($answer)) {
                 $defaults['answer[' . $i . ']'] = $answer->answer[$i];
                 $defaults['comment[' . $i . ']'] = $answer->comment[$i];
-                //$defaults['weighting['.$i.']']  = float_format($answer -> weighting[$i], 1);
-
                 $correct = $answer->correct[$i];
                 $defaults['correct[' . $i . ']'] = $correct;
 
@@ -119,9 +123,7 @@ class MultipleAnswerTrueFalse extends Question
                 if (!empty($option_data)) {
                     foreach ($option_data as $id => $data) {
                         $form->addElement('radio', 'correct[' . $i . ']', null, null, $id);
-
                         $j++;
-
                         if ($j == 3) {
                             break;
                         }
@@ -153,7 +155,11 @@ class MultipleAnswerTrueFalse extends Question
                     'comment[' . $i . ']',
                     null,
                     array(),
-                    array('ToolbarSet' => 'TestProposedAnswer', 'Width' => '100%', 'Height' => '100')
+                    array(
+                        'ToolbarSet' => 'TestProposedAnswer',
+                        'Width' => '100%',
+                        'Height' => '100',
+                    )
                 );
             }
 
@@ -179,17 +185,17 @@ class MultipleAnswerTrueFalse extends Question
         $wrongInputTemplate .= '<!-- BEGIN error --><span class="form_error">{error}</span><!-- END error -->';
         $wrongInputTemplate .= '</td>';
 
-        $doubtScoreInputTempalte = '<td>' . get_lang('DoubtScore') . '<br>{element}';
-        $doubtScoreInputTempalte .= '<!-- BEGIN error --><span class="form_error">{error}</span><!-- END error -->';
-        $doubtScoreInputTempalte .= '</td>';
-        $doubtScoreInputTempalte .= '</tr>';
-        $doubtScoreInputTempalte .= '</table>';
-        $doubtScoreInputTempalte .= '</div>';
-        $doubtScoreInputTempalte .= '</div>';
+        $doubtScoreInputTemplate = '<td>' . get_lang('DoubtScore') . '<br>{element}';
+        $doubtScoreInputTemplate .= '<!-- BEGIN error --><span class="form_error">{error}</span><!-- END error -->';
+        $doubtScoreInputTemplate .= '</td>';
+        $doubtScoreInputTemplate .= '</tr>';
+        $doubtScoreInputTemplate .= '</table>';
+        $doubtScoreInputTemplate .= '</div>';
+        $doubtScoreInputTemplate .= '</div>';
 
         $renderer->setElementTemplate($correctInputTemplate, 'option[1]');
         $renderer->setElementTemplate($wrongInputTemplate, 'option[2]');
-        $renderer->setElementTemplate($doubtScoreInputTempalte, 'option[3]');
+        $renderer->setElementTemplate($doubtScoreInputTemplate, 'option[3]');
 
         // 3 scores
         $form->addElement('text', 'option[1]', get_lang('Correct'), array('class' => 'span1', 'value' => '1'));
@@ -202,10 +208,11 @@ class MultipleAnswerTrueFalse extends Question
 
         $form->addElement('hidden', 'options_count', 3);
 
-        //Extra values True, false,  Dont known
+        // Extra values True, false,  Dont known
         if (!empty($this->extra)) {
             $scores = explode(':', $this->extra);
 
+
             if (!empty($scores)) {
                 for ($i = 1; $i <= 3; $i++) {
                     $defaults['option[' . $i . ']'] = $scores[$i - 1];
@@ -213,7 +220,7 @@ class MultipleAnswerTrueFalse extends Question
             }
         }
 
-        global $text, $class;
+        global $text;
 
         if ($obj_ex->edit_exercise_in_lp == true) {
             // setting the save button here and not in the question class.php
@@ -259,7 +266,12 @@ class MultipleAnswerTrueFalse extends Question
             }
         } else {
             for ($i=1 ; $i <= 3 ; $i++) {
-        	   $last_id = Question::saveQuestionOption($this->id, $this->options[$i], $course_id, $i);
+                $last_id = Question::saveQuestionOption(
+                    $this->id,
+                    $this->options[$i],
+                    $course_id,
+                    $i
+                );
                $correct[$i] = $last_id;
             }
         }
@@ -289,7 +301,8 @@ class MultipleAnswerTrueFalse extends Question
             $comment    = trim($form -> getSubmitValue('comment['.$i.']'));
             $goodAnswer = trim($form -> getSubmitValue('correct['.$i.']'));
             if (empty($options)) {
-                //If this is the first time that the question is created when change the default values from the form 1 and 2 by the correct "option id" registered
+                //If this is the first time that the question is created when
+                // change the default values from the form 1 and 2 by the correct "option id" registered
                 $goodAnswer = $sorted_by_position[$goodAnswer]['id'];
             }
     	    $questionWeighting += $extra_values[0]; //By default 0 has the correct answers

+ 1 - 0
main/exercice/oral_expression.class.php

@@ -1,5 +1,6 @@
 <?php
 /* For licensing terms, see /license.txt */
+
 /**
  *  Class OralExpression
  *	This class allows to instantiate an object of type FREE_ANSWER,

+ 15 - 5
main/exercice/overview.php

@@ -90,7 +90,12 @@ if (isset($_GET['preview'])) {
     $extra_params = '&preview=1';
 }
 
-$exercise_stat_info = $objExercise->get_stat_track_exercise_info($learnpath_id, $learnpath_item_id, 0);
+$exercise_stat_info = $objExercise->get_stat_track_exercise_info(
+    $learnpath_id,
+    $learnpath_item_id,
+    0
+);
+
 $attempt_list = null;
 if (isset($exercise_stat_info['exe_id'])) {
     $attempt_list = Event::getAllExerciseEventByExeId($exercise_stat_info['exe_id']);
@@ -109,7 +114,11 @@ if (!empty($attempt_list)) {
 // 2. Exercise button
 // Notice we not add there the lp_item_view_id because is not already generated
 $exercise_url = api_get_path(WEB_CODE_PATH).'exercice/exercise_submit.php?'.api_get_cidreq().'&exerciseId='.$objExercise->id.'&origin='.$origin.'&learnpath_id='.$learnpath_id.'&learnpath_item_id='.$learnpath_item_id.$extra_params;
-$exercise_url_button = Display::url($label, $exercise_url, array('class'=>'btn btn-success btn-large'));
+$exercise_url_button = Display::url(
+    $label,
+    $exercise_url,
+    array('class' => 'btn btn-success btn-large')
+);
 
 //3. Checking visibility of the exercise (overwrites the exercise button)
 $visible_return = $objExercise->is_visible(
@@ -181,8 +190,6 @@ if (!empty($attempts)) {
         );
 
         $teacher_revised = Display::label(get_lang('Validated'), 'success');
-        //$attempt_link = get_lang('NoResult');
-        //$attempt_link = Display::return_icon('quiz_na.png', get_lang('NoResult'), array(), ICON_SIZE_SMALL);
         if ($attempt_result['attempt_revised'] == 0) {
             $teacher_revised = Display::label(get_lang('NotValidated'), 'info');
         }
@@ -214,7 +221,10 @@ if (!empty($attempts)) {
                     RESULT_DISABLE_SHOW_FINAL_SCORE_ONLY_WITH_CATEGORIES
                 )
             )
-            || ($objExercise->results_disabled == RESULT_DISABLE_SHOW_SCORE_ONLY && $objExercise->feedback_type == EXERCISE_FEEDBACK_TYPE_END)) {
+            || (
+                $objExercise->results_disabled == RESULT_DISABLE_SHOW_SCORE_ONLY &&
+                $objExercise->feedback_type == EXERCISE_FEEDBACK_TYPE_END)
+        ) {
             $row['attempt_link'] = $attempt_link;
         }
         $my_attempt_array[] = $row;

+ 2 - 2
main/exercice/result.php

@@ -2,7 +2,7 @@
 /* For licensing terms, see /license.txt */
 
 /**
- *  Shows the exercise results
+ * Shows the exercise results
  *
  * @author Julio Montoya - Simple exercise result page
  *
@@ -26,7 +26,7 @@ if (empty($id)) {
 	api_not_allowed($show_headers);
 }
 
-$is_allowedToEdit   = api_is_allowed_to_edit(null,true) || $is_courseTutor;
+$is_allowedToEdit = api_is_allowed_to_edit(null,true) || $is_courseTutor;
 
 //Getting results from the exe_id. This variable also contain all the information about the exercise
 $track_exercise_info = ExerciseLib::get_exercise_track_exercise_info($id);

+ 1 - 3
main/exercice/unique_answer.class.php

@@ -259,9 +259,7 @@ class UniqueAnswer extends Question
         $form->addHtml('</tbody>');
         $form->addHtml('</table>');
 
-        $navigator_info = api_get_navigator();
-
-        global $text, $class;
+        global $text;
 
         $buttonGroup = [];
         //ie6 fix

+ 2 - 3
main/gradebook/gradebook_edit_all.php

@@ -78,11 +78,10 @@ foreach ($links as &$row) {
     $resource_name = Database ::fetch_array($result);
 
     if (isset($resource_name['lp_type'])) {
-        $resource_name = $resource_name[2];
+        $resource_name = $resource_name[4];
     } else {
-        $resource_name = $resource_name[1];
+        $resource_name = $resource_name[3];
     }
-
     $row['resource_name'] = $resource_name;
 
     // Update only if value changed

+ 10 - 7
main/gradebook/lib/be/exerciselink.class.php

@@ -194,7 +194,7 @@ class ExerciseLink extends AbstractLink
         in exercice/exercice.php, look for note-query-exe-results marker*/
         $session_id = api_get_session_id();
         $courseId = $this->getCourseId();
-	$exercise = new Exercise();
+	    $exercise = new Exercise($courseId);
         $exercise->read($this->get_ref_id());
 
         if (!$this->is_hp) {
@@ -202,10 +202,10 @@ class ExerciseLink extends AbstractLink
 		if ($exercise->exercise_was_added_in_lp == false) {
 			$sql = "SELECT * FROM $tblStats
 			        WHERE
-			            exe_exo_id      = ".intval($this->get_ref_id())." AND
-			            orig_lp_id      = 0 AND
+			            exe_exo_id = ".intval($this->get_ref_id())." AND
+			            orig_lp_id = 0 AND
 			            orig_lp_item_id = 0 AND
-			            status      <> 'incomplete' AND
+			            status <> 'incomplete' AND
 			            session_id = $session_id";
 		    } else {
 		        $lpId = null;
@@ -217,9 +217,9 @@ class ExerciseLink extends AbstractLink
 
 		        $sql = "SELECT * FROM $tblStats
 		                WHERE
-		                    exe_exo_id      = ".intval($this->get_ref_id())." AND
-		                    orig_lp_id      = $lpId AND
-		                    status      <> 'incomplete' AND
+		                    exe_exo_id = ".intval($this->get_ref_id())." AND
+		                    orig_lp_id = $lpId AND
+		                    status <> 'incomplete' AND
 		                    session_id = $session_id";
 		    }
 
@@ -314,6 +314,7 @@ class ExerciseLink extends AbstractLink
         if ((!api_is_allowed_to_edit() && $this->calc_score(api_get_user_id()) == null) || $status_user!=1) {
             $url .= '&amp;doexercise='.$this->get_ref_id();
         }
+
         return $url;
     }
 
@@ -358,6 +359,7 @@ class ExerciseLink extends AbstractLink
                 WHERE c_id = '.$this->course_id.' AND id = '.(int)$this->get_ref_id().' ';
         $result = Database::query($sql);
         $number = Database::fetch_row($result);
+
         return ($number[0] != 0);
     }
 
@@ -398,6 +400,7 @@ class ExerciseLink extends AbstractLink
     private function get_exercise_table()
     {
         $this->exercise_table = Database :: get_course_table(TABLE_QUIZ_TEST);
+
         return $this->exercise_table;
     }
 

+ 0 - 6
main/group/import.php

@@ -13,12 +13,6 @@ if (!api_is_allowed_to_edit(false, true)) {
 }
 
 $nameTools = get_lang('Import');
-
-/*	Libraries */
-
-include_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
-include_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
-
 $interbreadcrumb[] = array('url' => 'group.php', 'name' => get_lang('Groups'));
 
 Display::display_header($nameTools, 'Group');

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

@@ -128,7 +128,7 @@ if (is_int($global_error_code) && $global_error_code > 0) {
 
                     <div class="office">
                     <h2 class="title">Welcome to the Chamilo installation wizard</h2>
-                    <p class="text">Let\'s start hunting knowledge down with Chamilo LMS. The installation wizard will guide you through the Chamilo installation and configuration process.</p>
+                    <p class="text">Let\'s start hunting skills down with Chamilo LMS! This wizard will guide you through the Chamilo installation and configuration process.</p>
                           <p class="download-info">
                               <button class="btn btn-primary btn-lg" type="submit" value="INSTALL Chamilo" ><i class="fa fa-download"></i> Install Chamilo</button>
                               <a class="btn btn-success btn-lg" href="'.$installation_guide_url.'" target="_blank"> <i class="fa fa-file-text-o"></i> '.$read_installation_guide.'</a>

+ 3 - 0
main/inc/lib/course_category.lib.php

@@ -714,6 +714,9 @@ function browseCoursesInCategory($category_code, $random_value = null, $limit =
                 $id_in = "$id";
             }
         }
+        if ($id_in === null) {
+            return array();
+        }
         $sql = "SELECT * FROM $tbl_course WHERE id IN($id_in)";
     } else {
         $limitFilter = getLimitFilterFromArray($limit);

+ 6 - 7
main/inc/lib/display.lib.php

@@ -714,7 +714,6 @@ class Display
 
         $image = trim($image);
         $theme = 'themes/' . api_get_visual_theme() . '/icons/';
-        $icon = '';
         $size_extra = '';
 
         if (isset($size)) {
@@ -768,6 +767,7 @@ class Display
                 $img = "$img $alt_text";
             }
         }
+
         return $img;
     }
 
@@ -776,7 +776,7 @@ class Display
      *
      * @param string $image the filename of the file (in the main/img/ folder
      * @param string $alt_text the alt text (probably a language variable)
-     * @param array additional attributes (for instance height, width, onclick, ...)
+     * @param array  $additional_attributes (for instance height, width, onclick, ...)
      * @author Julio Montoya 2010
      */
     public static function img($image_path, $alt_text = '', $additional_attributes = array())
@@ -909,8 +909,7 @@ class Display
         $extra_attributes = array(),
         $show_blank_item = true,
         $blank_item_text = null
-    )
-    {
+    ) {
         $html = '';
         $extra = '';
         $default_id = 'id="' . $name . '" ';
@@ -1676,7 +1675,7 @@ class Display
         return self::page_subheader($title, $second_title);
     }
 
-    public static function page_subheader($title, $second_title = null, $size = 'h4')
+    public static function page_subheader($title, $second_title = null, $size = 'h3')
     {
         if (!empty($second_title)) {
             $second_title = Security::remove_XSS($second_title);
@@ -1687,12 +1686,12 @@ class Display
 
     public static function page_subheader2($title, $second_title = null)
     {
-        return self::page_header($title, $second_title, 'h3');
+        return self::page_header($title, $second_title, 'h4');
     }
 
     public static function page_subheader3($title, $second_title = null)
     {
-        return self::page_header($title, $second_title, 'h4');
+        return self::page_header($title, $second_title, 'h5');
     }
 
     /**

+ 14 - 10
main/inc/lib/events.lib.php

@@ -1285,27 +1285,31 @@ class Event
         }
 
         $sql = "SELECT * FROM $table_track_exercises
-                WHERE 	status 			= '' AND
-                        exe_user_id 	= $user_id AND
-                        c_id 	        = $courseId AND
-                        exe_exo_id 		= $exercise_id AND
-                        session_id 		= $session_id AND
-                        orig_lp_id 		= $lp_id AND
-                        orig_lp_item_id = $lp_item_id
+                WHERE
+                    status 			= '' AND
+                    exe_user_id 	= $user_id AND
+                    c_id 	        = $courseId AND
+                    exe_exo_id 		= $exercise_id AND
+                    session_id 		= $session_id AND
+                    orig_lp_id 		= $lp_id AND
+                    orig_lp_item_id = $lp_item_id
                 ORDER by exe_id $order ";
 
         $res = Database::query($sql);
         $list = array();
         while ($row = Database::fetch_array($res, 'ASSOC')) {
             //Checking if this attempt was revised by a teacher
-            $sql_revised = 'SELECT exe_id FROM '.$table_track_attempt_recording.' WHERE author != "" AND exe_id = '.$row['exe_id'].' LIMIT 1';
-            $res_revised = Database::query($sql_revised);
+            $sql = 'SELECT exe_id FROM '.$table_track_attempt_recording.'
+                    WHERE author != "" AND exe_id = '.$row['exe_id'].'
+                    LIMIT 1';
+            $res_revised = Database::query($sql);
             $row['attempt_revised'] = 0;
             if (Database::num_rows($res_revised) > 0) {
                 $row['attempt_revised'] = 1;
             }
             $list[$row['exe_id']] = $row;
-            $sql = "SELECT * FROM $table_track_attempt WHERE exe_id = {$row['exe_id']}";
+            $sql = "SELECT * FROM $table_track_attempt
+                    WHERE exe_id = {$row['exe_id']}";
             $res_question = Database::query($sql);
             while ($row_q = Database::fetch_array($res_question, 'ASSOC')) {
                 $list[$row['exe_id']]['question_list'][$row_q['question_id']] = $row_q;

+ 6 - 1
main/inc/lib/exercise.lib.php

@@ -959,7 +959,10 @@ HTML;
                         );
 
                         if (!empty($answerCorrect) && !empty($selectedValue)) {
-                            $s .= <<<JAVASCRIPT
+                            // Show connect if is not freeze (question preview)
+
+                            if (!$freeze) {
+                                $s .= <<<JAVASCRIPT
                                 <script>
                                     jsPlumb.ready(function() {
                                         jsPlumb.connect({
@@ -976,6 +979,8 @@ HTML;
                                     });
                                 </script>
 JAVASCRIPT;
+                            }
+
                         }
 
                         $s .= <<<HTML

+ 1 - 0
main/inc/lib/exercise_show_functions.lib.php

@@ -236,6 +236,7 @@ class ExerciseShowFunctions
         $ans,
         $in_results_disabled
     ) {
+
         $hide_expected_answer = false;
         if ($feedback_type == 0 && $in_results_disabled == 2) {
             $hide_expected_answer = true;

+ 22 - 2
main/inc/lib/formvalidator/Element/DatePicker.php

@@ -32,9 +32,29 @@ class DatePicker extends HTML_QuickForm_text
     */
     public function toHtml()
     {
-        $js = $this->getElementJS();
+        if ($this->_flagFrozen) {
+            return $this->getFrozenHtml();
+        }
+
+        $id = $this->getAttribute('id');
+        $value = $this->getValue();
+
+        if (!empty($value)) {
+            $value = api_format_date($value, DATE_TIME_FORMAT_LONG_24H);
+        }
+
+        if (empty($this->getLabel())) {
+            return $this->getElementJS() . '
+                <div class="input-group">
+                    <span class="input-group-addon">
+                        <input ' . $this->_getAttrString($this->_attributes) . '>
+                    </span>
+                    <input class="form-control" type="text" readonly id="' . $id . '_alt" value="' . $value . '">
+                </div>
+            ';
+        }
 
-        return $js.parent::toHtml();
+        return $this->getElementJS() . parent::toHtml();
     }
 
     /**

+ 22 - 2
main/inc/lib/formvalidator/Element/DateTimePicker.php

@@ -26,9 +26,29 @@ class DateTimePicker extends HTML_QuickForm_text
      */
     public function toHtml()
     {
-        $js = $this->getElementJS();
+        if ($this->_flagFrozen) {
+            return $this->getFrozenHtml();
+        }
+
+        $id = $this->getAttribute('id');
+        $value = $this->getValue();
+
+        if (!empty($value)) {
+            $value = api_format_date($value, DATE_TIME_FORMAT_LONG_24H);
+        }
+
+        if (empty($this->getLabel())) {
+            return $this->getElementJS() . '
+                <div class="input-group">
+                    <span class="input-group-addon">
+                        <input ' . $this->_getAttrString($this->_attributes) . '>
+                    </span>
+                    <input class="form-control" type="text" readonly id="' . $id . '_alt" value="' . $value . '">
+                </div>
+            ';
+        }
 
-        return $js.parent::toHtml();
+        return $this->getElementJS() . parent::toHtml();
     }
 
     /**

+ 14 - 9
main/inc/lib/formvalidator/Element/HtmlEditor.php

@@ -18,11 +18,11 @@ class HtmlEditor extends HTML_QuickForm_textarea
 
     /**
      * Class Constructor
-     * @param string  $name
-     * @param string  $elementLabel HTML editor  label
+     * @param string $name
+     * @param string $elementLabel HTML editor  label
      * @param array  $attributes Attributes for the textarea
-     * @param array $config Optional configuration settings for the online editor.
-     * @return bool
+     * @param array  $config Optional configuration settings for the online editor.
+     *
      */
     public function __construct(
         $name = null,
@@ -57,9 +57,10 @@ class HtmlEditor extends HTML_QuickForm_textarea
 
         if ($this->editor) {
             if ($this->editor->getConfigAttribute('fullPage')) {
-                
+
                 if (strlen(trim($value)) == 0) {
-                    // TODO: To be considered whether here to be added DOCTYPE, language and character set declarations.
+                    // TODO: To be considered whether here to be added DOCTYPE,
+                    // language and character set declarations.
                     $value = '<html><head><title></title></head><body></body></html>';
                     $this->setValue($value);
                 }
@@ -71,12 +72,13 @@ class HtmlEditor extends HTML_QuickForm_textarea
             return $this->getFrozenHtml();
         } else {
             $styleCss = $this->editor->getConfigAttribute('style');
-            
+
             if ($styleCss) {
                $style = true;
             } else {
                $style = false;
             }
+
             return $this->buildEditor($style);
         }
     }
@@ -91,6 +93,8 @@ class HtmlEditor extends HTML_QuickForm_textarea
     }
 
     /**
+     * @param bool $style
+     *
      * @return string
      */
     public function buildEditor($style = false)
@@ -99,12 +103,13 @@ class HtmlEditor extends HTML_QuickForm_textarea
         if ($this->editor) {
             $this->editor->value = $this->getValue();
             $this->editor->setName($this->getName());
+
             if ($style == true) {
                 $result = $this->editor->createHtmlStyle();
-            }  else {
+            } else {
                 $result = $this->editor->createHtml();
             }
-            
+
         }
 
         return $result;

+ 13 - 2
main/inc/lib/formvalidator/FormValidator.class.php

@@ -213,6 +213,7 @@ EOT;
      * @param string $name
      * @param string $label
      * @param array $attributes
+     *
      * @return mixed
      */
     public function addDatePicker($name, $label, $attributes = [])
@@ -224,6 +225,7 @@ EOT;
      * @param string $name
      * @param string $label
      * @param array $attributes
+     *
      * @return mixed
      */
     public function addDateTimePicker($name, $label, $attributes = [])
@@ -348,6 +350,7 @@ EOT;
      * @param string $name Element name (for form treatment purposes)
      * @param bool $createElement Whether to use the create or add method
      * @param array $attributes Additional attributes
+     *
      * @return HTML_QuickForm_button
      */
     public function addButtonCreate($label, $name = 'submit', $createElement = false, $attributes = array())
@@ -390,6 +393,7 @@ EOT;
      * @param string $label Text appearing on the button
      * @param string $name Element name (for form treatment purposes)
      * @param bool $createElement Whether to use the create or add method
+     *
      * @return HTML_QuickForm_button
      */
     public function addButtonDelete($label, $name = 'submit', $createElement = false)
@@ -411,6 +415,7 @@ EOT;
      * @param string $label Text appearing on the button
      * @param string $name Element name (for form treatment purposes)
      * @param bool $createElement Whether to use the create or add method
+     *
      * @return HTML_QuickForm_button
      */
     public function addButtonSend($label, $name = 'submit', $createElement = false)
@@ -439,6 +444,7 @@ EOT;
         if (empty($label)) {
             $label = get_lang('Search');
         }
+
         return $this->addButton($name, $label, 'search', 'default');
     }
 
@@ -562,6 +568,7 @@ EOT;
      * @param string $label Text appearing on the button
      * @param string $name Element name (for form treatment purposes)
      * @param bool $createElement Whether to use the create or add method
+     *
      * @return HTML_QuickForm_button
      */
     public function addButtonUpload($label, $name = 'submit', $createElement = false)
@@ -583,6 +590,7 @@ EOT;
      * @param string $label Text appearing on the button
      * @param string $name Element name (for form treatment purposes)
      * @param bool $createElement Whether to use the create or add method
+     *
      * @return HTML_QuickForm_button
      */
     public function addButtonDownload($label, $name = 'submit', $createElement = false)
@@ -604,6 +612,7 @@ EOT;
      * @param string $label Text appearing on the button
      * @param string $name Element name (for form treatment purposes)
      * @param bool $createElement Whether to use the create or add method
+     *
      * @return HTML_QuickForm_button
      */
     public function addButtonPreview($label, $name = 'submit', $createElement = false)
@@ -625,6 +634,7 @@ EOT;
      * @param string $label Text appearing on the button
      * @param string $name Element name (for form treatment purposes)
      * @param bool $createElement Whether to use the create or add method
+     *
      * @return HTML_QuickForm_button
      */
     public function addButtonCopy($label, $name = 'submit', $createElement = false)
@@ -745,9 +755,10 @@ EOT;
      * Adds a HTML-editor to the form
      * @param string $name
      * @param string $label The label for the form-element
-     * @param bool   $required	(optional) Is the form-element required (default=true)
+     * @param bool   $required (optional) Is the form-element required (default=true)
      * @param bool   $fullPage (optional) When it is true, the editor loads completed html code for a full page.
      * @param array  $config (optional) Configuration settings for the online editor.
+     * @param bool   $style
      */
     public function addHtmlEditor($name, $label, $required = true, $fullPage = false, $config = array(), $style = false)
     {
@@ -767,7 +778,7 @@ EOT;
         if ($fullPage) {
             $config['fullPage'] = true;
         }
-        
+
         if ($element->editor) {
             $element->editor->processConfig($config);
         }

+ 10 - 4
main/inc/lib/myspace.lib.php

@@ -202,11 +202,17 @@ class MySpace
 
         // getting all the courses of the user
         $sql = "SELECT * FROM $tbl_course_user
-                WHERE user_id = '".intval($user_id)."' AND relation_type<>".COURSE_RELATION_TYPE_RRHH." ";
+                WHERE
+                    user_id = '".intval($user_id)."' AND
+                    relation_type<>".COURSE_RELATION_TYPE_RRHH." ";
         $result = Database::query($sql);
-        while ($row = Database::fetch_row($result)) {
-            $courseCode = $row[0];
-            $courseInfo = api_get_course_info($courseCode);
+        while ($row = Database::fetch_array($result)) {
+            $courseInfo = api_get_course_info_by_id($row['c_id']);
+            if (empty($courseInfo)) {
+                continue;
+            }
+
+            $courseCode = $courseInfo['code'];
             $courseId = $courseInfo['real_id'];
 
             $return .= '<tr>';

+ 4 - 4
main/inc/lib/nusoap/class.nusoap_base.php

@@ -141,7 +141,7 @@ class nusoap_base {
 	* @access   public
 	*/
 	var $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema';
-	
+
     /**
 	* charset encoding for outgoing messages
 	*
@@ -408,7 +408,7 @@ class nusoap_base {
 		$this->debug("in serialize_val: name=$name, type=$type, name_ns=$name_ns, type_ns=$type_ns, use=$use, soapval=$soapval");
 		$this->appendDebug('value=' . $this->varDump($val));
 		$this->appendDebug('attributes=' . $this->varDump($attributes));
-		
+
     	if (is_object($val) && get_class($val) == 'soapval' && (! $soapval)) {
     		$this->debug("serialize_val: serialize soapval");
         	$xml = $val->serialize($use);
@@ -982,7 +982,7 @@ function iso8601_to_timestamp($datestr){
 function usleepWindows($usec)
 {
 	$start = gettimeofday();
-	
+
 	do
 	{
 		$stop = gettimeofday();
@@ -993,4 +993,4 @@ function usleepWindows($usec)
 }
 
 
-?>
+?>

+ 8 - 7
main/inc/lib/nusoap/class.soap_server.php

@@ -777,7 +777,7 @@ class nusoap_server extends nusoap_base {
 		//begin code to compress payload - by John
 		// NOTE: there is no way to know whether the Web server will also compress
 		// this data.
-		if (strlen($payload) > 1024 && isset($this->headers) && isset($this->headers['accept-encoding'])) {	
+		if (strlen($payload) > 1024 && isset($this->headers) && isset($this->headers['accept-encoding'])) {
 			if (strstr($this->headers['accept-encoding'], 'gzip')) {
 				if (function_exists('gzencode')) {
 					if (isset($this->debug_flag) && $this->debug_flag) {
@@ -871,6 +871,7 @@ class nusoap_server extends nusoap_base {
 		$this->debug('Use encoding: ' . $this->xml_encoding . ' when creating nusoap_parser');
 		// parse response, get soap parser obj
 		$parser = new nusoap_parser($data,$this->xml_encoding,'',$this->decode_utf8);
+
 		// parser debug
 		$this->debug("parser debug: \n".$parser->getDebug());
 		// if fault occurred during message parsing
@@ -904,7 +905,7 @@ class nusoap_server extends nusoap_base {
 	function getHTTPBody($soapmsg) {
 		return $soapmsg;
 	}
-	
+
 	/**
 	* gets the HTTP content type for the current response.
 	*
@@ -916,7 +917,7 @@ class nusoap_server extends nusoap_base {
 	function getHTTPContentType() {
 		return 'text/xml';
 	}
-	
+
 	/**
 	* gets the HTTP content type charset for the current response.
 	* returns false for non-text content types.
@@ -1075,7 +1076,7 @@ class nusoap_server extends nusoap_base {
         if(false == $namespace) {
             $namespace = "http://$SERVER_NAME/soap/$serviceName";
         }
-        
+
         if(false == $endpoint) {
         	if ($HTTPS == '1' || $HTTPS == 'on') {
         		$SCHEME = 'https';
@@ -1084,11 +1085,11 @@ class nusoap_server extends nusoap_base {
         	}
             $endpoint = "$SCHEME://$SERVER_NAME$SERVER_PORT$SCRIPT_NAME";
         }
-        
+
         if(false == $schemaTargetNamespace) {
             $schemaTargetNamespace = $namespace;
         }
-        
+
 		$this->wsdl = new wsdl;
 		$this->wsdl->serviceName = $serviceName;
         $this->wsdl->endpoint = $endpoint;
@@ -1124,4 +1125,4 @@ class soap_server extends nusoap_server {
 }
 
 
-?>
+?>

+ 147 - 147
main/inc/lib/nusoap/class.wsdl.php

@@ -6,15 +6,15 @@
 /**
 * parses a WSDL file, allows access to it's data, other utility methods.
 * also builds WSDL structures programmatically.
-* 
+*
 * @author   Dietrich Ayala <dietrich@ganx4.com>
 * @author   Scott Nichol <snichol@users.sourceforge.net>
 * @version  $Id: class.wsdl.php,v 1.76 2010/04/26 20:15:08 snichol Exp $
-* @access public 
+* @access public
 */
 class wsdl extends nusoap_base {
 	// URL or filename of the root of this WSDL
-    var $wsdl; 
+    var $wsdl;
     // define internal arrays of bindings, ports, operations, messages, etc.
     var $schemas = array();
     var $currentSchema;
@@ -32,9 +32,9 @@ class wsdl extends nusoap_base {
     var $opData = array();
     var $status = '';
     var $documentation = false;
-    var $endpoint = ''; 
+    var $endpoint = '';
     // array of wsdl docs to import
-    var $import = array(); 
+    var $import = array();
     // parser vars
     var $parser;
     var $position = 0;
@@ -57,7 +57,7 @@ class wsdl extends nusoap_base {
 
     /**
      * constructor
-     * 
+     *
      * @param string $wsdl WSDL document URL
 	 * @param string $proxyhost
 	 * @param string $proxyport
@@ -67,7 +67,7 @@ class wsdl extends nusoap_base {
 	 * @param integer $response_timeout set the response timeout
 	 * @param array $curl_options user-specified cURL options
 	 * @param boolean $use_curl try to use cURL
-     * @access public 
+     * @access public
      */
     function wsdl($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30,$curl_options=null,$use_curl=false){
 		parent::nusoap_base();
@@ -127,7 +127,7 @@ class wsdl extends nusoap_base {
 								}
 							}
 						}
-		            } 
+		            }
     			}
     		}
     		// WSDL imports
@@ -153,18 +153,18 @@ class wsdl extends nusoap_base {
 						}
 					}
 				}
-            } 
+            }
 		}
         // add new data to operation data
         foreach($this->bindings as $binding => $bindingData) {
             if (isset($bindingData['operations']) && is_array($bindingData['operations'])) {
                 foreach($bindingData['operations'] as $operation => $data) {
                     $this->debug('post-parse data gathering for ' . $operation);
-                    $this->bindings[$binding]['operations'][$operation]['input'] = 
-						isset($this->bindings[$binding]['operations'][$operation]['input']) ? 
+                    $this->bindings[$binding]['operations'][$operation]['input'] =
+						isset($this->bindings[$binding]['operations'][$operation]['input']) ?
 						array_merge($this->bindings[$binding]['operations'][$operation]['input'], $this->portTypes[ $bindingData['portType'] ][$operation]['input']) :
 						$this->portTypes[ $bindingData['portType'] ][$operation]['input'];
-                    $this->bindings[$binding]['operations'][$operation]['output'] = 
+                    $this->bindings[$binding]['operations'][$operation]['output'] =
 						isset($this->bindings[$binding]['operations'][$operation]['output']) ?
 						array_merge($this->bindings[$binding]['operations'][$operation]['output'], $this->portTypes[ $bindingData['portType'] ][$operation]['output']) :
 						$this->portTypes[ $bindingData['portType'] ][$operation]['output'];
@@ -181,16 +181,16 @@ class wsdl extends nusoap_base {
                     $this->bindings[$binding]['operations'][$operation]['transport'] = isset($bindingData['transport']) ? $bindingData['transport'] : '';
                     $this->bindings[$binding]['operations'][$operation]['documentation'] = isset($this->portTypes[ $bindingData['portType'] ][$operation]['documentation']) ? $this->portTypes[ $bindingData['portType'] ][$operation]['documentation'] : '';
                     $this->bindings[$binding]['operations'][$operation]['endpoint'] = isset($bindingData['endpoint']) ? $bindingData['endpoint'] : '';
-                } 
-            } 
+                }
+            }
         }
 	}
 
     /**
      * parses the wsdl document
-     * 
+     *
      * @param string $wsdl path or URL
-     * @access private 
+     * @access private
      */
     function parseWSDL($wsdl = '') {
 		$this->debug("parse WSDL at path=$wsdl");
@@ -200,7 +200,7 @@ class wsdl extends nusoap_base {
             $this->setError('no wsdl passed to parseWSDL()!!');
             return false;
         }
-        
+
         // parse $wsdl for url format
         $wsdl_props = parse_url($wsdl);
 
@@ -243,24 +243,24 @@ class wsdl extends nusoap_base {
                 $wsdl_string = '';
                 while ($data = fread($fp, 32768)) {
                     $wsdl_string .= $data;
-                } 
+                }
                 fclose($fp);
             } else {
             	$errstr = "Bad path to WSDL file $path";
             	$this->debug($errstr);
                 $this->setError($errstr);
                 return false;
-            } 
+            }
         }
         $this->debug('Parse WSDL');
         // end new code added
         // Create an XML parser.
-        $this->parser = xml_parser_create(); 
+        $this->parser = xml_parser_create();
         // Set the options for parsing the XML data.
         // xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
-        xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); 
+        xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0);
         // Set the object for the parser.
-        xml_set_object($this->parser, $this); 
+        xml_set_object($this->parser, $this);
         // Set the element handlers for the parser.
         xml_set_element_handler($this->parser, 'start_element', 'end_element');
         xml_set_character_data_handler($this->parser, 'character_data');
@@ -277,7 +277,7 @@ class wsdl extends nusoap_base {
 			$this->debug("XML payload:\n" . $wsdl_string);
             $this->setError($errstr);
             return false;
-        } 
+        }
 		// free the parser
         xml_parser_free($this->parser);
         $this->debug('Parsing WSDL done');
@@ -286,15 +286,15 @@ class wsdl extends nusoap_base {
 			return false;
 		}
         return true;
-    } 
+    }
 
     /**
      * start-element handler
-     * 
+     *
      * @param string $parser XML parser object
      * @param string $name element name
      * @param string $attrs associative array of attributes
-     * @access private 
+     * @access private
      */
     function start_element($parser, $name, $attrs)
     {
@@ -313,10 +313,10 @@ class wsdl extends nusoap_base {
         } else {
             // position in the total number of elements, starting from 0
             $pos = $this->position++;
-            $depth = $this->depth++; 
+            $depth = $this->depth++;
             // set self as current value for this depth
             $this->depth_array[$depth] = $pos;
-            $this->message[$pos] = array('cdata' => ''); 
+            $this->message[$pos] = array('cdata' => '');
             // process attributes
             if (count($attrs) > 0) {
 				// register namespace declarations
@@ -326,11 +326,11 @@ class wsdl extends nusoap_base {
                             $this->namespaces[$ns_prefix] = $v;
                         } else {
                             $this->namespaces['ns' . (count($this->namespaces) + 1)] = $v;
-                        } 
+                        }
                         if ($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema') {
                             $this->XMLSchemaVersion = $v;
                             $this->namespaces['xsi'] = $v . '-instance';
-                        } 
+                        }
                     }
                 }
                 // expand each attribute prefix to its namespace
@@ -338,22 +338,22 @@ class wsdl extends nusoap_base {
                     $k = strpos($k, ':') ? $this->expandQname($k) : $k;
                     if ($k != 'location' && $k != 'soapAction' && $k != 'namespace') {
                         $v = strpos($v, ':') ? $this->expandQname($v) : $v;
-                    } 
+                    }
                     $eAttrs[$k] = $v;
-                } 
+                }
                 $attrs = $eAttrs;
             } else {
                 $attrs = array();
-            } 
+            }
             // get element prefix, namespace and name
             if (preg_match('/:/', $name)) {
                 // get ns prefix
-                $prefix = substr($name, 0, strpos($name, ':')); 
+                $prefix = substr($name, 0, strpos($name, ':'));
                 // get ns
-                $namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : ''; 
+                $namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : '';
                 // get unqualified name
                 $name = substr(strstr($name, ':'), 1);
-            } 
+            }
 			// process attributes, expanding any prefixes to namespaces
             // find status, register data
             switch ($this->status) {
@@ -362,12 +362,12 @@ class wsdl extends nusoap_base {
 			            if (isset($attrs['type'])) {
 		                    $this->debug("msg " . $this->currentMessage . ": found part (with type) $attrs[name]: " . implode(',', $attrs));
 		                    $this->messages[$this->currentMessage][$attrs['name']] = $attrs['type'];
-            			} 
+            			}
 			            if (isset($attrs['element'])) {
 		                    $this->debug("msg " . $this->currentMessage . ": found part (with element) $attrs[name]: " . implode(',', $attrs));
 			                $this->messages[$this->currentMessage][$attrs['name']] = $attrs['element'] . '^';
-			            } 
-        			} 
+			            }
+        			}
         			break;
 			    case 'portType':
 			        switch ($name) {
@@ -376,25 +376,25 @@ class wsdl extends nusoap_base {
 			                $this->debug("portType $this->currentPortType operation: $this->currentPortOperation");
 			                if (isset($attrs['parameterOrder'])) {
 			                	$this->portTypes[$this->currentPortType][$attrs['name']]['parameterOrder'] = $attrs['parameterOrder'];
-			        		} 
+			        		}
 			        		break;
 					    case 'documentation':
 					        $this->documentation = true;
-					        break; 
+					        break;
 					    // merge input/output data
 					    default:
 					        $m = isset($attrs['message']) ? $this->getLocalPart($attrs['message']) : '';
 					        $this->portTypes[$this->currentPortType][$this->currentPortOperation][$name]['message'] = $m;
 					        break;
-					} 
+					}
 			    	break;
 				case 'binding':
 				    switch ($name) {
-				        case 'binding': 
+				        case 'binding':
 				            // get ns prefix
 				            if (isset($attrs['style'])) {
 				            $this->bindings[$this->currentBinding]['prefix'] = $prefix;
-					    	} 
+					    	}
 					    	$this->bindings[$this->currentBinding] = array_merge($this->bindings[$this->currentBinding], $attrs);
 					    	break;
 						case 'header':
@@ -403,17 +403,17 @@ class wsdl extends nusoap_base {
 						case 'operation':
 						    if (isset($attrs['soapAction'])) {
 						        $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['soapAction'] = $attrs['soapAction'];
-						    } 
+						    }
 						    if (isset($attrs['style'])) {
 						        $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['style'] = $attrs['style'];
-						    } 
+						    }
 						    if (isset($attrs['name'])) {
 						        $this->currentOperation = $attrs['name'];
 						        $this->debug("current binding operation: $this->currentOperation");
 						        $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['name'] = $attrs['name'];
 						        $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['binding'] = $this->currentBinding;
 						        $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['endpoint'] = isset($this->bindings[$this->currentBinding]['endpoint']) ? $this->bindings[$this->currentBinding]['endpoint'] : '';
-						    } 
+						    }
 						    break;
 						case 'input':
 						    $this->opStatus = 'input';
@@ -426,9 +426,9 @@ class wsdl extends nusoap_base {
 						        $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = array_merge($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus], $attrs);
 						    } else {
 						        $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = $attrs;
-						    } 
+						    }
 						    break;
-					} 
+					}
 					break;
 				case 'service':
 					switch ($name) {
@@ -436,7 +436,7 @@ class wsdl extends nusoap_base {
 					        $this->currentPort = $attrs['name'];
 					        $this->debug('current port: ' . $this->currentPort);
 					        $this->ports[$this->currentPort]['binding'] = $this->getLocalPart($attrs['binding']);
-					
+
 					        break;
 					    case 'address':
 					        $this->ports[$this->currentPort]['location'] = $attrs['location'];
@@ -444,9 +444,9 @@ class wsdl extends nusoap_base {
 					        $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['bindingType'] = $namespace;
 					        $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['endpoint'] = $attrs['location'];
 					        break;
-					} 
+					}
 					break;
-			} 
+			}
 		// set status
 		switch ($name) {
 			case 'import':
@@ -482,11 +482,11 @@ class wsdl extends nusoap_base {
 			    		$this->currentBinding = $this->getLocalPart($attrs['name']);
 					} else {
 			    		$this->currentBinding = $attrs['name'];
-					} 
+					}
 					$this->status = 'binding';
 					$this->bindings[$this->currentBinding]['portType'] = $this->getLocalPart($attrs['type']);
 					$this->debug("current binding: $this->currentBinding of portType: " . $attrs['type']);
-				} 
+				}
 				break;
 			case 'service':
 				$this->serviceName = $attrs['name'];
@@ -496,20 +496,20 @@ class wsdl extends nusoap_base {
 			case 'definitions':
 				foreach ($attrs as $name => $value) {
 					$this->wsdl_info[$name] = $value;
-				} 
+				}
 				break;
-			} 
-		} 
-	} 
+			}
+		}
+	}
 
 	/**
 	* end-element handler
-	* 
+	*
 	* @param string $parser XML parser object
 	* @param string $name element name
-	* @access private 
+	* @access private
 	*/
-	function end_element($parser, $name){ 
+	function end_element($parser, $name){
 		// unset schema status
 		if (/*preg_match('/types$/', $name) ||*/ preg_match('/schema$/', $name)) {
 			$this->status = "";
@@ -517,38 +517,38 @@ class wsdl extends nusoap_base {
             $this->currentSchema->clearDebug();
 			$this->schemas[$this->currentSchema->schemaTargetNamespace][] = $this->currentSchema;
         	$this->debug('Parsing WSDL schema done');
-		} 
+		}
 		if ($this->status == 'schema') {
 			$this->currentSchema->schemaEndElement($parser, $name);
 		} else {
 			// bring depth down a notch
 			$this->depth--;
-		} 
+		}
 		// end documentation
 		if ($this->documentation) {
 			//TODO: track the node to which documentation should be assigned; it can be a part, message, etc.
 			//$this->portTypes[$this->currentPortType][$this->currentPortOperation]['documentation'] = $this->documentation;
 			$this->documentation = false;
-		} 
-	} 
+		}
+	}
 
 	/**
 	 * element content handler
-	 * 
+	 *
 	 * @param string $parser XML parser object
 	 * @param string $data element content
-	 * @access private 
+	 * @access private
 	 */
 	function character_data($parser, $data)
 	{
 		$pos = isset($this->depth_array[$this->depth]) ? $this->depth_array[$this->depth] : 0;
 		if (isset($this->message[$pos]['cdata'])) {
 			$this->message[$pos]['cdata'] .= $data;
-		} 
+		}
 		if ($this->documentation) {
 			$this->documentation .= $data;
-		} 
-	} 
+		}
+	}
 
 	/**
 	* if authenticating, set user credentials here
@@ -567,21 +567,21 @@ class wsdl extends nusoap_base {
 		$this->authtype = $authtype;
 		$this->certRequest = $certRequest;
 	}
-	
+
 	function getBindingData($binding)
 	{
 		if (is_array($this->bindings[$binding])) {
 			return $this->bindings[$binding];
-		} 
+		}
 	}
-	
+
 	/**
 	 * returns an assoc array of operation names => operation data
-	 * 
+	 *
 	 * @param string $portName WSDL port name
 	 * @param string $bindingType eg: soap, smtp, dime (only soap and soap12 are currently supported)
-	 * @return array 
-	 * @access public 
+	 * @return array
+	 * @access public
 	 */
 	function getOperations($portName = '', $bindingType = 'soap') {
 		$ops = array();
@@ -613,15 +613,15 @@ class wsdl extends nusoap_base {
 			$this->debug("getOperations found no operations for port '$portName' bindingType $bindingType");
 		}
 		return $ops;
-	} 
-	
+	}
+
 	/**
 	 * returns an associative array of data necessary for calling an operation
-	 * 
+	 *
 	 * @param string $operation name of operation
 	 * @param string $bindingType type of binding eg: soap, soap12
-	 * @return array 
-	 * @access public 
+	 * @return array
+	 * @access public
 	 */
 	function getOperationData($operation, $bindingType = 'soap')
 	{
@@ -641,19 +641,19 @@ class wsdl extends nusoap_base {
 					if ($operation == $bOperation) {
 						$opData = $this->bindings[ $portData['binding'] ]['operations'][$operation];
 					    return $opData;
-					} 
-				} 
+					}
+				}
 			}
-		} 
+		}
 	}
-	
+
 	/**
 	 * returns an associative array of data necessary for calling an operation
-	 * 
+	 *
 	 * @param string $soapAction soapAction for operation
 	 * @param string $bindingType type of binding eg: soap, soap12
-	 * @return array 
-	 * @access public 
+	 * @return array
+	 * @access public
 	 */
 	function getOperationDataForSoapAction($soapAction, $bindingType = 'soap') {
 		if ($bindingType == 'soap') {
@@ -669,12 +669,12 @@ class wsdl extends nusoap_base {
 				foreach ($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) {
 					if ($opData['soapAction'] == $soapAction) {
 					    return $opData;
-					} 
-				} 
+					}
+				}
 			}
-		} 
+		}
 	}
-	
+
 	/**
     * returns an array of information about a given type
     * returns false if no type exists by the given name
@@ -885,7 +885,7 @@ class wsdl extends nusoap_base {
 	*
 	* @param mixed $debug whether to put debug=1 in endpoint URL
 	* @return string serialization of WSDL
-	* @access public 
+	* @access public
 	*/
 	function serialize($debug = 0)
 	{
@@ -893,15 +893,15 @@ class wsdl extends nusoap_base {
 		$xml .= "\n<definitions";
 		foreach($this->namespaces as $k => $v) {
 			$xml .= " xmlns:$k=\"$v\"";
-		} 
+		}
 		// 10.9.02 - add poulter fix for wsdl and tns declarations
 		if (isset($this->namespaces['wsdl'])) {
 			$xml .= " xmlns=\"" . $this->namespaces['wsdl'] . "\"";
-		} 
+		}
 		if (isset($this->namespaces['tns'])) {
 			$xml .= " targetNamespace=\"" . $this->namespaces['tns'] . "\"";
-		} 
-		$xml .= '>'; 
+		}
+		$xml .= '>';
 		// imports
 		if (sizeof($this->import) > 0) {
 			foreach($this->import as $ns => $list) {
@@ -912,8 +912,8 @@ class wsdl extends nusoap_base {
 						$xml .= '<import namespace="' . $ns . '" />';
 					}
 				}
-			} 
-		} 
+			}
+		}
 		// types
 		if (count($this->schemas)>=1) {
 			$xml .= "\n<types>\n";
@@ -923,7 +923,7 @@ class wsdl extends nusoap_base {
 				}
 			}
 			$xml .= '</types>';
-		} 
+		}
 		// messages
 		if (count($this->messages) >= 1) {
 			foreach($this->messages as $msgName => $msgParts) {
@@ -940,11 +940,11 @@ class wsdl extends nusoap_base {
 						    foreach($this->typemap as $ns => $types) {
 						        if (isset($types[$partType])) {
 						            $typePrefix = $this->getPrefixFromNamespace($ns);
-						        } 
-						    } 
+						        }
+						    }
 						    if (!isset($typePrefix)) {
 						        die("$partType has no namespace!");
-						    } 
+						    }
 						}
 						$ns = $this->getNamespaceFromPrefix($typePrefix);
 						$localPart = $this->getLocalPart($partType);
@@ -961,8 +961,8 @@ class wsdl extends nusoap_base {
 					}
 				}
 				$xml .= '</message>';
-			} 
-		} 
+			}
+		}
 		// bindings & porttypes
 		if (count($this->bindings) >= 1) {
 			$binding_xml = '';
@@ -990,7 +990,7 @@ class wsdl extends nusoap_base {
 					$portType_xml .= "\n" . '  <operation name="' . $opParts['name'] . '"';
 					if (isset($opParts['parameterOrder'])) {
 					    $portType_xml .= ' parameterOrder="' . $opParts['parameterOrder'] . '"';
-					} 
+					}
 					$portType_xml .= '>';
 					if(isset($opParts['documentation']) && $opParts['documentation'] != '') {
 						$portType_xml .= "\n" . '    <documentation>' . htmlspecialchars($opParts['documentation']) . '</documentation>';
@@ -998,12 +998,12 @@ class wsdl extends nusoap_base {
 					$portType_xml .= "\n" . '    <input message="tns:' . $opParts['input']['message'] . '"/>';
 					$portType_xml .= "\n" . '    <output message="tns:' . $opParts['output']['message'] . '"/>';
 					$portType_xml .= "\n" . '  </operation>';
-				} 
+				}
 				$portType_xml .= "\n" . '</portType>';
 				$binding_xml .= "\n" . '</binding>';
-			} 
+			}
 			$xml .= $portType_xml . $binding_xml;
-		} 
+		}
 		// services
 		$xml .= "\n<service name=\"" . $this->serviceName . '">';
 		if (count($this->ports) >= 1) {
@@ -1011,11 +1011,11 @@ class wsdl extends nusoap_base {
 				$xml .= "\n" . '  <port name="' . $pName . '" binding="tns:' . $attrs['binding'] . '">';
 				$xml .= "\n" . '    <soap:address location="' . $attrs['location'] . ($debug ? '?debug=1' : '') . '"/>';
 				$xml .= "\n" . '  </port>';
-			} 
-		} 
+			}
+		}
 		$xml .= "\n" . '</service>';
 		return $xml . "\n</definitions>";
-	} 
+	}
 
 	/**
 	 * determine whether a set of parameters are unwrapped
@@ -1060,7 +1060,7 @@ class wsdl extends nusoap_base {
 		$phpType = $typeDef['phpType'];
 		$arrayType = (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '');
 		$this->debug("in parametersMatchWrapped: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: $arrayType");
-		
+
 		// we expect a complexType or element of complexType
 		if ($phpType != 'struct') {
 			$this->debug("in parametersMatchWrapped: not a struct");
@@ -1101,7 +1101,7 @@ class wsdl extends nusoap_base {
 	 * TODO
 	 * - multi-ref serialization
 	 * - validate PHP values against type definitions, return errors if invalid
-	 * 
+	 *
 	 * @param string $operation operation name
 	 * @param string $direction (input|output)
 	 * @param mixed $parameters parameter value(s)
@@ -1112,12 +1112,12 @@ class wsdl extends nusoap_base {
 	function serializeRPCParameters($operation, $direction, $parameters, $bindingType = 'soap') {
 		$this->debug("in serializeRPCParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion, bindingType=$bindingType");
 		$this->appendDebug('parameters=' . $this->varDump($parameters));
-		
+
 		if ($direction != 'input' && $direction != 'output') {
 			$this->debug('The value of the \$direction argument needs to be either "input" or "output"');
 			$this->setError('The value of the \$direction argument needs to be either "input" or "output"');
 			return false;
-		} 
+		}
 		if (!$opData = $this->getOperationData($operation, $bindingType)) {
 			$this->debug('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bindingType);
 			$this->setError('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bindingType);
@@ -1168,7 +1168,7 @@ class wsdl extends nusoap_base {
 					$this->debug("serializing part $name of type $type");
 					// Track encoding style
 					if (isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) {
-						$encodingStyle = $opData[$direction]['encodingStyle'];			
+						$encodingStyle = $opData[$direction]['encodingStyle'];
 						$enc_style = $encodingStyle;
 					} else {
 						$enc_style = false;
@@ -1194,15 +1194,15 @@ class wsdl extends nusoap_base {
 		}
 		$this->debug("serializeRPCParameters returning: $xml");
 		return $xml;
-	} 
-	
+	}
+
 	/**
 	 * serialize a PHP value according to a WSDL message definition
-	 * 
+	 *
 	 * TODO
 	 * - multi-ref serialization
 	 * - validate PHP values against type definitions, return errors if invalid
-	 * 
+	 *
 	 * @param string $operation operation name
 	 * @param string $direction (input|output)
 	 * @param mixed $parameters parameter value(s)
@@ -1212,14 +1212,14 @@ class wsdl extends nusoap_base {
 	 */
 	function serializeParameters($operation, $direction, $parameters)
 	{
-		$this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion"); 
+		$this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion");
 		$this->appendDebug('parameters=' . $this->varDump($parameters));
-		
+
 		if ($direction != 'input' && $direction != 'output') {
 			$this->debug('The value of the \$direction argument needs to be either "input" or "output"');
 			$this->setError('The value of the \$direction argument needs to be either "input" or "output"');
 			return false;
-		} 
+		}
 		if (!$opData = $this->getOperationData($operation)) {
 			$this->debug('Unable to retrieve WSDL data for operation: ' . $operation);
 			$this->setError('Unable to retrieve WSDL data for operation: ' . $operation);
@@ -1227,18 +1227,18 @@ class wsdl extends nusoap_base {
 		}
 		$this->debug('opData:');
 		$this->appendDebug($this->varDump($opData));
-		
+
 		// Get encoding style for output and set to current
 		$encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
 		if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) {
 			$encodingStyle = $opData['output']['encodingStyle'];
 			$enc_style = $encodingStyle;
 		}
-		
+
 		// set input params
 		$xml = '';
 		if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) {
-			
+
 			$use = $opData[$direction]['use'];
 			$this->debug("use=$use");
 			$this->debug('got ' . count($opData[$direction]['parts']) . ' part(s)');
@@ -1249,7 +1249,7 @@ class wsdl extends nusoap_base {
 					$this->debug('serializing part "'.$name.'" of type "'.$type.'"');
 					// Track encoding style
 					if(isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) {
-						$encodingStyle = $opData[$direction]['encodingStyle'];			
+						$encodingStyle = $opData[$direction]['encodingStyle'];
 						$enc_style = $encodingStyle;
 					} else {
 						$enc_style = false;
@@ -1275,11 +1275,11 @@ class wsdl extends nusoap_base {
 		}
 		$this->debug("serializeParameters returning: $xml");
 		return $xml;
-	} 
-	
+	}
+
 	/**
 	 * serializes a PHP value according a given type definition
-	 * 
+	 *
 	 * @param string $name name of value (part or element)
 	 * @param string $type XML schema type of value (type or element)
 	 * @param mixed $value a native PHP value (parameter value)
@@ -1365,7 +1365,7 @@ class wsdl extends nusoap_base {
 					} else {
 						$value = 'true';
 					}
-				} 
+				}
 				if ($uqType == 'string' && gettype($value) == 'string') {
 					$value = $this->expandEntities($value);
 				}
@@ -1446,7 +1446,7 @@ class wsdl extends nusoap_base {
 			return false;
 		}
 		$phpType = $typeDef['phpType'];
-		$this->debug("in serializeType: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: " . (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '') ); 
+		$this->debug("in serializeType: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: " . (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '') );
 		// if php type == struct, map value to the <all> element names
 		if ($phpType == 'struct') {
 			if (isset($typeDef['typeClass']) && $typeDef['typeClass'] == 'element') {
@@ -1538,22 +1538,22 @@ class wsdl extends nusoap_base {
 				foreach($value as $v) {
 					$cols = ',' . sizeof($v);
 					$nv = array_merge($nv, $v);
-				} 
+				}
 				$value = $nv;
 			} else {
 				$cols = '';
-			} 
+			}
 			if (is_array($value) && sizeof($value) >= 1) {
 				$rows = sizeof($value);
 				$contents = '';
 				foreach($value as $k => $v) {
-					$this->debug("serializing array element: $k, $v of type: $typeDef[arrayType]");
+					//$this->debug("serializing array element: $k, $v of type: $typeDef[arrayType]");
 					//if (strpos($typeDef['arrayType'], ':') ) {
 					if (!in_array($typeDef['arrayType'],$this->typemap['http://www.w3.org/2001/XMLSchema'])) {
 					    $contents .= $this->serializeType('item', $typeDef['arrayType'], $v, $use);
 					} else {
 					    $contents .= $this->serialize_val($v, 'item', $typeDef['arrayType'], null, $this->XMLSchemaVersion, false, $use);
-					} 
+					}
 				}
 			} else {
 				$rows = 0;
@@ -1597,7 +1597,7 @@ class wsdl extends nusoap_base {
 		$this->debug("in serializeType: returning: $xml");
 		return $xml;
 	}
-	
+
 	/**
 	 * serializes the attributes for a complexType
 	 *
@@ -1652,7 +1652,7 @@ class wsdl extends nusoap_base {
 				if ($xname) {
 					$xml .=  " $aName=\"" . $this->expandEntities($xvalue[$xname]) . "\"";
 				}
-			} 
+			}
 		} else {
 			$this->debug("no attributes to serialize for XML Schema type $ns:$uqType");
 		}
@@ -1710,7 +1710,7 @@ class wsdl extends nusoap_base {
 				}
 				// if user took advantage of a minOccurs=0, then only serialize named parameters
 				if (isset($optionals)
-				    && (!isset($xvalue[$eName])) 
+				    && (!isset($xvalue[$eName]))
 					&& ( (!isset($attrs['nillable'])) || $attrs['nillable'] != 'true')
 					){
 					if (isset($attrs['minOccurs']) && $attrs['minOccurs'] <> '0') {
@@ -1758,7 +1758,7 @@ class wsdl extends nusoap_base {
 						}
 					}
 				}
-			} 
+			}
 		} else {
 			$this->debug("no elements to serialize for XML Schema type $ns:$uqType");
 		}
@@ -1794,7 +1794,7 @@ class wsdl extends nusoap_base {
 	    	}
 	    	$elements = $eElements;
 		}
-		
+
 		if (count($attrs) > 0) {
 	    	foreach($attrs as $n => $a){
 	            // expand each attribute
@@ -1847,7 +1847,7 @@ class wsdl extends nusoap_base {
 
 	/**
 	* register an operation with the server
-	* 
+	*
 	* @param string $name operation (method) name
 	* @param array $in assoc array of input values: key = param name, value = param type
 	* @param array $out assoc array of output values: key = param name, value = param type
@@ -1857,7 +1857,7 @@ class wsdl extends nusoap_base {
 	* @param string $use (encoded|literal) optional The use for the parameters (cannot mix right now)
 	* @param string $documentation optional The description to include in the WSDL
 	* @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded)
-	* @access public 
+	* @access public
 	*/
 	function addOperation($name, $in = false, $out = false, $namespace = false, $soapaction = false, $style = 'rpc', $use = 'encoded', $documentation = '', $encodingStyle = ''){
 		if ($use == 'encoded' && $encodingStyle == '') {
@@ -1904,7 +1904,7 @@ class wsdl extends nusoap_base {
 			'parts' => $out),
 		'namespace' => $namespace,
 		'transport' => 'http://schemas.xmlsoap.org/soap/http',
-		'documentation' => $documentation); 
+		'documentation' => $documentation);
 		// add portTypes
 		// add messages
 		if($in)
@@ -1932,7 +1932,7 @@ class wsdl extends nusoap_base {
             $this->messages[$name.'Response']= '0';
         }
 		return true;
-	} 
+	}
 }
 
-?>
+?>

+ 5 - 5
main/inc/lib/pdf.lib.php

@@ -479,6 +479,10 @@ class PDF
         }
         //$this->pdf->Output($output_file, $outputMode); // F to save the pdf in a file
 
+        if ($outputMode == 'F') {
+            $output_file = api_get_path(SYS_ARCHIVE_PATH) . $output_file;
+        }
+
         if ($saveInFile) {
             $fileToSave = !empty($fileToSave) ? $fileToSave : api_get_path(SYS_ARCHIVE_PATH).uniqid();
 
@@ -492,13 +496,9 @@ class PDF
                 $output_file,
                 $outputMode
             ); // F to save the pdf in a file
-            exit;
         }
 
-
-        if ($outputMode == 'F') {
-            // Do NOT exit when export to file
-        } else {
+        if ($outputMode != 'F') {
             exit;
         }
     }

+ 14 - 6
main/inc/lib/plugin.lib.php

@@ -106,9 +106,9 @@ class AppPlugin
         $pluginList = array();
         if (!empty($pluginListName)) {
             foreach ($pluginListName as $pluginName) {
-                $plugin_info = $this->getPluginInfo($pluginName);
-                if (isset($plugin_info['plugin_class'])) {
-                    $pluginList[] = $plugin_info['plugin_class']::create();
+                $pluginInfo = $this->getPluginInfo($pluginName);
+                if (isset($pluginInfo['plugin_class'])) {
+                    $pluginList[] = $pluginInfo['plugin_class']::create();
                 }
             }
         }
@@ -560,11 +560,19 @@ class AppPlugin
                     if ($setting['type'] != 'checkbox') {
                         $form->addElement($setting['type'], $setting['name'], $obj->get_lang($setting['name']));
                     } else {
-                        $element = & $form->createElement($setting['type'], $setting['name'], '', $obj->get_lang($setting['name']));
-                        if ($setting['init_value'] == 1) {
+                        $element = & $form->createElement(
+                            $setting['type'],
+                            $setting['name'],
+                            '',
+                            $obj->get_lang($setting['name'])
+                        );
+                        if (isset($setting['init_value']) && $setting['init_value'] == 1) {
                             $element->setChecked(true);
                         }
-                        $groups[$setting['group']][] = $element;
+
+                        if (isset($setting['group'])) {
+                            $groups[$setting['group']][] = $element;
+                        }
                     }
                 }
                 foreach ($groups as $k => $v) {

+ 7 - 2
main/inc/lib/skill.lib.php

@@ -980,10 +980,15 @@ class Skill extends Model
 
                 // If a short code was defined, send the short code to replace
                 // skill name (to shorten the text in the wheel)
-                if (!empty($skill['short_code'])) {
-                    $skill['data']['name'] = $skill['short_code'];
+                if (
+                    !empty($skill['short_code']) &&
+                    api_get_setting('show_full_skill_name_on_skill_wheel') === 'false'
+                ) {
+                    $skill['data']['short_code'] = $skill['short_code'];
                 }
 
+                $skill['data']['name'] = $skill['name'];
+
                 // In order to paint all members of a family with the same color
                 if (empty($skill_id)) {
                     if ($skill['parent_id'] == 1) {

+ 15 - 3
main/inc/lib/template.lib.php

@@ -66,9 +66,9 @@ class Template
         $this->load_plugins = $load_plugins;
 
         $template_paths = array(
-            api_get_path(SYS_CODE_PATH) . 'template/overrides', // user defined templates
+            api_get_path(SYS_CODE_PATH).'template/overrides', // user defined templates
             api_get_path(SYS_CODE_PATH).'template', //template folder
-            api_get_path(SYS_PLUGIN_PATH) //plugin folder
+            api_get_path(SYS_PLUGIN_PATH) // plugin folder
         );
 
         $cache_folder = api_get_path(SYS_ARCHIVE_PATH).'twig';
@@ -185,11 +185,23 @@ class Template
         }
     }
 
+    /**
+     * @param string $image
+     * @param int $size
+     *
+     * @return string
+     */
     public static function get_icon_path($image, $size = ICON_SIZE_SMALL)
     {
-        return Display:: return_icon($image, '', array(), $size, false, true);
+        return Display::return_icon($image, '', array(), $size, false, true);
     }
 
+    /**
+     * @param string $timestamp
+     * @param string $format
+     *
+     * @return string
+     */
     public static function format_date($timestamp, $format = null)
     {
         return api_format_date($timestamp, $format);

+ 5 - 2
main/inc/lib/usermanager.lib.php

@@ -314,7 +314,7 @@ class UserManager
             }
         } else {
             $expirationDate = api_get_utc_datetime($expirationDate);
-            $expirationDate = new \DateTime($expirationDate);
+            $expirationDate = new \DateTime($expirationDate, new DateTimeZone('UTC'));
         }
 
         $userManager = self::getManager();
@@ -848,7 +848,10 @@ class UserManager
 
         if (!empty($expiration_date)) {
             $expiration_date = api_get_utc_datetime($expiration_date);
-            $expiration_date = new \DateTime($expiration_date);
+            $expiration_date = new \DateTime(
+                $expiration_date,
+                new DateTimeZone('UTC')
+            );
         }
 
         $user

+ 2 - 1
main/inc/lib/userportal.lib.php

@@ -96,8 +96,9 @@ class IndexManager
 
     /**
      * Alias for the online_logout() function
+     * @param   bool    $redirect   Whether to ask online_logout to redirect to index.php or not
      */
-    function logout() {
+    function logout($redirect = true) {
         online_logout($this->user_id, true);
     }
 

+ 7 - 1
main/inc/local.inc.php

@@ -647,7 +647,13 @@ if (!empty($_SESSION['_user']['user_id']) && !($login || $logout)) {
                     exit;
                 }
             }
-        }//end logout ... else ... login
+            //end logout ... else ... login
+        } elseif ($logout) {
+            //if there was an attempted logout without a previous login, log
+            // this anonymous user out as well but avoid redirect
+            online_logout(null, false);
+            $osso->logout(); //redirects and exits
+        }
     } elseif (api_get_setting('openid_authentication')=='true') {
         if (!empty($_POST['openid_url'])) {
             include api_get_path(SYS_CODE_PATH).'auth/openid/login.php';

+ 13 - 11
main/install/data.sql

@@ -125,9 +125,6 @@ VALUES
 ('user_selected_theme',NULL,'radio','Platform','false','UserThemeSelection','UserThemeSelectionComment',NULL,NULL, 0),
 ('profile','theme','checkbox','User','false','ProfileChangesTitle','ProfileChangesComment',NULL,'UserTheme', 0),
 ('allow_course_theme',NULL,'radio','Course','true','AllowCourseThemeTitle','AllowCourseThemeComment',NULL,NULL, 0),
-('display_mini_month_calendar',NULL,'radio','Tools', 'true', 'DisplayMiniMonthCalendarTitle', 'DisplayMiniMonthCalendarComment', NULL, NULL, 0),
-('display_upcoming_events',NULL,'radio','Tools','true','DisplayUpcomingEventsTitle','DisplayUpcomingEventsComment',NULL,NULL, 0),
-('number_of_upcoming_events',NULL,'textfield','Tools','1','NumberOfUpcomingEventsTitle','NumberOfUpcomingEventsComment',NULL,NULL, 0),
 ('show_closed_courses',NULL,'radio','Platform','false','ShowClosedCoursesTitle','ShowClosedCoursesComment',NULL,NULL, 0),
 ('service_visio', 'visio_use_rtmpt', 'radio',null,'false', 'VisioUseRtmptTitle','VisioUseRtmptComment', NULL, NULL, 0),
 ('extendedprofile_registration', 'mycomptetences', 'checkbox','User','false', 'ExtendedProfileRegistrationTitle','ExtendedProfileRegistrationComment', NULL, 'MyCompetences', 0),
@@ -151,7 +148,6 @@ VALUES
 ('course_create_active_tools','notebook','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Notebook', 0),
 ('course_create_active_tools','attendances','checkbox','Tools','false','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Attendances', 0),
 ('course_create_active_tools','course_progress','checkbox','Tools','false','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'CourseProgress', 0),
-('allow_reservation', NULL, 'radio', 'Tools', 'false', 'AllowReservationTitle', 'AllowReservationComment', NULL, NULL, 0),
 ('profile','apikeys','checkbox','User','false','ProfileChangesTitle','ProfileChangesComment',NULL,'ApiKeys', 0),
 ('allow_message_tool', NULL, 'radio', 'Tools', 'true', 'AllowMessageToolTitle', 'AllowMessageToolComment', NULL, NULL,1),
 ('allow_social_tool', NULL, 'radio', 'Tools', 'true', 'AllowSocialToolTitle', 'AllowSocialToolComment', NULL, NULL,1),
@@ -420,10 +416,6 @@ VALUES
 ('user_selected_theme','false','No'),
 ('allow_course_theme','true','Yes'),
 ('allow_course_theme','false','No'),
-('display_mini_month_calendar', 'true', 'Yes'),
-('display_mini_month_calendar', 'false', 'No'),
-('display_upcoming_events', 'true', 'Yes'),
-('display_upcoming_events', 'false', 'No'),
 ('show_closed_courses', 'true', 'Yes'),
 ('show_closed_courses', 'false', 'No'),
 ('ldap_version', '2', 'LDAPVersion2'),
@@ -441,8 +433,6 @@ VALUES
 ('allow_users_to_create_courses','true','Yes'),
 ('allow_users_to_create_courses','false','No'),
 ('breadcrumbs_course_homepage', 'session_name_and_course_title', 'SessionNameAndCourseTitle'),
-('allow_reservation', 'true', 'Yes'),
-('allow_reservation', 'false', 'No'),
 ('allow_message_tool', 'true', 'Yes'),
 ('allow_message_tool', 'false', 'No'),
 ('allow_social_tool', 'true', 'Yes'),
@@ -1813,4 +1803,16 @@ VALUES
 ('my_courses_view_by_session', 'true', 'Yes'),
 ('my_courses_view_by_session', 'false', 'No');
 
-UPDATE settings_current SET selected_value = '1.10.0.50' WHERE variable = 'chamilo_database_version';
+-- Version 1.10.0.51
+
+INSERT INTO settings_current
+(variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable)
+VALUES
+('show_full_skill_name_on_skill_wheel', NULL, 'radio', 'Platform', 'false', 'ShowFullSkillNameOnSkillWheelTitle', 'ShowFullSkillNameOnSkillWheelComment', NULL, NULL, 1);
+
+INSERT INTO settings_options (variable, value, display_text)
+VALUES
+('show_full_skill_name_on_skill_wheel', 'true', 'Yes'),
+('show_full_skill_name_on_skill_wheel', 'false', 'No');
+
+UPDATE settings_current SET selected_value = '1.10.0.51' WHERE variable = 'chamilo_database_version';

+ 22 - 5
main/install/index.php

@@ -66,10 +66,25 @@ if (!array_key_exists($install_language, get_language_folder_list())) {
     $install_language = 'english';
 }
 
+$installationGuideLink = '../../documentation/installation_guide.html';
+
 // Loading language files.
 require api_get_path(SYS_LANG_PATH).'english/trad4all.inc.php';
 if ($install_language != 'english') {
     include_once api_get_path(SYS_LANG_PATH).$install_language.'/trad4all.inc.php';
+    switch ($install_language) {
+        case 'french':
+            $installationGuideLink = '../../documentation/installation_guide_fr_FR.html';
+            break;
+        case 'spanish':
+            $installationGuideLink = '../../documentation/installation_guide_es_ES.html';
+            break;
+        case 'italian':
+            $installationGuideLink = '../../documentation/installation_guide_it_IT.html';
+            break;
+        default:
+            break;
+    }
 }
 
 // These global variables must be set for proper working of the function get_lang(...) during the installation.
@@ -270,6 +285,8 @@ if (!$_POST) {
     $current_step = 5;
 } elseif (!empty($_POST['step5'])) {
     $current_step = 6;
+} elseif (@$_POST['step6']) {
+    $current_step = 7;
 }
 
 // Managing the $encryptPassForm
@@ -376,7 +393,7 @@ if ($encryptPassForm == '1') {
     <div class="panel-body">
     <div class="row">
         <div class="col-md-4">
-            <div class="well">
+            <div class="well install-steps-menu">
                 <ol>
                     <li <?php step_active('1'); ?>><?php echo get_lang('InstallationLanguage'); ?></li>
                     <li <?php step_active('2'); ?>><?php echo get_lang('Requirements'); ?></li>
@@ -388,7 +405,7 @@ if ($encryptPassForm == '1') {
                 </ol>
             </div>
             <div id="note">
-                <a class="btn btn-default" href="../../documentation/installation_guide.html" target="_blank">
+                <a class="btn btn-default" href="<?php echo $installationGuideLink; ?>" target="_blank">
                     <i class="fa fa-file-text-o"></i> <?php echo get_lang('ReadTheInstallationGuide'); ?>
                 </a>
             </div>
@@ -589,13 +606,13 @@ if (@$_POST['step2']) {
     <?php echo get_lang('CampusName').' : '.$campusForm; ?><br />
     <?php echo get_lang('InstituteShortName').' : '.$institutionForm; ?><br />
     <?php echo get_lang('InstituteURL').' : '.$institutionUrlForm; ?><br />
-    <?php echo get_lang('ChamiloURL').' : '.$urlForm; ?><br />
+    <?php echo get_lang('ChamiloURL').' : '.$urlForm; ?><br /><br />
     <?php
     if ($installType == 'new') {
         echo Display::display_warning_message(
-            '<h3 style="text-align: center">'.get_lang(
+            '<h4 style="text-align: center">'.get_lang(
                 'Warning'
-            ).'</h3><br />'.get_lang('TheInstallScriptWillEraseAllTables'),
+            ).'</h4>'.get_lang('TheInstallScriptWillEraseAllTables'),
             false
         );
     }

+ 2 - 2
main/install/install.lib.php

@@ -553,7 +553,7 @@ function step_active($param)
 {
     global $current_step;
     if ($param == $current_step) {
-        echo 'class="current_step" ';
+        echo 'class="current-step" ';
     }
 }
 
@@ -677,7 +677,7 @@ function display_requirements(
     echo '<div class="RequirementHeading"><h2>'.display_step_sequence().get_lang('Requirements')."</h2></div>";
     echo '<div class="RequirementText">';
     echo '<strong>'.get_lang('ReadThoroughly').'</strong><br />';
-    echo get_lang('MoreDetails').' <a href="../../documentation/installation_guide.html" target="_blank">'.get_lang('ReadTheInstallGuide').'</a>.<br />'."\n";
+    echo get_lang('MoreDetails').' <a href="../../documentation/installation_guide.html" target="_blank">'.get_lang('ReadTheInstallationGuide').'</a>.<br />'."\n";
 
     if ($installType == 'update') {
         echo get_lang('IfYouPlanToUpgradeFromOlderVersionYouMightWantToHaveAlookAtTheChangelog').'<br />';

+ 47 - 0
main/install/profiles/dev.json

@@ -0,0 +1,47 @@
+{
+    "id": 1,
+    "name": "Development",
+    "description": "Platform ready for development and testing",
+    "params": [
+        {
+            "variable": "default_document_quotum",
+            "subkey": "",
+            "selected_value": "524288000"
+        },
+        {
+            "variable": "server_type",
+            "subkey": "",
+            "selected_value": "test"
+        },
+        {
+            "variable": "send_email_to_admin_when_create_course",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "allow_use_sub_language",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "hide_dltt_markup",
+            "subkey": "",
+            "selected_value": "false"
+        },
+        {
+            "variable": "profile",
+            "subkey": "email",
+            "selected_value": "true"
+        },
+        {
+            "variable": "profile",
+            "subkey": "name",
+            "selected_value": "true"
+        },
+        {
+            "variable": "profile",
+            "subkey": "phone",
+            "selected_value": "true"
+        }
+    ]
+}

+ 116 - 0
main/install/profiles/hr.json

@@ -1,12 +1,128 @@
 {
     "id": 1,
     "name": "HR",
+    "description": "Corporate-ready platform",
     "parent": "prod",
     "params": [
         {
             "variable": "allow_skills_tool",
             "subkey": "",
             "selected_value": "true"
+        },
+        {
+            "variable": "show_hot_courses",
+            "subkey": "",
+            "selected_value": "false"
+        },
+        {
+            "variable": "hide_global_announcements_when_not_connected",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "course_catalog_hide_private",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "catalog_show_courses_sessions",
+            "subkey": "",
+            "selected_value": "1"
+        },
+        {
+            "variable": "go_to_course_after_login",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "enable_quiz_scenario",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "allow_public_certificates",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "hide_scorm_pdf_link",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "hide_scorm_copy_link",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "show_session_description",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "session_course_ordering",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "course_create_active_tools",
+            "subkey": "dropbox",
+            "selected_value": "false"
+        },
+        {
+            "variable": "course_create_active_tools",
+            "subkey": "users",
+            "selected_value": "false"
+        },
+        {
+            "variable": "course_create_active_tools",
+            "subkey": "groups",
+            "selected_value": "false"
+        },
+        {
+            "variable": "course_create_active_tools",
+            "subkey": "chat",
+            "selected_value": "false"
+        },
+        {
+            "variable": "course_create_active_tools",
+            "subkey": "online_conference",
+            "selected_value": "false"
+        },
+        {
+            "variable": "course_create_active_tools",
+            "subkey": "student_publications",
+            "selected_value": "false"
+        },
+        {
+            "variable": "course_create_active_tools",
+            "subkey": "wiki",
+            "selected_value": "false"
+        },
+        {
+            "variable": "course_create_active_tools",
+            "subkey": "notebook",
+            "selected_value": "false"
+        },
+        {
+            "variable": "allow_captcha",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "prevent_multiple_simultaneous_login",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "user_reset_password",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "courses_default_creation_visibility",
+            "subkey": "",
+            "selected_value": "1"
         }
     ]
 }

+ 23 - 0
main/install/profiles/open.json

@@ -0,0 +1,23 @@
+{
+    "id": 1,
+    "name": "Open",
+    "description": "Open platform, like the free campus",
+    "parent": "prod",
+    "params": [
+        {
+            "variable": "allow_skills_tool",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "platform_unsubscribe_allowed",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "course_catalog_published",
+            "subkey": "",
+            "selected_value": "true"
+        }
+    ]
+}

+ 41 - 0
main/install/profiles/prod.json

@@ -1,6 +1,7 @@
 {
     "id": 1,
     "name": "Production",
+    "description": "The basis of all production platforms",
     "params": [
         {
             "variable": "show_link_bug_notification",
@@ -16,6 +17,46 @@
             "variable": "show_admin_toolbar",
             "subkey": "",
             "selected_value": "do_not_show"
+        },
+        {
+            "variable": "allow_registration",
+            "subkey": "",
+            "selected_value": "false"
+        },
+        {
+            "variable": "allow_registration_as_teacher",
+            "subkey": "",
+            "selected_value": "false"
+        },
+        {
+            "variable": "course_images_in_courses_list",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "allow_use_sub_language",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "allow_email_editor",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "enabled_text2audio",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "gradebook_score_display_coloring",
+            "subkey": "",
+            "selected_value": "true"
+        },
+        {
+            "variable": "gradebook_score_display_custom",
+            "subkey": "",
+            "selected_value": "true"
         }
     ]
 }

+ 0 - 1
main/lang/arabic/trad4all.inc.php

@@ -3432,7 +3432,6 @@ $FirstUseTip = "When you enter your campus for the first time, the best way to u
 $Version_ = "Version";
 $UpdateFromLMSVersion = "Update from Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Please select the language you'd like to use when installing";
-$ReadTheInstallGuide = "read the installation guide";
 $HereAreTheValuesYouEntered = "Here are the values you entered";
 $PrintThisPageToRememberPassAndOthers = "Print this page to remember your password and other settings";
 $TheInstallScriptWillEraseAllTables = "The install script will erase all tables of the selected databases. We heavily recommend you do a full backup of them before confirming this last install step.";

+ 0 - 1
main/lang/asturian/trad4all.inc.php

@@ -4670,7 +4670,6 @@ $FirstUseTip = "Si entra na plataforma por vez primera, la meyor manera d'entend
 $Version_ = "Versión";
 $UpdateFromLMSVersion = "Actualización de Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Por favor, escueya l'idioma que quier usar pa esta instalación.";
-$ReadTheInstallGuide = "lleer la guía d'instalación";
 $HereAreTheValuesYouEntered = "Estos son los valores escritos";
 $PrintThisPageToRememberPassAndOthers = "Imprente esta páxina p'alcordase de la so seña y otres configuraciones";
 $TheInstallScriptWillEraseAllTables = "El programa d'instalación va esborrar toles tables de les bases de datos seleicionaes. Recomendamos que faiga una copia de seguridá completa enantes de dar el so preste a esti últimu pasu de la instalación.";

+ 0 - 2
main/lang/basque/trad4all.inc.php

@@ -5368,7 +5368,6 @@ $FirstUseTip = "Zure atarian lehenengo aldiz sartzen zarenean, berataz jabetzeko
 $Version_ = "Bertsioa";
 $UpdateFromLMSVersion = "Chamilo eguneratzea";
 $PleaseSelectInstallationProcessLanguage = "Mesedez, aukeratu instalazioaren bitartean erabili nahi duzun hizkuntza";
-$ReadTheInstallGuide = "irakurri instalatzeko gida";
 $HereAreTheValuesYouEntered = "Zuk sartu dituzun balioak honakoak dira:";
 $PrintThisPageToRememberPassAndOthers = "Inprimatu orri hau zure pasahitza eta beste ezarpen batzuk gogoratzeko";
 $TheInstallScriptWillEraseAllTables = "Instalazio scriptak hautatutako datu baseen taula guztiak ezabatuko ditu. Badaezpada, gogoz gomendatzen dizugu horien babeskopia osoa egitea, instalazioaren azken urrats hau baieztatu baino lehen.";
@@ -5666,7 +5665,6 @@ $ViewUsersWithTask = "Egindako lanak jaso dira";
 $ReminderMessage = "Bidali gogorarazteko mezua";
 $DateSent = "Bidalketa eguna";
 $ViewUsersWithoutTask = "Ikusi falta diren lanak";
-$SuggestionOnlyToEnableCSSUploadFeature = "CSS fitxategiak kargatzeko aukera gaitu nahi baduzu bakarrik da beharrezkoa";
 $SuggestionOnlyToEnableSubLanguageFeature = "Azpi-hizkuntzak aukera gaitu nahi baduzu bakarrik da beharrezkoa";
 $ThematicAdvance = "Aurrerapen tematikoa";
 $EditProfile = "Editatu profila";

+ 0 - 2
main/lang/brazilian/trad4all.inc.php

@@ -5181,7 +5181,6 @@ $FirstUseTip = "Quando acessar a plataforma pela primeira vez, a melhor maneira
 $Version_ = "Versão";
 $UpdateFromLMSVersion = "Atualizar a partir do Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Selecione, por favor, o idioma que gostaria de usar durante a instalação";
-$ReadTheInstallGuide = "ler o guia de instalação";
 $HereAreTheValuesYouEntered = "Aqui estão os valores que introduziu";
 $PrintThisPageToRememberPassAndOthers = "Imprima esta página para se lembrar da senha e demais configurações";
 $TheInstallScriptWillEraseAllTables = "O script de instalação apagará todas as tabelas das bases de dados selecionadas. Recomendamos que faça uma cópia de todas elas antes de confirmar a última etapa da instalação.";
@@ -5440,7 +5439,6 @@ $ViewUsersWithTask = "Atividades recebidas";
 $ReminderMessage = "Enviar um lembrete";
 $DateSent = "Data de envio";
 $ViewUsersWithoutTask = "Visualizar atividades faltantes";
-$SuggestionOnlyToEnableCSSUploadFeature = "Sugestão somente se você desejar ativar o recurso de upload de arquivos CSS";
 $SuggestionOnlyToEnableSubLanguageFeature = "Sugestão somente se você desejar ativar o recurso de sub-linguagem";
 $ThematicAdvance = "Progresso temático";
 $EditProfile = "Editar perfil";

+ 0 - 2
main/lang/bulgarian/trad4all.inc.php

@@ -4636,7 +4636,6 @@ $FirstUseTip = "Когато влезете за пръв път в портал
 $Version_ = "версия";
 $UpdateFromLMSVersion = "Надграждане (ъпгрейд) на Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Моля, изберете езика, който бихте желали да използвате по време на инсталирането <i>(Please select the language you'd like to use while installing)</i>:";
-$ReadTheInstallGuide = "прочетете ръководството за инсталиране";
 $HereAreTheValuesYouEntered = "Това са настройките, които току-що въведохте";
 $PrintThisPageToRememberPassAndOthers = "Отпечатайте тази страница, за да съхраните паролите си и другите настройки";
 $TheInstallScriptWillEraseAllTables = "Инсталаторът ще изтрие всички предишни таблици в указаните бази данни. Настоятелно Ви препоръчване да направите резервен архив на базите данни, преди да потвърдите последната стъпка на инсталирането.";
@@ -4826,7 +4825,6 @@ $ViewUsersWithTask = "Получени задачи";
 $ReminderMessage = "Изпращане на напомнително съобщение";
 $DateSent = "Дата на изпращане";
 $ViewUsersWithoutTask = "Преглед за липсващи работи";
-$SuggestionOnlyToEnableCSSUploadFeature = "Изисква се само ако искате да качвате допълнителни визуални стилове";
 $SuggestionOnlyToEnableSubLanguageFeature = "Изисква се само ако искате да ползвате производни, адаптирани езикови файлове за съответната организация";
 $ThematicAdvance = "Тематичен напредък";
 $EditProfile = "Редактиране на профила";

+ 70 - 2
main/lang/catalan/trad4all.inc.php

@@ -2,6 +2,76 @@
 /*
 for more information: see languages.txt in the lang folder.
 */
+$FirstAccessWasXSessionDurationYEndDateInZDays = "El primer accés d'aquest usuari a aquesta sessió va ser el %s. Amb una durada de %s dies, la data final està configurada en %s dies.";
+$UserNeverAccessedSessionDefaultDurationIsX = "Aquest usuari mai ha accedit abans a aquesta sessió. La durada està configurada a %s dies (des de la data del primer accés).";
+$SessionDurationEdit = "Edita la durada de la sessió";
+$EditUserSessionDuration = "Edita la durada de la sessió de l'usuari";
+$SessionDurationXDaysLeft = "Aquesta sessió té una durada màxima. Només queden %s dies.";
+$NextTopic = "Proper tema";
+$CurrentTopic = "Tema actual";
+$ShowFullCourseAdvance = "Mostra programació";
+$RedirectToCourseHome = "Redirigiu a l'inici del Curs";
+$LpReturnLink = "Enllaç de retorn en les lliçons";
+$LearningPathList = "Llista de lliçons";
+$UsersWithoutTask = "Estudiants que no han enviat la seva tasca";
+$UsersWithTask = "Estudiants que han enviat la seva tasca";
+$UploadFromTemplate = "Puja des de plantilla";
+$DocumentAlreadyAdded = "Ja s'ha afegit un document";
+$AddDocument = "Afegeix document";
+$ExportToDoc = "Exporta a .doc";
+$SortByTitle = "Ordena per títol";
+$SortByUpdatedDate = "Ordena per data d'edició";
+$SortByCreatedDate = "Ordena per data de creació";
+$ViewTable = "Vista en taula";
+$ViewList = "Vista en llista";
+$DRH = "Responsable de Recursos Humans";
+$Global = "Global";
+$QuestionTitle = "Títol de la pregunta";
+$QuestionId = "ID de la pregunta";
+$ExerciseId = "ID d'exercici";
+$ExportExcel = "Exporteu Excel";
+$CompanyReportResumed = "Informe corporatiu resumit";
+$CompanyReport = "Informe corporatiu";
+$Report = "Informe";
+$TraceIP = "Seguiu IP";
+$NoSessionProvided = "No s'ha indicat una sessió";
+$UserMustHaveTheDrhRole = "Els usuaris han de tenir el rol de director de recursos humans";
+$NothingToAdd = "Res per afegir";
+$NoStudentsFoundForSession = "Cap alumne trobat per a la sessió";
+$NoDestinationSessionProvided = "Sessió de destinació no indicada";
+$SessionXSkipped = "Sessió %s ignorada";
+$CheckDates = "Valideu les dates";
+$CreateACategory = "Crea una categoria";
+$PriorityOfMessage = "Tipus de missatge";
+$ModifyDate = "Data de modificació";
+$Weep = "Plora";
+$LatestChanges = "Darrers canvis";
+$FinalScore = "Nota final";
+$ErrorWritingXMLFile = "Hi ha hagut un error a l'escriure l'arxiu XML. Contacteu amb el seu administrador per tal que verifiqui els registres d'errors.";
+$TeacherXInSession = "Tutor a sessió: %s";
+$DeleteAttachment = "Elimineu arxiu adjunt";
+$EditingThisEventWillRemoveItFromTheSerie = "Editar aquest esdeveniment l'eliminarà de la llista d'esdeveniments de la que formeu part en aquests moments";
+$EnterTheCharactersYouReadInTheImage = "Introduïu els caràcters que veieu a la imatge";
+$YouDontHaveAnInstitutionAccount = "Si no té compte institucional";
+$LoginWithYourAccount = "Accediu amb el vostre compte";
+$YouHaveAnInstitutionalAccount = "Si teniu un compte institucional";
+$NoActionAvailable = "No hi ha acció disponible";
+$Coaches = "Tutors";
+$ShowDescription = "Mostra descripció";
+$HumanResourcesManagerShouldNotBeRegisteredToCourses = "Els directors de recursos humans no poden ser inscrits directament als cursos (en el seu lloc haurien de 'seguir-los'). Els usuaris que corresponen a aquest perfil no han estat inscrits.";
+$CleanAndUpdateCourseCoaches = "Neteja i actualitza les tutors de cursos";
+$NoPDFFoundAtRoot = "No s'han trobat PDF a l'arrel: heu de posar els PDF a l'arrel del vostre arxiu ZIP (sense cap cartpeta intermèdia)";
+$PDFsMustLookLike = "Els PDF s'han de veure així:";
+$ImportZipFileLocation = "Ubicació de l'arxiu d'importació ZIP";
+$YouMustImportAZipFile = "Heu d'importar com a arxiu ZIP";
+$ImportPDFIntroToCourses = "Importa introduccions de cursos en PDF";
+$SubscribeTeachersToSession = "Inscriu professors a sessions";
+$SubscribeStudentsToSession = "Inscriu estudiants a sessions";
+$ManageCourseCategories = "Gestiona les categories de cursos";
+$CourseCategoryListInX = "Categories de cursos en el lloc %s:";
+$CourseCategoryInPlatform = "Categories de cursos disponibles";
+$UserGroupBelongURL = "El grup ara pertany al grup seleccionat";
+$AtLeastOneUserGroupAndOneURL = "Heu de seleccionar com a mínim un grup i un lloc";
 $AgendaList = "Llista agenda";
 $Calendar = "Calendari";
 $CustomRange = "Rang personalitzat";
@@ -5394,7 +5464,6 @@ $FirstUseTip = "Quan entreu a la seva plataforma per primer cop, la millora mane
 $Version_ = "Versió";
 $UpdateFromLMSVersion = "Actualització de Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Seleccioneu l'idioma que desitgeu utilitzar durant la instal·lació";
-$ReadTheInstallGuide = "Llegiu la guia d'instal·lació";
 $HereAreTheValuesYouEntered = "Aquests són els valors que heu introduït";
 $PrintThisPageToRememberPassAndOthers = "Imprimiu aquesta pàgina per tal que recordeu la vostra contrasenya i d'altres configuracions";
 $TheInstallScriptWillEraseAllTables = "El programa d'instal·lació esborrarà totes les taules de les bases de dades seleccionades. Li recomanem encaridament que realitzi un còpia de seguretat completa de totes elles abans de confirmar aquest últim pas de la instal·lació.";
@@ -5699,7 +5768,6 @@ $ViewUsersWithTask = "Mostra estudiants que han enviat la tasca";
 $ReminderMessage = "Envia un recordatori";
 $DateSent = "Data d'enviament";
 $ViewUsersWithoutTask = "Mostra estudiants que no han enviat la tasca";
-$SuggestionOnlyToEnableCSSUploadFeature = "Només necessari si desitgeu habilitar la funcionalitat de càrrega d'arxius CSS";
 $SuggestionOnlyToEnableSubLanguageFeature = "Només necessari si desitgeu habilitar la funcionalitat de sub-idiomes";
 $ThematicAdvance = "Avança temàtic";
 $EditProfile = "Edita perfil";

+ 0 - 1
main/lang/croatian/trad4all.inc.php

@@ -3453,7 +3453,6 @@ $FirstUseTip = "Kad pristupite vašem portalu po prvi put, najbolji način da ga
 $Version_ = "Verzija";
 $UpdateFromLMSVersion = "Nadogradnja od Chamilo-a";
 $PleaseSelectInstallationProcessLanguage = "Molim odaberite jezik koji želite upotrebljavati prilikom instalacije";
-$ReadTheInstallGuide = "pročitaj upute za instalaciju";
 $HereAreTheValuesYouEntered = "Ovo su vrijednosti koje ste upisali";
 $PrintThisPageToRememberPassAndOthers = "Ispiši ovu stranicu da zapamtite vašu lozinku i ostale postavke";
 $TheInstallScriptWillEraseAllTables = "Instalacijska skripta će obrisati sva polja odabrane baze podataka. Preporučavamo vam da napravite cjelovitu sigurnosnu kopiju vašeg sustava prije potvrde ovog zadnjeg instalacijskog koraka.";

+ 0 - 2
main/lang/dutch/trad4all.inc.php

@@ -4725,7 +4725,6 @@ $FirstUseTip = "Wanneer u de campus voor het eerst gebruikt, is de beste werkwij
 $Version_ = "Versie";
 $UpdateFromLMSVersion = "Update van Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Selecteer de taal die u wil gebruiken tijdens de installaties";
-$ReadTheInstallGuide = "Lees de installatiehandleiding";
 $HereAreTheValuesYouEntered = "Dit zijn de waarden die u heeft ingevoerd";
 $PrintThisPageToRememberPassAndOthers = "Druk deze pagina af om uw paswoord en andere instellingen te helpen onthouden";
 $TheInstallScriptWillEraseAllTables = "Het installatiescript zal alle tabellen van de geselecteerde databank verwijderen. Het is heel belangrijk om eerst een volledige backup van de tabellen/databank te maken vooraleer de laatste stap te bevestigen.";
@@ -4991,7 +4990,6 @@ $ViewUsersWithTask = "Ontvangen opgaven";
 $ReminderMessage = "Stuur een herinnering";
 $DateSent = "Verzenddatum";
 $ViewUsersWithoutTask = "Toon ontbrekende opgaven";
-$SuggestionOnlyToEnableCSSUploadFeature = "Suggestie enkel wanneer je de CSS upload feature wil inschakelen";
 $SuggestionOnlyToEnableSubLanguageFeature = "Suggestie enkel wanneer je de sub-language feature wil inschakelen";
 $ThematicAdvance = "Thematische voortgang";
 $EditProfile = "Bewerk profiel";

+ 6 - 3
main/lang/english/trad4all.inc.php

@@ -5260,7 +5260,7 @@ $FirstUseTip = "When you enter your portal for the first time, the best way to u
 $Version_ = "Version";
 $UpdateFromLMSVersion = "Update from Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Please select the language you'd like to use when installing";
-$ReadTheInstallGuide = "read the installation guide";
+$AsciiSvgComment = "Enable the AsciiSVG plugin in the WYSIWYG editor to draw charts from mathematical functions.";
 $HereAreTheValuesYouEntered = "Here are the values you entered";
 $PrintThisPageToRememberPassAndOthers = "Print this page to remember your password and other settings";
 $TheInstallScriptWillEraseAllTables = "The install script will erase all tables of the selected databases. We heavily recommend you do a full backup of them before confirming this last install step.";
@@ -5352,6 +5352,7 @@ $UserTag = "User tag";
 $SelectSession = "Select session";
 $SpecialCourse = "Special course";
 $DurationInWords = "Duration in words";
+$UploadCorrection = "Upload correction";
 $MathASCIImathMLTitle = "ASCIIMathML mathematical editor";
 $MathASCIImathMLComment = "Enable ASCIIMathML mathematical editor";
 $YoutubeForStudentsTitle = "Allow learners to insert videos from YouTube";
@@ -5523,8 +5524,8 @@ $ViewUsersWithTask = "Assignments received";
 $ReminderMessage = "Send a reminder";
 $DateSent = "Date sent";
 $ViewUsersWithoutTask = "View missing assignments";
-$SuggestionOnlyToEnableCSSUploadFeature = "Suggestion only if you want to enable the CSS upload feature";
-$SuggestionOnlyToEnableSubLanguageFeature = "Suggestion only if you want to enable the sub-language feature";
+$AsciiSvgTitle = "Enable AsciiSVG";
+$SuggestionOnlyToEnableSubLanguageFeature = "Only required by the sub-languages feature";
 $ThematicAdvance = "Thematic advance";
 $EditProfile = "Edit profile";
 $TabsDashboard = "Dashboard";
@@ -7506,4 +7507,6 @@ $EnterPassword = "Enter password";
 $DownloadReportPdf = "Download report in PDF";
 $SkillXEnabled = "Skill \"%s\" enabled";
 $SkillXDisabled = "Skill \"%s\" disabled";
+$ShowFullSkillNameOnSkillWheelTitle = "Show full skill name on skill wheel";
+$ShowFullSkillNameOnSkillWheelComment = "On the wheel of skills, it shows the name of the skill when it has short code.";
 ?>

+ 15 - 5
main/lang/french/trad4all.inc.php

@@ -1514,7 +1514,7 @@ $ShowToolShortcutsComment = "Afficher les raccourcis vers les outils dans la ban
 $ShowStudentViewTitle = "Vue apprenant";
 $ShowStudentViewComment = "Activer la vue étudiant ?<br />Cette fonctionnalité permet à l'enseignant de voir ce qu'un étudiant verrait.";
 $AllowGroupCategories = "Catégories de groupes";
-$AllowGroupCategoriesComment = "Autoriser les administrateurs de cours de créer des catégories dans le module \"groupes\"?";
+$AllowGroupCategoriesComment = "Autoriser les administrateurs de cours à créer des catégories dans l'outil \"groupes\" du cours";
 $PlatformLanguageComment = "Vous pouvez déterminer la langue de la plateforme dans une autre section de l'administration, soit: <a href=\"languages.php\">Langues de la plateforme Chamilo</a>";
 $ProductionServer = "Serveur de production";
 $TestServer = "Serveur de test";
@@ -1921,7 +1921,7 @@ $DisplayUpcomingEventsTitle = "Afficher les événements à venir dans l'outil A
 $DisplayUpcomingEventsComment = "Ce paramètre active ou désactive les événements à venir qui apparaissent dans la colonne de gauche de l'outil Agenda du cours";
 $NumberOfUpcomingEventsTitle = "Nombre d'événements à venir qui doivent être affichés.";
 $NumberOfUpcomingEventsComment = "Le nombre d'événements à venir à afficher dans l'agenda. Ceci nécessite que l'affichage des événements à venir soit activé.";
-$ShowClosedCoursesTitle = "Afficher les cours fermées sur la page de login et sur l'accueil du portail ?";
+$ShowClosedCoursesTitle = "Afficher les cours fermés sur la page de login et sur l'accueil du portail ?";
 $ShowClosedCoursesComment = "Sur la page d'accueil du portail, une icône sera affichée à côté du cours pour s'y inscrire rapidement.";
 $LDAPConnectionError = "Erreur de connexion LDAP";
 $LDAP = "LDAP";
@@ -5251,7 +5251,7 @@ $FirstUseTip = "Lorsque vous entrez pour la première fois sur votre campus, la
 $Version_ = "Version";
 $UpdateFromLMSVersion = "Mise-à-jour depuis Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Veuillez sélectionner la langue de l'installateur";
-$ReadTheInstallGuide = "lisez le guide d'installation";
+$AsciiSvgComment = "Activer le plugin AsciiSVG de l'éditeur en ligne pour permettre la génération de graphiques selon des fonctions mathématiques.";
 $HereAreTheValuesYouEntered = "Voici les valeurs que vous avez introduites";
 $PrintThisPageToRememberPassAndOthers = "Imprimez cette page pour conserver votre mot de passe et autres paramètres";
 $TheInstallScriptWillEraseAllTables = "Le script d'installation va supprimer toutes les tables des bases de données sélectionnées. Nous recommandons avec insistance pour que vous fassiez une copie de sauvegarde complète de celles-ci avant de confirmer cette dernière étape de l'installation.";
@@ -5342,6 +5342,8 @@ $SendEmailToAdminComment = "Envoyer un e-mail à l'administrateur de la platefor
 $UserTag = "Tag utilisateur";
 $SelectSession = "Sélectionner session";
 $SpecialCourse = "Cours spécial";
+$DurationInWords = "Durée exprimée en mots";
+$UploadCorrection = "Envoyer une correction";
 $MathASCIImathMLTitle = "Éditeur mathématique ASCIImathML";
 $MathASCIImathMLComment = "Activer l'éditeur mathématique ASCIImathML";
 $YoutubeForStudentsTitle = "Autoriser les apprenants à insérer des vidéos depuis YouTube";
@@ -5513,7 +5515,7 @@ $ViewUsersWithTask = "Travaux déjà remis";
 $ReminderMessage = "Envoyer un rappel";
 $DateSent = "Date de réception";
 $ViewUsersWithoutTask = "Travaux manquants";
-$SuggestionOnlyToEnableCSSUploadFeature = "Suggestion, uniquement nécessaire pour activer l'upload de CSS";
+$AsciiSvgTitle = "Activer AsciiSVG";
 $SuggestionOnlyToEnableSubLanguageFeature = "Suggestion, uniquement nécessaire pour activer la fonctionnalité de sous-langage";
 $ThematicAdvance = "Progression du cours";
 $EditProfile = "Éditer le profil";
@@ -6174,6 +6176,7 @@ $ChatFiles = "Historique de conversations dans le chat";
 $Flash = "Flash";
 $Video = "Vidéo";
 $Images = "Images";
+$UploadCorrections = "Envoyer des corrections";
 $Text2AudioTitle = "Activer les services en ligne de conversion de texte à audio (text-to-speech)";
 $Text2AudioComment = "Outil en ligne pour la conversion du texte à l'audio. Cet outil utilise un système de synthétisation de la voix pour générer des pistes audio.";
 $ShowUsersFoldersTitle = "Montrer les répertoires utilisateurs dans l'outil de documents";
@@ -6195,7 +6198,7 @@ $Female = "Féminine";
 $Male = "Masculine";
 $IncludeAsciiMathMlTitle = "Charger la librairie Mathjax sur toutes les pages du système";
 $IncludeAsciiMathMlComment = "Activez ce paramètre si vous désirez pouvoir afficher des formules mathématiques basées sur MathML et des graphiques mathématiques basés sur ASCIIsvg, non seulement dans l'outil de cours, mais partout ailleurs sur la plateforme.";
-$CourseHideToolsTitle = "Cacher des outils par rapport aux enseignants";
+$CourseHideToolsTitle = "Occulter des outils aux enseignants";
 $CourseHideToolsComment = "Sélectionnez les outils que vous désirez cacher des enseignants. Cette option interdira l'accès à l'outil.";
 $GoogleAudio = "Utiliser les services audio de Google";
 $vozMe = "Utiliser les services audio vozMe";
@@ -7486,4 +7489,11 @@ $ResetPasswordTokenLimitTitle = "Limite de clef de réinitialisation du mot de p
 $ResetPasswordTokenLimitComment = "La quantité de secondes avant que la clef générée expire automatiquement et ne puisse plus être utilisée (il faut alors générer une nouvelle clef).";
 $ViewMyCoursesListBySessionTitle = "Vue des sessions par cours";
 $ViewMyCoursesListBySessionComment = "Active une nouvelle page \"Mes cours\" où les sessions apparaîssent comme partie des cours, plutôt que l'inverse.";
+$DownloadCertificatePdf = "Télécharger certificat en PDF";
+$EnterPassword = "Introduir mot de passe";
+$DownloadReportPdf = "Télécharger rapport en PDF";
+$SkillXEnabled = "Compétence \"%s\" activée";
+$SkillXDisabled = "Compétence \"%s\" désactivée";
+$ShowFullSkillNameOnSkillWheelTitle = "Montrer nom complet sur roue de compétences";
+$ShowFullSkillNameOnSkillWheelComment = "Dans la roue des compétences, montrer le titre complet de la compétence même si celle-ci dispose d'un code court (peut rendre la roue moins lisible selon la quantité de compétences)";
 ?>

+ 0 - 2
main/lang/galician/trad4all.inc.php

@@ -5214,7 +5214,6 @@ $FirstUseTip = "Cando entra no seu Campus por primeira vez, o mellor xeito de en
 $Version_ = "Versión";
 $UpdateFromLMSVersion = "Actualización de Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Por favor, seleccione o idioma que desexa utilizar durante a instalación";
-$ReadTheInstallGuide = "ler a guía de instalación";
 $HereAreTheValuesYouEntered = "Estes son os valores que introduciu";
 $PrintThisPageToRememberPassAndOthers = "Imprima esta páxina para recordar o seu contrasinal e outras configuracións";
 $TheInstallScriptWillEraseAllTables = "O programa de instalación borrará todas as táboas das bases de datos seleccionadas. Recomendámoslle encarecidamente que realice unha copia de seguridade completa de todas elas antes de confirmar este último paso na instalación.";
@@ -5512,7 +5511,6 @@ $ViewUsersWithTask = "Tarefas recibidas";
 $ReminderMessage = "Enviar un recordatorio";
 $DateSent = "Data de envío";
 $ViewUsersWithoutTask = "Ver tarefas perdidas";
-$SuggestionOnlyToEnableCSSUploadFeature = "Aconsellable só si quere activar a opción de subida de CSS";
 $SuggestionOnlyToEnableSubLanguageFeature = "Aconsellable só si quere activar a opción de sub-linguaxe";
 $ThematicAdvance = "Avance temático";
 $EditProfile = "Editar perfil";

+ 0 - 2
main/lang/german/trad4all.inc.php

@@ -4738,7 +4738,6 @@ $FirstUseTip = "Sie können die Funktionsweise am besten verstehen, wenn Sie sic
 $Version_ = "Version";
 $UpdateFromLMSVersion = "Chamilo Update";
 $PleaseSelectInstallationProcessLanguage = "Bitte die Sprache auswählen, die während der Installation benutzt werden soll";
-$ReadTheInstallGuide = "Den Installation Guide lesen";
 $HereAreTheValuesYouEntered = "Hier sind die Werte, die eingetragen wurden";
 $PrintThisPageToRememberPassAndOthers = "Diese Seite ausdrucken, um sich an das Passwort und andere Werte zu erinnern";
 $TheInstallScriptWillEraseAllTables = "Das Install-Script wird alle Tabellen der ausgewählten Datenbanken löschen. Es wird vorgeschlagen, unbedingt ein Backup der Datenbanken zu erstellen (sofern gewünscht), bevor dieser letzte Schritt bestätigt wird.";
@@ -4996,7 +4995,6 @@ $ViewUsersWithTask = "Erhaltene Ausarbeitungen";
 $ReminderMessage = "Erinnerung senden";
 $DateSent = "Absendedatum";
 $ViewUsersWithoutTask = "Fehlende Ausarbeitungen anzeigen";
-$SuggestionOnlyToEnableCSSUploadFeature = "Vorschlag erfolgt nur, wenn das CSSuploadfeature aktiviert wurde";
 $SuggestionOnlyToEnableSubLanguageFeature = "Vorschlag erfolgt nur, wenn das Untersprachenfeature aktiviert wurde";
 $ThematicAdvance = "Thematischer Aufbau";
 $EditProfile = "Profil bearbeiten";

+ 0 - 2
main/lang/greek/trad4all.inc.php

@@ -4707,7 +4707,6 @@ $FirstUseTip = "When you enter your portal for the first time, the best way to u
 $Version_ = "Version";
 $UpdateFromLMSVersion = "Update from Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Please select the language you'd like to use when installing";
-$ReadTheInstallGuide = "read the installation guide";
 $HereAreTheValuesYouEntered = "Here are the values you entered";
 $PrintThisPageToRememberPassAndOthers = "Print this page to remember your password and other settings";
 $TheInstallScriptWillEraseAllTables = "The install script will erase all tables of the selected databases. We heavily recommend you do a full backup of them before confirming this last install step.";
@@ -4942,7 +4941,6 @@ $ViewUsersWithTask = "Assignments received";
 $ReminderMessage = "Send a reminder";
 $DateSent = "Date sent";
 $ViewUsersWithoutTask = "View missing assignments";
-$SuggestionOnlyToEnableCSSUploadFeature = "Suggestion only if you want to enable the CSS upload feature";
 $SuggestionOnlyToEnableSubLanguageFeature = "Suggestion only if you want to enable the sub-language feature";
 $ThematicAdvance = "Θεματική πρόοδος";
 $EditProfile = "Επεξεργασία Προφίλ";

+ 0 - 1
main/lang/hungarian/trad4all.inc.php

@@ -3764,7 +3764,6 @@ $FirstUseTip = "Könnyen megértheti a portál működését, ha az első belép
 $Version_ = "Verzió";
 $UpdateFromLMSVersion = "Frissítés Chamilo-ról";
 $PleaseSelectInstallationProcessLanguage = "Kérjük válassza ki azt a nyelvet, amit telepítéskor használni szeretne.";
-$ReadTheInstallGuide = "a telepítési kézikönyv olvasása";
 $HereAreTheValuesYouEntered = "Ezeket az adatokat adta meg";
 $PrintThisPageToRememberPassAndOthers = "Nyomtassa ki az oldalt, így könnyen felhasználhatja a jelszavakat és egyéb információkat";
 $TheInstallScriptWillEraseAllTables = "A telepítőprogram minden táblát (és adatot) törölni fog a megadott adatbázisokból. Nyomtatékosan javasoljuk, hogy végezzen el egy teljes biztonsági mentést, mielőtt elindítaná a telepítés utolsó fázisát.";

+ 0 - 2
main/lang/italian/trad4all.inc.php

@@ -4690,7 +4690,6 @@ $FirstUseTip = "Se entri per la prima volta nel campus, la prima cosa da fare è
 $Version_ = "Versione";
 $UpdateFromLMSVersion = "Aggiorna dal sito di Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Ti prego di selezionare la lingua che preferisci usare nel corso dell'installazione";
-$ReadTheInstallGuide = "leggi la guida all'installazione";
 $HereAreTheValuesYouEntered = "Hai immesso i seguenti valori";
 $PrintThisPageToRememberPassAndOthers = "Stampa la pagina per ricordare la password e i parametri di configurazione";
 $TheInstallScriptWillEraseAllTables = "Lo script di installazione svuoterà completamente le tabelle dei database selezionati. TI RACCOMANDIAMO di eseguire un BACKUP COMPLETO del database e dei files prima di confermare l'inizio dell'installazione.";
@@ -4947,7 +4946,6 @@ $ViewUsersWithTask = "File già inviato";
 $ReminderMessage = "Manda un messaggio di richiamo";
 $DateSent = "Data d'invio";
 $ViewUsersWithoutTask = "Mostra i corsisti senza compiti assegnati";
-$SuggestionOnlyToEnableCSSUploadFeature = "Suggerimento: solo in caso si voglia abilitare il caricamento di CSS";
 $SuggestionOnlyToEnableSubLanguageFeature = "Suggerimento: solo se intendi abilitare la funzione di articolazione della lingua";
 $ThematicAdvance = "Avanzamento degli argomenti";
 $EditProfile = "Modifica il profilo";

+ 0 - 2
main/lang/latvian/trad4all.inc.php

@@ -4584,7 +4584,6 @@ $FirstUseTip = "Kad jūs ieiesiet savā portālā pirmo reizi, labākais veids,
 $Version_ = "Versija";
 $UpdateFromLMSVersion = "Modernizēt no Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Lūdzu izvēlieties instalācijas valodu";
-$ReadTheInstallGuide = "Lasiet instalācijas pamācību";
 $HereAreTheValuesYouEntered = "Šeit ir jūsu ievadītie parametri";
 $PrintThisPageToRememberPassAndOthers = "Izdrukājiet šo lapu, lai atcerētos jūsu paroli un citus uzstādījumus";
 $TheInstallScriptWillEraseAllTables = "Instalācijas skripts izdzēsīs visas tabulas no izvēlētajām datu bāzēm. Mēs ļoti iesakām jums izveidot pilnu dublējumkopiju no tām, pirms apstiprināt šo pēdējo instalēšanas soli.";
@@ -4837,7 +4836,6 @@ $ViewUsersWithTask = "Uzdevumi saņemti";
 $ReminderMessage = "Nosūtīt atgādinājumu";
 $DateSent = "Nosūtīšanas datums";
 $ViewUsersWithoutTask = "Skatīt trūkstošos uzdevumus";
-$SuggestionOnlyToEnableCSSUploadFeature = "Ieteikums tikai tad, ja jūs vēlaties aktivizēt CSS augšupielādes funkciju";
 $SuggestionOnlyToEnableSubLanguageFeature = "Ieteikums tikai tad, ja jūs vēlaties aktivizēt apakš-valodas funkciju";
 $ThematicAdvance = "Priekšskatījums pa tematiem";
 $EditProfile = "Rediģēt savu profilu";

+ 0 - 1
main/lang/lithuanian/trad4all.inc.php

@@ -2858,7 +2858,6 @@ $FirstUseTip = "When you enter your campus for the first time, the best way to u
 $Version_ = "Version";
 $UpdateFromLMSVersion = "Update from Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Please select the language you'd like to use when installing";
-$ReadTheInstallGuide = "read the installation guide";
 $HereAreTheValuesYouEntered = "Here are the values you entered";
 $PrintThisPageToRememberPassAndOthers = "Print this page to remember your password and other settings";
 $TheInstallScriptWillEraseAllTables = "The install script will erase all tables of the selected databases. We heavily recommend you do a full backup of them before confirming this last install step.";

+ 0 - 1
main/lang/macedonian/trad4all.inc.php

@@ -2840,7 +2840,6 @@ $FirstUseTip = "Кога ќе влезете првпат во Вашиот ка
 $Version_ = "Верзија";
 $UpdateFromLMSVersion = "Надгради од Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Ве молиме изберете кој јазик сакате да го користите додека инсталирате";
-$ReadTheInstallGuide = "прочитајте го упатството за инсталирање";
 $HereAreTheValuesYouEntered = "Ова се вредностите што ги внесовте";
 $PrintThisPageToRememberPassAndOthers = "Испечатете ја оваа страница за да ја запомните Вашата лозинка и другите поставки";
 $TheInstallScriptWillEraseAllTables = "Инсталацијата ќе ги избрише сите табели на селектираната база на податоци. Строго препорачуваме да им направите целосна резервна_копија пред да го потврдите последниот чекор на инсталацијата.";

+ 0 - 2
main/lang/polish/trad4all.inc.php

@@ -4782,7 +4782,6 @@ $FirstUseTip = "Po wejściu do portalu po raz pierwszy, najlepszym sposobem na z
 $Version_ = "Wersja";
 $UpdateFromLMSVersion = "Aktualizacja z Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Proszę wybrać język, którego chcesz używać podczas instalacji";
-$ReadTheInstallGuide = "Zapoznaj się z instrukcją instalacji";
 $HereAreTheValuesYouEntered = "Wartości, które otworzyłeś/aś";
 $PrintThisPageToRememberPassAndOthers = "Wydrukuj tę stronę do zapamiętania hasła i innych ustawień";
 $TheInstallScriptWillEraseAllTables = "Skrypt instalacyjny usunie wszystkie tabele z wybranych baz danych. Zalecamy zrobić pełną kopię zapasową przed zatwierdzeniem ostatniego kroku instalacji.";
@@ -5061,7 +5060,6 @@ $ViewUsersWithTask = "Otrzymano zadania";
 $ReminderMessage = "Wyślij przypomnienie";
 $DateSent = "Dane zostały wysłane";
 $ViewUsersWithoutTask = "Wyświetl brakujące zadania";
-$SuggestionOnlyToEnableCSSUploadFeature = "Sugestia tylko jeśli chcesz, włączyć funkcję wysyłania CSS";
 $SuggestionOnlyToEnableSubLanguageFeature = "Sugestia tylko jeśli chcesz włączyć funkcję sub-języka";
 $ThematicAdvance = "Postęp tematyczny";
 $EditProfile = "Edytuj profil";

+ 0 - 1
main/lang/portuguese/trad4all.inc.php

@@ -4894,7 +4894,6 @@ $FirstUseTip = "Quando acede ao seu portal pela primeira vez, a melhor maneira d
 $Version_ = "Versão";
 $UpdateFromLMSVersion = "Actualizar a partir do Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Por favor, seleccione o idioma que gostaria de utilizar durante a instalação";
-$ReadTheInstallGuide = "ler o guia de instalação";
 $HereAreTheValuesYouEntered = "Estes são os valores que introduziu";
 $PrintThisPageToRememberPassAndOthers = "Imprima esta página para se lembrar da sua senha/password e de outras configurações";
 $TheInstallScriptWillEraseAllTables = "O script de instalação eliminará todas as tabelas das bases-de-dados seleccionadas. Recomendamos vivamente que realize previamente um backup/cópia de segurança das mesmas antes de confirmar esta última etapa do processo de instalação.";

+ 0 - 1
main/lang/quechua_cusco/trad4all.inc.php

@@ -4333,7 +4333,6 @@ $FirstUseTip = "Cuando entra en su plataforma por primera vez, la mejor manera d
 $Version_ = "Versión";
 $UpdateFromLMSVersion = "Actualización de Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Por favor, seleccione el idioma que desea utilizar durante la instalación";
-$ReadTheInstallGuide = "leer la guía de instalación";
 $HereAreTheValuesYouEntered = "Éstos son los valores que ha introducido";
 $PrintThisPageToRememberPassAndOthers = "Imprima esta página para recordar su contraseña y otras configuraciones";
 $TheInstallScriptWillEraseAllTables = "El programa de instalación borrará todas las tablas de las bases de datos seleccionadas. Le recomendamos encarecidamente que realice una copia de seguridad completa de todas ellas antes de confirmar este último paso de la instalación.";

+ 1 - 3
main/lang/romanian/trad4all.inc.php

@@ -5106,7 +5106,6 @@ $FirstUseTip = "Cand intrati in campus pt prima oara, cea mai buna metoda de a-l
 $Version_ = "versiune";
 $UpdateFromLMSVersion = "Actualizare de la Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Alegeti limba dorita din timpul instalarii";
-$ReadTheInstallGuide = "Citeste instructiunile de instalare";
 $HereAreTheValuesYouEntered = "Acestea sunt valorile pe care le-ati introdus";
 $PrintThisPageToRememberPassAndOthers = "Printeaza aceasta pagina pentru a te ajuta sa-ti amintesti parola si alte setari";
 $TheInstallScriptWillEraseAllTables = "Instalatia va anula tabelele din banca de date selectate. E foarte important ca prima data sa faceti un backup a tabelelor/bancii de date inainte de a definitiva ultimul pas.";
@@ -5344,7 +5343,6 @@ $ViewUsersWithTask = "A vedea elevii care au trimis sarcina";
 $ReminderMessage = "A reaminti";
 $DateSent = "Data trimiterii";
 $ViewUsersWithoutTask = "A vedea elevii care nu au trimis sarcina";
-$SuggestionOnlyToEnableCSSUploadFeature = "Este necesar doar daca doreste habilitarea funcctiunii de incarcare a archivelor CSS";
 $SuggestionOnlyToEnableSubLanguageFeature = "Este necesar doar daca doreste habilitarea funcctiunii de sub-limbi";
 $ThematicAdvance = "Momentul unității didactice";
 $EditProfile = "Editati perfil";
@@ -6851,4 +6849,4 @@ $WorkEmailAlertActivateOnlyForTeachers = "Permite doar profesorilor a observa do
 $WorkEmailAlertActivateOnlyForStudents = "Permite doar studenților a observa doar prin e-mail de a trimite o nouă sarcină";
 $Uncategorized = "Fara categorie";
 $NaturalYear = "An natural";
-?>
+?>

+ 0 - 1
main/lang/russian/trad4all.inc.php

@@ -3180,7 +3180,6 @@ $FirstUseTip = "Когда впервые входите на свою студ
 $Version_ = "Версия";
 $UpdateFromLMSVersion = "Обновить с Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Пожалуйста, выберите язык, которых хотели бы использовать при установке";
-$ReadTheInstallGuide = "читать руководство по установке";
 $HereAreTheValuesYouEntered = "Здесь значения, которые Вы ввели";
 $PrintThisPageToRememberPassAndOthers = "Распечатать эту страницу для памяти своего пароля и других настроек";
 $TheInstallScriptWillEraseAllTables = "Установленный шрифт сотрет все таблицы выбранных баз данных. Мы настоятельно рекомендуем сделать полную резервную копию перед тем, как подтвердить этот последний шаг установки.";

+ 0 - 2
main/lang/slovak/trad4all.inc.php

@@ -5310,7 +5310,6 @@ $FirstUseTip = "Keď prvýkrát vstúpite na portál, najlepší spôsob, ako ho
 $Version_ = "Verzia";
 $UpdateFromLMSVersion = "Aktualizácia z Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Prosím vyberte jazyk, ktorý chcete použiť pri inštalácii";
-$ReadTheInstallGuide = "čítať návod na inštaláciu";
 $HereAreTheValuesYouEntered = "Tu sú hodnoty, ktoré ste zadali";
 $PrintThisPageToRememberPassAndOthers = "Vytlačte túto stránku, aby ste nezabudli vaše heslo a ďalšie nastavenia";
 $TheInstallScriptWillEraseAllTables = "Inštalačný skript zmaže všetky tabuľky z vybraných databáz. Silno vám odporúčame vykonať ich úplnú zálohu pred potvrdením tohto posledného kroku inštalácie.";
@@ -5598,7 +5597,6 @@ $ViewUsersWithTask = "Prijaté zadania";
 $ReminderMessage = "Poslať pripomenutie";
 $DateSent = "Odoslať údaje";
 $ViewUsersWithoutTask = "Zobraziť chábajúce zadania";
-$SuggestionOnlyToEnableCSSUploadFeature = "Navrhnite iba v prípade, ak chcete povoliť CSS funkciu odoslania";
 $SuggestionOnlyToEnableSubLanguageFeature = "Návrh iba v prípade, že chcete povoliť funkciu pod-jazyka";
 $ThematicAdvance = "Cieľ témy";
 $EditProfile = "Upraviť profil";

+ 0 - 2
main/lang/slovenian/trad4all.inc.php

@@ -5203,7 +5203,6 @@ $FirstUseTip = "Ko vstopate v portal prvič, je najboljši način za spoznavanje
 $Version_ = "Različica";
 $UpdateFromLMSVersion = "Nadgradi iz Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Izberite jezik, ki ga želite uporabljati med namestitvijo";
-$ReadTheInstallGuide = "preberite vodič po namestitvi";
 $HereAreTheValuesYouEntered = "Tule so vrednosti, ki ste jih vnesli";
 $PrintThisPageToRememberPassAndOthers = "Da ne bi pozabili gesla in ostalih pomembnih nastavitev, natisnite vsebino te strani in jo shranite na varno mesto";
 $TheInstallScriptWillEraseAllTables = "Namestitveni program bo nepovratno odstranil vse tabele izbrane podatkovne baze. Strogo priporočamo da pred nadaljevanjem postopka izvedete njeno popolno arhiviranje.";
@@ -5465,7 +5464,6 @@ $ViewUsersWithTask = "Prejete naloge (zadolžitve)";
 $ReminderMessage = "Pošlji opomnik";
 $DateSent = "Podatki so bili poslani";
 $ViewUsersWithoutTask = "Poglej neizvršene/manjkajoče naloge";
-$SuggestionOnlyToEnableCSSUploadFeature = "Namig: zgolj v primeru, da želite omogočiti zmožnost nalaganja CSS";
 $SuggestionOnlyToEnableSubLanguageFeature = "Namig: zgolj v primeru, da želite omogočiti zmožnost uporabe pod-jezikov";
 $ThematicAdvance = "Tematsko napredovanje";
 $EditProfile = "Uredi profil";

File diff suppressed because it is too large
+ 62 - 60
main/lang/spanish/trad4all.inc.php


+ 0 - 1
main/lang/swedish/trad4all.inc.php

@@ -3058,7 +3058,6 @@ $FirstUseTip = "När du kommer till din kursplats första gången är det enklas
 $Version_ = "Version";
 $UpdateFromLMSVersion = "Uppdatera från Chamilo";
 $PleaseSelectInstallationProcessLanguage = "Välj det språk du vill använda under installationen";
-$ReadTheInstallGuide = "Läs installationsguiden";
 $HereAreTheValuesYouEntered = "Här är värdena du skrev in";
 $PrintThisPageToRememberPassAndOthers = "Skriv ut den här sidan och spara den med ditt lösenord och andra inställningar";
 $TheInstallScriptWillEraseAllTables = "Installationsprogrammet kommer ta bort alla tabeller i den valda databasen. Vi rekommenderar verkligen att du gör en fullständig säkerhetskopia av dem innan du bekräftar detta sista installationssteg, annars förlorar du alla data i tabellerna.";

+ 0 - 1
main/lang/trad_chinese/trad4all.inc.php

@@ -2957,7 +2957,6 @@ $FirstUseTip = "當你首次進入的學園時,瞭解它的最佳辦法是選
 $Version_ = "版本";
 $UpdateFromLMSVersion = "由 Chamilo 更新";
 $PleaseSelectInstallationProcessLanguage = "請選擇你在安裝時想使用的語言";
-$ReadTheInstallGuide = "閱讀安裝說明";
 $HereAreTheValuesYouEntered = "這是你輸入的數據";
 $PrintThisPageToRememberPassAndOthers = "列印本頁以記下你的密碼及設定";
 $TheInstallScriptWillEraseAllTables = "安裝程式會把指定數據庫中的原有資料表刪除。我們強烈建議你在確認最後的安裝步驟前進行完整的備份。";

+ 1 - 4
main/mySpace/course.php

@@ -4,15 +4,12 @@
  * Courses reporting
  * @package chamilo.reporting
  */
-/**
- * Code
- */
+
 ob_start();
 $nameTools = 'Cours';
 $cidReset = true;
 
 require_once '../inc/global.inc.php';
-require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
 
 $this_section = SECTION_TRACKING;
 

+ 12 - 10
main/mySpace/myStudents.php

@@ -34,6 +34,7 @@ function show_image(image,width,height) {
 
 $export = isset($_GET['export']) ? $_GET['export'] : false;
 $sessionId = isset($_GET['id_session']) ? intval($_GET['id_session']) : 0;
+$origin = isset($_GET['origin']) ? Security::remove_XSS($_GET['origin']) : '';
 
 if (empty($sessionId)) {
     $sessionId = api_get_session_id();
@@ -57,7 +58,7 @@ $nameTools = get_lang('StudentDetails');
 $get_course_code = isset($_GET['course']) ? Security :: remove_XSS($_GET['course']) : '';
 
 if (isset($_GET['details'])) {
-    if (!empty ($_GET['origin']) && $_GET['origin'] == 'user_course') {
+    if ($origin == 'user_course') {
         $course_info = CourseManager :: get_course_information($get_course_code);
         if (empty ($cidReq)) {
             $interbreadcrumb[] = array (
@@ -70,14 +71,14 @@ if (isset($_GET['details'])) {
             "name" => get_lang("Users")
         );
     } else
-        if (!empty($_GET['origin']) && $_GET['origin'] == 'tracking_course') {
+        if ($origin == 'tracking_course') {
             $course_info = CourseManager :: get_course_information($get_course_code);
             $interbreadcrumb[] = array (
                 "url" => "../tracking/courseLog.php?cidReq=".$get_course_code.'&id_session=' . api_get_session_id(),
                 "name" => get_lang("Tracking")
             );
         } else
-            if (!empty ($_GET['origin']) && $_GET['origin'] == 'resume_session') {
+            if ($origin == 'resume_session') {
                 $interbreadcrumb[] = array (
                     'url' => "../session/session_list.php",
                     "name" => get_lang('SessionList')
@@ -113,7 +114,7 @@ if (isset($_GET['details'])) {
             }
     $nameTools = get_lang("DetailsStudentInCourse");
 } else {
-    if (!empty ($_GET['origin']) && $_GET['origin'] == 'resume_session') {
+    if ($origin == 'resume_session') {
         $interbreadcrumb[] = array (
             'url' => "../session/session_list.php",
             "name" => get_lang('SessionList')
@@ -333,7 +334,7 @@ if (!empty($student_id)) {
     echo $send_mail;
     if (!empty($student_id) && !empty($_GET['course'])) {
         // Only show link to connection details if course and student were defined in the URL
-        echo '<a href="access_details.php?student=' . $student_id . '&course=' . Security :: remove_XSS($_GET['course']) . '&origin=' . Security :: remove_XSS($_GET['origin']) . '&cidReq='.Security::remove_XSS($_GET['course']).'&id_session='.$sessionId.'">'.
+        echo '<a href="access_details.php?student=' . $student_id . '&course=' . Security :: remove_XSS($_GET['course']) . '&origin=' . $origin. '&cidReq='.Security::remove_XSS($_GET['course']).'&id_session='.$sessionId.'">'.
             Display :: return_icon('statistics.png', get_lang('AccessDetails'),'',ICON_SIZE_MEDIUM).'</a>';
     }
     if (api_can_login_as($student_id)) {
@@ -713,10 +714,10 @@ if (!empty($student_id)) {
                         <td >'.$scoretotal_display.'</td>';
 
                         if (isset($_GET['id_coach']) && intval($_GET['id_coach']) != 0) {
-                            echo '<td width="10"><a href="'.api_get_self().'?student='.$user_info['user_id'].'&details=true&course='.$course_info['code'].'&id_coach='.Security::remove_XSS($_GET['id_coach']).'&origin='.Security::remove_XSS($_GET['origin']).'&id_session='.$sessionId.'#infosStudent">
+                            echo '<td width="10"><a href="'.api_get_self().'?student='.$user_info['user_id'].'&details=true&course='.$course_info['code'].'&id_coach='.Security::remove_XSS($_GET['id_coach']).'&origin='.$origin.'&id_session='.$sessionId.'#infosStudent">
                             <img src="'.api_get_path(WEB_IMG_PATH).'2rightarrow.gif" border="0" /></a></td>';
                         } else {
-                            echo '<td width="10"><a href="'.api_get_self().'?student='.$user_info['user_id'].'&details=true&course='.$course_info['code'].'&origin='.Security::remove_XSS($_GET['origin']).'&id_session='.$sessionId.'#infosStudent">
+                            echo '<td width="10"><a href="'.api_get_self().'?student='.$user_info['user_id'].'&details=true&course='.$course_info['code'].'&origin='.$origin.'&id_session='.$sessionId.'#infosStudent">
                             <img src="'.api_get_path(WEB_IMG_PATH).'2rightarrow.gif" border="0" /></a></td>';
                         }
                         echo '</tr>';
@@ -903,7 +904,7 @@ if (!empty($student_id)) {
                         }
                         $link = Display::url(
                             '<img src="../img/2rightarrow.gif" border="0" />',
-                            'lp_tracking.php?cidReq='.Security::remove_XSS($_GET['course']).'&course='.Security::remove_XSS($_GET['course']).$from.'&origin='.Security::remove_XSS($_GET['origin']).'&lp_id='.$learnpath['id'].'&student_id='.$user_info['user_id'].'&id_session='.$sessionId
+                            'lp_tracking.php?cidReq='.Security::remove_XSS($_GET['course']).'&course='.Security::remove_XSS($_GET['course']).$from.'&origin='.$origin.'&lp_id='.$learnpath['id'].'&student_id='.$user_info['user_id'].'&id_session='.$sessionId
                         );
                         echo Display::tag('td', $link);
                     }
@@ -911,7 +912,7 @@ if (!empty($student_id)) {
                     if (api_is_allowed_to_edit()) {
                         echo '<td>';
                         if ($any_result === true) {
-                            echo '<a href="myStudents.php?action=reset_lp&sec_token='.$token.'&cidReq='.Security::remove_XSS($_GET['course']).'&course='.Security::remove_XSS($_GET['course']).'&details='.Security::remove_XSS($_GET['details']).'&origin='.Security::remove_XSS($_GET['origin']).'&lp_id='.$learnpath['id'].'&student='.$user_info['user_id'].'&details=true&id_session='.$sessionId.'">';
+                            echo '<a href="myStudents.php?action=reset_lp&sec_token='.$token.'&cidReq='.Security::remove_XSS($_GET['course']).'&course='.Security::remove_XSS($_GET['course']).'&details='.Security::remove_XSS($_GET['details']).'&origin='.$origin.'&lp_id='.$learnpath['id'].'&student='.$user_info['user_id'].'&details=true&id_session='.$sessionId.'">';
                             echo Display::return_icon('clean.png',get_lang('Clean'),'',ICON_SIZE_SMALL).'</a>';
                             echo '</a>';
                         }
@@ -1015,7 +1016,8 @@ if (!empty($student_id)) {
                 if (Database :: num_rows($result_last_attempt) > 0) {
                     $id_last_attempt = Database :: result($result_last_attempt, 0, 0);
                     if ($count_attempts > 0)
-                        echo '<a href="../exercice/exercise_show.php?id=' . $id_last_attempt . '&cidReq='.$course_code.'&session_id='.$sessionId.'&student='.$student_id.'&origin='.(empty($_GET['origin'])?'tracking':Security::remove_XSS($_GET['origin'])).'"> <img src="' . api_get_path(WEB_IMG_PATH) . 'quiz.gif" border="0" /> </a>';
+                        echo '<a href="../exercice/exercise_show.php?id=' . $id_last_attempt . '&cidReq='.$course_code.'&session_id='.$sessionId.'&student='.$student_id.'&origin='.(empty($origin)?'tracking':$origin).'">
+                        <img src="' . api_get_path(WEB_IMG_PATH) . 'quiz.gif" border="0" /> </a>';
                 }
                 echo '</td>';
 

+ 6 - 3
main/mySpace/session.php

@@ -9,7 +9,7 @@
 ob_start();
 $cidReset = true;
 require_once '../inc/global.inc.php';
-require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
+
 api_block_anonymous_users();
 
 $this_section = SECTION_TRACKING;
@@ -87,10 +87,13 @@ if (api_is_drh() || api_is_session_admin() || api_is_platform_admin()) {
     $a_sessions = Tracking::get_sessions_coached_by_user($id_coach);
 }
 
-$form = new FormValidator('search_course', 'get', api_get_path(WEB_CODE_PATH).'mySpace/session.php');
+$form = new FormValidator(
+    'search_course',
+    'get',
+    api_get_path(WEB_CODE_PATH).'mySpace/session.php'
+);
 $form->addElement('text', 'keyword', get_lang('Keyword'));
 $form->addButtonSearch(get_lang('Search'));
-$form->addElement('hidden', 'session_id', $sessionId);
 $keyword = '';
 if ($form->validate()) {
     $keyword = $form->getSubmitValue('keyword');

+ 0 - 1
main/mySpace/student.php

@@ -7,7 +7,6 @@
 $cidReset = true;
 
 require_once '../inc/global.inc.php';
-require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
 
 $nameTools = get_lang('Students');
 

+ 15 - 8
main/mySpace/teachers.php

@@ -4,17 +4,17 @@
  * Teacher report
  * @package chamilo.reporting
  */
-/**
- * Code
- */
+
 $cidReset = true;
 
 require_once '../inc/global.inc.php';
-require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
 
 $export_csv = isset($_GET['export']) && $_GET['export'] == 'csv' ? true : false;
 $keyword = isset($_GET['keyword']) ? Security::remove_XSS($_GET['keyword']) : null;
 $active = isset($_GET['active']) ? intval($_GET['active']) : 1;
+$sleepingDays = isset($_GET['sleeping_days']) ? intval($_GET['sleeping_days']) : null;
+
+$nameTools = get_lang('Teachers');
 
 api_block_anonymous_users();
 
@@ -178,7 +178,7 @@ if ($export_csv) {
 }
 
 $sort_by_first_name = api_sort_by_first_name();
-$actions .= '<div class="actions">';
+$actions = '<div class="actions">';
 
 if (api_is_drh()) {
     $menu_items = array(
@@ -197,9 +197,16 @@ if (api_is_drh()) {
     }
 }
 
-$actions .= '<span style="float:right">';
-$actions .= Display::url(Display::return_icon('printer.png', get_lang('Print'), array(), ICON_SIZE_MEDIUM), 'javascript: void(0);', array('onclick'=>'javascript: window.print();'));
-$actions .= Display::url(Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), array(), ICON_SIZE_MEDIUM), api_get_self().'?export=csv&keyword='.$keyword);
+$actions .= '&nbsp;<span style="float:right">';
+$actions .= Display::url(
+    Display::return_icon('printer.png', get_lang('Print'), array(), ICON_SIZE_MEDIUM),
+    'javascript: void(0);',
+    array('onclick'=>'javascript: window.print();')
+);
+$actions .= Display::url(
+    Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), array(), ICON_SIZE_MEDIUM),
+    api_get_self().'?export=csv&keyword='.$keyword
+);
 $actions .= '</span>';
 $actions .= '</div>';
 

+ 2 - 2
main/newscorm/learnpath.class.php

@@ -3142,7 +3142,7 @@ class learnpath
             $toc_list = $this->get_toc();
         }
         //$html = '<div id="scorm_title" class="scorm-heading">'.Security::remove_XSS($this->get_name()) . '</div>';
-        $html .= '<div class="scorm-body">';
+        $html = '<div class="scorm-body">';
         $hide_teacher_icons_lp = isset($_configuration['hide_teacher_icons_lp']) ? $_configuration['hide_teacher_icons_lp'] : true;
 
         if ($is_allowed_to_edit && $hide_teacher_icons_lp == false) {
@@ -8275,7 +8275,7 @@ class learnpath
         $form = new FormValidator('small_form', 'post', $url);
         $form->addElement('header', $title);
         $form->addElement('text', 'title', get_lang('Title'));
-        $form->addElement('button', 'submit_button', get_lang('Save'));
+        $form->addButtonSave(get_lang('Save'), 'submit_button');
         $form->addElement('hidden', 'id', $data['id']);
         $form->addElement('hidden', 'parent', $data['parent_item_id']);
         $form->addElement('hidden', 'previous', $data['previous_item_id']);

+ 5 - 2
main/newscorm/learnpathItem.class.php

@@ -2145,6 +2145,8 @@ class learnpathItem
         }
 
         $course_id = api_get_course_int_id();
+        $sessionId = api_get_session_id();
+
         // Deal with &, |, ~, =, <>, {}, ,, X*, () in reverse order.
         $this->prereq_alert = '';
         // First parse all parenthesis by using a sequential loop
@@ -2382,7 +2384,7 @@ class learnpathItem
                                         foreach ($list as $cond) {
                                             if (isset($items[$refs_list[$cond]])) {
                                                 $status = $items[$refs_list[$cond]]->get_status(true);
-                                                if ($status == $this->possible_status[2] OR
+                                                if ($status == $this->possible_status[2] ||
                                                     $status == $this->possible_status[3]
                                                 ) {
                                                     $mytrue++;
@@ -2636,7 +2638,8 @@ class learnpathItem
                                                     WHERE
                                                         c_id = ' . $course_id . ' AND
                                                         user_id = ' . $user_id . '  AND
-                                                        lp_id = ' . $this->lp_id . '
+                                                        lp_id = ' . $this->lp_id . ' AND
+                                                        session_id = '.$sessionId.'
                                                     LIMIT 0, 1';
                                             $rs_lp = Database::query($sql);
                                             $lp_id = Database :: fetch_row(

+ 1 - 1
main/newscorm/lp_add_audio.php

@@ -135,7 +135,7 @@ if (!empty($file)) {
 } else {
     $form->addElement('file', 'file');
     $form->addElement('hidden', 'id', $lp_item_id);
-    $form->addElement('button', 'submit', get_lang('Ok'));
+    $form->addButtonSave(get_lang('Save'));
 }
 $form->addElement('header', get_lang('Or'));
 

+ 1 - 1
main/newscorm/lp_ajax_save_item.php

@@ -221,7 +221,7 @@ function save_item(
              *   the LMS will leave the cmi.core.lesson_status as "completed"
              */
             $masteryScore = $myLPI->get_mastery_score();
-            if ($masteryScore == -1 or empty($masteryScore)) {
+            if ($masteryScore == -1 || empty($masteryScore)) {
                 $masteryScore = false;
             }
             $credit = $myLPI->get_credit();

+ 1 - 1
main/session/session_user_edit.php

@@ -64,7 +64,7 @@ $form->addElement('html', '<br>');
 $form->addElement('html', $msg);
 
 $form->addElement('text', 'duration', array(get_lang('ExtraDurationForUser'), null, get_lang('Days')));
-$form->addElement('button', 'submit', get_lang('Send'));
+$form->addButtonSave(get_lang('Save'));
 
 if (empty($data['duration'])) {
     $data['duration'] = 0;

+ 10 - 8
main/social/home.php

@@ -1,13 +1,12 @@
 <?php
 /* For licensing terms, see /chamilo_license.txt */
+
 /**
  * @package chamilo.social
  * @author Julio Montoya <gugli100@gmail.com>
  * @autor Alex Aragon <alex.aragon@beeznest.com> CSS Design and Template
  */
-/**
- * Initialization
- */
+
 $cidReset = true;
 
 require_once '../inc/global.inc.php';
@@ -16,7 +15,7 @@ $user_id = api_get_user_id();
 $show_full_profile = true;
 // social tab
 $this_section = SECTION_SOCIAL;
-unset($_SESSION['this_section']); //for hmtl editor repository
+unset($_SESSION['this_section']);
 
 api_block_anonymous_users();
 
@@ -78,7 +77,10 @@ if (api_get_setting('profile', 'picture') == 'true') {
 
 //Block Menu
 $social_menu_block = SocialManager::show_social_menu('home');
-$social_search_block = Display::panel(UserManager::get_search_form(''), get_lang("SearchUsers"));
+$social_search_block = Display::panel(
+    UserManager::get_search_form(''),
+    get_lang("SearchUsers")
+);
 
 $results = $userGroup->get_groups_by_age(1, false);
 
@@ -87,7 +89,7 @@ $groups_newest = array();
 if (!empty($results)) {
     foreach ($results as $result) {
         $id = $result['id'];
-        $result['description'] = Security::remove_XSS( $result['description'], STUDENT, true );
+        $result['description'] = Security::remove_XSS($result['description'], STUDENT, true);
         $result['name'] = Security::remove_XSS($result['name'], STUDENT, true);
 
         if ($result['count'] == 1) {
@@ -191,7 +193,7 @@ if ($list > 0) {
 // My friends
 $friend_html = SocialManager::listMyFriendsBlock(
     $user_id,
-    $link_shared,
+    '',
     $show_full_profile
 );
 //Block Social Sessions
@@ -202,7 +204,7 @@ $sessionList = SessionManager::getSessionsFollowedByUser($user_id, $user_info['s
 if (count($sessionList) > 0) {
     $social_session_block = $sessionList;
 }
-    
+
 $social_group_block = Display::panel($social_group_block, get_lang('Group'));
 
 $tpl = new Template(get_lang('SocialNetwork'));

Some files were not shown because too many files changed in this diff