Browse Source

Merge branch '-1.10.x' of github.com:chamilo/chamilo-lms into 1.10.x

Julio 9 years ago
parent
commit
ab01a4a45c
57 changed files with 956 additions and 906 deletions
  1. 11 6
      app/Resources/public/css/base.css
  2. 1 1
      main/admin/group_add.php
  3. 1 1
      main/admin/group_edit.php
  4. 3 3
      main/admin/system_announcements.php
  5. 1 1
      main/admin/user_edit.php
  6. 0 2
      main/admin/user_update_import.php
  7. 2 2
      main/attendance/attendance_controller.php
  8. 1 1
      main/auth/profile.php
  9. 17 8
      main/course_info/tools.php
  10. 38 36
      main/document/document.php
  11. 1 1
      main/dropbox/dropbox_init.inc.php
  12. 2 2
      main/exercice/exercise.php
  13. 3 3
      main/forum/forumfunction.inc.php
  14. 1 1
      main/gradebook/lib/fe/gradebooktable.class.php
  15. BIN
      main/img/icons/22/eyes-close.png
  16. BIN
      main/img/icons/22/eyes.png
  17. 3 1
      main/inc/ajax/social.ajax.php
  18. 2 2
      main/inc/introductionSection.inc.php
  19. 2 2
      main/inc/lib/api.lib.php
  20. 1 1
      main/inc/lib/document.lib.php
  21. 0 1
      main/inc/lib/formvalidator/FormValidator.class.php
  22. 1 1
      main/inc/lib/message.lib.php
  23. 1 1
      main/inc/lib/plugin.lib.php
  24. 12 32
      main/inc/lib/social.lib.php
  25. 9 3
      main/inc/lib/template.lib.php
  26. 1 1
      main/inc/lib/usergroup.lib.php
  27. 1 1
      main/inc/lib/userportal.lib.php
  28. 84 72
      main/lang/english/trad4all.inc.php
  29. 57 57
      main/lang/spanish/trad4all.inc.php
  30. 8 2
      main/mySpace/admin.php
  31. 8 2
      main/mySpace/coaches.php
  32. 1 1
      main/mySpace/progression.php
  33. 1 1
      main/newscorm/lp_add_audio.php
  34. 1 1
      main/newscorm/lp_add_item.php
  35. 1 1
      main/newscorm/lp_admin_view.php
  36. 1 1
      main/newscorm/lp_build.php
  37. 1 1
      main/newscorm/lp_edit.php
  38. 1 1
      main/newscorm/lp_edit_item.php
  39. 1 1
      main/newscorm/lp_edit_item_prereq.php
  40. 1 1
      main/newscorm/lp_list.php
  41. 1 1
      main/newscorm/lp_move_item.php
  42. 1 1
      main/newscorm/lp_view_item.php
  43. 1 1
      main/newscorm/openoffice_document.class.php
  44. 1 1
      main/reports/index.php
  45. 1 1
      main/reports/reports.php
  46. 16 4
      main/social/profile.php
  47. 2 2
      main/survey/copy_survey.php
  48. 1 1
      main/survey/survey_list.php
  49. 6 4
      main/template/default/announcement/slider.tpl
  50. 1 1
      main/template/default/learnpath/list.tpl
  51. 469 466
      main/template/default/skill/skill_wheel.tpl
  52. 120 117
      main/template/default/skill/skill_wheel_student.tpl
  53. 9 0
      main/template/default/social/profile.tpl
  54. 2 2
      main/template/default/social/user_block.tpl
  55. 39 43
      main/tracking/courseLog.php
  56. 2 2
      main/user/resume_session.php
  57. 3 3
      main/work/work.lib.php

+ 11 - 6
app/Resources/public/css/base.css

@@ -103,6 +103,17 @@ a.thumbnail:hover{
 #carousel-announcement{
     min-height: 300px;
 }
+#carousel-announcement .carousel-caption{
+    left: 0;
+    right: 0;
+    bottom: auto;
+    padding: 5px;
+    background-color: #fff;
+    position: relative;
+    text-align: left;
+    text-shadow: none;
+    color: #666;
+}
 #carousel-announcement img{
     display: block;
     max-width: 100%;
@@ -2418,10 +2429,6 @@ form .formw .freeze {
     vertical-align: middle;
 }
 
-.hide {
-    display: none;
-}
-
 .show_element {
     display: block !important;
 }
@@ -4240,8 +4247,6 @@ i.size-32.icon-new-work{
 .list-user-data .item{
     font-size: 12px;
     padding-top: 5px;
-}
-.list-user-data .item.name{
     text-align: center;
 }
 .social-search form{

+ 1 - 1
main/admin/group_add.php

@@ -61,7 +61,7 @@ $form->applyFilter('description', 'html_filter');
 $form->applyFilter('description', 'trim');
 
 // url
-$form->addElement('text', 'url', get_lang('URL'), array('size' => 35));
+$form->addElement('text', 'url', get_lang('Url'), array('size' => 35));
 $form->applyFilter('url', 'html_filter');
 $form->applyFilter('url', 'trim');
 

+ 1 - 1
main/admin/group_edit.php

@@ -68,7 +68,7 @@ $form->applyFilter('description', 'html_filter');
 $form->applyFilter('description', 'trim');
 
 // url
-$form->addElement('text', 'url', get_lang('URL'), array('size' => 35));
+$form->addElement('text', 'url', get_lang('Url'), array('size' => 35));
 $form->applyFilter('url', 'html_filter');
 $form->applyFilter('url', 'trim');
 // Picture

+ 3 - 3
main/admin/system_announcements.php

@@ -288,9 +288,9 @@ if ($show_announcement_list) {
         $row[] = $announcement->title;
         $row[] = api_convert_and_format_date($announcement->date_start);
         $row[] = api_convert_and_format_date($announcement->date_end);
-        $row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_TEACHER."&action=". ($announcement->visible_teacher ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_teacher  ? 'visible.gif' : 'invisible.gif'), get_lang('ShowOrHide'))."</a>";
-        $row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_STUDENT."&action=". ($announcement->visible_student  ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_student  ? 'visible.gif' : 'invisible.gif'), get_lang('ShowOrHide'))."</a>";
-        $row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_GUEST."&action=". ($announcement->visible_guest ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_guest  ? 'visible.gif' : 'invisible.gif'), get_lang('ShowOrHide'))."</a>";
+        $row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_TEACHER."&action=". ($announcement->visible_teacher ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_teacher  ? 'eyes.png' : 'eyes-close.png'), get_lang('ShowOrHide'))."</a>";
+        $row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_STUDENT."&action=". ($announcement->visible_student  ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_student  ? 'eyes.png' : 'eyes-close.png'), get_lang('ShowOrHide'))."</a>";
+        $row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_GUEST."&action=". ($announcement->visible_guest ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_guest  ? 'eyes.png' : 'eyes-close.png'), get_lang('ShowOrHide'))."</a>";
 
         $row[] = $announcement->lang;
         $row[] = "<a href=\"?action=edit&id=".$announcement->id."\">".Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL)."</a> <a href=\"?action=delete&id=".$announcement->id."\"  onclick=\"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."')) return false;\">".Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL)."</a>";

+ 1 - 1
main/admin/user_edit.php

@@ -60,7 +60,7 @@ function show_image(image,width,height) {
 }
 
 function confirmation(name) {
-    if (confirm("'.get_lang('AreYouSureToDelete', '').' " + name + " ?")) {
+    if (confirm("'.get_lang('AreYouSureToDeleteJS', '').' " + name + " ?")) {
             document.forms["profile"].submit();
     } else {
         return false;

+ 0 - 2
main/admin/user_update_import.php

@@ -385,8 +385,6 @@ if (isset($_POST['formSent']) && $_POST['formSent'] AND $_FILES['import_file']['
     $inserted_in_course = array();
     if (strcmp($file_type, 'csv') === 0) {
         updateUsers($users_to_insert);
-    } else {
-        $error_message = get_lang('YouMustImportAFileAccordingToSelectedOption1');
     }
 
     if (count($errors) > 0) {

+ 2 - 2
main/attendance/attendance_controller.php

@@ -629,8 +629,8 @@ class AttendanceController
                 api_get_self() . '?' . api_get_cidreq(
                 ) . '&action=calendar_logins'
             );
-            $form->addDateRangePicker('range', get_lang('Range'));
-            $form->addButton('submit', get_lang('submit'));
+            $form->addDateRangePicker('range', get_lang('DateRange'));
+            $form->addButton('submit', get_lang('Submit'));
 
             if ($form->validate()) {
                 $values = $form->getSubmitValues();

+ 1 - 1
main/auth/profile.php

@@ -33,7 +33,7 @@ if (!(isset($_user['user_id']) && $_user['user_id']) || api_is_anonymous($_user[
 $htmlHeadXtra[] = api_get_password_checker_js('#username', '#password1');
 $htmlHeadXtra[] = '<script>
 function confirmation(name) {
-    if (confirm("'.get_lang('AreYouSureToDelete', '').' " + name + " ?")) {
+    if (confirm("'.get_lang('AreYouSureToDeleteJS', '').' " + name + " ?")) {
             document.forms["profile"].submit();
     } else {
         return false;

+ 17 - 8
main/course_info/tools.php

@@ -6,6 +6,12 @@ require_once '../inc/global.inc.php';
 // The section for the tabs
 $this_section = SECTION_COURSES;
 
+$sessionId = api_get_session_id();
+
+if (!empty($sessionId)) {
+    api_not_allowed();
+}
+
 api_protect_course_script(true);
 
 if (!api_is_allowed_to_edit()) {
@@ -53,8 +59,11 @@ switch ($action) {
         $form->addElement(
             'select',
             'target',
-            get_lang('Target'),
-            array('_self' => '_self', '_blank' => '_blank')
+            get_lang('LinkTarget'),
+            [
+                '_self' => get_lang('LinkOpenSelf'),
+                '_blank' => get_lang('LinkOpenBlank')
+            ]
         );
         $form->addElement(
             'select',
@@ -73,7 +82,7 @@ switch ($action) {
         $form->addHtml('<div class="col-md-5">');
         if (isset($tool['custom_icon']) && !empty($tool['custom_icon'])) {
             $form->addLabel(
-                get_lang('Icon'),
+                get_lang('CurrentIcon'),
                 Display::img(
                     CourseHome::getCustomWebIconPath().$tool['custom_icon']
                 )
@@ -111,9 +120,9 @@ switch ($action) {
         foreach ($toolList as $tool) {
 
             if ($tool['id']>20) {
-                $toolName = $tool['name'];
+                $toolIconName = $tool['name'];
             } else {
-                $toolName = get_lang('Tool'.api_underscore_to_camel_case($tool['name']));
+                $toolIconName = get_lang('Tool'.api_underscore_to_camel_case($tool['name']));
             }
 
             $iconsTools .= '<div class="col-md-2">';
@@ -121,12 +130,12 @@ switch ($action) {
 
             if (!empty($tool['custom_icon'])) {
                 $image = getCustomWebIconPath().$tool['custom_icon'];
-                $icon = Display::img($image, $toolName);
+                $icon = Display::img($image, $toolIconName);
             } else {
                 $image = (substr($tool['image'], 0, strpos($tool['image'], '.'))).'.png';
                 $icon = Display::return_icon(
                     $image,
-                    $toolName,
+                    $toolIconName,
                     array('id' => 'tool_'.$tool['id']),
                     ICON_SIZE_BIG,
                     false
@@ -140,7 +149,7 @@ switch ($action) {
             $edit = '<a class="btn btn-default" href="' . api_get_self() . '?action=edit_icon&id=' . $tool['iid'] . '&'.api_get_cidreq().'"><i class="fa fa-pencil"></i></a>';
 
             $iconsTools .= '<div class="icon-tools">'. $icon . '</div>';
-            $iconsTools .= '<div class="name-tools">' . $toolName . '</div>';
+            $iconsTools .= '<div class="name-tools">' . $toolIconName . '</div>';
             $iconsTools .= '<div class="toolbar">' . $edit . $delete . '</div>';
             $iconsTools .= '</div>';
             $iconsTools .= '</div>';

+ 38 - 36
main/document/document.php

@@ -433,7 +433,7 @@ switch ($action) {
         $fileInfo = pathinfo($file);
         if ($fileInfo['extension'] == $formatTarget) {
             Display::addFlash(Display::return_message(
-                get_lang('ErrorSameFormat'),
+                get_lang('ConversionToSameFileFormat'),
                 'warning'
             ));
         } elseif (
@@ -456,7 +456,7 @@ switch ($action) {
             )
         ) {
             Display::addFlash(Display::return_message(
-                get_lang('FormatNotSupported'),
+                get_lang('FileFormatNotSupported'),
                 'warning'
             ));
         } else {
@@ -685,7 +685,7 @@ $tool_visibility = $tool_row['visibility'];*/
 
 $htmlHeadXtra[] = '<script>
 function confirmation (name) {
-    if (confirm(" '.get_lang('AreYouSureToDelete').' "+ name + " ?")) {
+    if (confirm(" '.get_lang('AreYouSureToDeleteJS').' "+ name + " ?")) {
         return true;
     } else {
         return false;
@@ -2008,40 +2008,42 @@ if (!empty($table_footer)) {
 
 echo '
     <div id="convertModal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
-      <div class="modal-dialog">
-        <div class="modal-content">
-          <div class="modal-header" style="text-align: center;">
-            <button type="button" class="close" data-dismiss="modal">
-              <span aria-hidden="true">&times;</span>
-              <span class="sr-only">' . get_lang('Close') . '</span>
-            </button>
-            <h4 class="modal-title">' . get_lang('PleaseSelectConvertFormat') . '</h4>
-          </div>
-          <div class="modal-body" style="text-align: center;">
-            <p>' . get_lang('ConvertFormats') . '&hellip;</p>
-            <select id="convertSelect" class="input-lg text-center">
-                <option value="">
-                    ' . get_lang('SelectConvertFormat') . '
-                </option>
-                <option value="pdf">
-                    PDF - Portable Document File
-                </option>
-                <option value="odt" style="display:none;" class="textFormatType">
-                    ODT - Open Document Text
-                </option>
-                <option value="odp" style="display:none;" class="presentationFormatType">
-                    ODP - Open Document Portable
-                </option>
-                <option value="ods" style="display:none;" class="spreadsheetFormatType">
-                    ODS - Open Document Spreadsheet
-                </option>
-            </select>
-          </div>
-          <div class="modal-footer">
-            <button type="button" class="btn btn-default" data-dismiss="modal">' . get_lang('Close') . '</button>
-          </div>
+        <div class="modal-dialog">
+            <div class="modal-content">
+                <div class="modal-header" style="text-align: center;">
+                <button type="button" class="close" data-dismiss="modal" aria-label="' . get_lang('Close') . '">
+                    <span aria-hidden="true">&times;</span>
+                </button>
+                <h4 class="modal-title">' . get_lang('Convert') . '</h4>
+            </div>
+            <div class="modal-body">
+              <form action="#" class="form-horizontal">
+                  <div class="form-group">
+                      <label class="col-sm-4 control-label" for="convertSelect">' . get_lang('ConvertFormats') . '</label>
+                      <div class="col-sm-8">
+                          <select id="convertSelect">
+                              <option value="">' . get_lang('Select') . '</option>
+                              <option value="pdf">
+                                  PDF - Portable Document File
+                              </option>
+                              <option value="odt" style="display:none;" class="textFormatType">
+                                  ODT - Open Document Text
+                              </option>
+                              <option value="odp" style="display:none;" class="presentationFormatType">
+                                  ODP - Open Document Portable
+                              </option>
+                              <option value="ods" style="display:none;" class="spreadsheetFormatType">
+                                  ODS - Open Document Spreadsheet
+                              </option>
+                          </select>
+                      </div>
+                  </div>
+              </form>
+            </div>
+            <div class="modal-footer">
+              <button type="button" class="btn btn-default" data-dismiss="modal">' . get_lang('Close') . '</button>
+            </div>
         </div>
-      </div>
     </div>';
 
 // Footer

+ 1 - 1
main/dropbox/dropbox_init.inc.php

@@ -283,7 +283,7 @@ $htmlHeadXtra[] =
 "<script type=\"text/javascript\">
 function confirmation (name)
 {
-	if (confirm(\" ". get_lang("AreYouSureToDelete") ." \"+ name + \" ?\"))
+	if (confirm(\" ". get_lang("AreYouSureToDeleteJS") ." \"+ name + \" ?\"))
 		{return true;}
 	else
 		{return false;}

+ 2 - 2
main/exercice/exercise.php

@@ -701,7 +701,7 @@ if (!empty($exercise_list)) {
                                 ICON_SIZE_SMALL
                             ),
                             '',
-                            array('onclick' => "javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('AreYouSureToDelete'), ENT_QUOTES, $charset))." ".addslashes($row['title'])."?"."')) return false;", 'href' => 'exercise.php?'.api_get_cidreq().'&choice=delete&sec_token='.$token.'&exerciseId='.$row['id'])
+                            array('onclick' => "javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('AreYouSureToDeleteJS'), ENT_QUOTES, $charset))." ".addslashes($row['title'])."?"."')) return false;", 'href' => 'exercise.php?'.api_get_cidreq().'&choice=delete&sec_token='.$token.'&exerciseId='.$row['id'])
                         );
                     } else {
                         $actions .= Display::return_icon('delete_na.png', get_lang('ResourceLockedByGradebook'), '', ICON_SIZE_SMALL);
@@ -963,7 +963,7 @@ if (isset($attribute['path']) && is_array($attribute['path'])) {
                 $actions .='    <a href="'.$exercisePath.'?'.api_get_cidreq().'&hpchoice=enable&page='.$page.'&file='.$path.'">'.
                     Display::return_icon('invisible.png', get_lang('Activate'), '', ICON_SIZE_SMALL).'</a>';
             }
-            $actions .= '<a href="'.$exercisePath.'?'.api_get_cidreq().'&hpchoice=delete&file='.$path.'" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('AreYouSureToDelete'), ENT_QUOTES, $charset).' '.$title."?").'\')) return false;">'.
+            $actions .= '<a href="'.$exercisePath.'?'.api_get_cidreq().'&hpchoice=delete&file='.$path.'" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('AreYouSureToDeleteJS'), ENT_QUOTES, $charset).' '.$title."?").'\')) return false;">'.
                 Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>';
             $item .= Display::tag('td', $actions);
             $tableRows[] = Display::tag('tr', $item);

+ 3 - 3
main/forum/forumfunction.inc.php

@@ -70,7 +70,7 @@ $(function () {
                     file.delete + '<\/td>' +
                     '<input type=\"hidden\" value=\"' + file.id +'\" name=\"file_ids[]\">' + '<\/tr>');
             } else {
-                alert('" . get_lang('ErrorUploadAttachment') . "');
+                alert('" . get_lang('UploadError') . "');
             }
         }
     });
@@ -90,7 +90,7 @@ $htmlHeadXtra[] = '<script>
             var l = $(this);
             var id = l.closest("tr").attr("id");
             var filename = l.closest("tr").find(".attachFilename").html();
-            if (confirm("' . get_lang('AreYouSureToDeleteFileX') . '".replace("%s", filename))) {
+            if (confirm("' . get_lang('AreYouSureToDeleteJS') . '", filename)) {
                 $.ajax({
                     type: "POST",
                     url: "'.api_get_path(WEB_AJAX_PATH) . 'forum.ajax.php?'.api_get_cidreq().'&a=delete_file&attachId=" + id +"&thread='.$threadId .'&forum='.$forumId .'",
@@ -5483,7 +5483,7 @@ function getAttachmentsAjaxTable($postId = null)
     // Forum attachment Ajax table
     $fileData = '
     <div class="control-group " style="'. $style . '">
-        <label class="control-label">'.get_lang('AttachmentFilesList').'</label>
+        <label class="control-label">'.get_lang('AttachmentList').'</label>
         <div class="controls">
             <table id="attachmentFileList" class="files data_table span10">
                 <tr>

+ 1 - 1
main/gradebook/lib/fe/gradebooktable.class.php

@@ -93,7 +93,7 @@ class GradebookTable extends SortableTable
             $this->set_header($column++, get_lang('Weight'), false);
             $this->set_header($column++, get_lang('Result'), false);
             $this->set_header($column++, get_lang('Ranking'), false);
-            $this->set_header($column++, get_lang('Best'), false);
+            $this->set_header($column++, get_lang('BestScore'), false);
             $this->set_header($column++, get_lang('Average'), false);
 
             if (!empty($cats)) {

BIN
main/img/icons/22/eyes-close.png


BIN
main/img/icons/22/eyes.png


+ 3 - 1
main/inc/ajax/social.ajax.php

@@ -218,7 +218,9 @@ switch ($action) {
         $url = isset($_POST['social_wall_new_msg_main']) ? $_POST['social_wall_new_msg_main'] : '';
         $html = '';
         if (SocialManager::verifyUrl($url) == true){
-            $html = Security::remove_XSS(SocialManager::readContentWithOpenGraph($url));
+            $html = Security::remove_XSS(
+                SocialManager::readContentWithOpenGraph($url)
+            );
         }
         echo $html;
         break;

+ 2 - 2
main/inc/introductionSection.inc.php

@@ -312,7 +312,7 @@ if (!empty($thematic_advance_info)) {
     $introduction_section .= '</div>';
 }
 $editIconButton = '';
-if (api_is_allowed_to_edit()) {
+if (api_is_allowed_to_edit() && empty($session_id)) {
     $editIconButton = Display::url(
         '<i class="fa fa-wrench"></i> ',
         api_get_path(WEB_CODE_PATH).'course_info/tools.php?'.api_get_cidreq(),
@@ -325,7 +325,7 @@ $textIntro = '';
 if ($intro_dispCommand) {
     if (empty($intro_content)) {
         // Displays "Add intro" commands
-        $toolbar = '<div class="btn-group pull-right" rol="group">';
+        $toolbar = '<div class="btn-group pull-right" role="group">';
         if (!empty($courseId)) {
             $textIntro  = '<a class="btn btn-default" title="' . get_lang('AddIntro') . '" href="'.api_get_self().'?' . api_get_cidreq().'&intro_cmdAdd=1">';
             $textIntro .= '<i class="fa fa-file-text"></i> ';

+ 2 - 2
main/inc/lib/api.lib.php

@@ -7587,8 +7587,8 @@ function api_warn_hosting_contact($limitName)
 
     if (!empty($email)) {
         $subject = get_lang('HostingWarningReached');
-        $body = get_lang('Portal').': '.api_get_path(WEB_PATH)." \n ";
-        $body .= get_lang('Limit').': '.$limitName." \n ";
+        $body = get_lang('PortalName').': '.api_get_path(WEB_PATH)." \n ";
+        $body .= get_lang('PortalLimitType').': '.$limitName." \n ";
         if (isset($hostingParams[$limitName])) {
             $body .= get_lang('Value') . ': ' . $hostingParams[$limitName];
         }

+ 1 - 1
main/inc/lib/document.lib.php

@@ -5034,7 +5034,7 @@ class DocumentManager
 
         $form = new FormValidator('selector', 'GET', api_get_self() . '?' . api_get_cidreq());
         $form->addElement('hidden', 'cidReq', api_get_course_id());
-        $parent_select = $form->addElement('select', 'id', get_lang('CurrentDirectory'), '', 'onchange="javascript: document.selector.submit();"');
+        $parent_select = $form->addSelect('id', get_lang('CurrentDirectory'), '', array('onchange' => 'javascript: document.selector.submit();'));
 
         if ($change_renderer) {
             $renderer = $form->defaultRenderer();

+ 0 - 1
main/inc/lib/formvalidator/FormValidator.class.php

@@ -116,7 +116,6 @@ EOT;
         return '<form{attributes}>
         <fieldset>
             {content}
-            <div class="clear"></div>
         </fieldset>
         {hidden}
         </form>';

+ 1 - 1
main/inc/lib/message.lib.php

@@ -420,7 +420,7 @@ class MessageManager
             if (!empty($drhList)) {
                 foreach ($drhList as $drhInfo) {
                     $message = sprintf(
-                            get_lang('CopyOfOriginalMessageSentToX'),
+                            get_lang('CopyOfMessageSentToXUser'),
                             $userInfo['complete_name']
                         ).' <br />'.$message;
 

+ 1 - 1
main/inc/lib/plugin.lib.php

@@ -387,7 +387,7 @@ class AppPlugin
                             if (!empty($plugin_tpl)) {
                                 //$template_plugin_file = api_get_path(SYS_PLUGIN_PATH)."$plugin_name/$plugin_tpl"; //for smarty
                                 $template_plugin_file = "$plugin_name/$plugin_tpl"; // for twig
-                                $template->display($template_plugin_file);
+                                $template->display($template_plugin_file, false);
                             }
                         }
                     }

+ 12 - 32
main/inc/lib/social.lib.php

@@ -1534,40 +1534,20 @@ class SocialManager extends UserManager
     }
 
     /**
-     * Get schedule html (with data openGrap)
-     * @param   string  $text       Content text
-     * @return  string  $newText    Content text with OpenGraph
-     */
-    public static function readContentWithOpenGraph($text)
-    {
-        // search link in first line
-        $regExUrl = "/(http|https)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/";
-        $newText = '';
-        if (preg_match($regExUrl, $text, $url)) {
-            // Comment this line to disable OpenGraph
-            $newText .= self::getHtmlByLink($url[0]);
-            // make the urls hyper links
-            //$newText .= preg_replace($regExUrl, "<a target=\"_blank\" href=" . $url[0] . ">".$url[0]."</a> ", $text);
-            
-        } else {
-            $newText = $text;
-        }
-        return $newText;
-    }
-
-    /**
-     * html with data OpenGrap
+     * get html data with OpenGrap passing the Url
      * @param $link url
      * @return string data html
      */
-    public static function getHtmlByLink($link)
+    public static function readContentWithOpenGraph($link)
     {
         $graph = OpenGraph::fetch($link);
+        if (!$graph) {
+            return false;
+        }
         $url = $graph->url;
         $image = $graph->image;
-        $domain = empty($url) ? '' : parse_url($url);
+        $domain = empty($url) ? parse_url($link) : parse_url($url);
         $domain = $domain['scheme'].'://'.$domain['host'];
-        $html = '';
         // Trick to verify if the Image Url Exist because of some bad metatag dev
         if (self::verifyUrl($image) == false){
             if (!($image[0] == '/')){
@@ -1577,11 +1557,12 @@ class SocialManager extends UserManager
         }
         $title = $graph->title;
         
-        $html .= '<div class="post-open-graph">';
-        $html .= '<h4><a target="_blank" href="'.$link.'">'.$title.'</a></h4>';
-        $html .= empty($image) ? '' : '<img alt="" src="'.$image.'" />';
-        $html .= empty($graph->description) ? '' : '<p class="description">'.$graph->description.'<a href="'.$link.'">'.$link.'</a></p>';
-        $html .= "</div>";
+        $html  = '<div class="thumbnail">';
+        $html .= '<a target="_blank" href="'.$link.'"><h3>'.$title.'</h3>';
+        $html .= empty($image) ? '' : '<img alt="" src="'.$image.'" /></a>';
+        $html .= empty($graph->description) ? '' : '<p class="description">'.$graph->description.'</p>';
+        $html .= '<a href="'.$link.'">'.$link.'</a>';
+        $html .= '</div>';
         return $html;
     }
 
@@ -1858,7 +1839,6 @@ class SocialManager extends UserManager
                 'cols-size' => [1, 10, 1]
             ]
         );
-        $form->addHtml('<div class="url_preview"></div>');
         $form->addHidden('url_content', '');
         $form->addButtonSend(get_lang('Post'), null, false, ['cols-size' => [1, 10, 1]]);
         $html = Display::panel($form->returnForm(), get_lang('SocialWall'));

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

@@ -1118,12 +1118,18 @@ class Template
     }
 
     /**
-     * @param string $template
+     * Render the template
+     * @param string $template The template path
+     * @param boolean $clearFlashMessages Clear the $_SESSION variables for flash messages
      */
-    public function display($template)
+    public function display($template, $clearFlashMessages = true)
     {
         $this->assign('flash_messages', Display::getFlashToString());
-        Display::cleanFlashMessages();
+
+        if ($clearFlashMessages) {
+            Display::cleanFlashMessages();
+        }
+
         echo $this->twig->render($template, $this->params);
     }
 

+ 1 - 1
main/inc/lib/usergroup.lib.php

@@ -1319,7 +1319,7 @@ class UserGroup extends Model
         }
 
         // url
-        $form->addElement('text', 'url', get_lang('URL'));
+        $form->addElement('text', 'url', get_lang('Url'));
         $form->applyFilter('url', 'html_filter');
         $form->applyFilter('url', 'trim');
 

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

@@ -936,7 +936,7 @@ class IndexManager
         if ($show_create_link) {
             $my_account_content .= '<li class="add-course"><a href="main/create_course/add_course.php">';
             if (api_get_setting('course_validation') == 'true' && !api_is_platform_admin()) {
-                $my_account_content .= Display::return_icon('new-course.png',get_lang('CourseCreateRequest'),null,ICON_SIZE_SMALL);
+                $my_account_content .= Display::return_icon('new-course.png',get_lang('CreateCourseRequest'),null,ICON_SIZE_SMALL);
                 $my_account_content .= get_lang('CreateCourseRequest');
             } else {
                 $my_account_content .= Display::return_icon('new-course.png',get_lang('CourseCreate'),null,ICON_SIZE_SMALL);

+ 84 - 72
main/lang/english/trad4all.inc.php

@@ -325,18 +325,18 @@ $DeleteUsersNotInList = "Unsubscribe students which are not in the imported list
 $IfSessionExistsUpdate = "If a session exists, update it";
 $CreatedByXYOnZ = "Create by <a href=\"%s\">%s</a> on %s";
 $LoginWithExternalAccount = "Login without an institutional account";
-$ImportAikenQuizExplanationExample = "This is the text for question 1
-A. Answer 1
-B. Answer 2
-C. Answer 3
-ANSWER: B
-
-This is the text for question 2
-A. Answer 1
-B. Answer 2
-C. Answer 3
-D. Answer 4
-ANSWER: D
+$ImportAikenQuizExplanationExample = "This is the text for question 1
+A. Answer 1
+B. Answer 2
+C. Answer 3
+ANSWER: B
+
+This is the text for question 2
+A. Answer 1
+B. Answer 2
+C. Answer 3
+D. Answer 4
+ANSWER: D
 ANSWER_EXPLANATION: this is an optional feedback comment that will appear next to the correct answer.";
 $ImportAikenQuizExplanation = "The Aiken format comes in a simple text (.txt) file, with several question blocks, each separated by a blank line. The first line is the question, the answer lines are prefixed by a letter and a dot, and the correct answer comes next with the ANSWER: prefix. See example below.";
 $ExerciseAikenErrorNoAnswerOptionGiven = "The imported file has at least one question without any answer (or the answers do not include the required prefix letter). Please make sure each question has at least one answer and that it is prefixed by a letter and a dot or a parenthesis, like this: A. answer one";
@@ -425,18 +425,18 @@ $VersionUpToDate = "Your version is up-to-date";
 $LatestVersionIs = "The latest version is";
 $YourVersionNotUpToDate = "Your version is not up-to-date";
 $Hotpotatoes = "Hotpotatoes";
-$ZeroMeansNoQuestionWillBeSelectedMinusOneMeansThatAllQuestionsWillBeSelected = "-1 = All questions will be selected.
+$ZeroMeansNoQuestionWillBeSelectedMinusOneMeansThatAllQuestionsWillBeSelected = "-1 = All questions will be selected.
  0 = No questions will be selected.";
-$EmailNotificationTemplateDescription = "You can customize the email sent to users when they finished the exercise. You can use tags like these:
-
-1. {{ student.username }}
-2. {{ student.firstname }}
-3. {{ student.lastname }}
-4. {{ student.official_code }}
-5. {{ exercise.title }}
-6. {{ exercise.start_time }}
-7. {{ exercise.end_time }}
-8. {{ course.title }}
+$EmailNotificationTemplateDescription = "You can customize the email sent to users when they finished the exercise. You can use tags like these:
+
+1. {{ student.username }}
+2. {{ student.firstname }}
+3. {{ student.lastname }}
+4. {{ student.official_code }}
+5. {{ exercise.title }}
+6. {{ exercise.start_time }}
+7. {{ exercise.end_time }}
+8. {{ course.title }}
 9. {{ course.code }}";
 $EmailNotificationTemplate = "Email notification template";
 $ExerciseEndButtonDisconnect = "Logout";
@@ -844,10 +844,10 @@ $AllowVisitors = "Allow visitors";
 $EnableIframeInclusionComment = "Allowing arbitrary iframes in the HTML Editor will enhance the edition capabilities of the users, but it can represent a security risk. Please make sure you can rely on your users (i.e. you know who they are) before enabling this feature.";
 $AddedToLPCannotBeAccessed = "This exercise has been included in a learning path, so it cannot be accessed by students directly from here. If you want to put the same exercise available through the exercises tool, please make a copy of the current exercise using the copy icon.";
 $EnableIframeInclusionTitle = "Allow iframes in HTML Editor";
-$MailTemplateRegistrationMessage = "Dear ((firstname)) ((lastname)),\n\nYou are registered on
-((sitename)) with the following settings:\n\nUsername :
-((username))\nPass : ((password))\n\nThe address of ((sitename)) is :
-((url))\n\nIn case of trouble, contact us.\n\nYours sincerely
+$MailTemplateRegistrationMessage = "Dear ((firstname)) ((lastname)),\n\nYou are registered on
+((sitename)) with the following settings:\n\nUsername :
+((username))\nPass : ((password))\n\nThe address of ((sitename)) is :
+((url))\n\nIn case of trouble, contact us.\n\nYours sincerely
 \n((admin_name)) ((admin_surname)).";
 $Explanation = "Once you click on \"Create a course\", a course is created with a section for Tests, Project based learning, Assessments, Courses, Dropbox, Agenda and much more. Logging in as teacher provides you with editing privileges for this course.";
 $CodeTaken = "This training code is already in use.  <br>Use the <b>Back</b> button on your browser and try again";
@@ -2640,16 +2640,16 @@ $NoPosts = "No posts";
 $WithoutAchievedSkills = "Without achieved skills";
 $TypeMessage = "Please type your message!";
 $ConfirmReset = "Do you really want to delete all messages?";
-$MailCronCourseExpirationReminderBody = "Dear %s,
-
-It has come to our attention that you have not completed the course %s although its expiration date had been set on %s, remaining %s days to finish it.
-
-We remind you that you have only the possibility to follow this course once a year, that is why we invite you insistently to complete your course on time.
-
-You can return to the course connecting to the platform through this address: %s
-
-Best Regards,
-
+$MailCronCourseExpirationReminderBody = "Dear %s,
+
+It has come to our attention that you have not completed the course %s although its expiration date had been set on %s, remaining %s days to finish it.
+
+We remind you that you have only the possibility to follow this course once a year, that is why we invite you insistently to complete your course on time.
+
+You can return to the course connecting to the platform through this address: %s
+
+Best Regards,
+
 %s Team";
 $MailCronCourseExpirationReminderSubject = "Urgent: %s course expiration reminder";
 $ExerciseAndLearningPath = "Exercise and learning path";
@@ -3133,7 +3133,7 @@ $NameOfLang['portuguese'] = "portuguese";
 $NameOfLang['russian'] = "russian";
 $NameOfLang['simpl_chinese'] = "simpl_chinese";
 $NameOfLang['spanish'] = "spanish";
-$Close = "close";
+$Close = "Close";
 $Platform = "Portal";
 $localLangName = "language";
 $email = "e-mail";
@@ -5778,8 +5778,8 @@ $CheckThatYouHaveEnoughQuestionsInYourCategories = "Make sure you have enough qu
 $PortalCoursesLimitReached = "Sorry, this installation has a courses limit, which has now been reached. To increase the number of courses allowed on this Chamilo installation, please contact your hosting provider or, if available, upgrade to a superior hosting plan.";
 $PortalTeachersLimitReached = "Sorry, this installation has a teachers limit, which has now been reached. To increase the number of teachers allowed on this Chamilo installation, please contact your hosting provider or, if available, upgrade to a superior hosting plan.";
 $PortalUsersLimitReached = "Sorry, this installation has a users limit, which has now been reached. To increase the number of users allowed on this Chamilo installation, please contact your hosting provider or, if available, upgrade to a superior hosting plan.";
-$GenerateSurveyAccessLinkExplanation = "By copying the link below and pasting it in an e-mail or on a website, you will allow any anonymous person to enter and answer this survey.
-You can test this feature by clicking the link above and answering the survey.
+$GenerateSurveyAccessLinkExplanation = "By copying the link below and pasting it in an e-mail or on a website, you will allow any anonymous person to enter and answer this survey.
+You can test this feature by clicking the link above and answering the survey.
 This is particularly useful if you want to allow anyone on a forum to answer you survey and you don't know their e-mail addresses.";
 $LinkOpenSelf = "Open self";
 $LinkOpenBlank = "Open blank";
@@ -5832,8 +5832,8 @@ $Item = "Item";
 $ConfigureDashboardPlugin = "Configure Dashboard Plugin";
 $EditBlocks = "Edit blocks";
 $Never = "Never";
-$YourAccountIsActiveYouCanLoginAndCheckYourCourses = "Dear user, 
-
+$YourAccountIsActiveYouCanLoginAndCheckYourCourses = "Dear user, 
+
 Your account has now been activated on the platform. Please login and enjoy your courses.";
 $SessionFields = "Session fields";
 $CopyLabelSuffix = "Copy";
@@ -5895,7 +5895,7 @@ $CourseSettingsRegisterDirectLink = "If your course is public or open, you can u
 $DirectLink = "Direct link";
 $here = "here";
 $GoAheadAndBrowseOurCourseCatalogXOnceRegisteredYouWillSeeTheCourseHereX = "<p>Go ahead and browse our course catalog %s to register to any course you like. Once registered, you will see the course appear right %s, instead of this message.</p>";
-$HelloXAsYouCanSeeYourCourseListIsEmpty = "<p>Hello <strong>%s</strong> and welcome,</p>
+$HelloXAsYouCanSeeYourCourseListIsEmpty = "<p>Hello <strong>%s</strong> and welcome,</p>
 <p>As you can see, your courses list is still empty. That's because you are not registered to any course yet! </p>";
 $UnsubscribeUsersAlreadyAddedInCourse = "Unsubscribe users already added";
 $ImportUsers = "Import users";
@@ -6159,7 +6159,7 @@ $AverageScore = "Average score";
 $LastConnexionDate = "Last connexion date";
 $ToolVideoconference = "Videoconference";
 $BigBlueButtonEnableTitle = "BigBlueButton videoconference tool";
-$BigBlueButtonEnableComment = "Choose whether you want to enable the BigBlueButton videoconference tool. Once enabled, it will show as an additional course tool in all courses' homepage, and teachers will be able to launch a conference at any time. Learners will not be able to launch a conference, only join one. If you don't have a BigBlueButton server, please <a href=\"http://bigbluebutton.org/\" target=\"_blank\">set one up</a> or ask the <a href=\"http://www.chamilo.org/en/providers\" target=\"_blank\">Chamilo official providers</a> for a quote.
+$BigBlueButtonEnableComment = "Choose whether you want to enable the BigBlueButton videoconference tool. Once enabled, it will show as an additional course tool in all courses' homepage, and teachers will be able to launch a conference at any time. Learners will not be able to launch a conference, only join one. If you don't have a BigBlueButton server, please <a href=\"http://bigbluebutton.org/\" target=\"_blank\">set one up</a> or ask the <a href=\"http://www.chamilo.org/en/providers\" target=\"_blank\">Chamilo official providers</a> for a quote.
 BigBlueButton is a free (as in freedom *and* beer), but its installation requires a set of technical skills that might not be immediately available to all. You can install it on your own or seek professional help to assist you or do it for you. This help, however, will generate a certain cost. In the pure logic of the free software, we offer you the tools to make your work easier and recommend professionals (the Chamilo Official Providers) that will be able to help you if this were too difficult.";
 $BigBlueButtonHostTitle = "BigBlueButton server host";
 $BigBlueButtonHostComment = "This is the name of the server where your BigBlueButton server is running. Might be <i>localhost</i>, an IP address (e.g. 192.168.13.54) or a domain name (e.g. my.video.com).";
@@ -6170,14 +6170,14 @@ $OnlyAccessFromYourGroup = "Only accessible from your group";
 $CreateAssignmentPage = "This will create a special wiki page in which the teacher can describe the task and which will be automatically linked to the wiki pages where learners perform the task. Both the teacher's and the learners' pages are created automatically. In these tasks, learners can only edit and view theirs pages, but this can be changed easily if you need to.";
 $UserFolders = "Folders of users";
 $UserFolder = "User folder";
-$HelpUsersFolder = "INFORMATION VISIBLE TO THE TEACHER ONLY:\nThe users folder contains a folder for each user who has accessed it through the documents tool, or when any file has been sent in the course through the online editor. If neither circumstances has occurred, then no user folder will have been created. In the case of groups, files that are sent through the editor will be added in the folder of each group, which is only accessible by students from this group.
-<br /><br />
-The users folder and each of the included folders will be hidden by default in for all students, but each student can see the contents of his/her directory through the online editor. However, if a student knows the address of a file or folder of another student, he may be able to access it.
-<br /><br />
-If the folder of a student is visible, other students can see what it contains. In this case, the student that owns the folder can also (from the documents tool and only in his/her folder): create and edit web documents, convert a document into a template for personal use, create and edit drawings in SVG and PNG formats, record audio files in WAV format, make audio files in MP3 from a text, make snapshops from a webcam, send documents, create folders, move folders and files, delete folders and files, and download backup of his/her folder.
-<br /><br />
-Moreover, the documents tool is synchronized with the file manager of the online editor, so changes in the documents triggered in any one of these will affect both.
-<br /><br />
+$HelpUsersFolder = "INFORMATION VISIBLE TO THE TEACHER ONLY:\nThe users folder contains a folder for each user who has accessed it through the documents tool, or when any file has been sent in the course through the online editor. If neither circumstances has occurred, then no user folder will have been created. In the case of groups, files that are sent through the editor will be added in the folder of each group, which is only accessible by students from this group.
+<br /><br />
+The users folder and each of the included folders will be hidden by default in for all students, but each student can see the contents of his/her directory through the online editor. However, if a student knows the address of a file or folder of another student, he may be able to access it.
+<br /><br />
+If the folder of a student is visible, other students can see what it contains. In this case, the student that owns the folder can also (from the documents tool and only in his/her folder): create and edit web documents, convert a document into a template for personal use, create and edit drawings in SVG and PNG formats, record audio files in WAV format, make audio files in MP3 from a text, make snapshops from a webcam, send documents, create folders, move folders and files, delete folders and files, and download backup of his/her folder.
+<br /><br />
+Moreover, the documents tool is synchronized with the file manager of the online editor, so changes in the documents triggered in any one of these will affect both.
+<br /><br />
 As such, the user folder is not only a place to deposit files, it becomes a complete manager of the documents students use during the course. Also, remember that any user can copy a file that is visible from any folder in the documents tool (whether or not he is the owner) to his/her portfolios or personal documents area of social network, which will be available to him/her for use in other courses.";
 $HelpFolderChat = "INFORMATION VISIBLE TO THE TEACHER ONLY:\nThis folder contains all sessions that have been opened in the chat. Although the chat sessions can often be trivial, others can be really interesting and worthy of being incorporated as an additional work document. To do this without changing the visibility of this folder, make the file visible and link it from where you deem appropriate. It is not recommended to make this folder visible to all.";
 $HelpFolderCertificates = "INFORMATION VISIBLE TO THE TEACHER ONLY:\nThis folder contains the various certificates templates that have been created for the rating tool. It is not recommended to make this folder visible to all.";
@@ -6226,8 +6226,8 @@ $Pediaphon = "Use Pediaphon audio services";
 $HelpPediaphon = "Supports text with several thousands characters, in various types of male and female voices (depending on the language). Audio files will be generated and automatically saved to the Chamilo directory in which you are.";
 $FirstSelectALanguage = "Please select a language";
 $MoveUserStats = "Move users results from/to a session";
-$CompareUserResultsBetweenCoursesAndCoursesInASession = "This advanced tool allows you to manually improve the tracking of users results when moving from courses methodology to sessions methodology. In most cases, you won't need to use it.<br />
-On this screen, you can compare results of users between the context of a standalone course, and the context of the same course inside a session.<br />
+$CompareUserResultsBetweenCoursesAndCoursesInASession = "This advanced tool allows you to manually improve the tracking of users results when moving from courses methodology to sessions methodology. In most cases, you won't need to use it.<br />
+On this screen, you can compare results of users between the context of a standalone course, and the context of the same course inside a session.<br />
 Once you are sure about what to do, you can choose to move the tracking data of the students (exercises results and learning paths tracking) from a course to a session.";
 $PDFExportWatermarkEnableTitle = "Enable watermark in PDF export";
 $PDFExportWatermarkEnableComment = "By enabling this option, you can upload an image or a text that will be automatically added as watermark to all PDF exports of documents on the system.";
@@ -6362,8 +6362,8 @@ $MailNotifyInvitation = "Notify by mail on new invitation received";
 $MailNotifyMessage = "Notify by mail on new personal message received";
 $MailNotifyGroupMessage = "Notify by mail on new message received in group";
 $SearchEnabledTitle = "Fulltext search";
-$SearchEnabledComment = "This feature allows you to index most of the documents uploaded to your portal, then provide a search feature for users.<br />
-This feature will not index documents that have already been uploaded, so it is important to enable (if wanted) at the beginning of your implementation.<br />
+$SearchEnabledComment = "This feature allows you to index most of the documents uploaded to your portal, then provide a search feature for users.<br />
+This feature will not index documents that have already been uploaded, so it is important to enable (if wanted) at the beginning of your implementation.<br />
 Once enabled, a search box will appear in the courses list of every user. Searching for a specific term will bring a list of corresponding documents, exercises or forum topics, filtered depending on the availability of these contents to the user.";
 $SpecificSearchFieldsAvailable = "Available custom search fields";
 $XapianModuleInstalled = "Xapian module installed";
@@ -7036,7 +7036,7 @@ $GradebookDefaultGradeModelComment = "This value will be selected by default whe
 $GradebookEnableGradeModelTitle = "Enable Gradebook model";
 $GradebookEnableGradeModelComment = "Enables the auto creation of gradebook categories inside a course depending of the gradebook models.";
 $ConfirmToLockElement = "Are you sure you want to lock this item? After locking this item you can't edit the user results. To unlock it, you need to contact the platform administrator.";
-$ConfirmToUnLockElement = "Are you sure you want to unlock this element?";
+$ConfirmToUnlockElement = "Are you sure you want to unlock this element?";
 $AllowSessionAdminsToSeeAllSessionsTitle = "Allow session administrators to see all sessions";
 $AllowSessionAdminsToSeeAllSessionsComment = "When this option is not enabled (default), session administrators can only see the sessions they have created. This is confusing in an open environment where session administrators might need to share support time between two sessions.";
 $PassPercentage = "Pass percentage";
@@ -7439,12 +7439,12 @@ $AreYouSureToSubscribe = "Are you sure to subscribe?";
 $CheckYourEmailAndFollowInstructions = "Check your email and follow the instructions.";
 $LinkExpired = "Link expired, please try again.";
 $ResetPasswordInstructions = "Instructions for the password change procedure";
-$ResetPasswordCommentWithUrl = "You are receiving this message because you (or someone pretending to be you) have requested a new password to be generated for you.
-
-To set a the new password you need to activate it. To do this, please click this link:
-
-%s
-
+$ResetPasswordCommentWithUrl = "You are receiving this message because you (or someone pretending to be you) have requested a new password to be generated for you.
+
+To set a the new password you need to activate it. To do this, please click this link:
+
+%s
+
 If you did not request this procedure, then please ignore this message. If you keep receiving it, please contact the portal administrator.";
 $CronRemindCourseExpirationActivateTitle = "Remind Course Expiration cron";
 $CronRemindCourseExpirationActivateComment = "Enable the Remind Course Expiration cron";
@@ -7453,14 +7453,14 @@ $CronRemindCourseExpirationFrequencyComment = "Number of days before the expirat
 $CronCourseFinishedActivateText = "Course Finished cron";
 $CronCourseFinishedActivateComment = "Activate the Course Finished cron";
 $MailCronCourseFinishedSubject = "End of course %s";
-$MailCronCourseFinishedBody = "Dear %s,
-
-Thank you for your participation to course %s. We hope you've acquired new relevant knowledge and enjoyed the course.
-
-You can check your performance in the course through the My Progress section.
-
-Best regards,
-
+$MailCronCourseFinishedBody = "Dear %s,
+
+Thank you for your participation to course %s. We hope you've acquired new relevant knowledge and enjoyed the course.
+
+You can check your performance in the course through the My Progress section.
+
+Best regards,
+
 %s Team";
 $GenerateDefaultContent = "Generate default content";
 $ThanksForYourSubscription = "Thanks for your subscription";
@@ -7536,10 +7536,22 @@ $DateRange = "Date range";
 $EditIcon = "Edit icon";
 $CustomIcon = "Custom icon";
 $CurrentIcon = "Current icon";
+$GroupReporting = "Group reporting";
 $ConvertFormats = "Convert format";
 $AreYouSureToDeleteX = "Are you sure you want to delete %s?";
 $AttachmentList = "Attachments list";
-$SeeCourseInformationAndRequirements = "Check requirements";
+$SeeCourseInformationAndRequirements = "See course information and requirements";
 $DownloadAll = "Download all";
 $DeletedDocuments = "Deleted documents";
+$CourseListNotAvailable = "Course list not available";
+$CopyOfMessageSentToXUser = "Copy of message sent to %s";
+$Convert = "Convert";
+$PortalLimitType = "Portal's limit type";
+$PortalName = "Portal name";
+$BestScore = "Best score";
+$AreYouSureToDeleteJS = "Are you sure to delete";
+$ConversionToSameFileFormat = "Conversion to same file format. Please choose another.";
+$FileFormatNotSupported = "File format not supported";
+$FileConvertedFromXToY = "File converted from %s to %s";
+$XDays = "%s days";
 ?>

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


+ 8 - 2
main/mySpace/admin.php

@@ -101,7 +101,13 @@ if (isset($_POST['export'])) {
     export_csv($header, $data, 'administrators.csv');
 }
 
-echo "<br /><br />";
-echo "<form method='post' action='admin.php'><button type='submit' class='save' name='export' value='" . get_lang('exportExcel') . "'>" . get_lang('exportExcel') . "</button><form>";
+echo "
+    <br /><br />
+    <form method='post' action='admin.php'>
+        <button type='submit' class='save' name='export' value='" . get_lang('ExportExcel') . "'>
+            " . get_lang('ExportExcel') . "
+        </button>
+    <form>
+";
 
 Display::display_footer();

+ 8 - 2
main/mySpace/coaches.php

@@ -216,6 +216,12 @@ if (isset($_POST['export'])){
 }
 
 echo "<br /><br />";
-echo "<form method='post' action='coaches.php'>
-        <button type='submit' class='save' name='export' value='".get_lang('exportExcel')."'>".get_lang('exportExcel')."</button><form>";
+echo "
+    <br /><br />
+    <form method='post' action='coaches.php'>
+        <button type='submit' class='save' name='export' value='" . get_lang('ExportExcel') . "'>
+            " . get_lang('ExportExcel') . "
+        </button>
+    <form>
+";
 Display::display_footer();

+ 1 - 1
main/mySpace/progression.php

@@ -62,7 +62,7 @@ if (Database::num_rows($result_course) > 0) {
 	}
 	echo '</table>';
 	echo "<br /><br />";
-	echo "<form method='post'><input type='submit' name='export' value='".get_lang('exportExcel')."'/><form>";
+	echo "<form method='post'><input type='submit' name='export' value='".get_lang('ExportExcel')."'/><form>";
 } else {
 	echo get_lang('NoCourse');
 }

+ 1 - 1
main/newscorm/lp_add_audio.php

@@ -83,7 +83,7 @@ $form = new FormValidator(
     null,
     array('enctype' => 'multipart/form-data')
 );
-$suredel = trim(get_lang('AreYouSureToDelete'));
+$suredel = trim(get_lang('AreYouSureToDeleteJS'));
 
 $lpPathInfo = $_SESSION['oLP']->generate_lp_folder(api_get_course_info());
 

+ 1 - 1
main/newscorm/lp_add_item.php

@@ -117,7 +117,7 @@ $lp_theme_css = $learnPath->get_theme();
 
 Display::display_header(null, 'Path');
 
-$suredel = trim(get_lang('AreYouSureToDelete'));
+$suredel = trim(get_lang('AreYouSureToDeleteJS'));
 //@todo move this somewhere else css/fix.css
 ?>
 <style>

+ 1 - 1
main/newscorm/lp_admin_view.php

@@ -160,7 +160,7 @@ if (isset($_POST['save_audio'])) {
 
 Display::display_header(null, 'Path');
 
-$suredel = trim(get_lang('AreYouSureToDelete'));
+$suredel = trim(get_lang('AreYouSureToDeleteJS'));
 
 ?>
 <script>

+ 1 - 1
main/newscorm/lp_build.php

@@ -85,7 +85,7 @@ $interbreadcrumb[] = array('url' => '#', "name" => $therow['name']);
 $lp_theme_css=$_SESSION['oLP']->get_theme();
 $show_learn_path = true;
 Display::display_header('', 'Path');
-$suredel = trim(get_lang('AreYouSureToDelete'));
+$suredel = trim(get_lang('AreYouSureToDeleteJS'));
 
 ?>
 <script type='text/javascript'>

+ 1 - 1
main/newscorm/lp_edit.php

@@ -185,7 +185,7 @@ if (api_is_platform_admin()) {
     $defaults['use_max_score'] = $_SESSION['oLP']->use_max_score;
 }
 
-$form->addElement('checkbox', 'subscribe_users', null, get_lang('SubscribeUsersToLP'));
+$form->addElement('checkbox', 'subscribe_users', null, get_lang('SubscribeUsersToLp'));
 
 $enableLpExtraFields = false;
 

+ 1 - 1
main/newscorm/lp_edit_item.php

@@ -87,7 +87,7 @@ $show_learn_path = true;
 $lp_theme_css = $_SESSION['oLP']->get_theme();
 
 Display::display_header(get_lang('Edit'),'Path');
-$suredel = trim(get_lang('AreYouSureToDelete'));
+$suredel = trim(get_lang('AreYouSureToDeleteJS'));
 
 ?>
 <script>

+ 1 - 1
main/newscorm/lp_edit_item_prereq.php

@@ -72,7 +72,7 @@ $lp_theme_css = $lp->get_theme();
 
 Display::display_header(get_lang('LearnpathPrerequisites'), 'Path');
 
-$suredel = trim(get_lang('AreYouSureToDelete'));
+$suredel = trim(get_lang('AreYouSureToDeleteJS'));
 ?>
 <script>
     function stripslashes(str) {

+ 1 - 1
main/newscorm/lp_list.php

@@ -29,7 +29,7 @@ $baseWordDir = $courseDir;
 $htmlHeadXtra[] =
     "<script>
 function confirmation(name) {
-    if (confirm(\" ".trim(get_lang('AreYouSureToDelete'))." \"+name+\"?\"))
+    if (confirm(\" ".trim(get_lang('AreYouSureToDeleteJS'))." \"+name+\"?\"))
         {return true;}
     else
         {return false;}

+ 1 - 1
main/newscorm/lp_move_item.php

@@ -99,7 +99,7 @@ $lp_theme_css = $_SESSION['oLP']->get_theme();
 
 Display::display_header(get_lang('Move'), 'Path');
 
-$suredel = trim(get_lang('AreYouSureToDelete'));
+$suredel = trim(get_lang('AreYouSureToDeleteJS'));
 ?>
 <script type='text/javascript'>
 /* <![CDATA[ */

+ 1 - 1
main/newscorm/lp_view_item.php

@@ -105,7 +105,7 @@ if ($mode == 'fullpage') {
     Display::display_header(get_lang('Item'), 'Path');
 }
 
-$suredel = trim(get_lang('AreYouSureToDelete'));
+$suredel = trim(get_lang('AreYouSureToDeleteJS'));
 ?>
 <script>
 /* <![CDATA[ */

+ 1 - 1
main/newscorm/openoffice_document.class.php

@@ -311,7 +311,7 @@ abstract class OpenofficeDocument extends learnpath
                 filesize($this->base_work_dir . '/' . $this->created_dir),
                 $convertedTitle,
                 sprintf(
-                    get_lang('ConvertedFromXToY'),
+                    get_lang('FileConvertedFromXToY'),
                     strtoupper($originalPathInfo['extension']),
                     strtoupper($convertedPathInfo['extension'])
                 ),

+ 1 - 1
main/reports/index.php

@@ -6,7 +6,7 @@
 * @copyrights CBLUE SPRL 2011
 * @package chamilo.reports
 */
-exit;
+//exit;
 $cidReset = true;
 
 // including files

+ 1 - 1
main/reports/reports.php

@@ -7,7 +7,7 @@
 * @copyrights CBLUE SPRL 2011
 * @package chamilo.reports
 */
-exit;
+//exit;
 $cidReset = true;
 
 // including files

+ 16 - 4
main/social/profile.php

@@ -299,15 +299,27 @@ $(document).ready(function() {
         $.ajax({
             contentType: "application/x-www-form-urlencoded",
             beforeSend: function() {
-                $(".url_preview").html("<i class=\'fa fa-spinner fa-pulse fa-1x\'></i>");
+                $(".panel-preview").hide();
+                $(".spinner").html("'.
+                    '<div class=\'text-center\'>'.
+                        '<i class=\'fa fa-spinner fa-pulse fa-1x\'></i>'.
+                        '<p>'. get_lang('Loading') . ' ' . get_lang('Preview') .'</p>'.
+                    '</div>'.
+                '");
             },
             type: "POST",
             url: "'. api_get_path(WEB_AJAX_PATH) .'social.ajax.php?a=readUrlWithOpenGraph",
             data: "social_wall_new_msg_main=" + e.originalEvent.clipboardData.getData("text"),
             success: function(response) {
-                $(".url_preview").html(response);
-                $("[name=\'url_content\']").val(response);
-                $(".url_preview img").addCSS("img-responsive");
+                if (!response == false) {
+                    $(".spinner").html("");
+                    $(".panel-preview").show();
+                    $(".url_preview").html(response);
+                    $("[name=\'url_content\']").val(response);
+                    $(".url_preview img").addClass("img-responsive");
+                } else {
+                    $(".spinner").html("");
+                }
             }
         });
     });

+ 2 - 2
main/survey/copy_survey.php

@@ -43,10 +43,10 @@ $surveys = SurveyManager::get_surveys(api_get_course_id(), api_get_session_id())
 $courses = CourseManager::get_courses_list();
 $form = new FormValidator('copy_survey', 'post', 'copy_survey.php?'.api_get_cidreq());
 if (!$surveys) {
-    Display::display_error_message(get_lang('NoSurveysAvailable'));
+    Display::display_error_message(get_lang('NoSurveyAvailable'));
 }
 if (count($courses) <= 1) {
-    Display::display_error_message(get_lang('NoCoursesAvailable'));
+    Display::display_error_message(get_lang('CourseListNotAvailable'));
 }
 if ($surveys && count($courses) > 1) {
     // Surveys select

+ 1 - 1
main/survey/survey_list.php

@@ -74,7 +74,7 @@ if (isset($_GET['search']) && $_GET['search'] == 'advanced') {
 if ($action == 'copy_survey') {
     if (api_is_allowed_to_edit()) {
         SurveyManager::copy_survey($_GET['survey_id']);
-        $message = get_lang('Copied');
+        $message = get_lang('SurveyCopied');
         header('Location: ' . api_get_path(WEB_CODE_PATH) . 'survey/survey_list.php?' . api_get_cidreq());
         exit;
     }

+ 6 - 4
main/template/default/announcement/slider.tpl

@@ -12,13 +12,15 @@
   <div class="carousel-inner" role="listbox">
       {% for announcement in announcements %}
         <div class="item {% if loop.index0 == 0 %} active {% endif %}">
-          {{ announcement.content }}
+          <div class="carousel-caption">
+              {{ announcement.title }}
+          </div>
+          <div class="carousel-content">
+              {{ announcement.content }}
+          </div>
             {% if announcement.readMore %}
                 <a href="{{ _p.web }}news_list.php?id={{ announcement.id }}">{{ "More" | get_lang }}</a>
             {% endif %}
-          <div class="carousel-caption">
-              <h3>{{ announcement.title }}</h3>
-          </div>
         </div>
     {% endfor %}
   </div>

+ 1 - 1
main/template/default/learnpath/list.tpl

@@ -1,6 +1,6 @@
 <script>
     function confirmation(name) {
-        if (confirm("{{ "AreYouSureToDelete"|get_lang }} \"" + name + "\" ?")) {
+        if (confirm("{{ "AreYouSureToDeleteJS"|get_lang }} \"" + name + "\" ?")) {
             return true;
         } else {
             return false;

+ 469 - 466
main/template/default/skill/skill_wheel.tpl

@@ -1,566 +1,569 @@
 {% include template ~ '/skill/skill_wheel.js.tpl' %}
-
 <script>
-
-/* Skill search input in the left menu */
-function check_skills_sidebar() {
-    //Selecting only selected skills
-    $("#skill_id option:selected").each(function() {
-        var skill_id = $(this).val();
-        if (skill_id != "" ) {
-            $.ajax({
-                url: "{{ url }}&a=skill_exists",
-                data: "skill_id="+skill_id,
-//                async: false,
-                success: function(return_value) {
-                    if (return_value == 0 ) {
-                        alert("{{ 'SkillDoesNotExist'|get_lang }}");
-
-                        //Deleting select option tag
-                        //$("#skill_id option[value="+skill_id+"]").remove();
-                        $("#skill_id").empty();
-
-                        //Deleting holder
-                        $("#skill_search .holder li").each(function () {
-                            if ($(this).attr("rel") == skill_id) {
-                                $(this).remove();
+    /* Skill search input in the left menu */
+    function check_skills_sidebar() {
+        //Selecting only selected skills
+        $("#skill_id option:selected").each(function () {
+            var skill_id = $(this).val();
+            if (skill_id != "") {
+                $.ajax({
+                    url: "{{ url }}&a=skill_exists",
+                    data: "skill_id=" + skill_id,
+                    async: false,
+                    success: function (return_value) {
+                        if (return_value == 0) {
+                            alert("{{ 'SkillDoesNotExist'|get_lang }}");
+
+                            //Deleting select option tag
+                            //$("#skill_id option[value="+skill_id+"]").remove();
+                            $("#skill_id").empty();
+
+                            //Deleting holder
+                            $("#skill_search .holder li").each(function () {
+                                if ($(this).attr("rel") == skill_id) {
+                                    $(this).remove();
+                                }
+                            });
+                        } else {
+                            $("#skill_id option[value=" + skill_id + "]").remove();
+
+                            //Deleting holder
+                            $("#skill_search .holder li").each(function () {
+                                if ($(this).attr("rel") == skill_id) {
+                                    $(this).remove();
+                                }
+                            });
+
+                            if ($('#skill_to_select_id_' + skill_id).length == 0) {
+                                skill_info = get_skill_info(skill_id);
+                                li = fill_skill_search_li(skill_id, skill_info.name);
+                                $("#skill_holder").append(li);
                             }
-                        });
-                    } else {
-                        $("#skill_id option[value="+skill_id+"]").remove();
-
-                        //Deleting holder
-                        $("#skill_search .holder li").each(function () {
-                            if ($(this).attr("rel") == skill_id) {
-                                $(this).remove();
-                            }
-                        });
-                        
-                        
-                       
-                        if ($('#skill_to_select_id_'+skill_id).length == 0) {
-                            skill_info = get_skill_info(skill_id);
-                            li = fill_skill_search_li(skill_id, skill_info.name);
-                            $("#skill_holder").append(li);
                         }
                     }
-                }
-            });
-        }
-    });
-}
-
-function fill_skill_search_li(skill_id, skill_name, checked) {
-    checked_condition = '';
-    if (checked == 1) {
-        checked_condition = 'checked=checked';
+                });
+            }
+        });
     }
-    return '<li><input id="skill_to_select_id_'+skill_id+'" rel="'+skill_id+'" name="'+skill_name+'" class="skill_to_select" '+checked_condition+' type="checkbox" value=""> <a href="#" class="load_wheel" rel="'+skill_id+'">'+skill_name+'</a></li>';
-}
-
-function check_skills_edit_form() {
-    //selecting only selected parents
-    $("#parent_id option:selected").each(function() {
-        var skill_id = $(this).val();
-        if (skill_id != "" ) {
-            $.ajax({
-                async: false,
-                url: "{{ url }}&a=skill_exists",
-                data: "skill_id="+skill_id,
-                success: function(return_value) {
-                    if (return_value == 0 ) {
-                        alert("{{ 'SkillDoesNotExist'|get_lang }}");
-
-                        //Deleting select option tag
-                        $("#parent_id").find('option').remove();
-                        //Deleting holder
-                        $("#skill_row .holder li").each(function () {
-                            if ($(this).attr("rel") == skill_id) {
-                                $(this).remove();
-                            }
-                        });
-                    } else {
-                        $("#parent_id").empty();
-                        $("#skill_edit_holder").find('li').remove();
-
-                        //Deleting holder
-                        $("#skill_row .holder li").each(function () {
-                            if ($(this).attr("rel") == skill_id) {
-                                $(this).remove();
-                            }
-                        });
-
-                        skill = get_skill_info(skill_id);
 
-                        $("#skill_edit_holder").append('<li class="bit-box" id="skill_option_'+skill_id+'"> '+skill.name+'</li>');
-                        $("#parent_id").append('<option class="selected" selected="selected" value="'+skill_id+'"></option>');
-                    }
-                }
-            });
+    function fill_skill_search_li(skill_id, skill_name, checked) {
+        checked_condition = '';
+        if (checked == 1) {
+            checked_condition = 'checked=checked';
         }
-    });
-}
-
-function check_gradebook() {
-    //selecting only selected users
-    $("#gradebook_id option:selected").each(function() {
-        var gradebook_id = $(this).val();
+        return '<li>' +
+                '<input id="skill_to_select_id_' + skill_id + '" rel="' + skill_id + '" name="' + skill_name + '" class="skill_to_select" ' + checked_condition + ' type="checkbox" value="">' +
+                '<a href="#" class="load_wheel" rel="' + skill_id + '">' + skill_name + '</a> ' + 
+                '</li>';
+    }
 
-        if (gradebook_id != "" ) {
-            $.ajax({
-                url: "{{ url }}&a=gradebook_exists",
-                data: "gradebook_id="+gradebook_id,
-                success: function(return_value) {
-                    if (return_value == 0 ) {
-                        alert("{{ 'GradebookDoesNotExist'|get_lang }}");
-                        //Deleting select option tag
-                        $("#gradebook_id option[value="+gradebook_id+"]").remove();
-                        //Deleting holder
-                        $("#gradebook_row .holder li").each(function () {
-                            if ($(this).attr("rel") == gradebook_id) {
-                                $(this).remove();
-                            }
-                        });
-                    } else {
-                        //Deleting holder
-                        $("#gradebook_row .holder li").each(function () {
-                            if ($(this).attr("rel") == gradebook_id) {
-                                $(this).remove();
-                            }
-                        });
+    function check_skills_edit_form() {
+        //selecting only selected parents
+        $("#parent_id option:selected").each(function () {
+            var skill_id = $(this).val();
+            if (skill_id != "") {
+                $.ajax({
+                    async: false,
+                    url: "{{ url }}&a=skill_exists",
+                    data: "skill_id=" + skill_id,
+                    success: function (return_value) {
+                        if (return_value == 0) {
+                            alert("{{ 'SkillDoesNotExist'|get_lang }}");
+
+                            //Deleting select option tag
+                            $("#parent_id").find('option').remove();
+                            //Deleting holder
+                            $("#skill_row .holder li").each(function () {
+                                if ($(this).attr("rel") == skill_id) {
+                                    $(this).remove();
+                                }
+                            });
+                        } else {
+                            $("#parent_id").empty();
+                            $("#skill_edit_holder").find('li').remove();
+
+                            //Deleting holder
+                            $("#skill_row .holder li").each(function () {
+                                if ($(this).attr("rel") == skill_id) {
+                                    $(this).remove();
+                                }
+                            });
+
+                            skill = get_skill_info(skill_id);
+
+                            $("#skill_edit_holder").append('<li class="bit-box" id="skill_option_' + skill_id + '"> ' + skill.name + '</li>');
+                            $("#parent_id").append('<option class="selected" selected="selected" value="' + skill_id + '"></option>');
+                        }
+                    }
+                });
+            }
+        });
+    }
 
-                        if ($('#gradebook_item_'+gradebook_id).length == 0) {
-                            gradebook = get_gradebook_info(gradebook_id);
-                            if (gradebook) {
-                                $("#gradebook_holder").append('<li id="gradebook_item_'+gradebook_id+'" class="bit-box"> '+gradebook.name+' <a rel="'+gradebook_id+'" class="closebutton" href="#"></a></li>');
+    function check_gradebook() {
+        //selecting only selected users
+        $("#gradebook_id option:selected").each(function () {
+            var gradebook_id = $(this).val();
+
+            if (gradebook_id != "") {
+                $.ajax({
+                    url: "{{ url }}&a=gradebook_exists",
+                    data: "gradebook_id=" + gradebook_id,
+                    success: function (return_value) {
+                        if (return_value == 0) {
+                            alert("{{ 'GradebookDoesNotExist'|get_lang }}");
+                            //Deleting select option tag
+                            $("#gradebook_id option[value=" + gradebook_id + "]").remove();
+                            //Deleting holder
+                            $("#gradebook_row .holder li").each(function () {
+                                if ($(this).attr("rel") == gradebook_id) {
+                                    $(this).remove();
+                                }
+                            });
+                        } else {
+                            //Deleting holder
+                            $("#gradebook_row .holder li").each(function () {
+                                if ($(this).attr("rel") == gradebook_id) {
+                                    $(this).remove();
+                                }
+                            });
+
+                            if ($('#gradebook_item_' + gradebook_id).length == 0) {
+                                gradebook = get_gradebook_info(gradebook_id);
+                                if (gradebook) {
+                                    $("#gradebook_holder").append('<li id="gradebook_item_' + gradebook_id + '" class="bit-box"> ' + gradebook.name +
+                                        ' <a rel="' + gradebook_id + '" class="closebutton" href="#"></a></li>');
+                                }
                             }
                         }
                     }
-                }
-            });
-        }
-    });
-}
-
-function delete_gradebook_from_skill(skill_id, gradebook_id) {
-    $.ajax({
-        url: url+'&a=delete_gradebook_from_skill&skill_id='+skill_id+'&gradebook_id='+gradebook_id,
-        async: false,
-        success: function(result) {
-            //if (result == 1) {
-                $('#gradebook_item_'+gradebook_id).remove();
-                $("#gradebook_id option").each(function() {
+                });
+            }
+        });
+    }
+
+    function delete_gradebook_from_skill(skill_id, gradebook_id) {
+        $.ajax({
+            url: url + '&a=delete_gradebook_from_skill&skill_id=' + skill_id + '&gradebook_id=' + gradebook_id,
+            async: false,
+            success: function (result) {
+                //if (result == 1) {
+                $('#gradebook_item_' + gradebook_id).remove();
+                $("#gradebook_id option").each(function () {
                     if ($(this).attr("value") == gradebook_id) {
                         $(this).remove();
                     }
                 });
-            //}
-        }
-    });
-}
-
-function return_skill_list_from_profile_search() {
-    var skill_list = {};
-
-    if ($("#profile_search li").length != 0) {
-        $("#profile_search li").each(function(index) {
-            id = $(this).attr("id").split('_')[3];
-            if (id) {
-                skill_list[index] = id;
+                //}
             }
         });
     }
-    return skill_list;
-}
 
-function submit_profile_search_form() {
-    $("#skill_wheel").remove();
+    function return_skill_list_from_profile_search() {
+        var skill_list = {};
+
+        if ($("#profile_search li").length != 0) {
+            $("#profile_search li").each(function (index) {
+                id = $(this).attr("id").split('_')[3];
+                if (id) {
+                    skill_list[index] = id;
+                }
+            });
+        }
+        return skill_list;
+    }
 
-    var skill_list = return_skill_list_from_profile_search();
+    function submit_profile_search_form() {
+        $("#skill_wheel").remove();
 
-    if (skill_list.length != 0) {
-        skill_list = { 'skill_id' : skill_list };
-        skill_params = $.param(skill_list);
+        var skill_list = return_skill_list_from_profile_search();
 
-        $.ajax({
-            url: url+'&a=profile_matches&'+skill_params,
-            async: false,
-            success: function (html) {
-                //users = jQuery.parseJSON(users);
-                $('#wheel_container').html(html);
+        if (skill_list.length != 0) {
+            skill_list = {'skill_id': skill_list};
+            skill_params = $.param(skill_list);
 
-            }
-        });
-    }
-    //return skill;
-}
-
-function add_skill_in_profile_list(skill_id, skill_name) {
-    if ($('#profile_match_item_'+skill_id).length == 0 ) {
-        $('#profile_search').append('<li class="bit-box" id="profile_match_item_'+skill_id+'">'+skill_name+'  <a rel="'+skill_id+'" class="closebutton" href="#"></a> </li>');
-    } else {
-        $('#profile_match_item_'+skill_id).remove();
+            $.ajax({
+                url: url + '&a=profile_matches&' + skill_params,
+                async: false,
+                success: function (html) {
+                    //users = jQuery.parseJSON(users);
+                    $('#wheel_container').html(html);
+
+                }
+            });
+        }
+        //return skill;
     }
-    toogle_save_profile_form();
-}
-
-function toogle_save_profile_form() {
-    //Hiding showing the save this search
-    if ($('#profile_search li').length == 0) {
-        $('#profile-options-container').hide();
-    } else {
-        $('#profile-options-container').show();
+
+    function add_skill_in_profile_list(skill_id, skill_name) {
+        if ($('#profile_match_item_' + skill_id).length == 0) {
+            $('#profile_search').append('<li class="bit-box" id="profile_match_item_' + skill_id + '">' + skill_name +
+                ' <a rel="' + skill_id + '" class="closebutton" href="#"></a> </li>');
+        } else {
+            $('#profile_match_item_' + skill_id).remove();
+        }
+        toogle_save_profile_form();
     }
-}
-
-$(document).ready(function() {
-    /* Skill search */
-    
-    //Tool tip (in exercises)
-    
-    var tip_options = {
-        placement : 'right'
+
+    function toogle_save_profile_form() {
+        //Hiding showing the save this search
+        if ($('#profile_search li').length == 0) {
+            $('#profile-options-container').hide();
+        } else {
+            $('#profile-options-container').show();
+        }
     }
-    $('.tooltip_skill').tooltip(tip_options);
 
-    /* Skill item list onclick  */
-    $("#skill_holder").on("click", "input.skill_to_select", function() {
-        skill_id = $(this).attr('rel');
-        skill_name = $(this).attr('name');
-        add_skill_in_profile_list(skill_id, skill_name);
-    });
+    $(document).ready(function () {
+        /* Skill search */
 
-     /* URL link when searching skills */
-    $("#skill_holder").on("click", "a.load_wheel", function(e) {
-        e.preventDefault();
+        //Tool tip (in exercises)
 
-        skill_id = $(this).attr('rel');
-        skill_to_load_from_get = 0;
-        load_nodes(skill_id, main_depth);
-    });
+        var tip_options = {
+            placement: 'right'
+        }
+        $('.tooltip_skill').tooltip(tip_options);
 
-     /* URL link when searching skills */
-    $("#skill_search").on("click", "a.load_root", function() {
-        skill_id = $(this).attr('rel');
-        skill_to_load_from_get = 0;
-        load_nodes(skill_id, main_depth);
-    });
+        /* Skill item list onclick  */
+        $("#skill_holder").on("click", "input.skill_to_select", function () {
+            skill_id = $(this).attr('rel');
+            skill_name = $(this).attr('name');
+            add_skill_in_profile_list(skill_id, skill_name);
+        });
 
-    /* Profile matcher */
+        /* URL link when searching skills */
+        $("#skill_holder").on("click", "a.load_wheel", function (e) {
+            e.preventDefault();
 
-    /* Submit button */
-    $("#search_profile_form").submit(function() {
-        submit_profile_search_form();
-        return false;
-    });
+            skill_id = $(this).attr('rel');
+            skill_to_load_from_get = 0;
+            load_nodes(skill_id, main_depth);
+        });
 
-    $("form#save_profile_form_button").on('submit', function(e) {
-        e.preventDefault();
+        /* URL link when searching skills */
+        $("#skill_search").on("click", "a.load_root", function () {
+            skill_id = $(this).attr('rel');
+            skill_to_load_from_get = 0;
+            load_nodes(skill_id, main_depth);
+        });
 
-        var profileId = parseInt($('input[name="profile_id"]').val());
+        /* Profile matcher */
 
-        var getProfileInfo = $.getJSON(
-            '{{ url }}',
-            {
-                a: 'get_profile',
-                profile_id: profileId
-            }
-        );
+        /* Submit button */
+        $("#search_profile_form").submit(function () {
+            submit_profile_search_form();
+            return false;
+        });
 
-        $.when(getProfileInfo).done(function(profileInfo) {
-            $("#name_profile").val(profileInfo.name);
-            $("#description_profile").val(profileInfo.description);
+        $("form#save_profile_form_button").on('submit', function (e) {
+            e.preventDefault();
 
-            $('#frm-save-profile').modal('show');
-        });
-    });
+            var profileId = parseInt($('input[name="profile_id"]').val());
 
-    /* Close button in profile matcher items */
-    $("#profile_search").on("click", "a.closebutton", function() {
-        skill_id = $(this).attr('rel');
-        $('input[id=skill_to_select_id_'+skill_id+']').attr('checked', false);
-        $('#profile_match_item_'+skill_id).remove();
-        submit_profile_search_form();
-        toogle_save_profile_form();
-    });
+            var getProfileInfo = $.getJSON(
+                    '{{ url }}',
+                    {
+                        a: 'get_profile',
+                        profile_id: profileId
+                    }
+            );
 
-    // Fill saved profiles list
-    update_my_saved_profiles();
+            $.when(getProfileInfo).done(function (profileInfo) {
+                $("#name_profile").val(profileInfo.name);
+                $("#description_profile").val(profileInfo.description);
 
-    /* Click in profile */
-    $("#saved_profiles").on("click", "li.load_profile", function() {
-        profile_id = $(this).attr('rel');
-        $('input[name="profile_id"]').val(profile_id);
-        $.ajax({
-           url: '{{ url }}&a=get_skills_by_profile&profile_id='+profile_id,
-           success:function(json) {
-               skill_list = jQuery.parseJSON(json);
-
-               $('#profile_search').empty();
-               $('#skill_holder').empty();
-               jQuery.each(skill_list, function(index, skill_id) {
-                    skill_info = get_skill_info(skill_id);
-                    li = fill_skill_search_li(skill_id, skill_info.name, 1);
-                    $("#skill_holder").append(li);
-                    add_skill_in_profile_list(skill_id, skill_info.name);
-               });
-               submit_profile_search_form();
-            }
+                $('#frm-save-profile').modal('show');
+            });
+        });
+
+        /* Close button in profile matcher items */
+        $("#profile_search").on("click", "a.closebutton", function () {
+            skill_id = $(this).attr('rel');
+            $('input[id=skill_to_select_id_' + skill_id + ']').attr('checked', false);
+            $('#profile_match_item_' + skill_id).remove();
+            submit_profile_search_form();
+            toogle_save_profile_form();
         });
-    });
 
-    $("#saved_profiles").on('click', 'li.load_profile button.close', function () {
-        var $parent = $(this).parent();
-        var profileId = $parent.attr('rel');
+        // Fill saved profiles list
+        update_my_saved_profiles();
 
-        $.getJSON('{{ url }}&a=delete_profile', {
-            profile: profileId
-        }, function (response) {
-            if (response.status) {
-                $parent.remove();
-            }
+        /* Click in profile */
+        $("#saved_profiles").on("click", "li.load_profile", function () {
+            profile_id = $(this).attr('rel');
+            $('input[name="profile_id"]').val(profile_id);
+            $.ajax({
+                url: '{{ url }}&a=get_skills_by_profile&profile_id=' + profile_id,
+                success: function (json) {
+                    skill_list = jQuery.parseJSON(json);
+
+                    $('#profile_search').empty();
+                    $('#skill_holder').empty();
+                    jQuery.each(skill_list, function (index, skill_id) {
+                        skill_info = get_skill_info(skill_id);
+                        li = fill_skill_search_li(skill_id, skill_info.name, 1);
+                        $("#skill_holder").append(li);
+                        add_skill_in_profile_list(skill_id, skill_info.name);
+                    });
+                    submit_profile_search_form();
+                }
+            });
         });
-    });
 
-    /* Wheel skill popup form */
+        $("#saved_profiles").on('click', 'li.load_profile button.close', function () {
+            var $parent = $(this).parent();
+            var profileId = $parent.attr('rel');
 
-    /* Close button in gradebook select */
-    $("#gradebook_holder").on("click", "a.closebutton", function() {
-        gradebook_id = $(this).attr('rel');
-        skill_id = $('input[name="id"]').attr('value');
-        delete_gradebook_from_skill(skill_id, gradebook_id);
-    });
+            $.getJSON('{{ url }}&a=delete_profile', {
+                profile: profileId
+            }, function (response) {
+                if (response.status) {
+                    $parent.remove();
+                }
+            });
+        });
 
-    $("#skill_id").fcbkcomplete({
-        json_url: "{{ url }}&a=find_skills",
-        cache: false,
-        filter_case: false,
-        filter_hide: true,
-        complete_text:"{{ 'StartToType' | get_lang }}",
-        firstselected: true,
-        //onremove: "testme",
-        onselect:"check_skills_sidebar",
-        filter_selected: true,
-        newel: true
-    });
+        /* Wheel skill popup form */
 
-    load_nodes(0, main_depth);
+        /* Close button in gradebook select */
+        $("#gradebook_holder").on("click", "a.closebutton", function () {
+            gradebook_id = $(this).attr('rel');
+            skill_id = $('input[name="id"]').attr('value');
+            delete_gradebook_from_skill(skill_id, gradebook_id);
+        });
 
-    function update_my_saved_profiles() {
-        $.ajax({
-           url: '{{ url }}&a=get_saved_profiles',
-           success:function(data) {
-               $("#saved_profiles").html(data);
-            }
+        $("#skill_id").fcbkcomplete({
+            json_url: "{{ url }}&a=find_skills",
+            cache: false,
+            filter_case: false,
+            filter_hide: true,
+            complete_text: "{{ 'StartToType' | get_lang }}",
+            firstselected: true,
+            //onremove: "testme",
+            onselect: "check_skills_sidebar",
+            filter_selected: true,
+            newel: true
         });
-    }
 
-    /* change background color */
+        load_nodes(0, main_depth);
+
+        function update_my_saved_profiles() {
+            $.ajax({
+                url: '{{ url }}&a=get_saved_profiles',
+                success: function (data) {
+                    $("#saved_profiles").html(data);
+                }
+            });
+        }
+
+        /* change background color */
         $("#celestial").click(function () {
-            $("#page-back").css("background","#A9E2F3");
+            $("#page-back").css("background", "#A9E2F3");
         });
         $("#white").click(function () {
-            $("#page-back").css("background","#FFFFFF");
+            $("#page-back").css("background", "#FFFFFF");
         });
         $("#black").click(function () {
-            $("#page-back").css("background","#000000");
+            $("#page-back").css("background", "#000000");
         });
         $("#lead").click(function () {
-            $("#page-back").css("background","#848484");
+            $("#page-back").css("background", "#848484");
         });
         $("#light-yellow").click(function () {
-            $("#page-back").css("background","#F7F8E0");
+            $("#page-back").css("background", "#F7F8E0");
         });
 
-    /* Generated random colour */
-    /*
-    function colour(d) {
-
-        if (d.children) {
-            // There is a maximum of two children!
-            var colours = d.children.map(colour),
-            a = d3.hsl(colours[0]),
-            b = d3.hsl(colours[1]);
-            // L*a*b* might be better here...
-            return d3.hsl((a.h + b.h) / 2, a.s * 1.2, a.levels_to_show / 1.2);
-        }
-        return d.colour || "#fff";
-    }*/
+        /* Generated random colour */
+        /*
+         function colour(d) {
+         
+         if (d.children) {
+         // There is a maximum of two children!
+         var colours = d.children.map(colour),
+         a = d3.hsl(colours[0]),
+         b = d3.hsl(colours[1]);
+         // L*a*b* might be better here...
+         return d3.hsl((a.h + b.h) / 2, a.s * 1.2, a.levels_to_show / 1.2);
+         }
+         return d.colour || "#fff";
+         }*/
+
+        $('#form-button-edit').on('click', function (e) {
+            e.preventDefault();
+
+            if (SkillWheel.currentSkill === null) {
+                return;
+            }
 
-    $('#form-button-edit').on('click', function(e) {
-        e.preventDefault();
+            window.location.href = "{{ _p.web_main }}admin/skill_edit.php?id=" + SkillWheel.currentSkill.id;
+        });
 
-        if (SkillWheel.currentSkill === null) {
-            return;
-        }
+        $('#form-button-create-child').on('click', function (e) {
+            e.preventDefault();
 
-        window.location.href = "{{ _p.web_main }}admin/skill_edit.php?id=" + SkillWheel.currentSkill.id;
-    });
+            if (SkillWheel.currentSkill === null) {
+                return;
+            }
 
-    $('#form-button-create-child').on('click', function(e) {
-        e.preventDefault();
+            window.location.href = "{{ _p.web_main }}admin/skill_create.php?parent=" + SkillWheel.currentSkill.id;
+        });
 
-        if (SkillWheel.currentSkill === null) {
-            return;
-        }
+        $('#form-button-add-to-profile').on('click', function (e) {
+            e.preventDefault();
 
-        window.location.href = "{{ _p.web_main }}admin/skill_create.php?parent=" + SkillWheel.currentSkill.id;
-    });
+            if (SkillWheel.currentSkill === null) {
+                return;
+            }
 
-    $('#form-button-add-to-profile').on('click', function(e) {
-        e.preventDefault();
+            add_skill_in_profile_list(SkillWheel.currentSkill.id, SkillWheel.currentSkill.name);
+        });
 
-        if (SkillWheel.currentSkill === null) {
-            return;
-        }
+        $('#frm-save-profile').on('hidden.bs.modal', function () {
+            $("#name_profile").val('');
+            $("#description_profile").val('');
+            $('input[name="profile_id"]').val(0);
+        });
 
-        add_skill_in_profile_list(SkillWheel.currentSkill.id, SkillWheel.currentSkill.name);
-    });
+        $('#form-button-save-profile').on('click', function (e) {
+            e.preventDefault();
+
+            var saveProfile = $.ajax(
+                    '{{ url }}',
+                    {
+                        data: {
+                            a: 'save_profile',
+                            name: $("#name_profile").val(),
+                            description: $("#description_profile").val(),
+                            skill_id: return_skill_list_from_profile_search(),
+                            profile: $('input[name="profile_id"]').val()
+                        }
+                    }
+            );
 
-    $('#frm-save-profile').on('hidden.bs.modal', function () {
-        $("#name_profile").val('');
-        $("#description_profile").val('');
-        $('input[name="profile_id"]').val(0);
-    });
+            $.when(saveProfile).done(function (response) {
+                if (parseInt(response) === 1) {
+                    update_my_saved_profiles();
 
-    $('#form-button-save-profile').on('click', function(e) {
-        e.preventDefault();
-
-        var saveProfile = $.ajax(
-            '{{ url }}',
-            {
-                data: {
-                    a: 'save_profile',
-                    name: $("#name_profile").val(),
-                    description: $("#description_profile").val(),
-                    skill_id: return_skill_list_from_profile_search(),
-                    profile: $('input[name="profile_id"]').val()
+                    alert("{{ "Saved" | get_lang }}");
+                } else {
+                    alert("{{ "Error" | get_lang }}");
                 }
-            }
-        );
 
-        $.when(saveProfile).done(function(response) {
-            if (parseInt(response) === 1 ) {
-                update_my_saved_profiles();
-
-                alert("{{ "Saved" | get_lang }}");
-            } else {
-                alert("{{ "Error" | get_lang }}");
-            }
-
-            $('#frm-save-profile').modal('hide');
+                $('#frm-save-profile').modal('hide');
+            });
         });
     });
-});
 </script>
 <div id="page-back" class="page-skill">
-<div class="container-fluid">
-    <div class="row">
+    <div class="container-fluid">
+        <div class="row">
 
-        <div class="col-md-3 skill-options">
-            <div class="skill-home">
-                <a class="btn btn-large btn-block btn-success" href="{{ _p.web }}user_portal.php"><i class="fa fa-home"></i> {{ "ReturnToCourseList"|get_lang }}</a>
-            </div>
-
-
-            <!-- ACCORDION -->
-
-            <div class="panel-group" id="accordion2">
-            <div class="panel panel-primary">
-                <div class="panel-heading">
-                    <a data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
-                        {{ 'SkillsSearch' | get_lang }}
+            <div class="col-md-3 skill-options">
+                <div class="skill-home">
+                    <a class="btn btn-large btn-block btn-success" href="{{ _p.web }}user_portal.php">
+                        <i class="fa fa-home"></i> {{ "ReturnToCourseList"|get_lang }}
                     </a>
                 </div>
-                <div id="collapseOne" class="panel-collapse collapse">
-                    <div class="panel-body">
-                        <!-- SEARCH -->
-                        <div class="search-skill">
-                            <p class="text">{{ 'EnterTheSkillNameToSearch' | get_lang }}</p>
-                            <form id="skill_search" class="form-search">
-                                <select id="skill_id" name="skill_id" /></select>
-                                <div class="button-skill">
-                                    <a class="btn btn-block btn-default load_root" rel="0" href="#"><i class="fa fa-eye"></i> {{ "ViewSkillsWheel"|get_lang }}</a>
-                                    <!-- <a id="clear_selection" class="btn btn-danger">{{ "Clear"|get_lang }}</a> -->
+                <!-- ACCORDION -->
+                <div class="panel-group" id="accordion2">
+                    <div class="panel panel-primary">
+                        <div class="panel-heading">
+                            <a data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
+                                {{ 'SkillsSearch' | get_lang }}
+                            </a>
+                        </div>
+                        <div id="collapseOne" class="panel-collapse collapse">
+                            <div class="panel-body">
+                                <!-- SEARCH -->
+                                <div class="search-skill">
+                                    <p class="text">{{ 'EnterTheSkillNameToSearch' | get_lang }}</p>
+                                    <form id="skill_search" class="form-search">
+                                        <select id="skill_id" name="skill_id" /></select>
+                                        <div class="button-skill">
+                                            <a class="btn btn-block btn-default load_root" rel="0" href="#">
+                                                <i class="fa fa-eye"></i> {{ "ViewSkillsWheel"|get_lang }}
+                                            </a>
+                                            <!-- <a id="clear_selection" class="btn btn-danger">{{ "Clear"|get_lang }}</a> -->
+                                        </div>
+                                        <ul id="skill_holder" class="holder_simple border"></ul>
+                                    </form>
                                 </div>
-                                <ul id="skill_holder" class="holder_simple border"></ul>
-                            </form>
+                                <!-- END SEARCH -->
+                            </div>
                         </div>
-                        <!-- END SEARCH -->
                     </div>
-                </div>
-            </div>
-            <div class="panel panel-primary">
-                <div class="panel-heading">
-                    <a data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
-                        {{ 'ProfileSearch'|get_lang }}
-                    </a>
-                </div>
-                <div id="collapseTwo" class="panel-collapse collapse">
-                    <div class="panel-body">
-                        <!-- SEARCH PROFILE -->
-                        <div class="search-profile-skill">
-
-                            <p class="text">{{ 'WhatSkillsAreYouLookingFor'|get_lang }}</p>
-                            <ul id="profile_search" class="holder holder_simple"></ul>
-                            <form id="search_profile_form" class="form-search">
-
-                                <button class="btn btn-default btn-block" type="submit"><i class="fa fa-search"></i> {{ "SearchProfileMatches"|get_lang }}</button>
-                            </form>
-                            <p class="text">{{ 'IsThisWhatYouWereLookingFor'|get_lang }}</p>
-                            <form id="save_profile_form_button" class="form-search">
-                                <button class="btn btn-default btn-block" type="submit"><i class="fa fa-floppy-o"></i> {{ "SaveThisSearch"|get_lang }}</button>
-
-                            </form>
+                    <div class="panel panel-primary">
+                        <div class="panel-heading">
+                            <a data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
+                                {{ 'ProfileSearch'|get_lang }}
+                            </a>
                         </div>
-                        <!-- END SEARCH PROFILE-->
-                        <div id="saved_profiles"></div>
-                    </div>
-                </div>
-            </div>
-                <div class="panel panel-primary">
-                    <div class="panel-heading">
-                        <a data-toggle="collapse" data-parent="#accordion2" href="#collapseThree">
-                            {{ 'DisplayOptions' | get_lang }}
-                        </a>
-                    </div>
-                    <div id="collapseThree" class="panel-collapse collapse">
-                        <div class="panel-body">
-                            <p class="text">{{ 'ChooseABackgroundColor' | get_lang }}</p>
-                            <ul>
-                                <li><a href="#" id="white">{{ 'White' | get_lang }}</a></li>
-                                <li><a href="#" id="black">{{ 'Black' | get_lang }}</a></li>
-                                <li><a href="#" id="celestial">{{ 'LightBlue' }}</a></li>
-                                <li><a href="#" id="lead">{{ 'Gray' | get_lang }}</a></li>
-                                <li><a href="#" id="light-yellow">{{ 'Corn' | get_lang }}</a></li>
-                            </ul>
+                        <div id="collapseTwo" class="panel-collapse collapse">
+                            <div class="panel-body">
+                                <!-- SEARCH PROFILE -->
+                                <div class="search-profile-skill">
+
+                                    <p class="text">{{ 'WhatSkillsAreYouLookingFor'|get_lang }}</p>
+                                    <ul id="profile_search" class="holder holder_simple"></ul>
+                                    <form id="search_profile_form" class="form-search">
+                                        <button class="btn btn-default btn-block" type="submit">
+                                            <i class="fa fa-search"></i> {{ "SearchProfileMatches"|get_lang }}
+                                        </button>
+                                    </form>
+                                    <p class="text">{{ 'IsThisWhatYouWereLookingFor'|get_lang }}</p>
+                                    <form id="save_profile_form_button" class="form-search">
+                                        <button class="btn btn-default btn-block" type="submit">
+                                            <i class="fa fa-floppy-o"></i> {{ "SaveThisSearch"|get_lang }}
+                                        </button>
+                                    </form>
+                                </div>
+                                <!-- END SEARCH PROFILE-->
+                                <div id="saved_profiles"></div>
+                            </div>
                         </div>
                     </div>
-                </div>
-                <div class="panel panel-primary">
-                    <div class="panel-heading">
-                        <a data-toggle="collapse" data-parent="#accordion2" href="#collapseFour">
-                            {{ "Legend"|get_lang }}
-                        </a>
+                    <div class="panel panel-primary">
+                        <div class="panel-heading">
+                            <a data-toggle="collapse" data-parent="#accordion2" href="#collapseThree">
+                                {{ 'DisplayOptions' | get_lang }}
+                            </a>
+                        </div>
+                        <div id="collapseThree" class="panel-collapse collapse">
+                            <div class="panel-body">
+                                <p class="text">{{ 'ChooseABackgroundColor' | get_lang }}</p>
+                                <ul>
+                                    <li><a href="#" id="white">{{ 'White' | get_lang }}</a></li>
+                                    <li><a href="#" id="black">{{ 'Black' | get_lang }}</a></li>
+                                    <li><a href="#" id="celestial">{{ 'LightBlue' }}</a></li>
+                                    <li><a href="#" id="lead">{{ 'Gray' | get_lang }}</a></li>
+                                    <li><a href="#" id="light-yellow">{{ 'Corn' | get_lang }}</a></li>
+                                </ul>
+                            </div>
+                        </div>
                     </div>
-                    <div id="collapseFour" class="panel-collapse collapse">
-                        <div class="panel-body">
-                            <p class="text"><span class="skill-legend-add">&nbsp;&nbsp;&nbsp;&nbsp;</span> {{ "SkillsYouCanLearn"|get_lang }}</p>
-                            <p class="text"><span class="skill-legend-search">&nbsp;&nbsp;&nbsp;&nbsp;</span> {{ "SkillsSearchedFor"|get_lang }}</p>
+                    <div class="panel panel-primary">
+                        <div class="panel-heading">
+                            <a data-toggle="collapse" data-parent="#accordion2" href="#collapseFour">
+                                {{ "Legend"|get_lang }}
+                            </a>
+                        </div>
+                        <div id="collapseFour" class="panel-collapse collapse">
+                            <div class="panel-body">
+                                <p class="text"><span class="skill-legend-add">&nbsp;&nbsp;&nbsp;&nbsp;</span> {{ "SkillsYouCanLearn"|get_lang }}</p>
+                                <p class="text"><span class="skill-legend-search">&nbsp;&nbsp;&nbsp;&nbsp;</span> {{ "SkillsSearchedFor"|get_lang }}</p>
+                            </div>
                         </div>
                     </div>
                 </div>
+                <!-- END ACCORDEON -->
             </div>
-
-            <!-- END ACCORDEON -->
-        </div>
-        <div id="wheel_container" class="col-md-9">
-            <div id="skill_wheel">
-                <img src="">
+            <div id="wheel_container" class="col-md-9">
+                <div id="skill_wheel">
+                    <img src="">
+                </div>
             </div>
         </div>
-</div>
-</div>
+    </div>
 </div>
 
 <div class="modal fade" id="frm-skill" tabindex="-1" role="dialog" aria-labelledby="form-skill-title" aria-hidden="true">

+ 120 - 117
main/template/default/skill/skill_wheel_student.tpl

@@ -1,154 +1,154 @@
 {% include template ~ '/skill/skill_wheel.js.tpl' %}
-
 <script>
-
-/* Skill search input in the left menu */
-function check_skills_sidebar() {
-    //Selecting only selected skills
-    $("#skill_id option:selected").each(function() {
-        var skill_id = $(this).val();
-        if (skill_id != "" ) {
-            $.ajax({
-                url: "{{ url }}&a=skill_exists",
-                data: "skill_id="+skill_id,
+    /* Skill search input in the left menu */
+    function check_skills_sidebar() {
+        //Selecting only selected skills
+        $("#skill_id option:selected").each(function () {
+            var skill_id = $(this).val();
+            if (skill_id != "") {
+                $.ajax({
+                    url: "{{ url }}&a=skill_exists",
+                    data: "skill_id=" + skill_id,
 //                async: false,
-                success: function(return_value) {
-                    if (return_value == 0 ) {
-                        alert("{{ 'SkillDoesNotExist'|get_lang }}");
-                        //Deleting select option tag
-                        //$("#skill_id option[value="+skill_id+"]").remove();
-                        $("#skill_id").empty();
+                    success: function (return_value) {
+                        if (return_value == 0) {
+                            alert("{{ 'SkillDoesNotExist'|get_lang }}");
+                            //Deleting select option tag
+                            //$("#skill_id option[value="+skill_id+"]").remove();
+                            $("#skill_id").empty();
 
-                        //Deleting holder
-                        $("#skill_search .holder li").each(function () {
-                            if ($(this).attr("rel") == skill_id) {
-                                $(this).remove();
-                            }
-                        });
-                    } else {
-                        $("#skill_id option[value="+skill_id+"]").remove();
+                            //Deleting holder
+                            $("#skill_search .holder li").each(function () {
+                                if ($(this).attr("rel") == skill_id) {
+                                    $(this).remove();
+                                }
+                            });
+                        } else {
+                            $("#skill_id option[value=" + skill_id + "]").remove();
 
-                        //Deleting holder
-                        $("#skill_search .holder li").each(function () {
-                            if ($(this).attr("rel") == skill_id) {
-                                $(this).remove();
-                            }
-                        });
+                            //Deleting holder
+                            $("#skill_search .holder li").each(function () {
+                                if ($(this).attr("rel") == skill_id) {
+                                    $(this).remove();
+                                }
+                            });
 
-                        if ($('#skill_to_select_id_'+skill_id).length == 0) {
-                            skill_info = get_skill_info(skill_id);
-                            li = fill_skill_search_li(skill_id, skill_info.name);
-                            $("#skill_holder").append(li);
+                            if ($('#skill_to_select_id_' + skill_id).length == 0) {
+                                skill_info = get_skill_info(skill_id);
+                                li = fill_skill_search_li(skill_id, skill_info.name);
+                                $("#skill_holder").append(li);
+                            }
                         }
                     }
-                },
-            });
-        }
-    });
-}
-
-function fill_skill_search_li(skill_id, skill_name, checked) {
-    checked_condition = '';
-    if (checked == 1) {
-        checked_condition = 'checked=checked';
+                });
+            }
+        });
     }
-    return '<li><a id="skill_to_select_id_'+skill_id+'" href="#" class="load_wheel" rel="'+skill_id+'">'+skill_name+'</a></li>';
-}
 
-function load_skill_info(skill_id) {
-    $.ajax({
-        url: url+'&a=get_skill_course_info&id='+skill_id,
-        async: false,
-        success: function(data) {
-            $('#skill_info').html(data);
-            return data;
+    function fill_skill_search_li(skill_id, skill_name, checked) {
+        checked_condition = '';
+        if (checked == 1) {
+            checked_condition = 'checked=checked';
         }
-    });
-}
+        return '<li>' + 
+            '<a id="skill_to_select_id_' + skill_id + '" href="#" class="load_wheel" rel="' + skill_id + '">' +
+                skill_name +
+            '</a>' +
+            '</li>';
+    }
+
+    function load_skill_info(skill_id) {
+        $.ajax({
+            url: url + '&a=get_skill_course_info&id=' + skill_id,
+            async: false,
+            success: function (data) {
+                $('#skill_info').html(data);
+                return data;
+            }
+        });
+    }
 
-$(document).ready(function() {
-    /* Skill search */
+    $(document).ready(function () {
+        /* Skill search */
 
-    /* Skill item list onclick  */
-    $("#skill_holder").on("click", "input.skill_to_select", function() {
-        skill_id = $(this).attr('rel');
-        skill_name = $(this).attr('name');
-        add_skill_in_profile_list(skill_id, skill_name);
-    });
+        /* Skill item list onclick  */
+        $("#skill_holder").on("click", "input.skill_to_select", function () {
+            skill_id = $(this).attr('rel');
+            skill_name = $(this).attr('name');
+            add_skill_in_profile_list(skill_id, skill_name);
+        });
 
-     /* URL link when searching skills */
-    $("#skill_holder").on("click", "a.load_wheel", function() {
-        skill_id = $(this).attr('rel');
-        skill_to_load_from_get = 0;
-        load_nodes(skill_id, main_depth);
-        load_skill_info(skill_id);
-    });
+        /* URL link when searching skills */
+        $("#skill_holder").on("click", "a.load_wheel", function () {
+            skill_id = $(this).attr('rel');
+            skill_to_load_from_get = 0;
+            load_nodes(skill_id, main_depth);
+            load_skill_info(skill_id);
+        });
 
-     /* URL link when searching skills */
-    $("#skill_search").on("click", "a.load_root", function() {
-        skill_id = $(this).attr('rel');
-        skill_to_load_from_get = 0;
-        load_nodes(skill_id, main_depth);
-    });
+        /* URL link when searching skills */
+        $("#skill_search").on("click", "a.load_root", function () {
+            skill_id = $(this).attr('rel');
+            skill_to_load_from_get = 0;
+            load_nodes(skill_id, main_depth);
+        });
 
-    /* When clicking in a course title */
-    $("#skill_info").on("click", "a.course_description_popup[rel]", function(e) {
-        e.preventDefault();
+        /* When clicking in a course title */
+        $("#skill_info").on("click", "a.course_description_popup[rel]", function (e) {
+            e.preventDefault();
 
-        var getCourseInfo = $.ajax(
-            url,
-            {
-                data: {
-                    a: 'get_course_info_popup',
-                    code: $(this).attr('rel')
+            var getCourseInfo = $.ajax(url, {
+                    data: {
+                        a: 'get_course_info_popup',
+                        code: $(this).attr('rel')
+                    }
                 }
-            }
-        );
+            );
 
-        $.when(getCourseInfo).done(function(response) {
-            $('#frm-course-info').find('.modal-body').html(response);
-            $('#frm-course-info').modal('show');
+            $.when(getCourseInfo).done(function (response) {
+                $('#frm-course-info').find('.modal-body').html(response);
+                $('#frm-course-info').modal('show');
+            });
         });
-    });
 
-    /* change background color */
+        /* change background color */
         $("#celestial").click(function () {
-            $("#page-back").css("background","#A9E2F3");
+            $("#page-back").css("background", "#A9E2F3");
         });
         $("#white").click(function () {
-            $("#page-back").css("background","#FFFFFF");
+            $("#page-back").css("background", "#FFFFFF");
         });
         $("#black").click(function () {
-            $("#page-back").css("background","#000000");
+            $("#page-back").css("background", "#000000");
         });
         $("#lead").click(function () {
-            $("#page-back").css("background","#848484");
+            $("#page-back").css("background", "#848484");
         });
         $("#light-yellow").click(function () {
-            $("#page-back").css("background","#F7F8E0");
+            $("#page-back").css("background", "#F7F8E0");
         });
 
-    /* Wheel skill popup form */
+        /* Wheel skill popup form */
 
-    $("#skill_id").fcbkcomplete({
-        json_url: "{{ url }}&a=find_skills",
-        cache: false,
-        filter_case: false,
-        filter_hide: true,
-        complete_text:"{{ 'StartToType' | get_lang }}",
-        firstselected: true,
-        //onremove: "testme",
-        onselect:"check_skills_sidebar",
-        filter_selected: true,
-        newel: true
-    });
+        $("#skill_id").fcbkcomplete({
+            json_url: "{{ url }}&a=find_skills",
+            cache: false,
+            filter_case: false,
+            filter_hide: true,
+            complete_text: "{{ 'StartToType' | get_lang }}",
+            firstselected: true,
+            //onremove: "testme",
+            onselect: "check_skills_sidebar",
+            filter_selected: true,
+            newel: true
+        });
 
-    load_nodes(0, main_depth);
+        load_nodes(0, main_depth);
 
-    $('#frm-course-info').on('', function() {
-        $('#frm-course-info').find('.modal-body').html('');
+        $('#frm-course-info').on('', function () {
+            $('#frm-course-info').find('.modal-body').html('');
+        });
     });
-});
 
 </script>
 <div id="page-back" class="page-skill">
@@ -157,7 +157,8 @@ $(document).ready(function() {
             <div class="col-md-3 skill-options">
                 <div class="skill-home">
                     <a class="btn btn-large btn-block btn-success" href="{{ _p.web }}user_portal.php">
-                        <i class="fa fa-home"></i> {{ "ReturnToCourseList"|get_lang }}</a>
+                        <i class="fa fa-home"></i> {{ "ReturnToCourseList"|get_lang }}
+                    </a>
                 </div>
                 <div class="skill-profile">
                     <div class="avatar">
@@ -200,7 +201,9 @@ $(document).ready(function() {
                                     <form id="skill_search" class="form-search">
                                         <select id="skill_id" name="skill_id" /></select>
                                         <div class="button-skill">
-                                            <a class="btn btn-default btn-block load_root" rel="0" href="#"><i class="fa fa-eye"></i> {{ "ViewSkillsWheel"|get_lang }}</a>
+                                            <a class="btn btn-default btn-block load_root" rel="0" href="#">
+                                                <i class="fa fa-eye"></i> {{ "ViewSkillsWheel"|get_lang }}
+                                            </a>
                                             <!-- <a id="clear_selection" class="btn btn-danger">{{ "Clear"|get_lang }}</a> -->
                                         </div>
                                         <ul id="skill_holder" class="holder_simple"></ul>

+ 9 - 0
main/template/default/social/profile.tpl

@@ -11,6 +11,15 @@
     </div>
     <div id="wallMessages" class="col-md-6">
         {{ social_wall_block }}
+        <div class="spinner"></div>
+        <div class="panel panel-preview panel-default" hidden="true">
+            <div class="panel-heading">
+                <h3 class="panel-title">{{ "Url" | get_lang }} - {{ "Preview" | get_lang }}</h3>
+            </div>
+            <div class="panel-body">
+                <div class="url_preview"></div>
+            </div>
+        </div>
         {{ social_post_wall_block }}
         {{ social_auto_extend_link }}
     </div>

+ 2 - 2
main/template/default/social/user_block.tpl

@@ -14,7 +14,7 @@
                         {{ social_avatar_block }}
                         
                         <ul class="list-user-data">
-                            <li class="item name">
+                            <li class="item">
                                 {{ user.complete_name }}
                             </li>
                             <li class="item">
@@ -48,7 +48,7 @@
                         
                         {% if not profile_edition_link is empty %}
                         <li class="item">
-                            <a class="btn btn-primary btn-sm btn-block" href="{{ profile_edition_link }}">
+                            <a class="btn link btn-sm btn-block" href="{{ profile_edition_link }}">
                             <i class="fa fa-edit"></i>{{ "EditProfile" | get_lang }}
                             </a>
                         </li>

+ 39 - 43
main/tracking/courseLog.php

@@ -88,7 +88,7 @@ if ($export_csv) {
     ob_start();
 }
 $columnsToHideFromSetting = api_get_configuration_value('course_log_hide_columns');
-$columnsToHide = empty($columnsToHideFromSetting) ? array(1, 9, 10, 11, 12) : $columnsToHideFromSetting;
+$columnsToHide = empty($columnsToHideFromSetting) ? array(0, 8, 9, 10, 11) : $columnsToHideFromSetting;
 $columnsToHide = json_encode($columnsToHide);
 
 $csv_content = array();
@@ -96,23 +96,22 @@ $csv_content = array();
 $js = "<script>
         // hide column and display the button to unhide it
         function foldup(in_id) {
-            $('#reporting_table .data_table tr td:nth-child('+in_id+')').fadeToggle();
-            $('#reporting_table .data_table tr th:nth-child('+in_id+')').fadeToggle();
-            $('div#unhideButtons span:nth-child('+in_id+')').fadeToggle();
+            $('#reporting_table .data_table tr td:nth-child(' + (in_id + 1) + ')').toggleClass('hide');
+            $('#reporting_table .data_table tr th:nth-child(' + (in_id + 1) + ')').toggleClass('hide');
+            $('div#unhideButtons a:nth-child(' + (in_id + 1) + ')').toggleClass('hide');
         }
 
         // add the red cross on top of each column
         function init_hide() {
             $('#reporting_table .data_table tr th').each(
                 function(index) {
-                    num_index = index + 1;
                     $(this).prepend(
-                        '<div style=\"cursor:pointer\" onclick=\"foldup('+num_index+')\">".Display::return_icon(
+                        '<div style=\"cursor:pointer\" onclick=\"foldup(' + index + ')\">" . Display::return_icon(
                             'visible.png',
                             get_lang('HideColumn'),
                             array('align' => 'absmiddle', 'hspace' => '3px'),
                             ICON_SIZE_SMALL
-                         )."</div>'
+                         ) . "</div>'
                     );
                 }
             );
@@ -135,15 +134,6 @@ $htmlHeadXtra[] = "<style type='text/css'>
     .secLine {background-color : #E6E6E6;}
     .content {padding-left : 15px;padding-right : 15px; }
     .specialLink{color : #0000FF;}
-    /* Style for reporting array hide/show columns */
-    .unhide_button {
-        cursor : pointer;
-        border:1px solid black;
-        background-color: #FAFAFA;
-        padding: 5px;
-        border-radius : 3px;
-        margin-right:3px;
-    }
     div#reporting_table table th {
       vertical-align:top;
     }
@@ -266,8 +256,6 @@ $form_search = new FormValidator(
     array(),
     FormValidator::LAYOUT_INLINE
 );
-$renderer = $form_search->defaultRenderer();
-$renderer->setCustomElementTemplate('<span>{element}</span>');
 $form_search->addElement('hidden', 'from', Security::remove_XSS($from));
 $form_search->addElement('hidden', 'session_id', $sessionId);
 $form_search->addElement('hidden', 'id_session', $sessionId);
@@ -335,30 +323,32 @@ $html .= Display::page_subheader2(get_lang('StudentList'));
 $is_western_name_order = api_is_western_name_order();
 
 if (count($a_students) > 0) {
+    $getLangXDays = get_lang('XDays');
     $form = new FormValidator(
         'reminder_form',
         'get',
-        api_get_path(REL_CODE_PATH).'announcements/announcements.php?'.api_get_cidreq()
+        api_get_path(REL_CODE_PATH).'announcements/announcements.php?' . api_get_cidreq(),
+        null,
+        ['style' => 'margin-bottom: 10px'],
+        FormValidator::LAYOUT_INLINE
     );
     $options = array (
-        2 => '2 '.get_lang('Days'),
-        3 => '3 '.get_lang('Days'),
-        4 => '4 '.get_lang('Days'),
-        5 => '5 '.get_lang('Days'),
-        6 => '6 '.get_lang('Days'),
-        7 => '7 '.get_lang('Days'),
-        15 => '15 '.get_lang('Days'),
-        30 => '30 '.get_lang('Days'),
+        2 => sprintf($getLangXDays, 2),
+        3 => sprintf($getLangXDays, 3),
+        4 => sprintf($getLangXDays, 4),
+        5 => sprintf($getLangXDays, 5),
+        6 => sprintf($getLangXDays, 6),
+        7 => sprintf($getLangXDays, 7),
+        15 => sprintf($getLangXDays, 15),
+        30 => sprintf($getLangXDays, 30),
         'never' => get_lang('Never')
     );
-    $el = $form->addSelect('since', get_lang('RemindInactivesLearnersSince'), $options);
-    /* $el = $form->addElement(
-        'select',
+    $el = $form->addSelect(
         'since',
-        '<img align="middle" src="'.api_get_path(WEB_IMG_PATH).'messagebox_warning.gif" border="0" />'.
-        get_lang('RemindInactivesLearnersSince'),
-        $options
-    ); */
+        Display::returnFontAswesomeIcon('warning') . get_lang('RemindInactivesLearnersSince'),
+        $options,
+        ['class' => 'col-sm-3']
+    );
     $el->setSelected(7);
 
     $form->addElement('hidden', 'action', 'add');
@@ -416,7 +406,7 @@ if (count($a_students) > 0) {
     $headers['login'] = get_lang('Login');
 
     $table->set_header(4, get_lang('TrainingTime').'&nbsp;'.
-        Display::return_icon('info3.gif', get_lang('TrainingTimeInfo'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
+        Display::return_icon('info3.gif', get_lang('CourseTimeInfo'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
     $headers['training_time'] = get_lang('TrainingTime');
     $table->set_header(5, get_lang('CourseProgress').'&nbsp;'.
         Display::return_icon('info3.gif', get_lang('ScormAndLPProgressTotalAverage'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
@@ -469,16 +459,22 @@ if (count($a_students) > 0) {
         }
     }
     // display buttons to un hide hidden columns
-    $html .= "<div id='unhideButtons'>";
+    $html .= '<div id="unhideButtons" class="btn-toolbar">';
     $index = 0;
+    $getLangDisplayColumn = get_lang('DisplayColumn');
     foreach ($headers as $header) {
-        $html .= "<span title='".get_lang('DisplayColumn')." ".$header."' class='unhide_button hide' onclick='foldup($index)'>".
-            Display :: return_icon(
-                'move.png',
-                get_lang('DisplayColumn'),
-                array('align'=>'absmiddle', 'hspace'=>'3px'),
-                16
-            )." ".$header."</span>";
+        $html .= Display::toolbarButton(
+            $header,
+            '#',
+            'arrow-right',
+            'default',
+            [
+                'title' => htmlentities("$getLangDisplayColumn \"$header\"", ENT_QUOTES),
+                'class' => 'hide',
+                'onclick' => "foldup($index); return false;"
+            ]
+        );
+
         $index++;
     }
     $html .= "</div>";

+ 2 - 2
main/user/resume_session.php

@@ -170,7 +170,7 @@ if ($allowTutors == 'true') {
     <!-- show nb_days_before and nb_days_after only if they are different from 0 -->
     <tr>
     	<td>
-    		<?php echo api_ucfirst(get_lang('CoachSessionAccessStartDate')) ?> :
+    		<?php echo api_ucfirst(get_lang('SessionCoachStartDate')) ?> :
     	</td>
     	<td>
     		<?php echo intval($session['coach_access_start_date']) ?>
@@ -178,7 +178,7 @@ if ($allowTutors == 'true') {
     </tr>
     <tr>
     	<td>
-    		<?php echo api_ucfirst(get_lang('CoachSessionAccessEndDate')) ?> :
+    		<?php echo api_ucfirst(get_lang('SessionCoachEndDate')) ?> :
     	</td>
     	<td>
     		<?php echo intval($session['coach_session_access_end_date']) ?>

+ 3 - 3
main/work/work.lib.php

@@ -1543,7 +1543,7 @@ function getWorkListTeacher(
                 $class = '';
             } else {
                 $icon = 'invisible.png';
-                $text = get_lang('invisible');
+                $text = get_lang('Invisible');
                 $action = 'visible';
                 $class = 'muted';
             }
@@ -4802,13 +4802,13 @@ function exportAllStudentWorkFromPublication(
 
     $header .= '<br />'.get_lang('Teachers').': '.$teachers.'<br />';
     $header .= '<br />'.get_lang('Date').': '.api_get_local_time().'<br />';
-    $header .= '<br />'.get_lang('StudentPublication').': '.$workData['title'].'<br />';
+    $header .= '<br />'.get_lang('WorkName').': '.$workData['title'].'<br />';
 
     $content = null;
     $expiresOn = null;
 
     if (!empty($assignment) && isset($assignment['expires_on'])) {
-        $content .= '<br /><strong>' . get_lang('ExpiryDate') . '</strong>: ' . api_get_local_time($assignment['expires_on']);
+        $content .= '<br /><strong>' . get_lang('ExpirationDate') . '</strong>: ' . api_get_local_time($assignment['expires_on']);
         $expiresOn = api_get_local_time($assignment['expires_on']);
     }
 

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