Ver Fonte

Merge remote-tracking branch 'origin/1.11.x' into ofaj

Julio há 8 anos atrás
pai
commit
03d69fc6f9
40 ficheiros alterados com 787 adições e 358 exclusões
  1. 17 30
      app/Resources/public/css/base.css
  2. 4 2
      app/Resources/public/css/scorm.css
  3. 5 1
      main/admin/grade_models.php
  4. 40 10
      main/admin/subscribe_user2course.php
  5. 3 3
      main/admin/teacher_time_report.php
  6. 2 2
      main/badge/issued_all.php
  7. 15 13
      main/document/create_document.php
  8. 13 2
      main/exercise/export/scorm/scorm_classes.php
  9. 1 1
      main/exercise/question_list_admin.inc.php
  10. BIN
      main/img/icons/128/contract.png
  11. BIN
      main/img/icons/128/expand.png
  12. BIN
      main/img/icons/22/contract.png
  13. BIN
      main/img/icons/22/expand.png
  14. BIN
      main/img/icons/32/contract.png
  15. BIN
      main/img/icons/32/expand.png
  16. BIN
      main/img/icons/48/contract.png
  17. BIN
      main/img/icons/48/expand.png
  18. BIN
      main/img/icons/64/contract.png
  19. BIN
      main/img/icons/64/expand.png
  20. 222 0
      main/img/icons/svg/contract.svg
  21. 222 0
      main/img/icons/svg/expand.svg
  22. 4 0
      main/inc/lib/api.lib.php
  23. 2 2
      main/inc/lib/display.lib.php
  24. 1 1
      main/inc/lib/document.lib.php
  25. 33 0
      main/inc/lib/extra_field.lib.php
  26. 1 1
      main/inc/lib/formvalidator/Rule/CompareFields.php
  27. 6 7
      main/inc/lib/grade_model.lib.php
  28. 7 12
      main/inc/lib/tracking.lib.php
  29. 51 1
      main/inc/lib/usermanager.lib.php
  30. 1 1
      main/inc/lib/userportal.lib.php
  31. 1 1
      main/lp/learnpath.class.php
  32. 19 15
      main/mySpace/myStudents.php
  33. 57 61
      main/template/default/admin/teacher_time_report.tpl
  34. 14 46
      main/template/default/layout/no_layout.tpl
  35. 1 1
      main/template/default/layout/page_footer.tpl
  36. 3 2
      main/template/default/learnpath/view.tpl
  37. 1 1
      main/template/default/social/avatar_block.tpl
  38. 14 12
      src/Chamilo/CoreBundle/Entity/Repository/SkillRepository.php
  39. 5 128
      src/Chamilo/CoreBundle/Entity/SkillRelUser.php
  40. 22 2
      tests/features/accessCompanyReports.feature

+ 17 - 30
app/Resources/public/css/base.css

@@ -14,14 +14,17 @@ html{
     min-height: 100%;
 }
 body{
-    margin-bottom: 60px;
+    margin-bottom: 120px;
 }
 /* Sticky footer style */
 .sticky-footer{
     position: absolute;
     bottom: 0;
     width: 100%;
-    height: 60px;
+    height: 120px;
+}
+#content-section{
+    margin-bottom: 150px;
 }
 /* End Sticky footer style */
 select {
@@ -43,9 +46,7 @@ a.thumbnail:hover{
   -webkit-border-radius: 5px;
   text-align: justify;
 }
-#content-section{
-    margin-bottom: 90px;
-}
+
 .version-checking{
   padding: 10px;
   width: 100%;
@@ -2496,6 +2497,8 @@ table#skill_holder {
   padding-top: .5em;
   padding-bottom: .5em;
   width: auto;
+  font-size: 12px;
+  line-height: 16px;
 }
 .lp-add-item{
   display:block;
@@ -3014,31 +3017,6 @@ a.forum_group_link {
     border: 1px solid #ccc;
     margin-bottom:5px;
 }
-
-#hide_bar_template {
-    vertical-align: middle;
-    width: 10px;
-    display: inline;
-    float:left;
-    height: 100%;
-    padding-bottom: 90em;
-    margin-bottom: -90em;
-    cursor:pointer;
-    background-color:#eee;
-    margin-left: 4px !important;
-    background-image: url("../../main/img/hide0.png");
-    background-repeat: no-repeat;
-    background-position: center center;
-}
-
-.hide_bar_template_not_hide {
-    background-image: url("../../main/img/hide2.png") !important;
-}
-
-#hide_bar_template:hover {
-    background-color:#aaa;
-}
-
 .timeline-example {
     background-color: #FFFFFF;
     border: 1px solid #CCCCCC;
@@ -5700,6 +5678,15 @@ a.sessionView {
 #resource_tab li.lp_resource_element a{
     padding: 5px;
 }
+/* Gravatar */
+#user_image_block img,
+#sn-avatar-one a.expand-image img{
+    width: 120px;
+}
+footer{
+    font-size: 12px;
+    padding-top: 10px;
+}
 /* CSS NEW TOP ******************************************************************************/
 /* CSS Responsive */
 @media (min-width: 1025px) and (max-width: 1200px) {

+ 4 - 2
app/Resources/public/css/scorm.css

@@ -16,7 +16,10 @@ See https://support.chamilo.org/issues/6976
 #scorm-info.panel-default{
 
 }
-
+.audio-scorm #container{
+    min-height: 45px;
+    margin-bottom: 5px;
+}
 #author_image {
   border: 1px solid #CCCCCC;
   float: left;
@@ -365,7 +368,6 @@ See https://support.chamilo.org/issues/6976
     height: 100%;
     margin: 0;
     overflow: hidden;
-    position: relative;
 }
 
 #learning_path_left_zone,

+ 5 - 1
main/admin/grade_models.php

@@ -48,6 +48,7 @@ function plusItem(item) {
    	 	document.getElementById("plus-"+(item+1)).style.display = "inline";
 	 	//document.getElementById("txta-"+(item)).value = "100";
 	 	//document.getElementById("txta-"+(item-1)).value = "";
+	 	$("input").removeClass("form-control");
         }
   }
 
@@ -59,15 +60,17 @@ function minItem(item) {
      document.getElementById("plus-"+item).style.display = "inline";
      document.getElementById("min-"+(item-1)).style.display = "inline";
 	 //document.getElementById("txta-"+(item-1)).value = "100";
+	 $("input").removeClass("form-control");
 	}
 	if (item = 1) {
 		document.getElementById("min-"+(item)).style.display = "none";
+		$("input").removeClass("form-control");
 	}
 }
 </script>';
 
 // The header.
-Display::display_header($tool_name);
+Display::display_header();
 
 //jqgrid will use this URL to do the selects
 $url            = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_grade_models';
@@ -168,4 +171,5 @@ switch ($action) {
         $obj->display();
         break;
 }
+echo '<script> $(document).ready(function(){ $("input").removeClass("form-control"); }); </script>';
 Display :: display_footer();

+ 40 - 10
main/admin/subscribe_user2course.php

@@ -60,10 +60,21 @@ if (is_array($extra_field_list)) {
         if ($extra_field[8] == 1 && $extra_field[2] == ExtraField::FIELD_TYPE_SELECT) {
             $new_field_list[] = array(
                 'name' => $extra_field[3],
+                'type' => $extra_field[2],
                 'variable' => $extra_field[1],
                 'data' => $extra_field[9],
             );
         }
+        if ($extra_field[8] == 1 && $extra_field[2] == ExtraField::FIELD_TYPE_TAG) {
+            $options = UserManager::get_extra_user_data_for_tags($extra_field[1]);
+
+            $new_field_list[] = array(
+                'name' => $extra_field[3],
+                'type' => $extra_field[2],
+                'variable' => $extra_field[1],
+                'data' => $options['options'],
+            );
+        }
     }
 }
 
@@ -118,7 +129,7 @@ if (empty($first_letter_user)) {
 }
 
 $where_filter = null;
-
+$extra_field_result = [];
 //Filter by Extra Fields
 $use_extra_fields = false;
 if (is_array($extra_field_list)) {
@@ -126,13 +137,21 @@ if (is_array($extra_field_list)) {
         $result_list = array();
         foreach ($new_field_list as $new_field) {
             $varname = 'field_'.$new_field['variable'];
+            $fieldtype = $new_field['type'];
             if (UserManager::is_extra_field_available($new_field['variable'])) {
                 if (isset($_POST[$varname]) && $_POST[$varname] != '0') {
                     $use_extra_fields = true;
-                    $extra_field_result[]= UserManager::get_extra_user_data_by_value(
-                        $new_field['variable'],
-                        $_POST[$varname]
-                    );
+                    if ($fieldtype == ExtraField::FIELD_TYPE_TAG) {
+                        $extra_field_result[]= UserManager::get_extra_user_data_by_tags(
+                            intval($_POST['field_id']),
+                            $_POST[$varname]
+                        );
+                    } else {
+                        $extra_field_result[]= UserManager::get_extra_user_data_by_value(
+                            $new_field['variable'],
+                            $_POST[$varname]
+                        );
+                    }
                 }
             }
         }
@@ -227,7 +246,6 @@ if (api_is_multiple_url_enabled()) {
 $result = Database::query($sql);
 $db_courses = Database::store_result($result);
 unset($result);
-
 ?>
 <form name="formulaire" method="post" action="<?php echo api_get_self(); ?>" style="margin:0px;">
 <?php
@@ -237,18 +255,30 @@ if (is_array($extra_field_list)) {
         foreach ($new_field_list as $new_field) {
             echo $new_field['name'];
             $varname = 'field_'.$new_field['variable'];
+            $fieldtype = $new_field['type'];
             echo '&nbsp;<select name="'.$varname.'">';
             echo '<option value="0">--'.get_lang('Select').'--</option>';
             foreach	($new_field['data'] as $option) {
                 $checked='';
-                if (isset($_POST[$varname])) {
-                    if ($_POST[$varname] == $option[1]) {
-                        $checked = 'selected="true"';
+                if ($fieldtype == ExtraField::FIELD_TYPE_TAG) {
+                    if (isset($_POST[$varname])) {
+                        if ($_POST[$varname] == $option['tag']) {
+                            $checked = 'selected="true"';
+                        }
+                    }
+                    echo '<option value="'.$option['tag'].'" '.$checked.'>'.$option['tag'].'</option>';
+                } else {
+                    if (isset($_POST[$varname])) {
+                        if ($_POST[$varname] == $option[1]) {
+                            $checked = 'selected="true"';
+                        }
                     }
+                    echo '<option value="'.$option[1].'" '.$checked.'>'.$option[1].'</option>';
                 }
-                echo '<option value="'.$option[1].'" '.$checked.'>'.$option[1].'</option>';
             }
             echo '</select>';
+            $extraHidden = $fieldtype == ExtraField::FIELD_TYPE_TAG ? '<input type="hidden" name="field_id" value="'.$option['field_id'].'" />' : '';
+            echo $extraHidden;
             echo '&nbsp;&nbsp;';
         }
         echo '<input class="btn btn-primary" type="button" value="'.get_lang('Filter').'" onclick="validate_filter()" ></input>';

+ 3 - 3
main/admin/teacher_time_report.php

@@ -388,6 +388,6 @@ $tpl->assign('form', $form->returnForm());
 
 $tpl->assign('rows', $timeReport->data);
 
-$contentTemplate = $tpl->get_template('admin/teacher_time_report.tpl');
-
-$tpl->display($contentTemplate);
+$contentTemplate = $tpl->fetch('default/admin/teacher_time_report.tpl');
+$tpl->assign('content', $contentTemplate);
+$tpl->display_one_col_template();

+ 2 - 2
main/badge/issued_all.php

@@ -36,8 +36,8 @@ if (!$user || !$skill) {
 }
 
 $userSkills = $skillUserRepo->findBy([
-    'userId' => $user->getId(),
-    'skillId' => $skill->getId()
+    'user' => $user,
+    'skill' => $skill
 ]);
 
 $userInfo = [

+ 15 - 13
main/document/create_document.php

@@ -23,21 +23,23 @@ var hide_bar = function() {
 
 $(document).ready(function() {
     $(".scrollbar-light").scrollbar();
-
+    
     if ($(window).width() <= 785 ) {
         hide_bar();
     }    
 
     $("#hide_bar_template").click(function() {
         
-        $("#template_col").toggleClass("hide");
+        $("#expand").toggleClass("hide");
+        $("#expand").toggleClass("hide");
+        $("#contract").toggleClass("hide");
         
-        if ($("#doc_form").is(".col-md-8")) {
-            $("#doc_form").removeClass("col-md-8");
+        if ($("#doc_form").is(".col-md-9")) {
+            $("#doc_form").removeClass("col-md-9");
             $("#doc_form").addClass("col-md-11");
         } else {
             $("#doc_form").removeClass("col-md-11");
-            $("#doc_form").addClass("col-md-8");
+            $("#doc_form").addClass("col-md-9");
         }
         
         $("#hide_bar_template").toggleClass("hide_bar_template_not_hide");
@@ -611,11 +613,13 @@ if ($form->validate()) {
 
 	// link back to the documents overview
 	if ($is_certificate_mode) {
-		$actionsLeft =  '<a href="document.php?certificate=true&id='.$folder_id.'&selectcat=' . Security::remove_XSS($_GET['selectcat']).'">'.
+            $actionsLeft =  '<a href="document.php?certificate=true&id='.$folder_id.'&selectcat=' . Security::remove_XSS($_GET['selectcat']).'">'.
             Display::return_icon('back.png',get_lang('Back').' '.get_lang('To').' '.get_lang('CertificateOverview'),'',ICON_SIZE_MEDIUM).'</a>';
+            $actionsLeft .= '<a id="hide_bar_template" href="#">'.Display::return_icon('expand.png',get_lang('Back'),null,ICON_SIZE_MEDIUM).'</a>';
         } else {
-		$actionsLeft = '<a href="document.php?curdirpath='.Security::remove_XSS($dir).'">'.
+            $actionsLeft = '<a href="document.php?curdirpath='.Security::remove_XSS($dir).'">'.
             Display::return_icon('back.png',get_lang('Back').' '.get_lang('To').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
+            $actionsLeft .= '<a id="hide_bar_template" href="#">'.Display::return_icon('expand.png',get_lang('Back'),array('id'=>'expand'),ICON_SIZE_MEDIUM).Display::return_icon('contract.png',get_lang('Back'),array('id'=>'contract', 'class'=>'hide'),ICON_SIZE_MEDIUM).'</a>';
         }
 
         echo $toolbar = Display::toolbarAction('actions-documents', array(0 => $actionsLeft, 1 => ''));
@@ -632,20 +636,18 @@ if ($form->validate()) {
 		Display::display_normal_message($create_certificate.': <br /><br/>'.$str_info,false);
 	}
     // HTML-editor
-    echo '<div class="row" style="overflow:hidden">
-            <div id="template_col" class="col-md-2">
+    echo '<div class="page-create">
+            <div class="row" style="overflow:hidden">
+            <div id="template_col" class="col-md-3">
                 <div class="panel panel-default">
                 <div class="panel-body">
                     <div id="frmModel" class="items-templates scrollbar-light"></div>
                 </div>
                 </div>
             </div>
-            <div class="col-md-1">
-                <div id="hide_bar_template"></div>
-            </div>
             <div id="doc_form" class="col-md-9">
                 '.$form->returnForm().'
             </div>
-          </div>';
+          </div></div>';
 	Display :: display_footer();
 }

+ 13 - 2
main/exercise/export/scorm/scorm_classes.php

@@ -98,6 +98,15 @@ class ScormQuestion extends Question
 				$this->answer = new ScormAnswerHotspot($this->id);
 				$this->answer->questionJSId = $this->js_id;
 				break;
+			// not supported
+			case UNIQUE_ANSWER_NO_OPTION:
+			case MULTIPLE_ANSWER_TRUE_FALSE:
+			case MULTIPLE_ANSWER_COMBINATION_TRUE_FALSE:
+			case UNIQUE_ANSWER_IMAGE:
+			case CALCULATED_ANSWER:
+				$this->answer = new ScormAnswerMultipleChoice($this->id);
+				$this->answer->questionJSId = $this->js_id;
+				break;
 			default:
 				$this->answer = new stdClass();
 				$this->answer->questionJSId = $this->js_id;
@@ -112,13 +121,15 @@ class ScormQuestion extends Question
 		$html = $this->getQuestionHTML();
 		$js = $this->getQuestionJS();
 
-		if (is_object($this->answer)) {
+		if (is_object($this->answer) && $this->answer instanceof Answer) {
 			list($js2, $html2) = $this->answer->export();
 			$js .= $js2;
 			$html .= $html2;
+		} else {
+			throw new \Exception('Question not supported. Exercise: '.$this->selectTitle());
 		}
 
-		return array($js,$html);
+		return array($js, $html);
 	}
 
 	function createAnswersForm($form)

+ 1 - 1
main/exercise/question_list_admin.inc.php

@@ -165,7 +165,7 @@ if (!$inATest) {
         //$questionList = $objExercise->getQuestionListWithMediasUncompressed();
 
         // Show all questions no matter the category settings.
-        $tempCategoryOrder = $objExercise->specialCategoryOrders;
+        $tempCategoryOrder = $objExercise->specialCategoryOrders ? $objExercise->specialCategoryOrders : false;
         $objExercise->specialCategoryOrders = false;
         $questionList = $objExercise->selectQuestionList(true);
         $objExercise->specialCategoryOrders = $tempCategoryOrder;

BIN
main/img/icons/128/contract.png


BIN
main/img/icons/128/expand.png


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


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


BIN
main/img/icons/32/contract.png


BIN
main/img/icons/32/expand.png


BIN
main/img/icons/48/contract.png


BIN
main/img/icons/48/expand.png


BIN
main/img/icons/64/contract.png


BIN
main/img/icons/64/expand.png


+ 222 - 0
main/img/icons/svg/contract.svg

@@ -0,0 +1,222 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   enable-background="new 0 0 512 512"
+   height="128"
+   id="Layer_1"
+   version="1.1"
+   viewBox="0 0 128 128"
+   width="128"
+   xml:space="preserve"
+   inkscape:version="0.91 r13725"
+   sodipodi:docname="contract.svg"><metadata
+     id="metadata13"><rdf:RDF><cc:Work
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
+     id="defs11"><linearGradient
+       inkscape:collect="always"
+       id="linearGradient4161"><stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop4163" /><stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop4165" /></linearGradient><linearGradient
+       inkscape:collect="always"
+       id="linearGradient4151"><stop
+         style="stop-color:#2daccd;stop-opacity:1"
+         offset="0"
+         id="stop4153" /><stop
+         style="stop-color:#006189;stop-opacity:1"
+         offset="1"
+         id="stop4155" /></linearGradient><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4151"
+       id="linearGradient4157"
+       x1="216.94914"
+       y1="211.52544"
+       x2="315.66104"
+       y2="314.03391"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.91828274,0,0,0.91828274,-178.05359,-178.05359)" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4161"
+       id="linearGradient4167"
+       x1="254.17493"
+       y1="213.81667"
+       x2="223.97308"
+       y2="242.96385"
+       gradientUnits="userSpaceOnUse" /><filter
+       inkscape:collect="always"
+       style="color-interpolation-filters:sRGB"
+       id="filter4209"
+       x="-0.073903374"
+       width="1.1478066"
+       y="-0.070192203"
+       height="1.1403844"><feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="1.5928788"
+         id="feGaussianBlur4211" /></filter><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4161"
+       id="linearGradient4215"
+       gradientUnits="userSpaceOnUse"
+       x1="254.17493"
+       y1="213.81667"
+       x2="223.97308"
+       y2="242.96385"
+       gradientTransform="translate(-2.3010933,82.839357)" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4161"
+       id="linearGradient4219"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(74.0185,77.853655)"
+       x1="254.17493"
+       y1="213.81667"
+       x2="223.97308"
+       y2="242.96385" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4161"
+       id="linearGradient4223"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(74.0185,77.853655)"
+       x1="254.17493"
+       y1="213.81667"
+       x2="223.97308"
+       y2="242.96385" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4151"
+       id="linearGradient4321"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.91828274,0,0,0.91828274,-178.05359,-178.05359)"
+       x1="216.94914"
+       y1="211.52544"
+       x2="315.66104"
+       y2="314.03391" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4151"
+       id="linearGradient4323"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.91828274,0,0,0.91828274,-178.05359,-178.05359)"
+       x1="216.94914"
+       y1="211.52544"
+       x2="315.66104"
+       y2="314.03391" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4151"
+       id="linearGradient4325"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.91828274,0,0,0.91828274,-178.05359,-178.05359)"
+       x1="216.94914"
+       y1="211.52544"
+       x2="315.66104"
+       y2="314.03391" /></defs><sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1325"
+     inkscape:window-height="747"
+     id="namedview9"
+     showgrid="false"
+     inkscape:zoom="1.84375"
+     inkscape:cx="82.385615"
+     inkscape:cy="62.608396"
+     inkscape:window-x="41"
+     inkscape:window-y="21"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="Layer_1" /><g
+     id="g5203"
+     inkscape:export-filename="/var/www/chamilo11/main/img/icons/128/contract.png"
+     inkscape:export-xdpi="90"
+     inkscape:export-ydpi="90"><rect
+       y="-1.5497208e-06"
+       x="0"
+       height="128"
+       width="128"
+       id="rect5182"
+       style="opacity:0;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /><g
+       transform="translate(1.5645942e-5,-0.08111333)"
+       id="g5184"><g
+         id="g4300"
+         transform="matrix(-0.74163088,0,0,-0.74163088,53.926898,53.926898)"><path
+           d="m 12.576172,5.2285156 c -4.0606465,0 -7.3476564,3.290683 -7.3476564,7.3476564 l 0,22.039062 c 0,4.060646 3.2870099,7.345704 7.3476564,7.345704 L 22.009766,32.53125 46.179688,56.697266 56.695312,46.179688 32.527344,22.009766 41.960938,12.576172 c 0,-4.0569734 -3.285058,-7.3476564 -7.345704,-7.3476564 l -22.039062,0 z"
+           inkscape:href="#path7"
+           id="path4144"
+           xlink:href="#path7"
+           inkscape:original="M 12.576172 5.2285156 C 8.5155255 5.2285156 5.2285156 8.5191986 5.2285156 12.576172 L 5.2285156 34.615234 C 5.2285156 38.67588 8.5155255 41.960938 12.576172 41.960938 L 22.009766 32.53125 L 46.179688 56.697266 L 56.695312 46.179688 L 32.527344 22.009766 L 41.960938 12.576172 C 41.960938 8.5191986 38.67588 5.2285156 34.615234 5.2285156 L 12.576172 5.2285156 z "
+           inkscape:radius="0"
+           sodipodi:type="inkscape:offset" /><path
+           id="path4290"
+           d="M 12.576168,7.6492557e-7 C 5.6914254,7.6492557e-7 7.6492557e-7,5.6956954 7.6492557e-7,12.576168 l 0,22.038785 C 7.6492557e-7,41.496537 5.6945843,47.19112 12.576168,47.19112 a 5.2300654,5.2300654 0 0 0 3.696446,-1.531668 l 5.737476,-5.733886 20.47125,20.469459 a 5.2300654,5.2300654 0 0 0 7.396473,0 L 60.395025,49.877813 a 5.2300654,5.2300654 0 0 0 0,-7.396473 L 39.923775,22.01009 45.659452,16.274404 A 5.2300654,5.2300654 0 0 0 47.19112,12.576168 C 47.19112,5.6956954 41.499696,7.649256e-7 34.614953,7.649256e-7 l -22.038785,0 z"
+           style="fill:#164450"
+           inkscape:connector-curvature="0" /><path
+           id="path7"
+           d="m 41.960729,12.575681 c 0,-4.0569733 -3.285616,-7.3462621 -7.346262,-7.3462621 l -22.038786,0 c -4.0606464,0 -7.3462621,3.2892888 -7.3462621,7.3462621 l 0,22.038786 c 0,4.060646 3.2856157,7.346262 7.3462621,7.346262 L 22.009659,32.530424 46.17909,56.696412 56.696182,46.179319 32.526751,22.009659 41.960729,12.575681 Z"
+           style="fill:url(#linearGradient4157);fill-opacity:1"
+           inkscape:connector-curvature="0" /><path
+           transform="matrix(0.91828274,0,0,0.91828274,-178.05359,-178.05359)"
+           sodipodi:nodetypes="ccccccc"
+           inkscape:connector-curvature="0"
+           id="path4159"
+           d="m 218.10802,229.19583 -10.42471,10.7637 c -6.04245,-0.99741 -7.6753,-3.04094 -8.37037,-10.40427 1.44589,-10.60089 -2.72811,-25.91585 3.7106,-28.34667 l 47.99702,47.70939 -6.85817,6.75405 z"
+           style="fill:url(#linearGradient4167);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter4209)" /></g><g
+         id="g4316"
+         transform="matrix(-0.74686544,0,0,-0.74686544,55.2075,169.511)"><path
+           id="path4286"
+           d="M 46.102459,66.075109 A 5.2300654,5.2300654 0 0 0 42.48134,67.604977 L 22.01009,88.076227 16.274404,82.34055 A 5.2300654,5.2300654 0 0 0 12.576168,80.808882 C 5.6945843,80.808882 7.6492555e-7,86.503465 7.6492555e-7,93.385049 l 0,22.038781 C 7.6492555e-7,122.30542 5.6945843,128 12.576168,128 l 22.038785,0 c 6.881584,0 12.576167,-5.69458 12.576167,-12.57617 a 5.2300654,5.2300654 0 0 0 -1.533459,-3.70003 l -5.733886,-5.7303 20.47125,-20.476628 a 5.2300654,5.2300654 0 0 0 0,-7.394683 L 49.877813,67.604977 a 5.2300654,5.2300654 0 0 0 -3.775354,-1.529868 z"
+           style="fill:#164450"
+           inkscape:connector-curvature="0" /><path
+           id="path4298"
+           d="M 46.17909,71.302617 22.009659,95.472278 12.575681,86.0383 c -4.0606464,0 -7.3462621,3.285616 -7.3462621,7.346262 l 0,22.038788 c 0,4.06064 3.2856157,7.34626 7.3462621,7.34626 l 22.038786,0 c 4.060646,0 7.346262,-3.28562 7.346262,-7.34626 L 32.526521,105.99672 56.695953,81.820168 46.17909,71.302617 Z"
+           style="fill:url(#linearGradient4321);fill-opacity:1"
+           inkscape:connector-curvature="0" /><path
+           transform="matrix(0,-0.91828274,0.91828274,0,-251.15218,304.33323)"
+           style="fill:url(#linearGradient4215);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter4209)"
+           d="m 215.80693,312.03519 -10.42471,10.7637 c -6.04245,-0.99741 -7.6753,-3.04094 -8.37037,-10.40427 1.44589,-10.60089 -2.72811,-25.91585 3.7106,-28.34667 l 47.99702,47.70939 -6.85817,6.75405 z"
+           id="path4213"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="ccccccc" /></g><g
+         id="g4311"
+         transform="matrix(-0.74162712,0,0,-0.74162712,169.00224,169.00276)"><path
+           id="path4148"
+           d="m 81.743308,66.075109 a 5.2300654,5.2300654 0 0 0 -3.621119,1.529868 L 67.604977,78.122189 a 5.2300654,5.2300654 0 0 0 0,7.394683 l 20.47125,20.476628 -5.733886,5.7303 a 5.2300654,5.2300654 0 0 0 -1.533459,3.70003 c 0,6.88159 5.694583,12.57617 12.576167,12.57617 l 22.038781,0 C 122.30542,128 128,122.30542 128,115.42383 l 0,-22.038781 c 0,-6.881584 -5.69458,-12.576167 -12.57617,-12.576167 a 5.2300654,5.2300654 0 0 0 -3.69823,1.531668 l -5.73569,5.735677 -20.471248,-20.47125 a 5.2300654,5.2300654 0 0 0 -3.775354,-1.529868 z"
+           style="fill:#164450"
+           inkscape:connector-curvature="0" /><path
+           id="path4294"
+           d="M 115.42335,86.0383 105.98914,95.472278 81.819939,71.302847 71.302847,81.819939 95.472278,105.99649 86.0383,115.42335 c 0,4.06064 3.285616,7.34626 7.346262,7.34626 l 22.038788,0 c 4.06064,0 7.34626,-3.28562 7.34626,-7.34626 l 0,-22.038788 c 0,-4.060646 -3.28562,-7.346262 -7.34626,-7.346262 z"
+           style="fill:url(#linearGradient4323);fill-opacity:1"
+           inkscape:connector-curvature="0" /><path
+           transform="matrix(0,-0.91828274,-0.91828274,0,376.17707,374.76837)"
+           sodipodi:nodetypes="ccccccc"
+           inkscape:connector-curvature="0"
+           id="path4217"
+           d="m 292.12652,307.04949 -10.42471,10.7637 c -6.04245,-0.99741 -7.6753,-3.04094 -8.37037,-10.40427 1.44589,-10.60089 -2.72811,-25.91585 3.7106,-28.34667 l 47.99702,47.70939 -6.85817,6.75405 z"
+           style="fill:url(#linearGradient4219);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter4209)" /></g><g
+         id="g4306"
+         transform="matrix(-0.70933474,0,0,-0.70933474,165.86791,52.926898)"><path
+           id="path4288"
+           d="M 93.385049,7.6492557e-7 C 86.500306,7.6492557e-7 80.808882,5.6956954 80.808882,12.576168 a 5.2300654,5.2300654 0 0 0 1.531668,3.698236 l 5.735677,5.735686 -20.47125,20.47125 a 5.2300654,5.2300654 0 0 0 0,7.396473 l 10.517212,10.517212 a 5.2300654,5.2300654 0 0 0 7.396473,0 l 20.471248,-20.469459 5.73748,5.733886 a 5.2300654,5.2300654 0 0 0 3.69644,1.531668 C 122.30542,47.19112 128,41.496537 128,34.614953 l 0,-22.038785 C 128,5.6956954 122.30858,7.6492557e-7 115.42383,7.6492557e-7 l -22.038781,0 z"
+           style="fill:#164450"
+           inkscape:connector-curvature="0" /><path
+           id="path4296"
+           d="m 115.42335,5.2294189 -22.038788,0 c -4.060646,0 -7.346262,3.2892888 -7.346262,7.3462621 l 9.433978,9.433978 -24.169661,24.169431 10.517092,10.517092 24.169431,-24.165988 9.43421,9.430535 c 4.06064,0 7.34626,-3.285616 7.34626,-7.346262 l 0,-22.038786 c 0,-4.0569733 -3.28562,-7.3462621 -7.34626,-7.3462621 z"
+           style="fill:url(#linearGradient4325);fill-opacity:1"
+           inkscape:connector-curvature="0" /><path
+           style="fill:url(#linearGradient4223);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter4209)"
+           d="m 292.12652,307.04949 -10.42471,10.7637 c -6.04245,-0.99741 -7.6753,-3.04094 -8.37037,-10.40427 1.44589,-10.60089 -2.72811,-25.91585 3.7106,-28.34667 l 47.99702,47.70939 -6.85817,6.75405 z"
+           id="path4221"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="ccccccc"
+           transform="matrix(-0.91828274,0,0,0.91828274,373.12604,-249.9543)" /></g></g></g></svg>

+ 222 - 0
main/img/icons/svg/expand.svg

@@ -0,0 +1,222 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   enable-background="new 0 0 512 512"
+   height="128"
+   id="Layer_1"
+   version="1.1"
+   viewBox="0 0 128 128"
+   width="128"
+   xml:space="preserve"
+   inkscape:version="0.91 r13725"
+   sodipodi:docname="expand.svg"><metadata
+     id="metadata13"><rdf:RDF><cc:Work
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+     id="defs11"><linearGradient
+       inkscape:collect="always"
+       id="linearGradient4161"><stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop4163" /><stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop4165" /></linearGradient><linearGradient
+       inkscape:collect="always"
+       id="linearGradient4151"><stop
+         style="stop-color:#2daccd;stop-opacity:1"
+         offset="0"
+         id="stop4153" /><stop
+         style="stop-color:#006189;stop-opacity:1"
+         offset="1"
+         id="stop4155" /></linearGradient><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4151"
+       id="linearGradient4157"
+       x1="216.94914"
+       y1="211.52544"
+       x2="315.66104"
+       y2="314.03391"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.91828274,0,0,0.91828274,-178.05359,-178.05359)" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4161"
+       id="linearGradient4167"
+       x1="254.17493"
+       y1="213.81667"
+       x2="223.97308"
+       y2="242.96385"
+       gradientUnits="userSpaceOnUse" /><filter
+       inkscape:collect="always"
+       style="color-interpolation-filters:sRGB"
+       id="filter4209"
+       x="-0.073903374"
+       width="1.1478066"
+       y="-0.070192203"
+       height="1.1403844"><feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="1.5928788"
+         id="feGaussianBlur4211" /></filter><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4161"
+       id="linearGradient4215"
+       gradientUnits="userSpaceOnUse"
+       x1="254.17493"
+       y1="213.81667"
+       x2="223.97308"
+       y2="242.96385"
+       gradientTransform="translate(-2.3010933,82.839357)" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4161"
+       id="linearGradient4219"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(74.0185,77.853655)"
+       x1="254.17493"
+       y1="213.81667"
+       x2="223.97308"
+       y2="242.96385" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4161"
+       id="linearGradient4223"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(74.0185,77.853655)"
+       x1="254.17493"
+       y1="213.81667"
+       x2="223.97308"
+       y2="242.96385" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4151"
+       id="linearGradient4321"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.91828274,0,0,0.91828274,-178.05359,-178.05359)"
+       x1="216.94914"
+       y1="211.52544"
+       x2="315.66104"
+       y2="314.03391" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4151"
+       id="linearGradient4323"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.91828274,0,0,0.91828274,-178.05359,-178.05359)"
+       x1="216.94914"
+       y1="211.52544"
+       x2="315.66104"
+       y2="314.03391" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4151"
+       id="linearGradient4325"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.91828274,0,0,0.91828274,-178.05359,-178.05359)"
+       x1="216.94914"
+       y1="211.52544"
+       x2="315.66104"
+       y2="314.03391" /></defs><sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1325"
+     inkscape:window-height="747"
+     id="namedview9"
+     showgrid="false"
+     inkscape:zoom="1.84375"
+     inkscape:cx="101.20404"
+     inkscape:cy="27.754443"
+     inkscape:window-x="41"
+     inkscape:window-y="21"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="Layer_1" /><g
+     id="g4411"
+     inkscape:export-filename="/var/www/chamilo11/main/img/icons/128/expand.png"
+     inkscape:export-xdpi="90"
+     inkscape:export-ydpi="90"><g
+       id="g4390"><g
+         id="g4300"
+         transform="matrix(0.74163088,0,0,0.74163088,7.999998,7.999998)"><path
+           d="m 12.576172,5.2285156 c -4.0606465,0 -7.3476564,3.290683 -7.3476564,7.3476564 l 0,22.039062 c 0,4.060646 3.2870099,7.345704 7.3476564,7.345704 L 22.009766,32.53125 46.179688,56.697266 56.695312,46.179688 32.527344,22.009766 41.960938,12.576172 c 0,-4.0569734 -3.285058,-7.3476564 -7.345704,-7.3476564 l -22.039062,0 z"
+           inkscape:href="#path7"
+           id="path4144"
+           xlink:href="#path7"
+           inkscape:original="M 12.576172 5.2285156 C 8.5155255 5.2285156 5.2285156 8.5191986 5.2285156 12.576172 L 5.2285156 34.615234 C 5.2285156 38.67588 8.5155255 41.960938 12.576172 41.960938 L 22.009766 32.53125 L 46.179688 56.697266 L 56.695312 46.179688 L 32.527344 22.009766 L 41.960938 12.576172 C 41.960938 8.5191986 38.67588 5.2285156 34.615234 5.2285156 L 12.576172 5.2285156 z "
+           inkscape:radius="0"
+           sodipodi:type="inkscape:offset" /><path
+           id="path4290"
+           d="M 12.576168,7.6492557e-7 C 5.6914254,7.6492557e-7 7.6492557e-7,5.6956954 7.6492557e-7,12.576168 l 0,22.038785 C 7.6492557e-7,41.496537 5.6945843,47.19112 12.576168,47.19112 a 5.2300654,5.2300654 0 0 0 3.696446,-1.531668 l 5.737476,-5.733886 20.47125,20.469459 a 5.2300654,5.2300654 0 0 0 7.396473,0 L 60.395025,49.877813 a 5.2300654,5.2300654 0 0 0 0,-7.396473 L 39.923775,22.01009 45.659452,16.274404 A 5.2300654,5.2300654 0 0 0 47.19112,12.576168 C 47.19112,5.6956954 41.499696,7.649256e-7 34.614953,7.649256e-7 l -22.038785,0 z"
+           style="fill:#164450"
+           inkscape:connector-curvature="0" /><path
+           id="path7"
+           d="m 41.960729,12.575681 c 0,-4.0569733 -3.285616,-7.3462621 -7.346262,-7.3462621 l -22.038786,0 c -4.0606464,0 -7.3462621,3.2892888 -7.3462621,7.3462621 l 0,22.038786 c 0,4.060646 3.2856157,7.346262 7.3462621,7.346262 L 22.009659,32.530424 46.17909,56.696412 56.696182,46.179319 32.526751,22.009659 41.960729,12.575681 Z"
+           style="fill:url(#linearGradient4157);fill-opacity:1"
+           inkscape:connector-curvature="0" /><path
+           transform="matrix(0.91828274,0,0,0.91828274,-178.05359,-178.05359)"
+           sodipodi:nodetypes="ccccccc"
+           inkscape:connector-curvature="0"
+           id="path4159"
+           d="m 218.10802,229.19583 -10.42471,10.7637 c -6.04245,-0.99741 -7.6753,-3.04094 -8.37037,-10.40427 1.44589,-10.60089 -2.72811,-25.91585 3.7106,-28.34667 l 47.99702,47.70939 -6.85817,6.75405 z"
+           style="fill:url(#linearGradient4167);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter4209)" /></g><g
+         id="g4316"
+         transform="matrix(0.74686544,0,0,0.74686544,8.0000026,24.563449)"><path
+           id="path4286"
+           d="M 46.102459,66.075109 A 5.2300654,5.2300654 0 0 0 42.48134,67.604977 L 22.01009,88.076227 16.274404,82.34055 A 5.2300654,5.2300654 0 0 0 12.576168,80.808882 C 5.6945843,80.808882 7.6492555e-7,86.503465 7.6492555e-7,93.385049 l 0,22.038781 C 7.6492555e-7,122.30542 5.6945843,128 12.576168,128 l 22.038785,0 c 6.881584,0 12.576167,-5.69458 12.576167,-12.57617 a 5.2300654,5.2300654 0 0 0 -1.533459,-3.70003 l -5.733886,-5.7303 20.47125,-20.476628 a 5.2300654,5.2300654 0 0 0 0,-7.394683 L 49.877813,67.604977 a 5.2300654,5.2300654 0 0 0 -3.775354,-1.529868 z"
+           style="fill:#164450"
+           inkscape:connector-curvature="0" /><path
+           id="path4298"
+           d="M 46.17909,71.302617 22.009659,95.472278 12.575681,86.0383 c -4.0606464,0 -7.3462621,3.285616 -7.3462621,7.346262 l 0,22.038788 c 0,4.06064 3.2856157,7.34626 7.3462621,7.34626 l 22.038786,0 c 4.060646,0 7.346262,-3.28562 7.346262,-7.34626 L 32.526521,105.99672 56.695953,81.820168 46.17909,71.302617 Z"
+           style="fill:url(#linearGradient4321);fill-opacity:1"
+           inkscape:connector-curvature="0" /><path
+           transform="matrix(0,-0.91828274,0.91828274,0,-251.15218,304.33323)"
+           style="fill:url(#linearGradient4215);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter4209)"
+           d="m 215.80693,312.03519 -10.42471,10.7637 c -6.04245,-0.99741 -7.6753,-3.04094 -8.37037,-10.40427 1.44589,-10.60089 -2.72811,-25.91585 3.7106,-28.34667 l 47.99702,47.70939 -6.85817,6.75405 z"
+           id="path4213"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="ccccccc" /></g><g
+         id="g4311"
+         transform="matrix(0.74162712,0,0,0.74162712,25.071699,25.071833)"><path
+           id="path4148"
+           d="m 81.743308,66.075109 a 5.2300654,5.2300654 0 0 0 -3.621119,1.529868 L 67.604977,78.122189 a 5.2300654,5.2300654 0 0 0 0,7.394683 l 20.47125,20.476628 -5.733886,5.7303 a 5.2300654,5.2300654 0 0 0 -1.533459,3.70003 c 0,6.88159 5.694583,12.57617 12.576167,12.57617 l 22.038781,0 C 122.30542,128 128,122.30542 128,115.42383 l 0,-22.038781 c 0,-6.881584 -5.69458,-12.576167 -12.57617,-12.576167 a 5.2300654,5.2300654 0 0 0 -3.69823,1.531668 l -5.73569,5.735677 -20.471248,-20.47125 a 5.2300654,5.2300654 0 0 0 -3.775354,-1.529868 z"
+           style="fill:#164450"
+           inkscape:connector-curvature="0" /><path
+           id="path4294"
+           d="M 115.42335,86.0383 105.98914,95.472278 81.819939,71.302847 71.302847,81.819939 95.472278,105.99649 86.0383,115.42335 c 0,4.06064 3.285616,7.34626 7.346262,7.34626 l 22.038788,0 c 4.06064,0 7.34626,-3.28562 7.34626,-7.34626 l 0,-22.038788 c 0,-4.060646 -3.28562,-7.346262 -7.34626,-7.346262 z"
+           style="fill:url(#linearGradient4323);fill-opacity:1"
+           inkscape:connector-curvature="0" /><path
+           transform="matrix(0,-0.91828274,-0.91828274,0,376.17707,374.76837)"
+           sodipodi:nodetypes="ccccccc"
+           inkscape:connector-curvature="0"
+           id="path4217"
+           d="m 292.12652,307.04949 -10.42471,10.7637 c -6.04245,-0.99741 -7.6753,-3.04094 -8.37037,-10.40427 1.44589,-10.60089 -2.72811,-25.91585 3.7106,-28.34667 l 47.99702,47.70939 -6.85817,6.75405 z"
+           style="fill:url(#linearGradient4219);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter4209)" /></g><g
+         id="g4306"
+         transform="matrix(0.70933474,0,0,0.70933474,28.205115,8.9999977)"><path
+           id="path4288"
+           d="M 93.385049,7.6492557e-7 C 86.500306,7.6492557e-7 80.808882,5.6956954 80.808882,12.576168 a 5.2300654,5.2300654 0 0 0 1.531668,3.698236 l 5.735677,5.735686 -20.47125,20.47125 a 5.2300654,5.2300654 0 0 0 0,7.396473 l 10.517212,10.517212 a 5.2300654,5.2300654 0 0 0 7.396473,0 l 20.471248,-20.469459 5.73748,5.733886 a 5.2300654,5.2300654 0 0 0 3.69644,1.531668 C 122.30542,47.19112 128,41.496537 128,34.614953 l 0,-22.038785 C 128,5.6956954 122.30858,7.6492557e-7 115.42383,7.6492557e-7 l -22.038781,0 z"
+           style="fill:#164450"
+           inkscape:connector-curvature="0" /><path
+           id="path4296"
+           d="m 115.42335,5.2294189 -22.038788,0 c -4.060646,0 -7.346262,3.2892888 -7.346262,7.3462621 l 9.433978,9.433978 -24.169661,24.169431 10.517092,10.517092 24.169431,-24.165988 9.43421,9.430535 c 4.06064,0 7.34626,-3.285616 7.34626,-7.346262 l 0,-22.038786 c 0,-4.0569733 -3.28562,-7.3462621 -7.34626,-7.3462621 z"
+           style="fill:url(#linearGradient4325);fill-opacity:1"
+           inkscape:connector-curvature="0" /><path
+           style="fill:url(#linearGradient4223);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter4209)"
+           d="m 292.12652,307.04949 -10.42471,10.7637 c -6.04245,-0.99741 -7.6753,-3.04094 -8.37037,-10.40427 1.44589,-10.60089 -2.72811,-25.91585 3.7106,-28.34667 l 47.99702,47.70939 -6.85817,6.75405 z"
+           id="path4221"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="ccccccc"
+           transform="matrix(-0.91828274,0,0,0.91828274,373.12604,-249.9543)" /></g></g><rect
+       ry="0"
+       y="0"
+       x="0"
+       height="128"
+       width="128"
+       id="rect4409"
+       style="opacity:0;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /></g></svg>

+ 4 - 0
main/inc/lib/api.lib.php

@@ -4264,6 +4264,10 @@ function api_get_language_info($languageId) {
     $language = Database::getManager()
         ->find('ChamiloCoreBundle:Language', intval($languageId));
 
+    if (!$language) {
+        return [];
+    }
+
     return [
         'id' => $language->getId(),
         'original_name' => $language->getOriginalName(),

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

@@ -2042,8 +2042,8 @@ class Display
             case 'wav':
                 //no break;
             case 'ogg':
-                $html = '<audio src="' . $params['url'] . '" controls class="skip"></audio>';
-
+                $html = '<audio width="300px" controls src="'.$params['url'].'" >';
+                
                 return $html;
                 break;
         }

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

@@ -3664,7 +3664,7 @@ class DocumentManager
             $return .= '<li class="doc_resource lp_resource_element '.$visibilityClass.' " data_id="' . $documentId . '" data_type="document" title="' . $my_file_title . '" >';
         }
 
-        $return .= '<div class="item_data" style="margin-left:' . ($num  * 18) . 'px;margin-right:5px;">';
+        $return .= '<div class="item_data" style="margin-left:' . ($num  * 5 ) . 'px;margin-right:5px;">';
 
         if ($add_move_button) {
             $return .= '<a class="moved" href="#">';

+ 33 - 0
main/inc/lib/extra_field.lib.php

@@ -285,6 +285,39 @@ class ExtraField extends Model
         }
     }
 
+    /**
+     * Get all the field info for User Tags
+     * @param string $variable
+     *
+     * @return array|bool
+     */
+    public function get_handler_field_info_by_tags($variable)
+    {
+        $variable = Database::escape_string($variable);
+        $sql = "SELECT * FROM {$this->table}
+                WHERE
+                    variable = '$variable' AND
+                    extra_field_type = $this->extraFieldType";
+        $result = Database::query($sql);
+        if (Database::num_rows($result)) {
+            $row = Database::fetch_array($result, 'ASSOC');
+            $row['display_text'] = ExtraField::translateDisplayName($row['variable'], $row['display_text']);
+
+            // All the tags of the field
+            $sql = "SELECT * FROM $this->table_field_tag
+                    WHERE field_id='".intval($row['id'])."'
+                    ORDER BY id ASC";
+            $result = Database::query($sql);
+            while ($option = Database::fetch_array($result, 'ASSOC')) {
+                $row['options'][$option['id']] = $option;
+            }
+
+            return $row;
+        } else {
+            return false;
+        }
+    }
+
     /**
      * @param int $fieldId
      *

+ 1 - 1
main/inc/lib/formvalidator/Rule/CompareFields.php

@@ -13,7 +13,7 @@ class HTML_QuickForm_Compare_Fields extends HTML_QuickForm_Rule_Compare
      * @param   string the value to compare
 	 * @return boolean True if date is valid
 	 */
-	function validate($values, $operator_and_max_value) {
+	function validate($values = [], $operator_and_max_value = null) {
         if (is_array($values) && !empty($values) && !empty($operator_and_max_value)) {
            $final_value = 0;
            foreach ($values as $value) {

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

@@ -106,8 +106,9 @@ class GradeModel extends Model
         // Setting the defaults
 
         $defaults = $this->get($id);
-
-        $components = $this->get_components($defaults['id']);
+        if ($defaults) {
+            $components = $this->get_components($defaults['id']);
+        }
 
         if ($action == 'edit') {
             if (!empty($components)) {
@@ -143,21 +144,20 @@ class GradeModel extends Model
             $template_title =
             '&nbsp{element} <!-- BEGIN error --> <span class="form_error">{error}</span><!-- END error -->
              <a href="javascript:plusItem(' . ($counter+1) . ')">
-                <img style="display: '.(($counter>=$nr_items)?'inline':'none').';" id="plus-' . ($counter+1) . '" src="'.Display::return_icon('add.png').'" alt="'.get_lang('Add').'" title="'.get_lang('Add').'">
+                '.Display::return_icon('add.png', get_lang('Add'), ['id' => 'plus-' . ($counter+1), 'style' => 'display: '.(($counter>=$nr_items) ? 'inline':'none') ]).'
             </a>
             <a href="javascript:minItem(' . ($counter) . ')">
-                <img style="display: '.(($counter>=$nr_items)?'inline':'none').';" id="min-' . $counter . '" src="'.Display::return_icon('delete.png').'" alt="'.get_lang('Delete').'" title="'.get_lang('Delete').'">
+                '.Display::return_icon('delete.png', get_lang('Delete'), ['id' => 'min-' . ($counter), 'style' => 'display: '.(($counter>=$nr_items) ? 'inline':'none') ]).'
             </a>
             </div></p></div>';
-
             $renderer->setElementTemplate($template_title, 'components['.$i.'][title]');
             $renderer->setElementTemplate($template_percentage, 'components['.$i.'][percentage]');
             $renderer->setElementTemplate($template_acronym, 'components['.$i.'][acronym]');
 
             if ($i == 0) {
                 $form->addRule('components['.$i.'][percentage]', get_lang('ThisFieldIsRequired'), 'required');
-                $form->addRule('components['.$i.'][title]', get_lang('ThisFieldIsRequired'), 'required');
                 $form->addRule('components['.$i.'][acronym]', get_lang('ThisFieldIsRequired'), 'required');
+                $form->addRule('components['.$i.'][title]', get_lang('ThisFieldIsRequired'), 'required');
             }
             $form->addRule('components['.$i.'][percentage]', get_lang('OnlyNumbers'), 'numeric');
 
@@ -187,7 +187,6 @@ class GradeModel extends Model
                 $counter++;
             }
         }
-
         $form->setDefaults($defaults);
 
         // Setting the rules

+ 7 - 12
main/inc/lib/tracking.lib.php

@@ -5834,8 +5834,8 @@ class Tracking
     /**
      * Get the HTML code for show a block with the achieved user skill on course/session
      * @param int $userId
-     * @param int $courseId
-     * @param int $sessionId
+     * @param int $courseId Optional.
+     * @param int $sessionId Optional.
      * @return string
      */
     public static function displayUserSkills($userId, $courseId = 0, $sessionId = 0)
@@ -5848,15 +5848,10 @@ class Tracking
             return '';
         }
 
-        $filter = ['userId' => $userId];
-
-        if (!empty($courseId)) {
-            $filter['courseId'] = $courseId;
-        }
+        $filter = ['user' => $userId];
 
-        if (!empty($sessionId)) {
-            $filter['sessionId'] = $sessionId;
-        }
+        $filter['course'] = $courseId ?: null;
+        $filter['session'] = $sessionId ?: null;
 
         $em = Database::getManager();
 
@@ -5882,11 +5877,11 @@ class Tracking
             ';
 
             foreach ($skillsRelUser as $userSkill) {
-                $skill = $em->find('ChamiloCoreBundle:Skill', $userSkill->getSkillId());
+                $skill = $userSkill->getSkill();
 
                 $html .= '
                                             <li class="thumbnail">
-                                                <a href="' . api_get_path(WEB_PATH) . 'badge/' . $skill->getId() . '/user/' . $userId . '" target="_blank">
+                                                <a href="' . api_get_path(WEB_PATH) . 'badge/' . $userSkill->getId() . '/user/' . $userId . '" target="_blank">
                                                     <img class="img-responsive" title="' . $skill->getName() . '" src="' . $skill->getWebIconPath() . '" width="64" height="64">
                                                     <div class="caption">
                                                         <p class="text-center">' . $skill->getName() . '</p>

+ 51 - 1
main/inc/lib/usermanager.lib.php

@@ -1569,7 +1569,7 @@ class UserManager
             case USER_IMAGE_SIZE_ORIGINAL:
                 $pictureAnonymousSize = '128';
                 $realSizeName = '';
-                $gravatarSize = 108;
+                $gravatarSize = 200;
                 break;
             case USER_IMAGE_SIZE_BIG:
                 $pictureAnonymousSize = '128';
@@ -2300,6 +2300,22 @@ class UserManager
         return $extraField->get_handler_field_info_by_field_variable($variable);
     }
 
+    /**
+     * Get the extra field information for user tag (the options as well)
+     * @param  int     $variable The name of the field we want to know everything about
+     * @return array   Array containing all the information about the extra profile field
+     * (first level of array contains field details, then 'options' sub-array contains options details,
+     * as returned by the database)
+     * @author José Loguercio
+     * @since v1.11.0
+     */
+    public static function get_extra_field_tags_information_by_name($variable)
+    {
+        $extraField = new ExtraField('user');
+
+        return $extraField->get_handler_field_info_by_tags($variable);
+    }
+
     /**
      * @param string $type
      *
@@ -2364,6 +2380,26 @@ class UserManager
         return $result;
     }
 
+    /**
+     * Get extra user data by tags value
+     *
+     * @param int $fieldId the ID of the field we want to know everything of
+     * @param string $tag the tag name for search
+     * @return array with extra data info of a user
+     * @author José Loguercio
+     * @since v1.11.0
+     */
+    public static function get_extra_user_data_by_tags($fieldId, $tag)
+    {
+        $extraField = new ExtraField('user');
+        $result = $extraField->getAllUserPerTag($fieldId, $tag);
+        $array = [];
+        foreach ($result as $index => $user) {
+            $array[] = $user['user_id'];
+        }
+        return $array;
+    }
+
     /**
      * Get extra user data by field variable
      * @param string    field variable
@@ -2387,6 +2423,20 @@ class UserManager
         return $data;
     }
 
+    /**
+     * Get extra user data tags by field variable
+     *
+     * @param string    field variable
+     * @return array    data
+     */
+    public static function get_extra_user_data_for_tags($field_variable)
+    {
+        $extra_information_by_variable = self::get_extra_field_tags_information_by_name($field_variable);
+
+
+        return $extra_information_by_variable;
+    }
+
     /**
      * Gives a list of [session_category][session_id] for the current user.
      * @param integer $user_id

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

@@ -853,7 +853,7 @@ class IndexManager
     {
         $html = null;
         if (!api_is_anonymous()) {
-            $userPicture = UserManager::getUserPicture(api_get_user_id());
+            $userPicture = UserManager::getUserPicture(api_get_user_id(), USER_IMAGE_SIZE_ORIGINAL);
             $content = null;
 
             if (api_get_setting('allow_social_tool') == 'true') {

+ 1 - 1
main/lp/learnpath.class.php

@@ -5909,7 +5909,7 @@ class learnpath
     {
         $gradebook = isset($_GET['gradebook']) ? Security :: remove_XSS($_GET['gradebook']) : null;
         $return = '<div class="actions">';
-        $return .=  '<a href="lp_controller.php?'.api_get_cidreq().'&gradebook=' . $gradebook . '&action=view&lp_id=' . $_SESSION['oLP']->lp_id . '&isStudentView=true">' . Display :: return_icon('preview_view.png', get_lang('Display'),'',ICON_SIZE_MEDIUM).'</a> ';
+        $return .=  '<a href="lp_controller.php?'.api_get_cidreq().'&gradebook=' . $gradebook . '&action=view&lp_id=' . $_SESSION['oLP']->lp_id . '&isStudentView=true" target="_self">' . Display :: return_icon('preview_view.png', get_lang('Display'),'',ICON_SIZE_MEDIUM).'</a> ';
         $return .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=admin_view&lp_id=' . $_SESSION['oLP']->lp_id . '&updateaudio=true">' . Display :: return_icon('upload_audio.png', get_lang('UpdateAllAudioFragments'),'',ICON_SIZE_MEDIUM).'</a>';
         $return .= '<a href="lp_controller.php?'.api_get_cidreq().'&action=edit&lp_id=' . $_SESSION['oLP']->lp_id . '">' . Display :: return_icon('settings.png', get_lang('CourseSettings'),'',ICON_SIZE_MEDIUM).'</a>';
         $buttons = array(

+ 19 - 15
main/mySpace/myStudents.php

@@ -659,14 +659,14 @@ if (!empty($student_id)) {
         );
 
         $attendance = new Attendance();
-        foreach ($courses_in_session as $sessionId => $courses) {
+        foreach ($courses_in_session as $sId => $courses) {
             $session_name = '';
             $access_start_date = '';
             $access_end_date = '';
             $date_session = '';
             $title = Display::return_icon('course.png', get_lang('Courses'), array(), ICON_SIZE_SMALL).' '.get_lang('Courses');
 
-            $session_info = api_get_session_info($sessionId);
+            $session_info = api_get_session_info($sId);
             if ($session_info) {
                 $session_name = $session_info['name'];
                 if (!empty($session_info['access_start_date']) && $session_info['access_start_date'] != '0000-00-00') {
@@ -708,15 +708,15 @@ if (!empty($student_id)) {
 
                     if (CourseManager :: is_user_subscribed_in_course($student_id, $courseCodeItem, true)) {
                         $time_spent_on_course = api_time_to_hms(
-                            Tracking :: get_time_spent_on_the_course($user_info['user_id'], $courseId, $sessionId)
+                            Tracking :: get_time_spent_on_the_course($user_info['user_id'], $courseId, $sId)
                         );
 
                         // get average of faults in attendances by student
-                        $results_faults_avg = $attendance->get_faults_average_by_course($student_id, $courseCodeItem, $sessionId);
+                        $results_faults_avg = $attendance->get_faults_average_by_course($student_id, $courseCodeItem, $sId);
                         if (!empty($results_faults_avg['total'])) {
                             if (api_is_drh()) {
                                 $attendances_faults_avg =
-                                    '<a title="'.get_lang('GoAttendance').'" href="'.api_get_path(WEB_CODE_PATH).'attendance/index.php?cidReq='.$courseCodeItem.'&id_session='.$sessionId.'&student_id='.$student_id.'">'.
+                                    '<a title="'.get_lang('GoAttendance').'" href="'.api_get_path(WEB_CODE_PATH).'attendance/index.php?cidReq='.$courseCodeItem.'&id_session='.$sId.'&student_id='.$student_id.'">'.
                                     $results_faults_avg['faults'].'/'.$results_faults_avg['total'].' ('.$results_faults_avg['porcent'].'%)</a>';
                             } else {
                                 $attendances_faults_avg =
@@ -730,12 +730,12 @@ if (!empty($student_id)) {
                         }
 
                         // Get evaluations by student
-                        $cats = Category::load(null, null, $courseCodeItem, null, null, $sessionId);
+                        $cats = Category::load(null, null, $courseCodeItem, null, null, $sId);
 
                         $scoretotal = array();
                         if (isset($cats) && isset($cats[0])) {
-                            if (!empty($sessionId)) {
-                                $scoretotal= $cats[0]->calc_score($student_id, null, $courseCodeItem, $sessionId);
+                            if (!empty($sId)) {
+                                $scoretotal= $cats[0]->calc_score($student_id, null, $courseCodeItem, $sId);
                             } else {
                                 $scoretotal= $cats[0]->calc_score($student_id, null, $courseCodeItem);
                             }
@@ -749,8 +749,8 @@ if (!empty($student_id)) {
                                 ' ('.round(($scoretotal[0] / $scoretotal[1]) * 100, 2).' %)';
                         }
 
-                        $progress = Tracking::get_avg_student_progress($user_info['user_id'], $courseCodeItem, null, $sessionId);
-                        $score = Tracking :: get_avg_student_score($user_info['user_id'], $courseCodeItem, null, $sessionId);
+                        $progress = Tracking::get_avg_student_progress($user_info['user_id'], $courseCodeItem, null, $sId);
+                        $score = Tracking :: get_avg_student_score($user_info['user_id'], $courseCodeItem, null, $sId);
                         $progress = empty($progress) ? '0%' : $progress.'%';
                         $score = empty($score) ? '0%' : $score.'%';
 
@@ -765,7 +765,7 @@ if (!empty($student_id)) {
                         );
 
                         echo '<tr>
-                        <td ><a href="' .$courseInfoItem['course_public_url'] .'?id_session=' . $sessionId . '">'.
+                        <td ><a href="' .$courseInfoItem['course_public_url'] .'?id_session=' . $sId . '">'.
                             $courseInfoItem['title'].'</a></td>
                         <td >'.$time_spent_on_course .'</td>
                         <td >'.$progress.'</td>
@@ -774,10 +774,10 @@ if (!empty($student_id)) {
                         <td >'.$scoretotal_display.'</td>';
 
                         if (isset($_GET['id_coach']) && intval($_GET['id_coach']) != 0) {
-                            echo '<td width="10"><a href="'.api_get_self().'?student='.$user_info['user_id'].'&details=true&course='.$courseInfoItem['code'].'&id_coach='.Security::remove_XSS($_GET['id_coach']).'&origin='.$origin.'&id_session='.$sessionId.'#infosStudent">
+                            echo '<td width="10"><a href="'.api_get_self().'?student='.$user_info['user_id'].'&details=true&course='.$courseInfoItem['code'].'&id_coach='.Security::remove_XSS($_GET['id_coach']).'&origin='.$origin.'&id_session='.$sId.'#infosStudent">
                             '.Display::return_icon('2rightarrow.png', get_lang('Details')).'</a></td>';
                         } else {
-                            echo '<td width="10"><a href="'.api_get_self().'?student='.$user_info['user_id'].'&details=true&course='.$courseInfoItem['code'].'&origin='.$origin.'&id_session='.$sessionId.'#infosStudent">
+                            echo '<td width="10"><a href="'.api_get_self().'?student='.$user_info['user_id'].'&details=true&course='.$courseInfoItem['code'].'&origin='.$origin.'&id_session='.$sId.'#infosStudent">
                             '.Display::return_icon('2rightarrow.png', get_lang('Details')).'</a></td>';
                         }
                         echo '</tr>';
@@ -1310,9 +1310,13 @@ if (!empty($student_id)) {
         </table>
         </div>
     <?php
-        echo Tracking::displayUserSkills($user_info['user_id'], $courseInfo['id'], $sessionId);
-
     } //end details
+
+    echo Tracking::displayUserSkills(
+        $user_info['user_id'],
+        $courseInfo ? $courseInfo['real_id'] : 0,
+        $sessionId
+    );
 }
 
 if ($export) {

+ 57 - 61
main/template/default/admin/teacher_time_report.tpl

@@ -1,71 +1,67 @@
-{% extends template ~ "/layout/main.tpl" %}
-
-{% block body %}
-    <script>
-        $(document).on('ready', function () {
-            $('#course').on('change', function () {
-                $('#session').prop('selectedIndex', 0);
-                $('#teacher').prop('selectedIndex', 0);
-            });
+<script>
+    $(document).on('ready', function () {
+        $('#course').on('change', function () {
+            $('#session').prop('selectedIndex', 0);
+            $('#teacher').prop('selectedIndex', 0);
+        });
 
-            $('#session').on('change', function () {
-                $('#course').prop('selectedIndex', 0);
-                $('#teacher').prop('selectedIndex', 0);
-            });
+        $('#session').on('change', function () {
+            $('#course').prop('selectedIndex', 0);
+            $('#teacher').prop('selectedIndex', 0);
+        });
 
-            $('#teacher').on('change', function () {
-                $('#course').prop('selectedIndex', 0);
-                $('#session').prop('selectedIndex', 0);
-            });
+        $('#teacher').on('change', function () {
+            $('#course').prop('selectedIndex', 0);
+            $('#session').prop('selectedIndex', 0);
+        });
 
-            $('#daterange').on('apply.daterangepicker', function (ev, picker) {
-                $('[name="from"]').val(picker.startDate.format('YYYY-MM-DD'));
-                $('[name="until"]').val(picker.endDate.format('YYYY-MM-DD'));
-            }).on('cancel.daterangepicker', function (ev, picker) {
-                $('#daterange, [name="from"], [name="until"]').val('');
-            });
+        $('#daterange').on('apply.daterangepicker', function (ev, picker) {
+            $('[name="from"]').val(picker.startDate.format('YYYY-MM-DD'));
+            $('[name="until"]').val(picker.endDate.format('YYYY-MM-DD'));
+        }).on('cancel.daterangepicker', function (ev, picker) {
+            $('#daterange, [name="from"], [name="until"]').val('');
         });
-    </script>
-    <div class="col-md-12">
-        <div class="actions">
-            <a href="{{ _p.web_main }}admin/teachers_time_by_session_report.php">
-                {{ 'session.png'|img(32, 'Sessions'|get_lang) }}
+    });
+</script>
+<div class="col-md-12">
+    <div class="actions">
+        <a href="{{ _p.web_main }}admin/teachers_time_by_session_report.php">
+            {{ 'session.png'|img(32, 'Sessions'|get_lang) }}
+        </a>
+        <div class="pull-right">
+            <a href="{{ _p.web_self ~ '?' ~ {'export':'pdf','from':selectedFrom,'until':selectedUntil,'course':selectedCourse,'session':selectedSession,'teacher':selectedTeacher}|url_encode }}">
+                {{ 'pdf.png' | img(32, 'ExportToPDF'|get_lang ) }}
+            </a>
+            <a href="{{ _p.web_self ~ '?' ~ {'export':'xls','from':selectedFrom,'until':selectedUntil,'course':selectedCourse,'session':selectedSession,'teacher':selectedTeacher}|url_encode }}">
+                {{ 'export_excel.png' | img(32, 'ExportExcel'|get_lang ) }}
             </a>
-            <div class="pull-right">
-                <a href="{{ _p.web_self ~ '?' ~ {'export':'pdf','from':selectedFrom,'until':selectedUntil,'course':selectedCourse,'session':selectedSession,'teacher':selectedTeacher}|url_encode }}">
-                    {{ 'pdf.png' | img(32, 'ExportToPDF'|get_lang ) }}
-                </a>
-                <a href="{{ _p.web_self ~ '?' ~ {'export':'xls','from':selectedFrom,'until':selectedUntil,'course':selectedCourse,'session':selectedSession,'teacher':selectedTeacher}|url_encode }}">
-                    {{ 'export_excel.png' | img(32, 'ExportExcel'|get_lang ) }}
-                </a>
-            </div>
         </div>
-        <h1 class="page-header">{{ 'TeacherTimeReport' | get_lang }}</h1>
-        {{ form }}
-        <h2 class="page-header">{{ reportTitle }} <small>{{ reportSubTitle }}</small></h2>
-        <table class="table">
-            <thead>
+    </div>
+    <h1 class="page-header">{{ 'TeacherTimeReport' | get_lang }}</h1>
+    {{ form }}
+    <h2 class="page-header">{{ reportTitle }} <small>{{ reportSubTitle }}</small></h2>
+    <table class="table">
+        <thead>
+            <tr>
+                {% if withFilter %}
+                    <th>{{ 'Session' | get_lang }}</th>
+                    <th>{{ 'Course' | get_lang }}</th>
+                {% endif %}
+                <th>{{ 'Coach' | get_lang }}</th>
+                <th>{{ 'TotalTime' | get_lang }}</th>
+            </tr>
+        </thead>
+        <tbody>
+            {% for row in rows %}
                 <tr>
                     {% if withFilter %}
-                        <th>{{ 'Session' | get_lang }}</th>
-                        <th>{{ 'Course' | get_lang }}</th>
+                        <td>{{ row.session ? row.session.name : '&nbsp' }}</td>
+                        <td>{{ row.course.name }}</td>
                     {% endif %}
-                    <th>{{ 'Coach' | get_lang }}</th>
-                    <th>{{ 'TotalTime' | get_lang }}</th>
+                    <td>{{ row.coach.completeName }} ({{ row.coach.username}})</td>
+                    <td>{{ row.totalTime }}</td>
                 </tr>
-            </thead>
-            <tbody>
-                {% for row in rows %}
-                    <tr>
-                        {% if withFilter %}
-                            <td>{{ row.session ? row.session.name : '&nbsp' }}</td>
-                            <td>{{ row.course.name }}</td>
-                        {% endif %}
-                        <td>{{ row.coach.completeName }} ({{ row.coach.username}})</td>
-                        <td>{{ row.totalTime }}</td>
-                    </tr>
-                {% endfor %}
-            </tbody>
-        </table>
-    </div>
-{% endblock %}
+            {% endfor %}
+        </tbody>
+    </table>
+</div>

+ 14 - 46
main/template/default/layout/no_layout.tpl

@@ -1,49 +1,17 @@
 <!DOCTYPE html>
-<!--[if lt IE 7]> <html lang="{{ document_language }}" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
-<!--[if IE 7]>    <html lang="{{ document_language }}" class="no-js lt-ie9 lt-ie8"> <![endif]-->
-<!--[if IE 8]>    <html lang="{{ document_language }}" class="no-js lt-ie9"> <![endif]-->
-<!--[if gt IE 8]><!-->
-<html lang="{{ document_language }}" class="no-js"> <!--<![endif]-->
+<!--[if lt IE 7]> <html lang="{{document_language}}" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]>    <html lang="{{document_language}}" class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]>    <html lang="{{document_language}}" class="no-js lt-ie9"> <![endif]-->
+<!--[if gt IE 8]><!--><html lang="{{document_language}}" class="no-js"> <!--<![endif]-->
 <head>
-    {% block head %}
-        {% include template ~ "/layout/head.tpl" %}
-    {% endblock %}
-  </head>
-<body dir="{{ text_direction }}" class="{{ section_name }} {{ login_class }}">
-<noscript>{{ "NoJavascript"|get_lang }}</noscript>
-    <div class="wrap">
-        <!-- Display Cookies validation -->
-        {% if displayCookieUsageWarning == true %}
-        <div class="toolbar-cookie alert-warning">
-            <form onSubmit="$(this).toggle('slow')" action="" method="post">
-                <input value=1 type="hidden" name="acceptCookies"/>
-                <div class="cookieUsageValidation">
-                    {{ "YouAcceptCookies" | get_lang }}
-                    <span style="margin-left:20px;" onclick="$(this).next().toggle('slow'); $(this).toggle('slow')">
-                        ({{"More" | get_lang }})
-                    </span>
-                    <div style="display:none; margin:20px 0;">
-                        {{ "HelpCookieUsageValidation" | get_lang}}
-                    </div>
-                    <span style="margin-left:20px;" onclick="$(this).parent().parent().submit()">
-                        ({{"Accept" | get_lang }})
-                    </span>
-                </div>
-            </form>
-        </div>
-        {% endif %}
-    	{% include template ~ "/layout/page_header.tpl" %}
-		<section id="content-section">
-			<div class="container">
-                                {% block breadcrumb %}
-                                    {{ breadcrumb }}
-                                {% endblock %}
-				{% block body %}
-                                    {{ content }}
-                                {% endblock %}
-			</div>
-		</section>
-	{% include template ~ "/layout/page_footer.tpl" %}	
-    </div>
-  </body>
+{% include template ~ "/layout/head.tpl" %}
+</head>
+<body dir="{{text_direction}}" class="{{section_name}}">
+<section id="content-scorm">
+    
+        {% block body %}
+            {{ content }}
+        {% endblock %}
+    
+</body>
 </html>

+ 1 - 1
main/template/default/layout/page_footer.tpl

@@ -33,7 +33,7 @@
                     </div>
                     {% endif %}
                 </div>
-                <div class="col-md-4">
+                <div class="col-md-4 text-right">
                     {% if administrator_name is not null %}
                     <div class="administrator-name">
                         {{ administrator_name }}

+ 3 - 2
main/template/default/learnpath/view.tpl

@@ -24,12 +24,13 @@
                                         </div>
                                     {% endif %}
                                 </div>
-
+                                
                                 {% if show_audio_player %}
-                                    <div id="lp_media_file">
+                                    <div id="lp_media_file" class="audio-scorm">
                                         {{ media_player }}
                                     </div>
                                 {% endif %}
+                                
 
                                 {% if gamification_mode == 1 %}
                                     <hr>

+ 1 - 1
main/template/default/social/avatar_block.tpl

@@ -16,7 +16,7 @@
         </div>
     {% elseif show_user %}
         <a href="{{ user_image.big }}" class="expand-image">
-            <img class="img-responsive img-circle" src="{{ user_image.normal }}">
+            <img class="img-responsive img-circle" src="{{ user_image.big }}">
         </a>
     {% endif %}
 </div>

+ 14 - 12
src/Chamilo/CoreBundle/Entity/Repository/SkillRepository.php

@@ -29,29 +29,31 @@ class SkillRepository extends EntityRepository
     {
         $qb = $this->createQueryBuilder('s');
 
-        $qb->innerJoin(
-            'ChamiloCoreBundle:SkillRelUser',
-            'su',
-            Join::WITH,
-            's.id = su.skillId'
-        )
-        ->where(
-            $qb->expr()->eq('su.userId', $user->getId())
-        );
+        $qb
+            ->innerJoin(
+                'ChamiloCoreBundle:SkillRelUser',
+                'su',
+                Join::WITH,
+                's.id = su.skill'
+            )
+            ->where(
+                $qb->expr()->eq('su.user', $user->getId())
+            );
 
         if ($course) {
             $qb->andWhere(
-                $qb->expr()->eq('su.courseId', $course->getId())
+                $qb->expr()->eq('su.course', $course->getId())
             );
         }
 
         if ($session) {
             $qb->andWhere(
-                $qb->expr()->eq('su.sessionId', $session->getId())
+                $qb->expr()->eq('su.session', $session->getId())
             );
         }
 
-        $qb->setMaxResults(1)
+        $qb
+            ->setMaxResults(1)
             ->orderBy('su.id', 'DESC');
 
         return $qb->getQuery()->getOneOrNullResult();

+ 5 - 128
src/Chamilo/CoreBundle/Entity/SkillRelUser.php

@@ -4,12 +4,10 @@
 namespace Chamilo\CoreBundle\Entity;
 
 use Chamilo\SkillBundle\Entity\Level;
+use Doctrine\Common\Collections\Criteria;
 use Doctrine\ORM\Mapping as ORM;
 use Chamilo\UserBundle\Entity\User;
 use Doctrine\Common\Collections\ArrayCollection;
-use Chamilo\CoreBundle\Entity\Skill;
-use Chamilo\CoreBundle\Entity\Course;
-use Chamilo\CoreBundle\Entity\Session;
 
 /**
  * SkillRelUser
@@ -35,20 +33,6 @@ class SkillRelUser
      */
     private $id;
 
-    /**
-     * @var integer
-     *
-     * @ORM\Column(name="user_id", type="integer", nullable=false)
-     */
-    private $userId;
-
-    /**
-     * @var integer
-     *
-     * @ORM\Column(name="skill_id", type="integer", nullable=false)
-     */
-    private $skillId;
-
     /**
      * @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User", inversedBy="achievedSkills", cascade={"persist"})
      * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
@@ -74,23 +58,9 @@ class SkillRelUser
      */
     private $assignedBy;
 
-    /**
-     * @var integer
-     *
-     * @ORM\Column(name="course_id", type="integer", nullable=false)
-     */
-    private $courseId;
-
-    /**
-     * @var integer
-     *
-     * @ORM\Column(name="session_id", type="integer", nullable=false)
-     */
-    private $sessionId;
-
     /**
      * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course", inversedBy="issuedSkills", cascade={"persist"})
-     * @ORM\JoinColumn(name="course_id", referencedColumnName="id")
+     * @ORM\JoinColumn(name="course_id", referencedColumnName="id", nullable=true)
      */
     private $course;
 
@@ -98,7 +68,7 @@ class SkillRelUser
      * @var Session
      *
      * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Session", inversedBy="issuedSkills", cascade={"persist"})
-     * @ORM\JoinColumn(name="session_id", referencedColumnName="id")
+     * @ORM\JoinColumn(name="session_id", referencedColumnName="id", nullable=true)
      */
     private $session;
 
@@ -137,52 +107,6 @@ class SkillRelUser
         $this->comments = new ArrayCollection();
     }
 
-    /**
-     * Set userId
-     *
-     * @param integer $userId
-     * @return SkillRelUser
-     */
-    public function setUserId($userId)
-    {
-        $this->userId = $userId;
-
-        return $this;
-    }
-
-    /**
-     * Get userId
-     *
-     * @return integer
-     */
-    public function getUserId()
-    {
-        return $this->userId;
-    }
-
-    /**
-     * Set skillId
-     *
-     * @param integer $skillId
-     * @return SkillRelUser
-     */
-    public function setSkillId($skillId)
-    {
-        $this->skillId = $skillId;
-
-        return $this;
-    }
-
-    /**
-     * Get skillId
-     *
-     * @return integer
-     */
-    public function getSkillId()
-    {
-        return $this->skillId;
-    }
-
     /**
      * Set user
      * @param User $user
@@ -314,52 +238,6 @@ class SkillRelUser
         return $this->assignedBy;
     }
 
-    /**
-     * Set courseId
-     *
-     * @param integer $courseId
-     * @return SkillRelUser
-     */
-    public function setCourseId($courseId)
-    {
-        $this->courseId = $courseId;
-
-        return $this;
-    }
-
-    /**
-     * Get courseId
-     *
-     * @return integer
-     */
-    public function getCourseId()
-    {
-        return $this->courseId;
-    }
-
-    /**
-     * Set sessionId
-     *
-     * @param integer $sessionId
-     * @return SkillRelUser
-     */
-    public function setSessionId($sessionId)
-    {
-        $this->sessionId = $sessionId;
-
-        return $this;
-    }
-
-    /**
-     * Get sessionId
-     *
-     * @return integer
-     */
-    public function getSessionId()
-    {
-        return $this->sessionId;
-    }
-
     /**
      * Get id
      *
@@ -499,9 +377,9 @@ class SkillRelUser
     public function getComments($sortDescByDateTime = false)
     {
         if ($sortDescByDateTime) {
-            $criteria = \Doctrine\Common\Collections\Criteria::create();
+            $criteria = Criteria::create();
             $criteria->orderBy([
-                'feedbackDateTime' => \Doctrine\Common\Collections\Criteria::DESC
+                'feedbackDateTime' => Criteria::DESC
             ]);
 
             return $this->comments->matching($criteria);
@@ -517,7 +395,6 @@ class SkillRelUser
     public function getAverage()
     {
         $sum = 0;
-        $average = 0;
         $countValues = 0;
 
         foreach ($this->comments as $comment) {

+ 22 - 2
tests/features/accessCompanyReports.feature

@@ -1,8 +1,8 @@
 @administration
-Feature: Access to company reports as admin
+Feature: Access to portal reports as admin
   In order to analyse reports of time spent on the platform
   As an administrator
-  I need to be able to access the company reports
+  I need to be able to access the portal reports
 
   Scenario: See the company reports link on the admin page
     Given I am a platform administrator
@@ -18,3 +18,23 @@ Feature: Access to company reports as admin
     Given I am a platform administrator
     And I am on "/main/admin/company_reports_resumed.php"
     Then I should not see "not authorized"
+
+  Scenario: See the company reports link on the admin page
+    Given I am a platform administrator
+    And I am on "/main/admin/teacher_time_report.php"
+    Then I should see "Teachers time report"
+
+  Scenario: See the company reports link on the admin page
+    Given I am a platform administrator
+    And I am on "/main/admin/teacher_time_report.php"
+    Then I should not see "not authorized"
+
+  Scenario: See the company reports link on the admin page
+    Given I am a platform administrator
+    And I am on "/main/admin/teachers_time_by_session_report.php"
+    Then I should see "Teachers time report by session"
+
+  Scenario: See the company reports link on the admin page
+    Given I am a platform administrator
+    And I am on "/main/admin/teachers_time_by_session_report.php"
+    Then I should not see "not authorized"