Explorar o código

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

aragonc %!s(int64=9) %!d(string=hai) anos
pai
achega
2d05b3f058
Modificáronse 68 ficheiros con 867 adicións e 453 borrados
  1. 6 6
      app/Migrations/Schema/V110/Version20150803163400.php
  2. 3 0
      app/Resources/public/css/base.css
  3. 2 2
      app/Resources/public/css/scorm.css
  4. 223 222
      main/course_progress/thematic.php
  5. 2 2
      main/course_progress/thematic_controller.php
  6. 60 60
      main/course_progress/thematic_plan.php
  7. 2 2
      main/cron/remind_course_expiration.php
  8. BIN=BIN
      main/img/icons/16/attendance.png
  9. 6 6
      main/inc/lib/extra_field.lib.php
  10. 105 2
      main/inc/lib/formvalidator/Element/DatePicker.php
  11. 109 2
      main/inc/lib/formvalidator/Element/DateTimePicker.php
  12. 7 7
      main/inc/lib/formvalidator/FormValidator.class.php
  13. 5 7
      main/inc/lib/social.lib.php
  14. 3 3
      main/install/data.sql
  15. 24 4
      main/install/index.php
  16. 98 10
      main/install/install.lib.php
  17. 19 0
      main/install/profiles/README.md
  18. 12 0
      main/install/profiles/hr.json
  19. 21 0
      main/install/profiles/prod.json
  20. 2 2
      main/lang/arabic/trad4all.inc.php
  21. 2 2
      main/lang/asturian/trad4all.inc.php
  22. 2 2
      main/lang/basque/trad4all.inc.php
  23. 2 2
      main/lang/bengali/trad4all.inc.php
  24. 2 2
      main/lang/bulgarian/trad4all.inc.php
  25. 2 2
      main/lang/catalan/trad4all.inc.php
  26. 2 2
      main/lang/croatian/trad4all.inc.php
  27. 2 2
      main/lang/czech/trad4all.inc.php
  28. 2 2
      main/lang/danish/trad4all.inc.php
  29. 3 3
      main/lang/dari/trad4all.inc.php
  30. 21 5
      main/lang/english/trad4all.inc.php
  31. 2 2
      main/lang/esperanto/trad4all.inc.php
  32. 2 2
      main/lang/faroese/trad4all.inc.php
  33. 2 2
      main/lang/finnish/trad4all.inc.php
  34. 10 3
      main/lang/french/trad4all.inc.php
  35. 2 2
      main/lang/friulian/trad4all.inc.php
  36. 2 2
      main/lang/georgian/trad4all.inc.php
  37. 2 2
      main/lang/greek/trad4all.inc.php
  38. 2 2
      main/lang/hebrew/trad4all.inc.php
  39. 2 2
      main/lang/indonesian/trad4all.inc.php
  40. 2 2
      main/lang/italian/trad4all.inc.php
  41. 2 2
      main/lang/japanese/trad4all.inc.php
  42. 2 2
      main/lang/korean/trad4all.inc.php
  43. 2 2
      main/lang/latvian/trad4all.inc.php
  44. 2 2
      main/lang/lithuanian/trad4all.inc.php
  45. 2 2
      main/lang/macedonian/trad4all.inc.php
  46. 2 2
      main/lang/malay/trad4all.inc.php
  47. 2 2
      main/lang/occitan/trad4all.inc.php
  48. 2 2
      main/lang/pashto/trad4all.inc.php
  49. 2 2
      main/lang/polish/trad4all.inc.php
  50. 2 2
      main/lang/portuguese/trad4all.inc.php
  51. 2 2
      main/lang/quechua_cusco/trad4all.inc.php
  52. 2 2
      main/lang/romanian/trad4all.inc.php
  53. 2 2
      main/lang/russian/trad4all.inc.php
  54. 2 2
      main/lang/serbian/trad4all.inc.php
  55. 2 2
      main/lang/simpl_chinese/trad4all.inc.php
  56. 2 2
      main/lang/slovak/trad4all.inc.php
  57. 2 2
      main/lang/slovenian/trad4all.inc.php
  58. 19 3
      main/lang/somali/trad4all.inc.php
  59. 2 2
      main/lang/spanish_latin/trad4all.inc.php
  60. 2 2
      main/lang/swahili/trad4all.inc.php
  61. 2 2
      main/lang/tagalog/trad4all.inc.php
  62. 2 2
      main/lang/thai/trad4all.inc.php
  63. 2 2
      main/lang/tibetan/trad4all.inc.php
  64. 2 2
      main/lang/turkish/trad4all.inc.php
  65. 2 2
      main/lang/ukrainian/trad4all.inc.php
  66. 19 17
      main/lang/vietnamese/trad4all.inc.php
  67. 4 2
      main/session/resume_session.php
  68. 0 1
      main/template/default/social/whoisonline.tpl

+ 6 - 6
app/Migrations/Schema/V110/Version20150803163400.php

@@ -25,7 +25,7 @@ class Version20150803163400 extends AbstractMigrationChamilo
             'radio',
             'Crons',
             'false',
-            'CronRemindCourseExpirationActivateText',
+            'CronRemindCourseExpirationActivateTitle',
             'CronRemindCourseExpirationActivateComment',
             null,
             null,
@@ -39,13 +39,13 @@ class Version20150803163400 extends AbstractMigrationChamilo
         );
 
         $this->addSettingCurrent(
-            'cron_remind_course_expiration_frecuency',
+            'cron_remind_course_expiration_frequency',
             null,
             'textfield',
             'Crons',
             '2',
-            'CronRemindCourseExpirationFrecuencyText',
-            'CronRemindCourseExpirationFrecuencyComment',
+            'CronRemindCourseExpirationFrecuenqyTitle',
+            'CronRemindCourseExpirationFrecuenqyComment',
             null,
             null,
             1,
@@ -59,7 +59,7 @@ class Version20150803163400 extends AbstractMigrationChamilo
             'radio',
             'Crons',
             'false',
-            'CronCourseFinishedActivateText',
+            'CronCourseFinishedActivateTitle',
             'CronCourseFinishedActivateComment',
             null,
             null,
@@ -101,7 +101,7 @@ class Version20150803163400 extends AbstractMigrationChamilo
                     's.variable',
                     [
                         'cron_remind_course_expiration_activate',
-                        'cron_remind_course_expiration_frecuency',
+                        'cron_remind_course_expiration_frequency',
                         'cron_course_finished_activate'
                     ]
                 )

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

@@ -61,6 +61,9 @@ a.thumbnail:hover{
   text-align: left;
 }
 /*------------------------*/
+.cursor-pointer {
+    cursor: pointer;
+}
 .invisible {
   visibility: visible;
 }

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

@@ -136,7 +136,7 @@ See https://support.chamilo.org/issues/6976
 }
 
 .inner_lp_toc .scorm_item_section .scorm_item:before {
-    content : url('../../img/lp_section.png');  /* path from main/newscorm/lp_controller.php file */
+    content : url('../../main/img/lp_section.png');  /* path from main/newscorm/lp_controller.php file */
     vertical-align: text-top;
     margin-right : 5px;
 }
@@ -316,7 +316,7 @@ See https://support.chamilo.org/issues/6976
 }
 /* for section */
 .scorm_item_section.scorm_completed{
-  background:url("../img/icon_completed_section.png")no-repeat 98% center #606c88;
+  background:url("../../main/img/icon_completed_section.png")no-repeat 98% center #606c88;
   padding-right: 1.5em;
 }
 .scorm_item_section{

+ 223 - 222
main/course_progress/thematic.php

@@ -17,52 +17,52 @@ $user_info = api_get_user_info();
 $param_gradebook = '&'.api_get_cidreq();
 
 if (api_is_allowed_to_edit(null, true)) {
-	echo '<div class="actions">';
+    echo '<div class="actions">';
 
-	switch ($action) {
-		case 'thematic_add' :
+    switch ($action) {
+        case 'thematic_add' :
         case 'thematic_import_select' :
             echo '<a href="index.php?'.api_get_cidreq().'">'.
-				Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('ThematicDetails'),'',ICON_SIZE_MEDIUM).'</a>';
+                Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('ThematicDetails'),'',ICON_SIZE_MEDIUM).'</a>';
             break;
-		case 'thematic_list' :
+        case 'thematic_list' :
             echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_add'.$url_token.'">'.
-				Display::return_icon('new_course_progress.png',get_lang('NewThematicSection'),'',ICON_SIZE_MEDIUM).'</a>';
+                Display::return_icon('new_course_progress.png',get_lang('NewThematicSection'),'',ICON_SIZE_MEDIUM).'</a>';
             break;
-		case 'thematic_details' :
+        case 'thematic_details' :
             echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_add'.$url_token.'">'.
-				Display::return_icon('new_course_progress.png',get_lang('NewThematicSection'),'',ICON_SIZE_MEDIUM).'</a>';
+                Display::return_icon('new_course_progress.png',get_lang('NewThematicSection'),'',ICON_SIZE_MEDIUM).'</a>';
             echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_import_select'.$url_token.'">'.
-				Display::return_icon('import_csv.png',get_lang('ImportThematic'),'',ICON_SIZE_MEDIUM).'</a>';
+                Display::return_icon('import_csv.png',get_lang('ImportThematic'),'',ICON_SIZE_MEDIUM).'</a>';
             echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_export'.$url_token.'">'.
-				Display::return_icon('export_csv.png',get_lang('ExportThematic'),'', ICON_SIZE_MEDIUM).'</a>';
+                Display::return_icon('export_csv.png',get_lang('ExportThematic'),'', ICON_SIZE_MEDIUM).'</a>';
             echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_export_pdf'.$url_token.'">'.
-				Display::return_icon('pdf.png',get_lang('ExportToPDF'),'', ICON_SIZE_MEDIUM).'</a>';
+                Display::return_icon('pdf.png',get_lang('ExportToPDF'),'', ICON_SIZE_MEDIUM).'</a>';
             break;
-		default :
+        default :
             echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_add'.$url_token.'">'.
-				Display::return_icon('new_course_progress.png',get_lang('NewThematicSection'),'',ICON_SIZE_MEDIUM).'</a>';
-	}
-	echo '</div>';
+                Display::return_icon('new_course_progress.png',get_lang('NewThematicSection'),'',ICON_SIZE_MEDIUM).'</a>';
+    }
+    echo '</div>';
 }
 
 if ($action == 'thematic_list') {
 
-	$table = new SortableTable(
-		'thematic_list',
-		array('Thematic', 'get_number_of_thematics'),
-		array('Thematic', 'get_thematic_data')
-	);
-
-	$parameters['action'] = $action;
-	$table->set_additional_parameters($parameters);
-	$table->set_header(0, '', false, array('style'=>'width:20px;'));
-	$table->set_header(1, get_lang('Title'), false );
-	if (api_is_allowed_to_edit(null, true)) {
-		$table->set_header(2, get_lang('Actions'), false,array('style'=>'text-align:center;width:40%;'));
-		$table->set_form_actions(array ('thematic_delete_select' => get_lang('DeleteAllThematics')));
-	}
-	$table->display();
+    $table = new SortableTable(
+        'thematic_list',
+        array('Thematic', 'get_number_of_thematics'),
+        array('Thematic', 'get_thematic_data')
+    );
+
+    $parameters['action'] = $action;
+    $table->set_additional_parameters($parameters);
+    $table->set_header(0, '', false, array('style'=>'width:20px;'));
+    $table->set_header(1, get_lang('Title'), false );
+    if (api_is_allowed_to_edit(null, true)) {
+        $table->set_header(2, get_lang('Actions'), false,array('style'=>'text-align:center;width:40%;'));
+        $table->set_form_actions(array ('thematic_delete_select' => get_lang('DeleteAllThematics')));
+    }
+    $table->display();
 
 } elseif ($action == 'thematic_details') {
 
@@ -70,219 +70,220 @@ if ($action == 'thematic_list') {
         Display::display_confirmation_message(get_lang('ThematicSectionHasBeenCreatedSuccessfull'));
     }
 
-	if (isset($last_id) && $last_id) {
-		$link_to_thematic_plan = '<a href="index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$last_id.'">'.
-			Display::return_icon('lesson_plan.png', get_lang('ThematicPlan'), array('style'=>'vertical-align:middle;float:none;'),ICON_SIZE_SMALL).'</a>';
-		$link_to_thematic_advance = '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$last_id.'">'.
-			Display::return_icon('lesson_plan_calendar.png', get_lang('ThematicAdvance'), array('style'=>'vertical-align:middle;float:none;'),ICON_SIZE_SMALL).'</a>';
-		Display::display_confirmation_message(
-			get_lang('ThematicSectionHasBeenCreatedSuccessfull').'<br />'.sprintf(get_lang('NowYouShouldAddThematicPlanXAndThematicAdvanceX'),$link_to_thematic_plan, $link_to_thematic_advance),
-			false
-		);
-	}
-
-	// display title
-	if (!empty($thematic_id)) {
-	} else {
-		// display information
-		$message = '<strong>'.get_lang('Information').'</strong><br />';
-		$message .= get_lang('ThematicDetailsDescription');
-		Display::display_normal_message($message, false);
-		echo '<br />';
-	}
-
-	// Display thematic data
-	if (!empty($thematic_data)) {
-
-		// display progress
-		echo '<div style="text-align:right;"><h2>'.get_lang('Progress').': <span id="div_result">'.$total_average_of_advances.'</span> %</h2></div>';
-		echo '<table width="100%" class="data_table">';
-		echo '<tr><th width="33%">'.get_lang('Thematic').'</th><th>'.get_lang('ThematicPlan').'</th><th width="33%">'.get_lang('ThematicAdvance').'</th></tr>';
-		foreach ($thematic_data as $thematic) {
-		    $my_thematic_id = $thematic['id'];
-
-		    $session_star = '';
-		    if (api_is_allowed_to_edit(null, true)) {
-		        if (api_get_session_id() == $thematic['session_id']) {
+    if (isset($last_id) && $last_id) {
+        $link_to_thematic_plan = '<a href="index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$last_id.'">'.
+            Display::return_icon('lesson_plan.png', get_lang('ThematicPlan'), array('style'=>'vertical-align:middle;float:none;'),ICON_SIZE_SMALL).'</a>';
+        $link_to_thematic_advance = '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$last_id.'">'.
+            Display::return_icon('lesson_plan_calendar.png', get_lang('ThematicAdvance'), array('style'=>'vertical-align:middle;float:none;'),ICON_SIZE_SMALL).'</a>';
+        Display::display_confirmation_message(
+            get_lang('ThematicSectionHasBeenCreatedSuccessfull').'<br />'.sprintf(get_lang('NowYouShouldAddThematicPlanXAndThematicAdvanceX'),$link_to_thematic_plan, $link_to_thematic_advance),
+            false
+        );
+    }
+
+    // display title
+    if (!empty($thematic_id)) {
+    } else {
+        // display information
+        $message = '<strong>'.get_lang('Information').'</strong><br />';
+        $message .= get_lang('ThematicDetailsDescription');
+        Display::display_normal_message($message, false);
+        echo '<br />';
+    }
+
+    // Display thematic data
+    if (!empty($thematic_data)) {
+
+        // display progress
+        echo '<div style="text-align:right;"><h2>'.get_lang('Progress').': <span id="div_result">'.$total_average_of_advances.'</span> %</h2></div>';
+        echo '<table width="100%" class="data_table">';
+        echo '<tr><th width="33%">'.get_lang('Thematic').'</th><th>'.get_lang('ThematicPlan').'</th><th width="33%">'.get_lang('ThematicAdvance').'</th></tr>';
+        foreach ($thematic_data as $thematic) {
+            $my_thematic_id = $thematic['id'];
+
+            $session_star = '';
+            if (api_is_allowed_to_edit(null, true)) {
+                if (api_get_session_id() == $thematic['session_id']) {
                     $session_star = api_get_session_image(api_get_session_id(), $user_info['status']);
-		        }
-		    }
-
-		    //@todo add a validation in order to load or not course thematics in the session thematic
-			echo '<tr>';
-			$actions_first_col = '';
-			if (api_is_allowed_to_edit(null, true)) {
-    			// Thematic title
-    			$actions_first_col  = Display::url(
-					Display::return_icon('cd.gif', get_lang('Copy')),
-					'index.php?'.api_get_cidreq().'&action=thematic_copy&thematic_id='.$my_thematic_id.$param_gradebook.$url_token
-				);
-    			if (api_get_session_id() == 0 ) {
-
-    				if ($thematic['display_order'] > 1) {
-						$actions_first_col .= ' <a href="'.api_get_self().'?action=moveup&'.api_get_cidreq().'&thematic_id='.$my_thematic_id.$param_gradebook.$url_token.'">'.Display::return_icon('up.png', get_lang('Up'),'',ICON_SIZE_SMALL).'</a>';
-					} else {
-						$actions_first_col .= ' '.Display::return_icon('up_na.png','&nbsp;','',ICON_SIZE_SMALL);
-					}
-					if (isset($thematic['max_thematic_item']) && $thematic['display_order'] < $thematic['max_thematic_item']) {
-						$actions_first_col .= ' <a href="'.api_get_self().'?action=movedown&a'.api_get_cidreq().'&thematic_id='.$my_thematic_id.$param_gradebook.$url_token.'">'.Display::return_icon('down.png',get_lang('Down'),'',ICON_SIZE_SMALL).'</a>';
-					} else {
-						$actions_first_col .= ' '.Display::return_icon('down_na.png','&nbsp;','',ICON_SIZE_SMALL);
-					}
-
-    			}
-    			if (api_get_session_id() == $thematic['session_id']) {
+                }
+            }
+
+            //@todo add a validation in order to load or not course thematics in the session thematic
+            echo '<tr>';
+            $actions_first_col = '';
+            if (api_is_allowed_to_edit(null, true)) {
+                // Thematic title
+                $actions_first_col  = Display::url(
+                    Display::return_icon('cd.gif', get_lang('Copy')),
+                    'index.php?'.api_get_cidreq().'&action=thematic_copy&thematic_id='.$my_thematic_id.$param_gradebook.$url_token
+                );
+                if (api_get_session_id() == 0 ) {
+
+                    if ($thematic['display_order'] > 1) {
+                        $actions_first_col .= ' <a href="'.api_get_self().'?action=moveup&'.api_get_cidreq().'&thematic_id='.$my_thematic_id.$param_gradebook.$url_token.'">'.Display::return_icon('up.png', get_lang('Up'),'',ICON_SIZE_SMALL).'</a>';
+                    } else {
+                        $actions_first_col .= ' '.Display::return_icon('up_na.png','&nbsp;','',ICON_SIZE_SMALL);
+                    }
+                    if (isset($thematic['max_thematic_item']) && $thematic['display_order'] < $thematic['max_thematic_item']) {
+                        $actions_first_col .= ' <a href="'.api_get_self().'?action=movedown&a'.api_get_cidreq().'&thematic_id='.$my_thematic_id.$param_gradebook.$url_token.'">'.Display::return_icon('down.png',get_lang('Down'),'',ICON_SIZE_SMALL).'</a>';
+                    } else {
+                        $actions_first_col .= ' '.Display::return_icon('down_na.png','&nbsp;','',ICON_SIZE_SMALL);
+                    }
+
+                }
+                if (api_get_session_id() == $thematic['session_id']) {
                     $actions_first_col .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_edit&thematic_id='.$my_thematic_id.$param_gradebook.$url_token.'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>';
                     $actions_first_col .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_delete&thematic_id='.$my_thematic_id.$param_gradebook.$url_token.'">'.Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>';
-    			}
-
-    			$actions_first_col = Display::div($actions_first_col, array('id'=>'thematic_id_content_'.$thematic['id'], 'class'=>'thematic_tools'));
-    			$actions_first_col = Display::div($actions_first_col, array('style'=>'height:20px'));
-			}
-
-			echo Display::tag('td', Display::tag('h3', Security::remove_XSS($thematic['title'], STUDENT).$session_star).Security::remove_XSS($thematic['content'], STUDENT).$actions_first_col, array('id'=>'thematic_td_content_'.$thematic['id'], 'class'=>'thematic_content'));
-
-			// Display 2nd column - thematic plan data
-
-			echo '<td>';
-
-			//if (api_is_allowed_to_edit(null, true) &&  api_get_session_id() == $thematic['session_id']) {
-			if (api_is_allowed_to_edit(null, true)) {
-				echo '<div style="text-align:right"><a href="index.php?'.api_get_cidreq().'&origin=thematic_details&action=thematic_plan_list&thematic_id='.$thematic['id'].'&width=700&height=500">'.
-				Display::return_icon('edit.png', get_lang('EditThematicPlan'), array('style'=>'vertical-align:middle'),ICON_SIZE_MEDIUM).'</a></div><br />';
-			}
-
-			if (empty($thematic_plan_div[$thematic['id']])) {
-				echo Display::div('', array('id' => "thematic_plan_".$thematic['id']));
-			} else {
-				echo $thematic_plan_div[$thematic['id']];
-			}
-			echo '</td>';
-
-			// Display 3rd column - thematic advance data
-			echo '<td style="vertical-align:top">';
-
-			//if (api_is_allowed_to_edit(null, true) &&  api_get_session_id() == $thematic['session_id']) {
-			if (api_is_allowed_to_edit(null, true)) {
-				echo '<div style="text-align:right"><a href="index.php?'.api_get_cidreq().'&action=thematic_advance_add&thematic_id='.$thematic['id'].'">'.
-					Display::return_icon('add.png',get_lang('NewThematicAdvance'),'',ICON_SIZE_MEDIUM).'</a></div>';
-			}
-
-			//if (api_is_allowed_to_edit(null, true) &&  api_get_session_id() == $thematic['session_id']) {
-			if (!empty($thematic_advance_data[$thematic['id']])) {
-			    echo '<table width="100%">';
-				foreach ($thematic_advance_data[$thematic['id']] as $thematic_advance) {
-
-					$thematic_advance['start_date'] = api_get_local_time($thematic_advance['start_date']);
-					$thematic_advance['start_date'] = api_format_date($thematic_advance['start_date'], DATE_TIME_FORMAT_LONG);
-					echo '<tr>';
-					echo '<td width="90%" class="thematic_advance_content" id="thematic_advance_content_id_'.$thematic_advance['id'].'">';
-
-					$edit_link = '';
-					if (api_is_allowed_to_edit(null, true)) {
-						$edit_link   = '<a class="ajax" href="index.php?'.api_get_cidreq().'&action=thematic_advance_edit&thematic_id='.$thematic['id'].'&thematic_advance_id='.$thematic_advance['id'].'&display=no_header" >'.Display::return_icon('edit.png',get_lang('EditThematicAdvance'),array(),ICON_SIZE_SMALL).'</a>';
-						$edit_link  .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_advance_delete&thematic_id='.$thematic['id'].'&thematic_advance_id='.$thematic_advance['id'].'">'.
-                                        Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a></center>';
-
-						//Links
-						$edit_link = Display::div(
-							Display::div($edit_link , array('id'=>'thematic_advance_tools_'.$thematic_advance['id'], 'class'=>'thematic_advance_actions')),
-							array('style'=>'height:20px;')
-						);
-					}
-
-					$thematic_advance_item =  isset($thematic_advance_div[$thematic['id']][$thematic_advance['id']]) ? $thematic_advance_div[$thematic['id']][$thematic_advance['id']] : null;
-
-					echo Display::div($thematic_advance_item, array('id'=>'thematic_advance_'.$thematic_advance['id']));
-
-					echo $edit_link;
-
-					echo '</td>';
-
-					//if (api_is_allowed_to_edit(null, true) && api_get_session_id() == $thematic['session_id']) {
-					if (api_is_allowed_to_edit(null, true)) {
-    					if (empty($thematic_id)) {
-    						$checked = '';
-    						if ($last_done_thematic_advance == $thematic_advance['id']) {
-    							$checked = 'checked';
-    						}
-    						$style = '';
-    						if ($thematic_advance['done_advance'] == 1) {
-    							$style = ' style="background-color:#E5EDF9" ';
-    						} else {
-    							$style = ' style="background-color:#fff" ';
-    						}
-    						echo '<td id="td_done_thematic_'.$thematic_advance['id'].'" '.$style.'><center>';
-    						echo '<input type="radio" class="done_thematic" id="done_thematic_'.$thematic_advance['id'].'" name="done_thematic" value="'.$thematic_advance['id'].'" '.$checked.' onclick="update_done_thematic_advance(this.value)">';
-    						echo '</center></td>';
-    					} else {
-    						if ($thematic_advance['done_advance'] == 1) {
-    							echo '<td><center>'.get_lang('Done').'</center></td>';
-    						} else {
-    							echo '<td><center>-</center></td>';
-    						}
-    					}
-					}
-					echo '</tr>';
-				}
-				echo '</table>';
-			} else {
-				echo '<div><em>'.get_lang('ThereIsNoAThematicAdvance').'</em></div>';
-			}
-			echo '</td>';
-			echo '</tr>';
-       } //End for
-	   echo '</table>';
+                }
+
+                $actions_first_col = Display::div($actions_first_col, array('id'=>'thematic_id_content_'.$thematic['id'], 'class'=>'thematic_tools'));
+                $actions_first_col = Display::div($actions_first_col, array('style'=>'height:20px'));
+            }
+
+            echo Display::tag('td', Display::tag('h3', Security::remove_XSS($thematic['title'], STUDENT).$session_star).Security::remove_XSS($thematic['content'], STUDENT).$actions_first_col, array('id'=>'thematic_td_content_'.$thematic['id'], 'class'=>'thematic_content'));
+
+            // Display 2nd column - thematic plan data
+
+            echo '<td>';
+
+            //if (api_is_allowed_to_edit(null, true) &&  api_get_session_id() == $thematic['session_id']) {
+            if (api_is_allowed_to_edit(null, true)) {
+                echo '<div style="text-align:right"><a href="index.php?'.api_get_cidreq().'&origin=thematic_details&action=thematic_plan_list&thematic_id='.$thematic['id'].'&width=700&height=500">'.
+                    Display::return_icon('edit.png', get_lang('EditThematicPlan'), array('style'=>'vertical-align:middle'),ICON_SIZE_MEDIUM).'</a></div><br />';
+            }
+
+            if (empty($thematic_plan_div[$thematic['id']])) {
+                echo Display::div('', array('id' => "thematic_plan_".$thematic['id']));
+            } else {
+                echo $thematic_plan_div[$thematic['id']];
+            }
+            echo '</td>';
+
+            // Display 3rd column - thematic advance data
+            echo '<td style="vertical-align:top">';
+
+            //if (api_is_allowed_to_edit(null, true) &&  api_get_session_id() == $thematic['session_id']) {
+            if (api_is_allowed_to_edit(null, true)) {
+                echo '<div style="text-align:right"><a href="index.php?'.api_get_cidreq().'&action=thematic_advance_add&thematic_id='.$thematic['id'].'">'.
+                    Display::return_icon('add.png',get_lang('NewThematicAdvance'),'',ICON_SIZE_MEDIUM).'</a></div>';
+            }
+
+            //if (api_is_allowed_to_edit(null, true) &&  api_get_session_id() == $thematic['session_id']) {
+            if (!empty($thematic_advance_data[$thematic['id']])) {
+                echo '<table width="100%">';
+                foreach ($thematic_advance_data[$thematic['id']] as $thematic_advance) {
+
+                    $thematic_advance['start_date'] = api_get_local_time($thematic_advance['start_date']);
+                    $thematic_advance['start_date'] = api_format_date($thematic_advance['start_date'], DATE_TIME_FORMAT_LONG);
+                    echo '<tr>';
+                    echo '<td width="90%" class="thematic_advance_content" id="thematic_advance_content_id_'.$thematic_advance['id'].'">';
+
+                    $edit_link = '';
+                    if (api_is_allowed_to_edit(null, true)) {
+                        $edit_link   = '<a class="ajax" href="index.php?'.api_get_cidreq().'&action=thematic_advance_edit&thematic_id='.$thematic['id'].'&thematic_advance_id='.$thematic_advance['id'].'&display=no_header" >'.Display::return_icon('edit.png',get_lang('EditThematicAdvance'),array(),ICON_SIZE_SMALL).'</a>';
+                        $edit_link  .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_advance_delete&thematic_id='.$thematic['id'].'&thematic_advance_id='.$thematic_advance['id'].'">'.
+                            Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a></center>';
+
+                        //Links
+                        $edit_link = Display::div(
+                            Display::div($edit_link , array('id'=>'thematic_advance_tools_'.$thematic_advance['id'], 'class'=>'thematic_advance_actions')),
+                            array('style'=>'height:20px;')
+                        );
+                    }
+
+                    $thematic_advance_item =  isset($thematic_advance_div[$thematic['id']][$thematic_advance['id']]) ? $thematic_advance_div[$thematic['id']][$thematic_advance['id']] : null;
+
+                    echo Display::div($thematic_advance_item, array('id'=>'thematic_advance_'.$thematic_advance['id']));
+
+                    echo $edit_link;
+
+                    echo '</td>';
+
+                    //if (api_is_allowed_to_edit(null, true) && api_get_session_id() == $thematic['session_id']) {
+                    if (api_is_allowed_to_edit(null, true)) {
+                        if (empty($thematic_id)) {
+                            $checked = '';
+                            if ($last_done_thematic_advance == $thematic_advance['id']) {
+                                $checked = 'checked';
+                            }
+                            $style = '';
+                            if ($thematic_advance['done_advance'] == 1) {
+                                $style = ' style="background-color:#E5EDF9" ';
+                            } else {
+                                $style = ' style="background-color:#fff" ';
+                            }
+                            echo '<td id="td_done_thematic_'.$thematic_advance['id'].'" '.$style.'><center>';
+                            echo '<input type="radio" class="done_thematic" id="done_thematic_'.$thematic_advance['id'].'" name="done_thematic" value="'.$thematic_advance['id'].'" '.$checked.' onclick="update_done_thematic_advance(this.value)">';
+                            echo '</center></td>';
+                        } else {
+                            if ($thematic_advance['done_advance'] == 1) {
+                                echo '<td><center>'.get_lang('Done').'</center></td>';
+                            } else {
+                                echo '<td><center>-</center></td>';
+                            }
+                        }
+                    }
+                    echo '</tr>';
+                }
+                echo '</table>';
+            } else {
+                echo '<div><em>'.get_lang('ThereIsNoAThematicAdvance').'</em></div>';
+            }
+            echo '</td>';
+            echo '</tr>';
+        } //End for
+        echo '</table>';
     } else {
-	   echo '<div><em>'.get_lang('ThereIsNoAThematicSection').'</em></div>';
+        echo '<div><em>'.get_lang('ThereIsNoAThematicSection').'</em></div>';
     }
-} else if ($action == 'thematic_add' || $action == 'thematic_edit') {
+} elseif ($action == 'thematic_add' || $action == 'thematic_edit') {
 
-	// Display form
-	$form = new FormValidator('thematic_add','POST','index.php?action=thematic_add&'.api_get_cidreq());
+    // Display form
+    $form = new FormValidator('thematic_add','POST','index.php?action=thematic_add&'.api_get_cidreq());
 
-	if ($action == 'thematic_edit') {
-		$form->addElement('header', '', get_lang('EditThematicSection'));
-	}
+    if ($action == 'thematic_edit') {
+        $form->addElement('header', '', get_lang('EditThematicSection'));
+    }
 
-	$form->addElement('hidden', 'sec_token', $token);
-	$form->addElement('hidden', 'action', $action);
+    $form->addElement('hidden', 'sec_token', $token);
+    $form->addElement('hidden', 'action', $action);
 
-	if (!empty($thematic_id)) {
-		$form->addElement('hidden', 'thematic_id',$thematic_id);
-	}
+    if (!empty($thematic_id)) {
+        $form->addElement('hidden', 'thematic_id',$thematic_id);
+    }
 
-	$form->addText('title', get_lang('Title'), true, array('size'=>'50'));
-	$form->addHtmlEditor('content', get_lang('Content'), false, false, array('ToolbarSet' => 'TrainingDescription', 'Height' => '150'));
-	$form->addButtonSave(get_lang('Save'));
+    $form->addText('title', get_lang('Title'), true, array('size'=>'50'));
+    $form->addHtmlEditor('content', get_lang('Content'), false, false, array('ToolbarSet' => 'TrainingDescription', 'Height' => '150'));
+    $form->addButtonSave(get_lang('Save'));
 
     $show_form = true;
 
-	if (!empty($thematic_data)) {
+    if (!empty($thematic_data)) {
         if (api_get_session_id()) {
-        	if ($thematic_data['session_id'] != api_get_session_id()) {
-        		$show_form  = false;
+            if ($thematic_data['session_id'] != api_get_session_id()) {
+                $show_form  = false;
                 Display::display_error_message(get_lang('NotAllowedClickBack'),false);
-        	}
+            }
         }
-		// set default values
-		$default['title'] = $thematic_data['title'];
-		$default['content'] = $thematic_data['content'];
-		$form->setDefaults($default);
-	}
-
-	// error messages
-	if (isset($error)) {
-		Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false);
-	}
-    if ($show_form)
+        // set default values
+        $default['title'] = $thematic_data['title'];
+        $default['content'] = $thematic_data['content'];
+        $form->setDefaults($default);
+    }
+
+    // error messages
+    if (isset($error)) {
+        Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false);
+    }
+    if ($show_form) {
         $form->display();
-} else if ($action == 'thematic_import_select') {
+    }
+} elseif ($action == 'thematic_import_select') {
     // Create form to upload csv file.
     $form = new FormValidator('thematic_import','POST','index.php?action=thematic_import&'.api_get_cidreq().$url_token);
     $form->addElement('header', get_lang('ImportThematic'));
     $form->addElement('file', 'file');
     $form->addElement('checkbox', 'replace', null, get_lang('DeleteAllThematic'));
-	$form->addButtonImport(get_lang('Import'), 'SubmitImport');
+    $form->addButtonImport(get_lang('Import'), 'SubmitImport');
     $form->display();
 }

+ 2 - 2
main/course_progress/thematic_controller.php

@@ -55,8 +55,8 @@ class ThematicController
                             if (api_is_allowed_to_edit(null, true)) {
 
                                 $id = isset($_POST['thematic_id']) ? $_POST['thematic_id'] : null;
-                                $title = $_POST['title'];
-                                $content = $_POST['content'];
+                                $title = trim($_POST['title']);
+                                $content = trim($_POST['content']);
                                 $session_id = api_get_session_id();
                                 $thematic->set_thematic_attributes($id, $title, $content, $session_id);
                                 $last_id = $thematic->thematic_save();

+ 60 - 60
main/course_progress/thematic_plan.php

@@ -19,7 +19,7 @@ $new_id = ADD_THEMATIC_PLAN;
 if (!empty($thematic_simple_list))
 foreach($thematic_simple_list as $item) {
     if ($item >= ADD_THEMATIC_PLAN) {
-    	$new_id = $item + 1;
+        $new_id = $item + 1;
         $default_thematic_plan_title[$item] = $new_thematic_plan_data[$item]['title'];
     }
 }
@@ -35,10 +35,10 @@ if (isset($message) && $message == 'ok') {
 $param_gradebook = null;
 if ($action == 'thematic_plan_list') {
         $form = new FormValidator(
-			'thematic_plan_add',
-			'POST',
-			'index.php?action=thematic_plan_list&thematic_id='.$thematic_id.'&'.api_get_cidreq().$param_gradebook
-		);
+            'thematic_plan_add',
+            'POST',
+            'index.php?action=thematic_plan_list&thematic_id='.$thematic_id.'&'.api_get_cidreq().$param_gradebook
+        );
         $form->addElement('hidden', 'action', 'thematic_plan_add');
         //$form->addElement('hidden', 'thematic_plan_token', $token);
         $form->addElement('hidden', 'thematic_id', $thematic_id);
@@ -46,17 +46,17 @@ if ($action == 'thematic_plan_list') {
         foreach ($default_thematic_plan_title as $id => $title) {
             $form->addElement('hidden', 'description_type['.$id.']', $id);
             $form->addText('title['.$id.']', get_lang('Title'), false, array('size'=>'50'));
-			$form->addHtmlEditor(
-				'description['.$id.']',
-				get_lang('Description'),
-				false,
-				false,
-				array(
-					'ToolbarStartExpanded' => 'false',
-					'ToolbarSet' => 'TrainingDescription',
-					'Height' => '150'
-				)
-			);
+            $form->addHtmlEditor(
+               'description['.$id.']',
+               get_lang('Description'),
+               false,
+               false,
+               array(
+                   'ToolbarStartExpanded' => 'false',
+                   'ToolbarSet' => 'TrainingDescription',
+                   'Height' => '150'
+               )
+            );
 
             if (!empty($thematic_simple_list) && in_array($id, $thematic_simple_list)) {
                 $thematic_plan = $new_thematic_plan_data[$id];
@@ -70,56 +70,56 @@ if ($action == 'thematic_plan_list') {
                 $default['description['.$id.']']= '';
             }
             $form->setDefaults($default);
-		}
+        }
         $form->addButtonSave(get_lang('Save'));
         $form->display();
-} else if ($action == 'thematic_plan_add' || $action == 'thematic_plan_edit') {
-	if ($description_type >= ADD_THEMATIC_PLAN) {
-		$header_form = get_lang('NewBloc');
-	} else {
-		$header_form = $default_thematic_plan_title[$description_type];
-	}
-	if (!$error) {
-		$token = md5(uniqid(rand(),TRUE));
-		$_SESSION['thematic_plan_token'] = $token;
-	}
+} elseif ($action == 'thematic_plan_add' || $action == 'thematic_plan_edit') {
+    if ($description_type >= ADD_THEMATIC_PLAN) {
+        $header_form = get_lang('NewBloc');
+    } else {
+        $header_form = $default_thematic_plan_title[$description_type];
+    }
+    if (!$error) {
+        $token = md5(uniqid(rand(),TRUE));
+        $_SESSION['thematic_plan_token'] = $token;
+    }
 
-	// display form
-	$form = new FormValidator('thematic_plan_add','POST','index.php?action=thematic_plan_edit&thematic_id='.$thematic_id.'&'.api_get_cidreq().$param_gradebook,'','style="width: 100%;"');
-	//$form->addElement('header', '', $header_form);
-	$form->addElement('hidden', 'action', $action);
-	$form->addElement('hidden', 'thematic_plan_token', $token);
+    // display form
+    $form = new FormValidator('thematic_plan_add','POST','index.php?action=thematic_plan_edit&thematic_id='.$thematic_id.'&'.api_get_cidreq().$param_gradebook,'','style="width: 100%;"');
+    //$form->addElement('header', '', $header_form);
+    $form->addElement('hidden', 'action', $action);
+    $form->addElement('hidden', 'thematic_plan_token', $token);
 
-	if (!empty($thematic_id)) {
-		$form->addElement('hidden', 'thematic_id', $thematic_id);
-	}
-	if (!empty($description_type)) {
-		$form->addElement('hidden', 'description_type', $description_type);
-	}
+    if (!empty($thematic_id)) {
+        $form->addElement('hidden', 'thematic_id', $thematic_id);
+    }
+    if (!empty($description_type)) {
+        $form->addElement('hidden', 'description_type', $description_type);
+    }
 
-	$form->addText('title', get_lang('Title'), true, array('size'=>'50'));
-	$form->addHtmlEditor('description', get_lang('Description'), false, false, array('ToolbarStartExpanded'=>'false', 'ToolbarSet' => 'TrainingDescription', 'Width' => '80%', 'Height' => '150'));
-	$form->addButtonSave(get_lang('Save'));
+    $form->addText('title', get_lang('Title'), true, array('size'=>'50'));
+    $form->addHtmlEditor('description', get_lang('Description'), false, false, array('ToolbarStartExpanded'=>'false', 'ToolbarSet' => 'TrainingDescription', 'Width' => '80%', 'Height' => '150'));
+    $form->addButtonSave(get_lang('Save'));
 
-	if ($description_type < ADD_THEMATIC_PLAN) {
-		$default['title'] = $default_thematic_plan_title[$description_type];
-	}
-	if (!empty($thematic_plan_data)) {
-		// set default values
-		$default['title'] = $thematic_plan_data[0]['title'];
-		$default['description'] = $thematic_plan_data[0]['description'];
-	}
-	$form->setDefaults($default);
+    if ($description_type < ADD_THEMATIC_PLAN) {
+        $default['title'] = $default_thematic_plan_title[$description_type];
+    }
+    if (!empty($thematic_plan_data)) {
+        // set default values
+        $default['title'] = $thematic_plan_data[0]['title'];
+        $default['description'] = $thematic_plan_data[0]['description'];
+    }
+    $form->setDefaults($default);
 
-	if (isset($default_thematic_plan_question[$description_type])) {
-		$message = '<strong>'.get_lang('QuestionPlan').'</strong><br />';
-		$message .= $default_thematic_plan_question[$description_type];
-		Display::display_normal_message($message, false);
-	}
+    if (isset($default_thematic_plan_question[$description_type])) {
+        $message = '<strong>'.get_lang('QuestionPlan').'</strong><br />';
+        $message .= $default_thematic_plan_question[$description_type];
+        Display::display_normal_message($message, false);
+    }
 
-	// error messages
-	if ($error) {
-		Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false);
-	}
-	$form->display();
+    // error messages
+    if ($error) {
+        Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false);
+    }
+    $form->display();
 }

+ 2 - 2
main/cron/remind_course_expiration.php

@@ -20,11 +20,11 @@ if (!$isActive) {
     exit;
 }
 
-$frecuency = api_get_setting('cron_remind_course_expiration_frecuency');
+$frequency = api_get_setting('cron_remind_course_expiration_frequency');
 
 // Days before expiration date to send reminders
 $today = gmdate("Y-m-d");
-$expirationDate = gmdate("Y-m-d", strtotime("$today + $frecuency day"));
+$expirationDate = gmdate("Y-m-d", strtotime("$today + $frequency day"));
 
 $gradebookTable = Database::get_main_table(TABLE_MAIN_GRADEBOOK_CATEGORY);
 $certificateTable = Database::get_main_table(TABLE_MAIN_GRADEBOOK_CERTIFICATE);

BIN=BIN
main/img/icons/16/attendance.png


+ 6 - 6
main/inc/lib/extra_field.lib.php

@@ -342,10 +342,10 @@ class ExtraField extends Model
         $types[self::FIELD_TYPE_LETTERS_ONLY] = get_lang('FieldTypeOnlyLetters');
         $types[self::FIELD_TYPE_ALPHANUMERIC] = get_lang('FieldTypeAlphanumeric');
         $types[self::FIELD_TYPE_LETTERS_SPACE] = get_lang(
-            'FieldTypeLettersSpace'
+            'FieldTypeLettersSpaces'
         );
         $types[self::FIELD_TYPE_ALPHANUMERIC_SPACE] = get_lang(
-            'FieldTypeNoPunctuation'
+            'FieldTypeAlphanumericSpaces'
         );
 
         switch ($handler) {
@@ -1455,7 +1455,7 @@ EOF;
                         );
                         break;
                     case ExtraField::FIELD_TYPE_LETTERS_ONLY:
-                        $form->addLettersOnly(
+                        $form->addTextLettersOnly(
                             "extra_{$field_details['variable']}",
                             $field_details['display_text']
                         );
@@ -1470,7 +1470,7 @@ EOF;
                         }
                         break;
                     case ExtraField::FIELD_TYPE_ALPHANUMERIC:
-                        $form->addAlphanumeric(
+                        $form->addTextAlphanumeric(
                             "extra_{$field_details['variable']}",
                             $field_details['display_text']
                         );
@@ -1487,7 +1487,7 @@ EOF;
                         }
                         break;
                     case ExtraField::FIELD_TYPE_LETTERS_SPACE:
-                        $form->addLettersAndSpaces(
+                        $form->addTextLettersAndSpaces(
                             "extra_{$field_details['variable']}",
                             $field_details['display_text']
                         );
@@ -1502,7 +1502,7 @@ EOF;
                         }
                         break;
                     case ExtraField::FIELD_TYPE_ALPHANUMERIC_SPACE:
-                        $form->addAlphanumericAndSpaces(
+                        $form->addTextAlphanumericAndSpaces(
                             "extra_{$field_details['variable']}",
                             $field_details['display_text']
                         );

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

@@ -61,8 +61,15 @@ class DatePicker extends HTML_QuickForm_text
 
         $js .= "<script>
             $(function() {
-                $('#$id').datepicker({
-                    dateFormat: 'yy-mm-dd'
+                $('#$id').hide().datepicker({
+                    defaultDate: '" . $this->getValue() . "',
+                    dateFormat: 'yy-mm-dd',
+                    altField: '#{$id}_alt',
+                    altFormat: \"" . get_lang('DateFormatLongNoDayJS') . "\",
+                    showOn: 'both',
+                    buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true) . "',
+                    buttonImageOnly: true,
+                    buttonText: '" . get_lang('SelectDate') . "'
                 });
             });
         </script>";
@@ -70,4 +77,100 @@ class DatePicker extends HTML_QuickForm_text
         return $js;
     }
 
+    /**
+     * @param string $layout
+     *
+     * @return string
+     */
+    public function getTemplate($layout)
+    {
+        $size = $this->getColumnsSize();
+        $id = $this->getAttribute('id');
+        $value = $this->getValue();
+
+        if (empty($size)) {
+            $sizeTemp = $this->getInputSize();
+            if (empty($size)) {
+                $sizeTemp = 8;
+            }
+            $size = array(2, $sizeTemp, 2);
+        } else {
+            if (is_array($size)) {
+                if (count($size) != 3) {
+                    $sizeTemp = $this->getInputSize();
+                    if (empty($size)) {
+                        $sizeTemp = 8;
+                    }
+                    $size = array(2, $sizeTemp, 2);
+                }
+                // else just keep the $size array as received
+            } else {
+                $size = array(2, intval($size), 2);
+            }
+        }
+
+        if (!empty($value)) {
+            $value = api_format_date($value, DATE_FORMAT_LONG_NO_DAY);
+        }
+
+        switch ($layout) {
+            case FormValidator::LAYOUT_INLINE:
+                return '
+                <div class="form-group {error_class}">
+                    <label {label-for} >
+                        <!-- BEGIN required --><span class="form_required">*</span><!-- END required -->
+                        {label}
+                    </label>
+
+                    <div class="input-group">
+                        <span class="input-group-addon cursor-pointer">
+                            {element}
+                        </span>
+                        <input class="form-control" type="text" readonly id="' . $id . '_alt" value="' . $value . '">
+                    </div>
+                </div>';
+                break;
+            case FormValidator::LAYOUT_HORIZONTAL:
+                return '
+                <div class="form-group {error_class}">
+                    <label {label-for} class="col-sm-'.$size[0].' control-label" >
+                        <!-- BEGIN required --><span class="form_required">*</span><!-- END required -->
+                        {label}
+                    </label>
+                    <div class="col-sm-'.$size[1].'">
+                        {icon}
+
+                        <div class="input-group">
+                            <span class="input-group-addon">
+                                {element}
+                            </span>
+                            <input class="form-control" type="text" readonly id="' . $id . '_alt" value="' . $value . '">
+                        </div>
+
+                        <!-- BEGIN label_2 -->
+                            <p class="help-block">{label_2}</p>
+                        <!-- END label_2 -->
+
+                        <!-- BEGIN error -->
+                            <span class="help-inline">{error}</span>
+                        <!-- END error -->
+                    </div>
+                    <div class="col-sm-'.$size[2].'">
+                        <!-- BEGIN label_3 -->
+                            {label_3}
+                        <!-- END label_3 -->
+                    </div>
+                </div>';
+                break;
+            case FormValidator::LAYOUT_BOX_NO_LABEL:
+                return '
+                        <div class="input-group">
+                            {icon}
+                            {element}
+                            <input class="form-control" type="text" readonly id="' . $id . '_alt" value="' . $value . '">
+                        </div>';
+                break;
+        }
+    }
+
 }

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

@@ -55,13 +55,120 @@ class DateTimePicker extends HTML_QuickForm_text
         //timeFormat: 'hh:mm'
         $js .= "<script>
             $(function() {
-                $('#$id').datetimepicker({
+                $('#$id').hide().datetimepicker({
+                    defaultDate: '" . $this->getValue() . "',
                     dateFormat: 'yy-mm-dd',
-                    timeFormat: 'HH:mm'
+                    timeFormat: 'HH:mm',
+                    altField: '#{$id}_alt',
+                    altFormat: \"" . get_lang('DateFormatLongNoDayJS') . "\",
+                    altTimeFormat: \"" . get_lang('TimeFormatNoSecJS') . "\",
+                    altSeparator: \" " . get_lang('AtTime') . " \",
+                    altFieldTimeOnly: false,
+                    showOn: 'both',
+                    buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true) . "',
+                    buttonImageOnly: true,
+                    buttonText: '" . get_lang('SelectDate') . "'
                 });
             });
         </script>";
 
         return $js;
     }
+
+    /**
+     * @param string $layout
+     *
+     * @return string
+     */
+    public function getTemplate($layout)
+    {
+        $size = $this->getColumnsSize();
+        $id = $this->getAttribute('id');
+        $value = $this->getValue();
+
+        if (empty($size)) {
+            $sizeTemp = $this->getInputSize();
+            if (empty($size)) {
+                $sizeTemp = 8;
+            }
+            $size = array(2, $sizeTemp, 2);
+        } else {
+            if (is_array($size)) {
+                if (count($size) != 3) {
+                    $sizeTemp = $this->getInputSize();
+                    if (empty($size)) {
+                        $sizeTemp = 8;
+                    }
+                    $size = array(2, $sizeTemp, 2);
+                }
+                // else just keep the $size array as received
+            } else {
+                $size = array(2, intval($size), 2);
+            }
+        }
+
+        if (!empty($value)) {
+            $value = api_format_date($value, DATE_TIME_FORMAT_LONG_24H);
+        }
+
+        switch ($layout) {
+            case FormValidator::LAYOUT_INLINE:
+                return '
+                <div class="form-group {error_class}">
+                    <label {label-for} >
+                        <!-- BEGIN required --><span class="form_required">*</span><!-- END required -->
+                        {label}
+                    </label>
+
+                    <div class="input-group">
+                        <span class="input-group-addon">
+                            {element}
+                        </span>
+                        <input class="form-control" type="text" readonly id="' . $id . '_alt" value="' . $value . '">
+                    </div>
+                </div>';
+                break;
+            case FormValidator::LAYOUT_HORIZONTAL:
+                return '
+                <div class="form-group {error_class}">
+                    <label {label-for} class="col-sm-'.$size[0].' control-label" >
+                        <!-- BEGIN required --><span class="form_required">*</span><!-- END required -->
+                        {label}
+                    </label>
+                    <div class="col-sm-'.$size[1].'">
+                        {icon}
+
+                        <div class="input-group">
+                            <span class="input-group-addon cursor-pointer">
+                                {element}
+                            </span>
+                            <input class="form-control" type="text" readonly id="' . $id . '_alt" value="' . $value . '">
+                        </div>
+
+                        <!-- BEGIN label_2 -->
+                            <p class="help-block">{label_2}</p>
+                        <!-- END label_2 -->
+
+                        <!-- BEGIN error -->
+                            <span class="help-inline">{error}</span>
+                        <!-- END error -->
+                    </div>
+                    <div class="col-sm-'.$size[2].'">
+                        <!-- BEGIN label_3 -->
+                            {label_3}
+                        <!-- END label_3 -->
+                    </div>
+                </div>';
+                break;
+            case FormValidator::LAYOUT_BOX_NO_LABEL:
+                return '
+                        <div class="input-group">
+                            {icon}
+                            {element}
+                            <input class="form-control" type="text" readonly id="' . $id . '_alt" value="' . $value . '">
+                        </div>';
+                break;
+        }
+    }
+
 }

+ 7 - 7
main/inc/lib/formvalidator/FormValidator.class.php

@@ -1040,7 +1040,7 @@ EOT;
      * @param bool $required	Optional. Is the form-element required (default=true)
      * @param array $attributes Optional. List of attributes for the form-element
      */
-    public function addLettersOnly(
+    public function addTextLettersOnly(
         $name,
         $label,
         $required = false,
@@ -1087,7 +1087,7 @@ EOT;
      * @param bool $required	Optional. Is the form-element required (default=true)
      * @param array $attributes Optional. List of attributes for the form-element
      */
-    public function addAlphanumeric(
+    public function addTextAlphanumeric(
         $name,
         $label,
         $required = false,
@@ -1134,7 +1134,7 @@ EOT;
      * @param bool $required	Optional. Is the form-element required (default=true)
      * @param array $attributes Optional. List of attributes for the form-element
      */
-    public function addLettersAndSpaces(
+    public function addTextLettersAndSpaces(
         $name,
         $label,
         $required = false,
@@ -1145,7 +1145,7 @@ EOT;
             $attributes,
             [
                 'pattern' => '[a-zA-ZñÑ\s]+',
-                'title' => get_lang('OnlyLettersAndSpace')
+                'title' => get_lang('OnlyLettersAndSpaces')
             ]
         );
 
@@ -1154,7 +1154,7 @@ EOT;
             $name,
             [
                 $label,
-                get_lang('OnlyLettersAndSpace')
+                get_lang('OnlyLettersAndSpaces')
             ],
             $attributes
         );
@@ -1167,7 +1167,7 @@ EOT;
 
         $this->addRule(
             $name,
-            get_lang('OnlyLettersAndSpace'),
+            get_lang('OnlyLettersAndSpaces'),
             'regex',
             '/^[a-zA-ZñÑ\s]+$/'
         );
@@ -1181,7 +1181,7 @@ EOT;
      * @param bool $required	Optional. Is the form-element required (default=true)
      * @param array $attributes Optional. List of attributes for the form-element
      */
-    public function addAlphanumericAndSpaces(
+    public function addTextAlphanumericAndSpaces(
         $name,
         $label,
         $required = false,

+ 5 - 7
main/inc/lib/social.lib.php

@@ -893,16 +893,14 @@ class SocialManager extends UserManager
 
             $user_rol = $user_info['status'] == 1 ? Display::return_icon('teacher.png',get_lang('Teacher'),null,ICON_SIZE_TINY) : Display::return_icon('user.png',get_lang('Student'),null,ICON_SIZE_TINY);
             $status_icon_chat = null;
-            if($user_info['user_is_online_in_chat'] == 1){
-                $status_icon_chat = Display::return_icon('online.png',get_lang('Online'));
-            }else{
-                $status_icon_chat = Display::return_icon('offline.png',get_lang('Offline'));
+            if ($user_info['user_is_online_in_chat'] == 1) {
+                $status_icon_chat = Display::return_icon('online.png', get_lang('Online'));
+            } else {
+                $status_icon_chat = Display::return_icon('offline.png', get_lang('Offline'));
             }
 
-            if($user_info)
-
             $userPicture = $user_info['avatar'];
-            $img = '<img class="img-responsive img-circle" title = "'.$completeName.'" alt="'.$completeName.'" src="'.$userPicture.'">';
+            $img = '<img class="img-responsive img-circle" title="'.$completeName.'" alt="'.$completeName.'" src="'.$userPicture.'">';
 
             $url =  null;
             // Anonymous users can't have access to the profile

+ 3 - 3
main/install/data.sql

@@ -311,9 +311,9 @@ VALUES
 ('allow_teachers_to_create_sessions', NULL, 'radio', 'Session', 'false', 'AllowTeachersToCreateSessionsTitle', 'AllowTeachersToCreateSessionsComment', NULL, NULL, 0),
 ('institution_address',NULL,'textfield','Platform','','InstitutionAddressTitle','InstitutionAddressComment',NULL,NULL, 1),
 ('chamilo_database_version', NULL, 'textfield', NULL, '0', 'DatabaseVersion', '', NULL, NULL, 0),
-('cron_remind_course_finished_activate', NULL, 'radio', 'Crons', 'false', 'CronRemingCourseFinishedActivateText', 'CronRemingCourseFinishedActivateComment', NULL, NULL, 1),
-('cron_remind_course_expiration_frecuency', NULL, 'textfield', 'Crons', '2', 'CronRemingCourseExpirationFrecuencyText', 'CronRemingCourseExpirationFrecuencyComment', NULL, NULL, 1),
-('cron_remind_course_expiration_activate', NULL, 'radio', 'Crons', 'false', 'CronRemingCourseExpirationActivateText', 'CronRemingCourseExpirationActivateComment', NULL, NULL, 1);
+('cron_remind_course_finished_activate', NULL, 'radio', 'Crons', 'false', 'CronRemindCourseFinishedActivateTitle', 'CronRemindCourseFinishedActivateComment', NULL, NULL, 1),
+('cron_remind_course_expiration_frequency', NULL, 'textfield', 'Crons', '2', 'CronRemindCourseExpirationFrequencyTitle', 'CronRemindCourseExpirationFrequencyComment', NULL, NULL, 1),
+('cron_remind_course_expiration_activate', NULL, 'radio', 'Crons', 'false', 'CronRemindCourseExpirationActivateTitle', 'CronRemindCourseExpirationActivateComment', NULL, NULL, 1);
 
 INSERT INTO settings_options (variable, value, display_text)
 VALUES

+ 24 - 4
main/install/index.php

@@ -148,6 +148,7 @@ $is_valid_request = isset($_REQUEST['is_executable']) ? $_REQUEST['is_executable
 $badUpdatePath = false;
 $emptyUpdatePath = true;
 $proposedUpdatePath = '';
+
 if (!empty($_POST['updatePath'])) {
     $proposedUpdatePath = $_POST['updatePath'];
 }
@@ -229,6 +230,9 @@ if (!isset($_GET['running'])) {
     $allowSelfRegProf = 1;
     $encryptPassForm = 'sha1';
     $session_lifetime = 360000;
+    if (!empty($_GET['profile'])) {
+        $installationProfile = api_htmlentities($_GET['profile'], ENT_QUOTES);
+    }
 } else {
     foreach ($_POST as $key => $val) {
         $magic_quotes_gpc = ini_get('magic_quotes_gpc');
@@ -405,6 +409,12 @@ if ($installType == 'new') {
 
 if (!empty($instalation_type_label) && empty($_POST['step6'])) {
     echo '<div class="page-header"><h2>'.$instalation_type_label.'</h2></div>';
+}
+if (empty($installationProfile)) {
+    $installationProfile = '';
+    if (!empty($_POST['installationProfile'])) {
+        $installationProfile = api_htmlentities($_POST['installationProfile']);
+    }
 }
     ?>
     <input type="hidden" name="updatePath"         value="<?php if (!$badUpdatePath) echo api_htmlentities($proposedUpdatePath, ENT_QUOTES); ?>" />
@@ -435,6 +445,7 @@ if (!empty($instalation_type_label) && empty($_POST['step6'])) {
     <input type="hidden" name="session_lifetime"   value="<?php echo api_htmlentities($session_lifetime, ENT_QUOTES); ?>" />
     <input type="hidden" name="old_version"        value="<?php echo api_htmlentities($my_old_version, ENT_QUOTES); ?>" />
     <input type="hidden" name="new_version"        value="<?php echo api_htmlentities($new_version, ENT_QUOTES); ?>" />
+    <input type="hidden" name="installationProfile" value="<?php echo api_htmlentities($installationProfile, ENT_QUOTES); ?>" />
 <?php
 
 if (@$_POST['step2']) {
@@ -447,7 +458,8 @@ if (@$_POST['step2']) {
         $dbHostForm,
         $dbUsernameForm,
         $dbPassForm,
-        $dbNameForm
+        $dbNameForm,
+        $installationProfile
     );
 } elseif (@$_POST['step4']) {
     //STEP 5 : CONFIGURATION SETTINGS
@@ -617,8 +629,11 @@ if (@$_POST['step2']) {
         $msg = get_lang('UpdateExecution');
     }
     echo '<div class="RequirementHeading">
-          <h2>'.display_step_sequence().$msg.'</h2>
-          <div id="pleasewait" class="alert alert-success">'.get_lang('PleaseWaitThisCouldTakeAWhile').'
+          <h2>'.display_step_sequence().$msg.'</h2>';
+    if (!empty($installationProfile)) {
+        echo '    <h3>('.$installationProfile.')</h3>';
+    }
+    echo '    <div id="pleasewait" class="alert alert-success">'.get_lang('PleaseWaitThisCouldTakeAWhile').'
 
           <div class="progress">
           <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%">
@@ -756,7 +771,8 @@ if (@$_POST['step2']) {
             $institutionUrlForm,
             $campusForm,
             $allowSelfReg,
-            $allowSelfRegProf
+            $allowSelfRegProf,
+            $installationProfile
         );
 
         include 'install_files.inc.php';
@@ -776,6 +792,10 @@ if (@$_POST['step2']) {
 } else {
     // This is the start screen.
     display_language_selection();
+    if (!empty($_GET['profile'])) {
+        $installationProfile = api_htmlentities($_GET['profile'], ENT_QUOTES);
+    }
+    echo '<input type="hidden" name="installationProfile" value="'.api_htmlentities($installationProfile, ENT_QUOTES).'" />';
 }
 
 $poweredBy = 'Powered by <a href="http://www.chamilo.org" target="_blank"> Chamilo </a> &copy; '.date('Y');

+ 98 - 10
main/install/install.lib.php

@@ -503,10 +503,6 @@ function get_config_param($param, $updatePath = '')
 
 /**
  * Gets a configuration parameter from the database. Returns returns null on failure.
- * @param   string  $host DB Host
- * @param   string  $login DB login
- * @param   string  $pass DB pass
- * @param   string  $dbName DB name
  * @param   string  $param Name of param we want
  * @return  mixed   The parameter value or null if not found
  */
@@ -663,7 +659,7 @@ function display_language_selection()
  * @param string $installType
  * @param boolean $badUpdatePath
  * @param boolean $badUpdatePath
- * @param string The updatePath given (if given)
+ * @param string $updatePath The updatePath given (if given)
  * @param array $update_from_version_8 The different subversions from version 1.9
  *
  * @author unknow
@@ -1295,13 +1291,20 @@ function displayDatabaseParameter(
  * Displays step 3 - a form where the user can enter the installation settings
  * regarding the databases - login and password, names, prefixes, single
  * or multiple databases, tracking or not...
+ * @param string $installType
+ * @param string $dbHostForm
+ * @param string $dbUsernameForm
+ * @param string $dbPassForm
+ * @param string $dbNameForm
+ * @param string $installationProfile
  */
 function display_database_settings_form(
     $installType,
     $dbHostForm,
     $dbUsernameForm,
     $dbPassForm,
-    $dbNameForm
+    $dbNameForm,
+    $installationProfile = ''
 ) {
     if ($installType == 'update') {
         global $_configuration;
@@ -1450,6 +1453,11 @@ function display_database_settings_form(
 /**
  * Displays a parameter in a table row.
  * Used by the display_configuration_settings_form function.
+ * @param string $installType
+ * @param string $parameterName
+ * @param string $formFieldName
+ * @param string $parameterValue
+ * @param string $displayWhenUpdate
  */
 function display_configuration_parameter(
     $installType,
@@ -1470,6 +1478,21 @@ function display_configuration_parameter(
 
 /**
  * Displays step 4 of the installation - configuration settings about Chamilo itself.
+ * @param string $installType
+ * @param string $urlForm
+ * @param string $languageForm
+ * @param string $emailForm
+ * @param string $adminFirstName
+ * @param string $adminLastName
+ * @param string $adminPhoneForm
+ * @param string $campusForm
+ * @param string $institutionForm
+ * @param string $institutionUrlForm
+ * @param string $encryptPassForm
+ * @param bool $allowSelfReg
+ * @param bool $allowSelfRegProf
+ * @param string $loginForm
+ * @param string $passForm
  */
 function display_configuration_settings_form(
     $installType,
@@ -1644,6 +1667,7 @@ function display_configuration_settings_form(
 
 /**
  * After installation is completed (step 6), this message is displayed.
+ * @param string $installType
  */
 function display_after_install_message($installType)
 {
@@ -1663,7 +1687,7 @@ function display_after_install_message($installType)
 
 /**
  * This function return countries list from array (hardcoded)
- * @param   bool    (Optional) True for returning countries list with select html
+ * @param   bool  $combo  (Optional) True for returning countries list with select html
  * @return  array|string countries list
  */
 function get_countries_list_from_array($combo = false)
@@ -1747,6 +1771,11 @@ function updateDirAndFilesPermissions()
     }
 }
 
+/**
+ * @param $current_value
+ * @param $wanted_value
+ * @return string
+ */
 function compare_setting_values($current_value, $wanted_value)
 {
     $current_value_string = $current_value;
@@ -1760,6 +1789,12 @@ function compare_setting_values($current_value, $wanted_value)
     }
 }
 
+/**
+ * @param $course_dir
+ * @param $course_attempt_name
+ * @param string $file
+ * @return bool
+ */
 function check_course_script_interpretation($course_dir, $course_attempt_name, $file = 'test.php')
 {
     $output = false;
@@ -1845,6 +1880,7 @@ function check_course_script_interpretation($course_dir, $course_attempt_name, $
  * @param string $language
  * @param string $allowRegistration
  * @param string $allowTeacherSelfRegistration
+ * @param string $installationProfile The name of an installation profile file in main/install/profiles/
  */
 function installSettings(
     $organizationName,
@@ -1855,7 +1891,8 @@ function installSettings(
     $adminFirstName,
     $language,
     $allowRegistration,
-    $allowTeacherSelfRegistration
+    $allowTeacherSelfRegistration,
+    $installationProfile = ''
 ) {
     $allowRegistration = $allowRegistration ? 'true' : 'false';
     $allowTeacherSelfRegistration = $allowTeacherSelfRegistration ? 'true' : 'false';
@@ -1879,6 +1916,7 @@ function installSettings(
                 WHERE variable = '$variable'";
         Database::query($sql);
     }
+    $res = installProfileSettings($installationProfile);
 }
 
 /**
@@ -2403,6 +2441,7 @@ function fixIds(EntityManager $em)
  * @param string $siteName
  * @param string $allowSelfReg
  * @param string $allowSelfRegProf
+ * @param string $installationProfile Installation profile, if any was provided
  */
 function finishInstallation(
     $manager,
@@ -2419,7 +2458,8 @@ function finishInstallation(
     $institutionUrlForm,
     $siteName,
     $allowSelfReg,
-    $allowSelfRegProf
+    $allowSelfRegProf,
+    $installationProfile = ''
 ) {
     $sysPath = !empty($sysPath) ? $sysPath : api_get_path(SYS_PATH);
 
@@ -2487,9 +2527,57 @@ function finishInstallation(
         $adminFirstName,
         $languageForm,
         $allowSelfReg,
-        $allowSelfRegProf
+        $allowSelfRegProf,
+        $installationProfile
     );
 
     lockSettings();
     updateDirAndFilesPermissions();
 }
+
+/**
+ * Update settings based on installation profile defined in a JSON file
+ * @param string $installationProfile The name of the JSON file in main/install/profiles/ folder
+ * @return bool false on failure (no bad consequences anyway, just ignoring profile)
+ */
+function installProfileSettings(
+    $installationProfile = ''
+) {
+    if (empty($installationProfile)) {
+        return false;
+    }
+    $jsonPath = api_get_path(SYS_PATH).'main/install/profiles/'.$installationProfile.'.json';
+    // Make sure the path to the profile is not hacked
+    if (!Security::check_abs_path($jsonPath, api_get_path(SYS_PATH).'main/install/profiles/')) {
+        return false;
+    }
+    if (!is_file($jsonPath)) {
+        return false;
+    }
+    if (!is_readable($jsonPath)) {
+        return false;
+    }
+    if (!function_exists('json_decode')) {
+        // The php-json extension is not available. Ignore profile.
+        return false;
+    }
+    $json = file_get_contents($jsonPath);
+    $params = json_decode($json);
+    if ($params === false or $params === null) {
+        return false;
+    }
+    $settings = $params->params;
+    if (!empty($params->parent)) {
+        $res = installProfileSettings($params->parent);
+    }
+    foreach ($settings as $id => $param) {
+        $sql = "UPDATE settings_current
+                SET selected_value = '".$param->selected_value."'
+                WHERE variable = '".$param->variable."'";
+        if (!empty($param->subkey)) {
+            $sql .= " AND subkey='" . $param->subkey . "'";
+        }
+        Database::query($sql);
+    }
+    return true;
+}

+ 19 - 0
main/install/profiles/README.md

@@ -0,0 +1,19 @@
+Installation profiles repository
+================================
+
+This folder contains installation profiles, that will pre-configure an
+installation process so no post-installation configuration is necessary if you
+already know what settings you want.
+
+The files are configured in JSON format and, at this time, will not be openly
+provided through the web installer interface. To install using one of these
+profiles, you will have to add a parameter to the URL manually.
+
+In step 1 of the installer, reload the page adding profile=[profile-name] at the
+end of the URL (where profile-name is the name of the file without the ".json"
+extension), like so (on the language selection page):
+```
+http://example.com/main/install/index.php?profile=hr
+```
+
+Also, the php-json extension has to be enabled.

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

@@ -0,0 +1,12 @@
+{
+    "id": 1,
+    "name": "HR",
+    "parent": "prod",
+    "params": [
+        {
+            "variable": "allow_skills_tool",
+            "subkey": "",
+            "selected_value": "true"
+        }
+    ]
+}

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

@@ -0,0 +1,21 @@
+{
+    "id": 1,
+    "name": "Production",
+    "params": [
+        {
+            "variable": "show_link_bug_notification",
+            "subkey": "",
+            "selected_value": "false"
+        },
+        {
+            "variable": "default_document_quotum",
+            "subkey": "",
+            "selected_value": "524288000"
+        },
+        {
+            "variable": "show_admin_toolbar",
+            "subkey": "",
+            "selected_value": "do_not_show"
+        }
+    ]
+}

+ 2 - 2
main/lang/arabic/trad4all.inc.php

@@ -1967,8 +1967,8 @@ $MyStats = "معاينة إحصائياتي";
 $Logout = "تسجيل خروج";
 $MyAgenda = "أجندتي";
 $CourseHomepage = "صفحة المقرر";
-$CourseManagerview = "معاينة واجهة المدرب";
-$StudentView = " معاينة واجهة الطلاب";
+$SwitchToTeacherView = "معاينة واجهة المدرب";
+$SwitchToStudentView = " معاينة واجهة الطلاب";
 $AddResource = "أضفه";
 $AddedResources = "مرفقات";
 $NameOfLang['arabic'] = "العربية";

+ 2 - 2
main/lang/asturian/trad4all.inc.php

@@ -2564,8 +2564,8 @@ $MyStats = "Ver les mios estadístiques";
 $Logout = "Colar";
 $MyAgenda = "La mio axenda";
 $CourseHomepage = "Páxina d'entamu del cursu";
-$CourseManagerview = "Dir a vista del profesor";
-$StudentView = "Vista d'estudiante";
+$SwitchToTeacherView = "Dir a vista del profesor";
+$SwitchToStudentView = "Vista d'estudiante";
 $AddResource = "Amestar recursu";
 $AddedResources = "Recursos amestaos";
 $NameOfLang['arabic'] = "árabe";

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

@@ -2655,8 +2655,8 @@ $MyStats = "Ikusi nire estatistikak";
 $Logout = "Saiotik atera";
 $MyAgenda = "Agenda pertsonala";
 $CourseHomepage = "Ikastaroaren orri nagusia";
-$CourseManagerview = "Irakaslearen ikuspegia";
-$StudentView = "Ikaslearen ikuspegia";
+$SwitchToTeacherView = "Irakaslearen ikuspegia";
+$SwitchToStudentView = "Ikaslearen ikuspegia";
 $AddResource = "Gehitu baliabidea";
 $AddedResources = "Baliabide erantsiak";
 $NameOfLang['arabic'] = "arabiera";

+ 2 - 2
main/lang/bengali/trad4all.inc.php

@@ -3044,8 +3044,8 @@ $MyStats = "Visualizar minhas estatísticas";
 $Logout = "Logout";
 $MyAgenda = "Minha agenda";
 $CourseHomepage = "Homepage do Curso";
-$CourseManagerview = "Visão do Professor";
-$StudentView = "Visão do Estudante";
+$SwitchToTeacherView = "Visão do Professor";
+$SwitchToStudentView = "Visão do Estudante";
 $AddResource = "Adicioná-lo";
 $AddedResources = "Recursos adicionados";
 $TimeReportForTeacherX = "Tempo de relatório para professor %s";

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

@@ -2549,8 +2549,8 @@ $MyStats = "Преглед на моите посещения";
 $Logout = "Напускане";
 $MyAgenda = "Моята програма";
 $CourseHomepage = "Страница на курса";
-$CourseManagerview = "Изглед за преподавателя";
-$StudentView = "Изглед за курсиста";
+$SwitchToTeacherView = "Изглед за преподавателя";
+$SwitchToStudentView = "Изглед за курсиста";
 $AddResource = "Добавяне";
 $AddedResources = "Прикрепени ресурси";
 $NameOfLang['arabic'] = "арабски";

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

@@ -2830,8 +2830,8 @@ $MyStats = "Veure les meves estadístiques";
 $Logout = "Sortir";
 $MyAgenda = "Agenda personal";
 $CourseHomepage = "Pàgina principal del curs";
-$CourseManagerview = "Vista del professor";
-$StudentView = "Vista de l'estudiant";
+$SwitchToTeacherView = "Vista del professor";
+$SwitchToStudentView = "Vista de l'estudiant";
 $AddResource = "Afegir";
 $AddedResources = "Annexes";
 $NameOfLang['arabic'] = "Àrab";

+ 2 - 2
main/lang/croatian/trad4all.inc.php

@@ -1747,8 +1747,8 @@ $MyStats = "Pogled u moju statistiku";
 $Logout = "Odjava";
 $MyAgenda = "Moj raspored";
 $CourseHomepage = "Početna stranica kolegija";
-$CourseManagerview = "Predavačev pogled";
-$StudentView = "Studentov pogled";
+$SwitchToTeacherView = "Predavačev pogled";
+$SwitchToStudentView = "Studentov pogled";
 $AddResource = "Dodaj";
 $AddedResources = "Prilozi";
 $NameOfLang['arabic'] = "arapski";

+ 2 - 2
main/lang/czech/trad4all.inc.php

@@ -1598,8 +1598,8 @@ $MyStats = "Zobraz mou statistiku";
 $Logout = "Odhlášení";
 $MyAgenda = "Moje Agenda";
 $CourseHomepage = "Domov kurzu";
-$CourseManagerview = "Pohled učitele";
-$StudentView = "Pohled studenta";
+$SwitchToTeacherView = "Pohled učitele";
+$SwitchToStudentView = "Pohled studenta";
 $AddResource = "Přidat zdroj";
 $AddedResources = "Přidané zdroje";
 $Close = "zavřít";

+ 2 - 2
main/lang/danish/trad4all.inc.php

@@ -1775,8 +1775,8 @@ $MyStats = "Se mine statistikker";
 $Logout = "Logud";
 $MyAgenda = "Min kalender";
 $CourseHomepage = "Kursusside";
-$CourseManagerview = "Se kursusside som underviser";
-$StudentView = "Se kursusside som deltager";
+$SwitchToTeacherView = "Se kursusside som underviser";
+$SwitchToStudentView = "Se kursusside som deltager";
 $AddResource = "Tilføj det";
 $AddedResources = "Vedhæftninger";
 $NameOfLang['arabic'] = "arabisk";

+ 3 - 3
main/lang/dari/trad4all.inc.php

@@ -2595,8 +2595,8 @@ $MyStats = "Toon mijn statistieken";
 $Logout = "Uitloggen";
 $MyAgenda = "Mijn agenda";
 $CourseHomepage = "Cursusstartpagina";
-$CourseManagerview = "Zicht als cursusbeheerder";
-$StudentView = "Zicht als student";
+$SwitchToTeacherView = "Zicht als cursusbeheerder";
+$SwitchToStudentView = "Zicht als student";
 $AddResource = "Materiaal toevoegen";
 $AddedResources = "Bijlagen";
 $NameOfLang['arabic'] = "Arabisch";
@@ -5503,4 +5503,4 @@ $List = "Lijst";
 $CourseDescriptions = "Cursus beschrijvingen";
 $GlossaryTermUpdated = "Termen aangepast";
 $DeleteAllGlossaryTerms = "Verwijder alle termen";
-?>
+?>

+ 21 - 5
main/lang/english/trad4all.inc.php

@@ -5832,7 +5832,7 @@ $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";
@@ -7447,10 +7447,10 @@ To set a the new password you need to activate it. To do this, please click this
 %s
 
 If you did not request this procedure, then please ignore this message. If you keep receiving it, please contact the portal administrator.";
-$CronRemindCourseExpirationActivateText = "Remind Course Expiration cron";
+$CronRemindCourseExpirationActivateTitle = "Remind Course Expiration cron";
 $CronRemindCourseExpirationActivateComment = "Enable the Remind Course Expiration cron";
-$CronRemindCourseExpirationFrecuencyText = "Frecuency for the Remind Course Expiration cron";
-$CronRemindCourseExpirationFrecuencyComment = "Number of days before the expiration of the course to consider to send reminder mail";
+$CronRemindCourseExpirationFrequencyTitle = "Frequency for the Remind Course Expiration cron";
+$CronRemindCourseExpirationFrequencyComment = "Number of days before the expiration of the course to consider to send reminder mail";
 $CronCourseFinishedActivateText = "Course Finished cron";
 $CronCourseFinishedActivateComment = "Activate the Course Finished cron";
 $MailCronCourseFinishedSubject = "End of course %s";
@@ -7472,4 +7472,20 @@ $AddAttachment = "Add attachment";
 $FieldTypeOnlyLetters = "Text only letters";
 $FieldTypeAlphanumeric = "Text only alphanumeric characters";
 $OnlyLetters = "Only letters";
-?>
+$SelectFillTheBlankSeparator = "Select a blanks marker";
+$RefreshBlanks = "Refresh terms";
+$WordTofind = "Word to find";
+$BlankInputSize = "Input size of box to fill";
+$DateFormatLongNoDayJS = "MM dd, yy";
+$TimeFormatNoSecJS = "HH:mm";
+$AtTime = " at";
+$SendSubscriptionNotification = "Send mail notification for subscription";
+$SendAnEmailWhenAUserBeingSubscribed = "Send an email when a user being subscribed to session";
+$SelectDate = "Select date";
+$OnlyLettersAndSpaces = "Only letters and spaces";
+$OnlyLettersAndNumbersAndSpaces = "Only letters, numbers and spaces";
+$FieldTypeLettersSpaces = "Text letters and spaces";
+$CronRemindCourseFinishedActivateTitle = "Send course finished notification";
+$FieldTypeAlphanumericSpaces = "Text alphanumeric characters and spaces";
+$CronRemindCourseFinishedActivateComment = "Whether to send an e-mail to students when their course (session) is finished. This requires cron tasks to be configured (see main/cron/ directory).";
+?>

+ 2 - 2
main/lang/esperanto/trad4all.inc.php

@@ -1540,8 +1540,8 @@ $MyStats = "Montru la statistikon";
 $Logout = "Adiaŭi";
 $MyAgenda = "Mia agendo";
 $CourseHomepage = "Kursaa hejmpaĝo";
-$CourseManagerview = "Kursmastrumanta vido";
-$StudentView = "Studenta vido";
+$SwitchToTeacherView = "Kursmastrumanta vido";
+$SwitchToStudentView = "Studenta vido";
 $AddResource = "Aldoni materialon";
 $AddedResources = "Aldonitaĵoj";
 $NameOfLang['arabic'] = "araba";

+ 2 - 2
main/lang/faroese/trad4all.inc.php

@@ -55,8 +55,8 @@ $Date = "Dato";
 $MyCourses = "Míni skeið";
 $ModifyProfile = "Vangamynd";
 $MyAgenda = "Kalendari";
-$CourseManagerview = "Vís sum undirvísari";
-$StudentView = "Vís sum næmingur";
+$SwitchToTeacherView = "Vís sum undirvísari";
+$SwitchToStudentView = "Vís sum næmingur";
 $Courses = "Skeið";
 $Home = "Heim";
 $SelectAll = "Vel alt";

+ 2 - 2
main/lang/finnish/trad4all.inc.php

@@ -1309,8 +1309,8 @@ $MyStats = "Katso tilastojasi";
 $Logout = "Logout";
 $MyAgenda = "Oma kalenteri";
 $CourseHomepage = "Kurssin kotisivu";
-$CourseManagerview = "Opettajanäkymä";
-$StudentView = "Oppilasnäkymä";
+$SwitchToTeacherView = "Opettajanäkymä";
+$SwitchToStudentView = "Oppilasnäkymä";
 $AddResource = "Lisää";
 $AddedResources = "Liitteet";
 $NameOfLang['arabic'] = "Arabia";

+ 10 - 3
main/lang/french/trad4all.inc.php

@@ -7436,10 +7436,10 @@ $LinkExpired = "Lien expiré, merci de recommencer la procédure.";
 $ResetPasswordInstructions = "Instructions de changement de mot de passe";
 $ResetPasswordCommentWithUrl = "Ce message vous est envoyé parce que vous (ou quelqu'un qui tente d'usurper votre identité) a demandé qu'un nouveau mot de passe soit généré pour votre compte. Pour configurer votre nouveau mot de passe, veuillez suivre le lien suivant: %s 
 Si vous n'avez rien demandé, vous pouvez ignorer ce message en toute tranquilité. Si vous n'avez rien demandé et que vous continuez de recevoir ces messages, merci de bien vouloir contacter l'administrateur du portail.";
-$CronRemindCourseExpirationActivateText = "Cron de rappel de fin de cours";
+$CronRemindCourseExpirationActivateTitle = "Cron de rappel de fin de cours";
 $CronRemindCourseExpirationActivateComment = "Activez cette option pour envoyer un e-mail de rappel quand la fin du cours (session) approche (requiert la configuration d'un processus cron sur le serveur).";
-$CronRemindCourseExpirationFrecuencyText = "Fréquence du rappel de fin de cours";
-$CronRemindCourseExpirationFrecuencyComment = "Quantité de jours avant la fin du cours (session) pour envoyer le rappel par e-mail. Par exemple, indiquez 7 pour envoyer un e-mail 7 jours avant la fin du cours.";
+$CronRemindCourseExpirationFrequencyTitle = "Fréquence du rappel de fin de cours";
+$CronRemindCourseExpirationFrequencyComment = "Quantité de jours avant la fin du cours (session) pour envoyer le rappel par e-mail. Par exemple, indiquez 7 pour envoyer un e-mail 7 jours avant la fin du cours.";
 $CronCourseFinishedActivateText = "Cron de fin du cours";
 $CronCourseFinishedActivateComment = "Activez pour envoyer un e-mail lorsque le cours est terminé";
 $MailCronCourseFinishedSubject = "Fin du cours: %s";
@@ -7456,4 +7456,11 @@ $XTeam = "Équipe %s";
 $YouCanStartSubscribingToCoursesEnteringToXUrl = "Vous pouvez vous inscrire à des cours en allant sur %s";
 $VideoUrl = "URL de vidéo";
 $AddAttachment = "Ajouter une pièce jointe";
+$FieldTypeOnlyLetters = "Texte de lettres exclusivement";
+$FieldTypeAlphanumeric = "Caractères alphanumériques (a-z,0-9,A-Z)";
+$OnlyLetters = "Lettres uniquement";
+$SelectFillTheBlankSeparator = "Marqueur pour les trous";
+$RefreshBlanks = "Rafraîchir les termes";
+$WordTofind = "Mot à trouver";
+$BlankInputSize = "Taille de la zone à remplir";
 ?>

+ 2 - 2
main/lang/friulian/trad4all.inc.php

@@ -3064,8 +3064,8 @@ $MyStats = "Ver as miñas estatísticas";
 $Logout = "Saír";
 $MyAgenda = "A miña axenda";
 $CourseHomepage = "Páxina inicial do curso";
-$CourseManagerview = "Vista do profesor";
-$StudentView = "Vista do alumno";
+$SwitchToTeacherView = "Vista do profesor";
+$SwitchToStudentView = "Vista do alumno";
 $AddResource = "Engadir recurso";
 $AddedResources = "Recursos engadidos";
 $TimeReportForTeacherX = "Informe de tempo profesor %s";

+ 2 - 2
main/lang/georgian/trad4all.inc.php

@@ -2605,8 +2605,8 @@ $MyStats = "Mein Fortschritt";
 $Logout = "Logout";
 $MyAgenda = "Mein Kalender";
 $CourseHomepage = "Kurs Home";
-$CourseManagerview = "Kursleiter-Ansicht";
-$StudentView = "Teilnehmer-Ansicht";
+$SwitchToTeacherView = "Kursleiter-Ansicht";
+$SwitchToStudentView = "Teilnehmer-Ansicht";
 $AddResource = "Hinzufügen";
 $AddedResources = "Anhänge";
 $NameOfLang['arabic'] = "Arabisch";

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

@@ -2584,8 +2584,8 @@ $MyStats = "Προβολή των στατιστικών μου";
 $Logout = "Έξοδος";
 $MyAgenda = "Η αντζέντα μου";
 $CourseHomepage = "Κεντρική σελίδα του μαθήματος";
-$CourseManagerview = "Όψη εκπαιδευτικού";
-$StudentView = "Όψη μαθητή";
+$SwitchToTeacherView = "Όψη εκπαιδευτικού";
+$SwitchToStudentView = "Όψη μαθητή";
 $AddResource = "Προσθήκη";
 $AddedResources = "Επισυνάψεις";
 $NameOfLang['arabic'] = "áñáâéêÜ";

+ 2 - 2
main/lang/hebrew/trad4all.inc.php

@@ -2006,8 +2006,8 @@ $MyStats = "Statisztikáim megtekintése";
 $Logout = "Kijelentkezés";
 $MyAgenda = "Az én naptáram";
 $CourseHomepage = "Kurzus főoldala";
-$CourseManagerview = "Oktatói nézet";
-$StudentView = "Felhasználói nézet";
+$SwitchToTeacherView = "Oktatói nézet";
+$SwitchToStudentView = "Felhasználói nézet";
 $AddResource = "Hozzáad";
 $AddedResources = "Csatolások";
 $NameOfLang['arabic'] = "arab";

+ 2 - 2
main/lang/indonesian/trad4all.inc.php

@@ -1369,8 +1369,8 @@ $MyStats = "Lihat statistik Ku";
 $Logout = "Logout";
 $MyAgenda = "Agenda-ku";
 $CourseHomepage = "Situs Mata Kuliah";
-$CourseManagerview = "Jendela Pengajar";
-$StudentView = "Jendela Siswa";
+$SwitchToTeacherView = "Jendela Pengajar";
+$SwitchToStudentView = "Jendela Siswa";
 $AddResource = "Tambahkan";
 $AddedResources = "Resource ditambahkan";
 $NameOfLang['arabic'] = "arab";

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

@@ -2567,8 +2567,8 @@ $MyStats = "Progressi personali";
 $Logout = "Esci";
 $MyAgenda = "La mia agenda";
 $CourseHomepage = "Pagina iniziale";
-$CourseManagerview = "Vista Docente";
-$StudentView = "Vista Corsista";
+$SwitchToTeacherView = "Vista Docente";
+$SwitchToStudentView = "Vista Corsista";
 $AddResource = "Aggiungi";
 $AddedResources = "Allegati";
 $NameOfLang['arabic'] = "Arabo";

+ 2 - 2
main/lang/japanese/trad4all.inc.php

@@ -720,8 +720,8 @@ $MyStats = "進行状況を表示";
 $Logout = "ログアウト";
 $MyAgenda = "個人用の予定表";
 $CourseHomepage = "コースのホーム";
-$CourseManagerview = "教員表示";
-$StudentView = "学生表示";
+$SwitchToTeacherView = "教員表示";
+$SwitchToStudentView = "学生表示";
 $Platform = "iCampus utilise la plate-forme";
 $Statistics = "統計情報";
 $Previous = "前へ";

+ 2 - 2
main/lang/korean/trad4all.inc.php

@@ -1098,8 +1098,8 @@ $MyStats = "내 통계정보 보기";
 $Logout = "로그아웃";
 $MyAgenda = "내 일정";
 $CourseHomepage = "과정 홈";
-$CourseManagerview = "교사 화면";
-$StudentView = "학생 화면";
+$SwitchToTeacherView = "교사 화면";
+$SwitchToStudentView = "학생 화면";
 $AddResource = "추가";
 $AddedResources = "첨부";
 $NameOfLang['arabic'] = "arabic";

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

@@ -2453,8 +2453,8 @@ $MyStats = "Statistika par manām darbībām kursos";
 $Logout = "Beigt darbu!";
 $MyAgenda = "Mans plānotājs";
 $CourseHomepage = "Uz Kursa sākuma lapu";
-$CourseManagerview = "Skatīt, kā Lektoram";
-$StudentView = "Skatīt, kā Kursantam";
+$SwitchToTeacherView = "Skatīt, kā Lektoram";
+$SwitchToStudentView = "Skatīt, kā Kursantam";
 $AddResource = "Pievienot to";
 $AddedResources = "Pielikumi";
 $NameOfLang['arabic'] = "ar&#257;bu";

+ 2 - 2
main/lang/lithuanian/trad4all.inc.php

@@ -1686,8 +1686,8 @@ $MyStats = "Mano statistika";
 $Logout = "Atsijungti";
 $MyAgenda = "Mano darbotvarkė";
 $CourseHomepage = "Kurso pagrindinis";
-$CourseManagerview = "Dėstytojo sąsaja";
-$StudentView = "Studento sąsaja";
+$SwitchToTeacherView = "Dėstytojo sąsaja";
+$SwitchToStudentView = "Studento sąsaja";
 $AddResource = "Pridėti tai";
 $AddedResources = "Prisegti failai";
 $Close = "uždaryti";

+ 2 - 2
main/lang/macedonian/trad4all.inc.php

@@ -1624,8 +1624,8 @@ $MyStats = "Прикажи ги моите статистики";
 $Logout = "Одјавување";
 $MyAgenda = "Мој календар";
 $CourseHomepage = "Почетна страна на Курсот";
-$CourseManagerview = "Поглед за Учителот";
-$StudentView = "Поглед за курсистот";
+$SwitchToTeacherView = "Поглед за Учителот";
+$SwitchToStudentView = "Поглед за курсистот";
 $AddResource = "Додај го";
 $AddedResources = "Прикачени";
 $NameOfLang['arabic'] = "&#1072;&#1088;&#1072;&#1087;&#1089;&#1082;&#1080;";

+ 2 - 2
main/lang/malay/trad4all.inc.php

@@ -603,8 +603,8 @@ $MyStats = "Vis min statistikk";
 $Logout = "Logg av";
 $MyAgenda = "Min agenda";
 $CourseHomepage = "Kursets hjemmeside";
-$CourseManagerview = "Lærervisning";
-$StudentView = "Studentvisning";
+$SwitchToTeacherView = "Lærervisning";
+$SwitchToStudentView = "Studentvisning";
 $AddResource = "Legg til";
 $AddedResources = "Vedlegg";
 $NameOfLang['arabic'] = "Arabisk";

+ 2 - 2
main/lang/occitan/trad4all.inc.php

@@ -276,8 +276,8 @@ $MyStats = "Veire meis estadisticas";
 $Logout = "Sortir";
 $MyAgenda = "Mon agenda";
 $CourseHomepage = "Acuelh";
-$CourseManagerview = "Vista dau professor";
-$StudentView = "Vista de l'estudiant";
+$SwitchToTeacherView = "Vista dau professor";
+$SwitchToStudentView = "Vista de l'estudiant";
 $AddedResources = "Apondons";
 $Close = "Plegar";
 $Platform = "Plataforma";

+ 2 - 2
main/lang/pashto/trad4all.inc.php

@@ -1957,8 +1957,8 @@ $MyStats = "دیدن روند پیشرفت";
 $Logout = "خروج";
 $MyAgenda = "تقویم من";
 $CourseHomepage = "صفحۀ اصلی درس";
-$CourseManagerview = "نمای استاد";
-$StudentView = "نمای دانشجو";
+$SwitchToTeacherView = "نمای استاد";
+$SwitchToStudentView = "نمای دانشجو";
 $AddResource = "این را بی افزایید";
 $AddedResources = "منابع مورد نظر افزوده شد";
 $NameOfLang['arabic'] = "&#1593;&#1585;&#1576;&#1740;";

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

@@ -2648,8 +2648,8 @@ $MyStats = "Pokaż moje statystyki";
 $Logout = "Wyloguj";
 $MyAgenda = "Mój kalendarz";
 $CourseHomepage = "Strona główna kursu";
-$CourseManagerview = "Widok administratora";
-$StudentView = "Widok studenta";
+$SwitchToTeacherView = "Widok administratora";
+$SwitchToStudentView = "Widok studenta";
 $AddResource = "Dodaj to";
 $AddedResources = "Załączniki";
 $NameOfLang['arabic'] = "arabski";

+ 2 - 2
main/lang/portuguese/trad4all.inc.php

@@ -2779,8 +2779,8 @@ $MyStats = "Visualizar o meu progresso";
 $Logout = "Sair";
 $MyAgenda = "Agenda pessoal";
 $CourseHomepage = "Página principal do curso";
-$CourseManagerview = "Modo de visualização do Instrutor";
-$StudentView = "Modo de visualização do Aluno";
+$SwitchToTeacherView = "Modo de visualização do Instrutor";
+$SwitchToStudentView = "Modo de visualização do Aluno";
 $AddResource = "Adicioná-lo";
 $AddedResources = "Anexos";
 $NameOfLang['arabic'] = "árabe";

+ 2 - 2
main/lang/quechua_cusco/trad4all.inc.php

@@ -2385,8 +2385,8 @@ $MyStats = "Qhawariy yupanaykunata";
 $Logout = "Lloqsiy";
 $MyAgenda = "Ruwanay";
 $CourseHomepage = "Yachachinamanta raphi qallariy";
-$CourseManagerview = "Yachachiq qhawariynin";
-$StudentView = "Yachaqe qhawariynin";
+$SwitchToTeacherView = "Yachachiq qhawariynin";
+$SwitchToStudentView = "Yachaqe qhawariynin";
 $AddResource = "Yapay yanapaysinata";
 $AddedResources = "Yanapaysikuna yapasqa";
 $Close = "wisqay";

+ 2 - 2
main/lang/romanian/trad4all.inc.php

@@ -2962,8 +2962,8 @@ $MyStats = "Vezi statisticile";
 $Logout = "Iesire";
 $MyAgenda = "Agenda mea";
 $CourseHomepage = "Pagina principala a cursului";
-$CourseManagerview = "Modul de vizualizare al profesorului";
-$StudentView = "Modul de vizualizare al studentului";
+$SwitchToTeacherView = "Modul de vizualizare al profesorului";
+$SwitchToStudentView = "Modul de vizualizare al studentului";
 $AddResource = "Adauga";
 $AddedResources = "Atasamente";
 $TimeReportForTeacherX = "Raport de timp profesor %s";

+ 2 - 2
main/lang/russian/trad4all.inc.php

@@ -1885,8 +1885,8 @@ $MyStats = "Просмотреть мою статистику";
 $Logout = "Выход из системы";
 $MyAgenda = "Мой порядок дня (расписание)";
 $CourseHomepage = "Домашняя страница курса";
-$CourseManagerview = "Вид преподавателя";
-$StudentView = "Вид студента";
+$SwitchToTeacherView = "Вид преподавателя";
+$SwitchToStudentView = "Вид студента";
 $AddResource = "Добавить это";
 $AddedResources = "Прикрепленные файлы";
 $NameOfLang['arabic'] = "арабский";

+ 2 - 2
main/lang/serbian/trad4all.inc.php

@@ -1586,8 +1586,8 @@ $MyStats = "Pogled na moje statistike";
 $Logout = "Odjava";
 $MyAgenda = "Moja agenda";
 $CourseHomepage = "Početna stranica kursa";
-$CourseManagerview = "Pogled predavača";
-$StudentView = "Pogled polaznika";
+$SwitchToTeacherView = "Pogled predavača";
+$SwitchToStudentView = "Pogled polaznika";
 $AddResource = "Dodaj";
 $AddedResources = "Resursi su dodati";
 $NameOfLang['arabic'] = "arapski";

+ 2 - 2
main/lang/simpl_chinese/trad4all.inc.php

@@ -1819,8 +1819,8 @@ $MyStats = "查看状态";
 $Logout = "退出";
 $MyAgenda = "日程安排";
 $CourseHomepage = "课程主页";
-$CourseManagerview = "教师视角";
-$StudentView = "学生视角";
+$SwitchToTeacherView = "教师视角";
+$SwitchToStudentView = "学生视角";
 $AddResource = "添加";
 $AddedResources = "附件";
 $NameOfLang['arabic'] = "阿拉伯语";

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

@@ -3113,8 +3113,8 @@ $MyStats = "Pozrieť moju štatistiku";
 $Logout = "Odhlásenie";
 $MyAgenda = "Moja agenda";
 $CourseHomepage = "Domov kurzu";
-$CourseManagerview = "Náhľad lektora";
-$StudentView = "Náhľad študenta";
+$SwitchToTeacherView = "Náhľad lektora";
+$SwitchToStudentView = "Náhľad študenta";
 $AddResource = "Pridať zdroj";
 $AddedResources = "Pridané zdroje";
 $TimeReportForTeacherX = "Čas správy učiteľa %s";

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

@@ -3051,8 +3051,8 @@ $MyStats = "Poglej moj napredek";
 $Logout = "Odjava";
 $MyAgenda = "Osebna agenda";
 $CourseHomepage = "Domača stran tečaja";
-$CourseManagerview = "Učiteljev pogled";
-$StudentView = "Uporabnikov pogled";
+$SwitchToTeacherView = "Učiteljev pogled";
+$SwitchToStudentView = "Uporabnikov pogled";
 $AddResource = "Dodaj";
 $AddedResources = "Priponke";
 $TimeReportForTeacherX = "Časovno poročilo za učitelja %s";

+ 19 - 3
main/lang/somali/trad4all.inc.php

@@ -7472,10 +7472,10 @@ $ResetPasswordInstructions = "Instrucciones para el procedimiento de cambio de c
 $ResetPasswordCommentWithUrl = "Ha recibido este mensaje porque Usted (o alguien que intenta hacerse pasar por Ud) ha pedido que su contraseña sea generada nuevamente. Para configurar una nueva contraseña, necesita activarla. Para ello, por favor de clic en el siguiente enlace: %s.
 
 Si no ha pedido un cambio de contraseña, puede ignorar este mensaje. No obstante, si vuelve a recibirlo repetidamente, por favor comuníquese con el administrador de su portal.";
-$CronRemindCourseExpirationActivateText = "Cron de Recordatorio de Expiración de Curso";
+$CronRemindCourseExpirationActivateTitle = "Cron de Recordatorio de Expiración de Curso";
 $CronRemindCourseExpirationActivateComment = "Habilitar el cron de envío de recordatorio de expiración de cursos";
-$CronRemindCourseExpirationFrecuencyText = "Frecuencia del recordatorio de expiración de curso";
-$CronRemindCourseExpirationFrecuencyComment = "Número de días antes de la expiración del curso a considerar para enviar el correo electrónico de recordatorio";
+$CronRemindCourseExpirationFrequencyTitle = "Frecuencia del recordatorio de expiración de curso";
+$CronRemindCourseExpirationFrequencyComment = "Número de días antes de la expiración del curso a considerar para enviar el correo electrónico de recordatorio";
 $CronCourseFinishedActivateText = "Cron de finalización de curso";
 $CronCourseFinishedActivateComment = "Activar el cron de finalización de curso";
 $MailCronCourseFinishedSubject = "Fin del curso %s";
@@ -7497,4 +7497,20 @@ $AddAttachment = "Añadir archivo adjunto";
 $FieldTypeOnlyLetters = "Texto de letras solamente";
 $FieldTypeAlphanumeric = "Texto de caracteres alfanuméricos";
 $OnlyLetters = "Sólo letras";
+$SelectFillTheBlankSeparator = "Marcador para los espacios en blanco";
+$RefreshBlanks = "Refrescar los blancos";
+$WordTofind = "Palabras por encontrar";
+$BlankInputSize = "Tamaño del espacio en blanco";
+$DateFormatLongNoDayJS = "dd 'de' MM 'de' yy";
+$TimeFormatNoSecJS = "HH'h':mm";
+$AtTime = "a las";
+$SendSubscriptionNotification = "Enviar notificación de suscripción por correo electrónico";
+$SendAnEmailWhenAUserBeingSubscribed = "Enviar un correo electrónico cuando un usuario está suscrito a la sesión";
+$SelectDate = "Seleccionar fecha";
+$OnlyLettersAndSpaces = "Sólo letras y espacios";
+$OnlyLettersAndNumbersAndSpaces = "Sólo letras, números y espacios";
+$FieldTypeLettersSpaces = "Texto de letras y espacios";
+$CronRemindCourseFinishedActivateTitle = "Enviar notificación de finalización de curso";
+$FieldTypeAlphanumericSpaces = "Texto de caracteres alfanuméricos y espacios";
+$CronRemindCourseFinishedActivateComment = "Enviar un correo electrónico a los estudiantes cuando su curso (o sesión) ha finalizado. Esto requiere tareas cron para ser configurado (ver directorio main/cron/).";
 ?>

+ 2 - 2
main/lang/spanish_latin/trad4all.inc.php

@@ -1485,8 +1485,8 @@ $MyStats = "Ver mis estadísticas";
 $Logout = "Salir";
 $MyAgenda = "Mi agenda";
 $CourseHomepage = "Página inicial del curso";
-$CourseManagerview = "Vista del profesor";
-$StudentView = "Vista del alumno";
+$SwitchToTeacherView = "Vista del profesor";
+$SwitchToStudentView = "Vista del alumno";
 $AddResource = "Añadir este recurso";
 $AddedResources = "Recursos añadidos";
 $NameOfLang['arabic'] = "árabe";

+ 2 - 2
main/lang/swahili/trad4all.inc.php

@@ -1897,8 +1897,8 @@ $MyStats = "Visa min statistik";
 $Logout = "Logga ut";
 $MyAgenda = "Min agenda";
 $CourseHomepage = "Kurshemsida";
-$CourseManagerview = "Lärarvy";
-$StudentView = "Studentvy";
+$SwitchToTeacherView = "Lärarvy";
+$SwitchToStudentView = "Studentvy";
 $AddResource = "Lägg till";
 $AddedResources = "Bilagor";
 $NameOfLang['arabic'] = "arabiska";

+ 2 - 2
main/lang/tagalog/trad4all.inc.php

@@ -598,8 +598,8 @@ $MyStats = "Tingan aking progreso";
 $Logout = "Mag-Logout";
 $MyAgenda = "Personal na agenda";
 $CourseHomepage = "Home ng kurso";
-$CourseManagerview = "Tanaw ng Guro";
-$StudentView = "Tanaw ng Mag-aaral";
+$SwitchToTeacherView = "Tanaw ng Guro";
+$SwitchToStudentView = "Tanaw ng Mag-aaral";
 $Statistics = "Istatistika";
 $Previous = "Nakaraan";
 $Courses = "Mga Kurso";

+ 2 - 2
main/lang/thai/trad4all.inc.php

@@ -1224,8 +1224,8 @@ $MyStats = "ดูสถิติการเข้าใช้งานระ
 $Logout = "ออกจากระบบ";
 $MyAgenda = "กำหนดการของเรา";
 $CourseHomepage = "โฮมเพจรายวิชา";
-$CourseManagerview = "หน้าแสดงผลของผู้สอน";
-$StudentView = "หน้าแสดงผลของผู้เรียน";
+$SwitchToTeacherView = "หน้าแสดงผลของผู้สอน";
+$SwitchToStudentView = "หน้าแสดงผลของผู้เรียน";
 $AddResource = "เพิ่ม";
 $AddedResources = "แนบไฟล์";
 $NameOfLang['arabic'] = "ÍÒËÃѺ";

+ 2 - 2
main/lang/tibetan/trad4all.inc.php

@@ -1777,8 +1777,8 @@ $MyStats = "檢視狀態";
 $Logout = "退出";
 $MyAgenda = "日程安排";
 $CourseHomepage = "課程主頁";
-$CourseManagerview = "教師界面";
-$StudentView = "學生界面";
+$SwitchToTeacherView = "教師界面";
+$SwitchToStudentView = "學生界面";
 $AddResource = "加入";
 $AddedResources = "附件";
 $Platform = "系統";

+ 2 - 2
main/lang/turkish/trad4all.inc.php

@@ -1809,8 +1809,8 @@ $MyStats = "İstatistiklerimi Göster";
 $Logout = "Çıkış";
 $MyAgenda = "Ajandam";
 $CourseHomepage = "Ders AnaSayfası";
-$CourseManagerview = "Öğretmen Görünümü";
-$StudentView = "Öğrenci Görünümü";
+$SwitchToTeacherView = "Öğretmen Görünümü";
+$SwitchToStudentView = "Öğrenci Görünümü";
 $AddResource = "Ekle";
 $AddedResources = "Ekler";
 $NameOfLang['arabic'] = "Arapça";

+ 2 - 2
main/lang/ukrainian/trad4all.inc.php

@@ -1353,8 +1353,8 @@ $MyStats = "Переглянути мою статистику";
 $Logout = "Вийти";
 $MyAgenda = "Мій календар";
 $CourseHomepage = "Домашня сторінка курсу";
-$CourseManagerview = "Вид викладача";
-$StudentView = "Вид студента";
+$SwitchToTeacherView = "Вид викладача";
+$SwitchToStudentView = "Вид студента";
 $AddResource = "Додати це";
 $AddedResources = "Додатки";
 $NameOfLang['arabic'] = "&#1072;&#1088;&#1072;&#1073;&#1089;&#1100;&#1082;&#1072;";

+ 19 - 17
main/lang/vietnamese/trad4all.inc.php

@@ -84,7 +84,7 @@ class learnpath
      * @param	string	$course Course code
      * @param	integer	$lp_id
      * @param	integer	$user_id
-     * @return	boolean	True on success, false on error
+     * @return mixed True on success, false on error
      */
     public function __construct($course, $lp_id, $user_id)
     {
@@ -418,6 +418,7 @@ class learnpath
         if ($this->debug > 2) {
             error_log('New LP - learnpath::__construct() ' . __LINE__ . ' - End of learnpath constructor for learnpath ' . $this->get_id(), 0);
         }
+        return true;
     }
 
     /**
@@ -553,15 +554,15 @@ class learnpath
         $typeCleaned = Database::escape_string($type);
         if ($type == 'quiz') {
             $sql = 'SELECT SUM(ponderation)
-					FROM ' . Database :: get_course_table(TABLE_QUIZ_QUESTION) . ' as quiz_question
+                    FROM ' . Database :: get_course_table(TABLE_QUIZ_QUESTION) . ' as quiz_question
                     INNER JOIN  ' . Database :: get_course_table(TABLE_QUIZ_TEST_QUESTION) . ' as quiz_rel_question
                     ON
                         quiz_question.id = quiz_rel_question.question_id AND
                         quiz_question.c_id = quiz_rel_question.c_id
                     WHERE
                         quiz_rel_question.exercice_id = '.$id." AND
-	            		quiz_question.c_id = $course_id AND
-	            		quiz_rel_question.c_id = $course_id ";
+                        quiz_question.c_id = $course_id AND
+                        quiz_rel_question.c_id = $course_id ";
             $rsQuiz = Database::query($sql);
             $max_score = Database :: result($rsQuiz, 0, 0);
 
@@ -1224,15 +1225,16 @@ class learnpath
 
     /**
      * Updates an item's content in place
-     * @param	integer	Element ID
-     * @param	integer	Parent item ID
-     * @param	integer Previous item ID
-     * @param   string	Item title
-     * @param   string  Item description
-     * @param   string  Prerequisites (optional)
-     * @param   string  Indexing terms (optional)
-     * @param   array   The array resulting of the $_FILES[mp3] element
-     * @return	boolean	True on success, false on error
+     * @param   integer $id Element ID
+     * @param   integer $parent Parent item ID
+     * @param   integer $previous Previous item ID
+     * @param   string  $title Item title
+     * @param   string  $description Item description
+     * @param   string  $prerequisites Prerequisites (optional)
+     * @param   array   $audio The array resulting of the $_FILES[mp3] element
+     * @param   int     $max_time_allowed
+     * @param   string  $url
+     * @return  boolean True on success, false on error
      */
     public function edit_item(
         $id,
@@ -1240,8 +1242,8 @@ class learnpath
         $previous,
         $title,
         $description,
-        $prerequisites = 0,
-        $audio = null,
+        $prerequisites = '0',
+        $audio = array(),
         $max_time_allowed = 0,
         $url = ''
     ) {
@@ -1467,8 +1469,8 @@ class learnpath
      * Updates an item's prereq in place
      * @param	integer	$id Element ID
      * @param	string	$prerequisite_id Prerequisite Element ID
-     * @param	string	$mastery_score Prerequisite min score
-     * @param	string	$max_score Prerequisite max score
+     * @param	int 	$mastery_score Prerequisite min score
+     * @param	int 	$max_score Prerequisite max score
      *
      * @return	boolean	True on success, false on error
      */

+ 4 - 2
main/session/resume_session.php

@@ -108,7 +108,9 @@ switch ($action) {
 }
 
 $sessionHeader = Display::page_header(
-    Display::return_icon('session.png', get_lang('Session')).' '.$sessionInfo['name'],null, 'h3'
+    Display::return_icon('session.png', get_lang('Session')).' '.$sessionInfo['name'],
+    null,
+    'h3'
 );
 
 $url = Display::url(
@@ -277,7 +279,7 @@ $userListToShow = Display::page_subheader(get_lang('UserList').$url);
 $userList = SessionManager::get_users_by_session($sessionId);
 
 if (!empty($userList)) {
-    $table = new HTML_Table(array('class' => 'data_table','id'=>'session-user-list'));
+    $table = new HTML_Table(array('class' => 'data_table', 'id'=>'session-user-list'));
 
     $table->setHeaderContents(0, 0, get_lang('User'));
     $table->setHeaderContents(0, 1, get_lang('Status'));

+ 0 - 1
main/template/default/social/whoisonline.tpl

@@ -14,7 +14,6 @@
                 </div>
             </div>
             <div id="whoisonline">
-
                 {{ whoisonline }}
             </div>
         </div>