Browse Source

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

jmontoyaa 7 years ago
parent
commit
a8284a5467

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

@@ -4849,7 +4849,7 @@ div#chat-remote-video video {
 	padding: 0;
 }
 .grid-courses .items .image {
-    min-height: 225px;
+    /* min-height: 175px; */
     position: relative;
 }
 .grid-courses .items .image .pin{
@@ -4994,7 +4994,7 @@ div#chat-remote-video video {
 }
 /* Catalog session */
 .return-catalog{
-	margin-bottom: 35px;
+	margin-top: 23px;
 }
 .search-session, .search-courses{
     margin-bottom: 15px;

+ 1 - 1
composer.json

@@ -106,7 +106,7 @@
         "jimmiw/php-time-ago": "^0.4.14",
         "phpoffice/phpword": "^0.12.1|dev-master",
         "facebook/php-sdk-v4": "~5.0",
-        "kigkonsult/icalcreator": "0.1.0",
+        "kigkonsult/icalcreator": "2.22.5",
         "essence/essence": "2.6.1",
         "pclzip/pclzip": "2.8.2",
         "chamilo/chash": "dev-master",

+ 60 - 57
main/auth/courses_categories.php

@@ -66,65 +66,67 @@ $code = isset($code) ? $code : null;
         <h2 class="title-courses"><?php echo get_lang('CourseManagement'); ?></h2>
         <div class="search-courses">
             <div class="row">
-            <div class="col-md-6">
-                <?php
-                if ($showCourses) {
-                    if (!isset($_GET['hidden_links']) || intval($_GET['hidden_links']) != 1) { ?>
-                    <form method="post" action="<?php echo CourseCategory::getCourseCategoryUrl(1, $pageLength, 'ALL', 0, 'subscribe'); ?>">
-                        <input type="hidden" name="sec_token" value="<?php echo $stok; ?>">
-                        <input type="hidden" name="search_course" value="1" />
-                        <label><?php echo get_lang('Search'); ?></label>
-                        <div class="input-group">
-                            <input class="form-control" type="text" name="search_term" value="<?php echo (empty($_POST['search_term']) ? '' : api_htmlentities(Security::remove_XSS($_POST['search_term']))); ?>" />
-                            <div class="input-group-btn">
-                                <button class="btn btn-default" type="submit">
-                                    <em class="fa fa-search"></em> <?php echo get_lang('Search'); ?>
-                                </button>
+                <div class="col-md-<?php echo ($showSessions ? '4' : '6'); ?>">
+                    <?php
+                    if ($showCourses) {
+                        if (!isset($_GET['hidden_links']) || intval($_GET['hidden_links']) != 1) { ?>
+                        <form method="post" action="<?php echo CourseCategory::getCourseCategoryUrl(1, $pageLength, 'ALL', 0, 'subscribe'); ?>">
+                            <input type="hidden" name="sec_token" value="<?php echo $stok; ?>">
+                            <input type="hidden" name="search_course" value="1" />
+                            <label><?php echo get_lang('Search'); ?></label>
+                            <div class="input-group">
+                                <input class="form-control" type="text" name="search_term" value="<?php echo (empty($_POST['search_term']) ? '' : api_htmlentities(Security::remove_XSS($_POST['search_term']))); ?>" />
+                                <div class="input-group-btn">
+                                    <button class="btn btn-default" type="submit">
+                                        <em class="fa fa-search"></em> <?php echo get_lang('Search'); ?>
+                                    </button>
+                                </div>
                             </div>
-                        </div>
-                    </form>
-                <?php } ?>
-            </div>
-            <div class="col-md-6">
-                <?php
-                $webAction = api_get_path(WEB_CODE_PATH).'auth/courses.php';
-                $action = (!empty($_REQUEST['action']) ? Security::remove_XSS($_REQUEST['action']) : 'display_courses');
-                $pageLength = !empty($_REQUEST['pageLength']) ? intval($_REQUEST['pageLength']) : CoursesAndSessionsCatalog::PAGE_LENGTH;
-                $pageCurrent = !empty($_REQUEST['pageCurrent']) ? intval($_REQUEST['pageCurrent']) : 1;
-                $form = '<form action="'.$webAction.'" method="GET" >';
-                $form .= '<input type="hidden" name="action" value="'.$action.'">';
-                $form .= '<input type="hidden" name="pageCurrent" value="'.$pageCurrent.'">';
-                $form .= '<input type="hidden" name="pageLength" value="'.$pageLength.'">';
-                $form .= '<div class="form-group">';
-                $form .= '<label>'.get_lang('CourseCategories').'</label>';
-                $form .= '<select name="category_code" onchange="submit();" class="selectpicker show-tick form-control">';
-                $codeType = isset($_REQUEST['category_code']) ? Security::remove_XSS($_REQUEST['category_code']) : '';
-                foreach ($browse_course_categories[0] as $category) {
-                    $categoryCode = $category['code'];
-                    $countCourse = $category['count_courses'];
-                    $form .= '<option '.($categoryCode == $codeType ? 'selected="selected" ' : '').' value="'.$category['code'].'">'.$category['name'].' ( '.$countCourse.' ) </option>';
-                    if (!empty($browse_course_categories[$categoryCode])) {
-                        foreach ($browse_course_categories[$categoryCode] as $subCategory) {
-                            $subCategoryCode = $subCategory['code'];
-                            $form .= '<option '.($subCategoryCode == $codeType ? 'selected="selected" ' : '').' value="'.$subCategory['code'].'"> ---'.$subCategory['name'].' ( '.$subCategory['count_courses'].' ) </option>';
+                        </form>
+                    <?php } ?>
+                </div>
+                <div class="col-md-<?php echo ($showSessions ? '4' : '6'); ?>">
+                    <?php
+                    $webAction = api_get_path(WEB_CODE_PATH).'auth/courses.php';
+                    $action = (!empty($_REQUEST['action']) ? Security::remove_XSS($_REQUEST['action']) : 'display_courses');
+                    $pageLength = !empty($_REQUEST['pageLength']) ? intval($_REQUEST['pageLength']) : CoursesAndSessionsCatalog::PAGE_LENGTH;
+                    $pageCurrent = !empty($_REQUEST['pageCurrent']) ? intval($_REQUEST['pageCurrent']) : 1;
+                    $form = '<form action="'.$webAction.'" method="GET" >';
+                    $form .= '<input type="hidden" name="action" value="'.$action.'">';
+                    $form .= '<input type="hidden" name="pageCurrent" value="'.$pageCurrent.'">';
+                    $form .= '<input type="hidden" name="pageLength" value="'.$pageLength.'">';
+                    $form .= '<div class="form-group">';
+                    $form .= '<label>'.get_lang('CourseCategories').'</label>';
+                    $form .= '<select name="category_code" onchange="submit();" class="selectpicker show-tick form-control">';
+                    $codeType = isset($_REQUEST['category_code']) ? Security::remove_XSS($_REQUEST['category_code']) : '';
+                    foreach ($browse_course_categories[0] as $category) {
+                        $categoryCode = $category['code'];
+                        $countCourse = $category['count_courses'];
+                        $form .= '<option '.($categoryCode == $codeType ? 'selected="selected" ' : '').' value="'.$category['code'].'">'.$category['name'].' ( '.$countCourse.' ) </option>';
+                        if (!empty($browse_course_categories[$categoryCode])) {
+                            foreach ($browse_course_categories[$categoryCode] as $subCategory) {
+                                $subCategoryCode = $subCategory['code'];
+                                $form .= '<option '.($subCategoryCode == $codeType ? 'selected="selected" ' : '').' value="'.$subCategory['code'].'"> ---'.$subCategory['name'].' ( '.$subCategory['count_courses'].' ) </option>';
+                            }
                         }
                     }
-                }
-                $form .= '</select>';
-                $form .= '</form>';
-                echo $form;
-            ?>
-            </div>
+                    $form .= '</select>';
+                    $form .= '</form>';
+                    echo $form;
+                ?>
+                </div>
             </div>
+            <?php  if ($showSessions) { ?>
+                <div class="col-md-4">
+                    <div class="return-catalog">
+                        <a class="btn btn-default btn-lg btn-block" href="<?php echo CourseCategory::getCourseCategoryUrl(1, $pageLength, null, 0, 'display_sessions'); ?>">
+                            <em class="fa fa-arrow-right"></em> <?php echo get_lang('SessionList'); ?>
+                        </a>
+                    </div>
+                </div>
+            <?php } ?>
         </div>
     </div>
-    <?php  if ($showSessions) { ?>
-        <div class="return-catalog">
-            <a class="btn btn-default btn-lg btn-block" href="<?php echo CourseCategory::getCourseCategoryUrl(1, $pageLength, null, 0, 'display_sessions'); ?>">
-                <em class="fa fa-arrow-right"></em> <?php echo get_lang('SessionList'); ?>
-            </a>
-        </div>
-    <?php } ?>
 </div>
 <?php  } ?>
 <div class="grid-courses">
@@ -355,14 +357,14 @@ function return_title($course, $registeredUser)
 {
     $html = '';
     $linkCourse = api_get_course_url($course['code']);
-    $title = cut($course['title'], 60);
+    $cutTitle = cut($course['title'], 60);
 
     $html .= '<div class="block-title"><h4 class="title">';
 
     if (!$registeredUser) {
-        $html .= $title;
+        $html .= $cutTitle;
     } else {
-        $html .= '<a title="'.$title.'" href="'.$linkCourse.'">'.$title.'</a>';
+        $html .= '<a title="'.$course['title'].'" href="'.$linkCourse.'">'.$cutTitle.'</a>';
     }
 
     $html .= '</h4></div>';
@@ -396,7 +398,8 @@ function return_description_button($course)
             array(
                 'class' => 'ajax btn btn-default btn-sm',
                 'data-title' => $title, 'title' => get_lang('Description'),
-                'aria-label' => get_lang('Description')
+                'aria-label' => get_lang('Description'),
+                'data-size' => 'lg'
             )
         );
     }

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

@@ -1509,6 +1509,6 @@ if ((isset($cas_login) && $cas_login && exist_firstpage_parameter()) ||
 
 Redirect::session_request_uri($logging_in, $user_id);
 
-if (!ChamiloApi::isAjaxRequest() && api_get_configuration_value('survey_answered_at_field')) {
+if (!ChamiloApi::isAjaxRequest() && api_get_configuration_value('allow_mandatory_survey')) {
     SurveyManager::protectByMandatory();
 }

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

@@ -7262,7 +7262,7 @@ $NewStatus = "New status";
 $Reason = "Reason";
 $RequestStatus = "Request new status";
 $StatusRequestMessage = "You have been logged-in with default permissions. You can request more permissions by submitting the following request.";
-$ReasonIsMandatory = "You reason field is mandatory. Please fill it in before submitting.";
+$ReasonIsMandatory = "The 'reason' field is mandatory. Please fill it in before submitting.";
 $RequestSubmitted = "Your request has been submitted.";
 $RequestFailed = "We are not able to fulfill your request at this time. Please contact your administrator.";
 $InternalLogin = "Internal login";
@@ -8003,8 +8003,8 @@ $Annotation = "Annotation";
 $TeacherPicture = "Teacher picture";
 $FeedbackIfNotCorrect = "Feedback if not correct";
 $ScheduledAnnouncements = "Scheduled announcements";
-$SpecificDate = "Specific date";
-$BaseDate = "Base date";
+$SpecificDate = "Specific dispatch date";
+$BaseDate = "Dispatch based on the session's start/end dates";
 $AfterOrBefore = "After or before";
 $Before = "Before";
 $ScheduleAnnouncementDescription = "This form allows scheduling announcements to be sent automatically to the students who are taking a course in a session. 
@@ -8014,5 +8014,8 @@ There are two types of announcements that can be sent:
 Specific date: In this case a specific day is selected to make the announcement. 
 
 Based on the start / end date of the session: in this case the number of days to pass before sending the announcement must be indicated. And those days can be associated to before or after the start / end date. For example: 3 days after the start date.";
-$MandatorySurveyNoAnswered = "You have pending a mandatory survey. To enter the course, you must first complete it.";
-?>
+$MandatorySurveyNoAnswered = "A mandatory survey is waiting your answer. To enter the course, you must first complete the survey.";
+$ShowPreviousButton = "Show previous button";
+$AllTickets = "All tickets";
+$IsMandatory = "Mandatory?";
+?>

+ 11 - 0
main/lang/french/trad4all.inc.php

@@ -3999,6 +3999,7 @@ $ApprovalForNewAccount = "Approbation pour un nouveau compte";
 $ManageUser = "Gestion de l'utilisateur";
 $SubscribeUserToCourseAsTeacher = "Inscrire des formateurs";
 $PasswordEncryptedForSecurity = "Votre mot de passe est crypté pour des raisons de sécurité. Après avoir cliqué sur le lien, un autre courriel vous sera envoyé avec votre mot de passe.";
+$ExtraFields = "Champs extra";
 $OpenIDCouldNotBeFoundPleaseRegister = "Cet OpenID n'est pas dans notre base de données. Merci de vous enregistrer sur notre portail en utilisant ce formulaire. Si vous disposez déjà d'un compte utilisateur sur ce portail, merci d'éditer votre profil afin d'y ajouter cet OpenID";
 $UsernameMaxXCharacters = "Le nom d'utilisateur doit être de %s caractères au maximum";
 $PictureUploaded = "Votre photo a été importée";
@@ -7949,4 +7950,14 @@ $TempScoreXQuestionsNotCorrectedYet = "Score temporaire: %s question(s) ouverte(
 $Annotation = "Annotation";
 $TeacherPicture = "Photo du prof";
 $FeedbackIfNotCorrect = "Feedback si incorrecte";
+$ScheduledAnnouncements = "Annonces programmées";
+$SpecificDate = "Date spécifique d'envoi";
+$BaseDate = "Envoi sur base des dates de début/fin de la session";
+$AfterOrBefore = "Avant ou après";
+$Before = "Avant le";
+$ScheduleAnnouncementDescription = "Ce formulair permet de programmer l'envoi automatique d'annonces aux étudiants qui réalisent le cours dans une session. Il existe deux types d'annonces programmées: l'envoi à une date spécifique: dans ce cas, on sélectionne un jour en particulier pour procéder à l'envoi du mail; et l'envoi sur base des dates de début ou de fin de la session: dans ce cas, il faut indiquer le nombre de jours de différence avec la date de début ou de fin, auquel l'e-mail doit être envoyé. Par exemple: 3 jours avant la fin de la session.";
+$MandatorySurveyNoAnswered = "Une enquête obligatoire est en attente de votre réponse. Pour entrer dans le cours, il est nécessaire de la compléter d'abord.";
+$ShowPreviousButton = "Montrer le bouton 'Précédent'";
+$AllTickets = "Tous les tickets";
+$IsMandatory = "Obligatoire?";
 ?>

+ 3 - 0
main/lang/spanish/trad4all.inc.php

@@ -8046,4 +8046,7 @@ Envío en una fecha concreta: En este caso se selecciona un día concreto para h
 
 Envío en base a la fecha de inicio/finalización de la sesión: en este caso se ha de indicar el número de días que han de pasar antes de enviar el anuncio. Y esos días pueden estar asociados a antes o después de la fecha de inicio/finalización. Por ejemplo: 3 días después de fecha de inicio.";
 $MandatorySurveyNoAnswered = "Usted tiene pendiente una encuesta obligatoria. Para ingresar al curso, primero deberá completarla";
+$ShowPreviousButton = "Mostrar el botón 'anterior'";
+$AllTickets = "Todos los tickets";
+$IsMandatory = "Obligatorio/a?";
 ?>

+ 1 - 0
main/survey/create_new_survey.php

@@ -274,6 +274,7 @@ if ($form->validate()) {
     // Storing the survey
     $return = SurveyManager::store_survey($values);
 
+    $values['item_id'] = $return['id'];
     $extraFieldValue = new ExtraFieldValue('survey');
     $extraFieldValue->saveFieldValues($values);
 

+ 18 - 5
main/survey/fillsurvey.php

@@ -16,8 +16,6 @@ if (!isset($_GET['cidReq'])) {
     $_cid = $_GET['cidReq'];
 }
 
-$fillingSurvey = true;
-
 // Including the global initialization file
 require_once __DIR__.'/../inc/global.inc.php';
 
@@ -165,7 +163,13 @@ if (Database::num_rows($result) > 1) {
     } else {
         // Header
         Display :: display_header(get_lang('ToolSurvey'));
-        echo '<form id="language" name="language" method="POST" action="'.api_get_self().'?course='.Security::remove_XSS($_GET['course']).'&invitationcode='.Security::remove_XSS($_GET['invitationcode']).'&cidReq='.Security::remove_XSS($_GET['cidReq']).'">';
+        $frmLangUrl = api_get_self().'?'.api_get_cidreq().'&'
+            .http_build_query([
+                'course' => Security::remove_XSS($_GET['course']),
+                'invitationcode' => Security::remove_XSS($_GET['invitationcode'])
+            ]);
+
+        echo '<form id="language" name="language" method="POST" action="'.$frmLangUrl.'">';
         echo '<select name="language">';
         while ($row = Database::fetch_array($result, 'ASSOC')) {
             echo '<option value="'.$row['survey_id'].'">'.$row['lang'].'</option>';
@@ -371,7 +375,8 @@ if ($survey_data['form_fields'] != '' &&
     $form = new FormValidator(
         'profile',
         'post',
-        api_get_self()."?".str_replace('&show_form=1', '&show_form=1', Security::remove_XSS($_SERVER['QUERY_STRING']))
+        api_get_self()."?".api_get_cidreq().'&'
+            .str_replace('&show_form=1', '&show_form=1', Security::remove_XSS($_SERVER['QUERY_STRING']))
     );
 
     if (api_is_western_name_order()) {
@@ -594,6 +599,14 @@ if (isset($_POST['finish_survey'])) {
 
     SurveyUtil::flagSurveyAsAnswered($survey_invitation['survey_code'], $survey_invitation['c_id']);
 
+    if ($course_info) {
+        echo Display::toolbarButton(
+            get_lang('ReturnToCourseHomepage'),
+            api_get_course_url($course_info['code']),
+            'home'
+        );
+    }
+
     unset($_SESSION['paged_questions']);
     unset($_SESSION['page_questions_sec']);
     Display :: display_footer();
@@ -1181,7 +1194,7 @@ $p_l = isset($_POST['language']) ? Security::remove_XSS($_POST['language']) : ''
 
 $add_parameters = isset($_GET['user_id']) ? 'user_id='.intval($_GET['user_id']).'&amp;' : '';
 
-$url = api_get_self().'?'.$add_parameters.'course='.$g_c.'&invitationcode='.$g_ic.'&show='.$show.'&cidReq='.$g_cr;
+$url = api_get_self().'?'.api_get_cidreq().'&'.$add_parameters.'course='.$g_c.'&invitationcode='.$g_ic.'&show='.$show;
 $form = new FormValidator('question', 'post', $url);
 $form->addHidden('language', $p_l);
 

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

@@ -1733,7 +1733,7 @@ class SurveyManager
      */
     public static function protectByMandatory()
     {
-        if (isset($GLOBALS['fillingSurvey']) && $GLOBALS['fillingSurvey']) {
+        if (strpos($_SERVER['SCRIPT_NAME'], 'fillsurvey.php') !== false) {
             return;
         }
 
@@ -1792,7 +1792,7 @@ class SurveyManager
             Display::return_message(get_lang('MandatorySurveyNoAnswered'), 'warning')
         );
 
-        header('Location: '.api_get_path(WEB_CODE_PATH).'survey/fillsurvey.php?'.$urlParams);
+        header('Location: '.api_get_path(WEB_CODE_PATH).'survey/fillsurvey.php?'.$urlParams.'&'.api_get_cidreq());
         exit;
     }
 }

+ 19 - 7
main/template/default/auth/session_catalog.tpl

@@ -14,7 +14,21 @@
         <h2 class="title-session">{{ 'Sessions'|get_lang }}</h2>
        	<div class="search-session">
                 <div class="row">
+                {% if show_courses %}
+                    <div class="col-md-4">
+                        <div class="return-catalog">
+                            <a class="btn btn-default btn-lg btn-block" href="{{ _p.web_self }}">
+                                <em class="fa fa-arrow-left"></em> {{ "CourseManagement"|get_lang }}
+                            </a>
+                        </div>
+                    </div>
+                {% endif %}
+
+                {% if show_courses %}
+                    <div class="col-md-4">
+                {% else %}
                     <div class="col-md-6">
+                {% endif %}
                         <form method="post" action="{{ _p.web_self }}?action=display_sessions">
                             <div class="form-group">
                                 <label>{{ "ByDate"|get_lang }}</label>
@@ -30,7 +44,12 @@
                             </div>
                         </form>
                     </div>
+
+                {% if show_courses %}
+                    <div class="col-md-4">
+                {% else %}
                     <div class="col-md-6">
+                {% endif %}
                         <form method="post" action="{{ _p.web_self }}?action=search_tag">
                             <label>{{ "ByTag"|get_lang }}</label>
                             <div class="input-group">
@@ -46,13 +65,6 @@
                     </div>
                 </div>
             </div>
-       	{% if show_courses %}
-        <div class="return-catalog">
-        	<a class="btn btn-default btn-lg btn-block" href="{{ _p.web_self }}">
-            	<em class="fa fa-arrow-left"></em> {{ "CourseManagement"|get_lang }}
-            </a>
-       	</div>
-       	{% endif %}
         </div>
     </div>
     <!-- new view session grib -->

+ 2 - 3
plugin/maintenancemode/lang/english.php

@@ -8,8 +8,7 @@ $strings['IPAdmin'] = "Admin's IP";
 $strings['MaintenanceModeIsOff'] = "Maintenance mode is off";
 $strings['MaintenanceModeIsOn'] = "Maintenance mode is on";
 
-$strings['IPAdminDescription'] = "The admin with this IP will only have access to the platform.";
+$strings['IPAdminDescription'] = "Only the admin with this IP will maintain access to the platform during maintenance mode.";
 $strings['MaintenanceFileNotPresent'] = "Can't create file: %s. Check permissions in the root folder";
-
-
+$strings['TheFollowingTextWillBeAddedToHtaccess'] = "The text below (editor box) will be temporarily added to the .htaccess file.";
 

+ 8 - 8
plugin/maintenancemode/lang/french.php

@@ -1,14 +1,14 @@
 <?php
 
-$strings['plugin_title'] = "Maintenance mode";
-$strings['plugin_comment'] = "Put chamilo in maintenance mode";
-$strings['tool_enable'] = 'Enable plugin';
+$strings['plugin_title'] = "Mode maintenance";
+$strings['plugin_comment'] = "Mettre votre portail Chamilo en maintenance";
+$strings['tool_enable'] = 'Activer le plugin';
 
-$strings['IPAdmin'] = "IP de l'administrateur";
-$strings['IPAdminDescription'] = "L'administrateur utilisant. cette adresse IP conservera les droits d'accès à la plateforme. L'adresse IP indiquée est l'adresse détectée automatiquement par Chamilo par rapport à votre visite actuelle. Elle est également utilisée par défaut dans le bloc ci-dessous.";
+$strings['MaintenanceModeIsOff'] = "Le mode maintenance est désactivé";
+$strings['MaintenanceModeIsOn'] = "Le mode maintenance est activé";
 
+$strings['IPAdmin'] = "IP de l'administrateur";
+$strings['IPAdminDescription'] = "L'administrateur utilisant cette adresse IP conservera les droits d'accès à la plateforme. L'adresse IP indiquée est l'adresse détectée automatiquement par Chamilo par rapport à votre visite actuelle. Elle est également utilisée par défaut dans le bloc ci-dessous.";
 $strings['MaintenanceFileNotPresent'] = "Le fichier %s à la racine de Chamilo n'est pas présent et n'a pas pu être créé. Veuillez créer le fichier manuellement et donner les permissions au serveur web de le modifier, par exemple en utilisant la commande 'chown www-data maintenance.html";
-
-
-
+$strings['TheFollowingTextWillBeAddedToHtaccess'] = "Le texte suivant sera ajouté temporairement au fichier .htaccess à la racine de votre installation de Chamilo.";
 

+ 14 - 0
plugin/maintenancemode/lang/spanish.php

@@ -0,0 +1,14 @@
+<?php
+
+$strings['plugin_title'] = "Modo de mantenimiento";
+$strings['plugin_comment'] = "Poner Chamilo en estado de mantenimiento";
+$strings['tool_enable'] = 'Activar plugin';
+
+$strings['MaintenanceModeIsOff'] = "El modo de mantenimiento no está activado";
+$strings['MaintenanceModeIsOn'] = "El modo de mantenimiento está activado";
+
+$strings['IPAdmin'] = "IP del administrador";
+$strings['IPAdminDescription'] = "El administrador que use esta dirección IP mantendrá los permisos para acceder a la plataforma. La dirección IP indicada es la dirección detectada automáticamente por Chamilo según su situación actual. También es usada de manera predeterminada en el bloque siguiente.";
+$strings['MaintenanceFileNotPresent'] = "El archivo %s en la raíz de Chamilo no está presente y tampoco ha podido ser creado. Por favor, crea el archivo manualmente (por FTP o SSH si es un servidor remoto) y de permisos para que el servidor web pueda modificarlo. Por ejemplo usando el comando 'chown www-data maintenance.html'";
+$strings['TheFollowingTextWillBeAddedToHtaccess'] = "El texto siguiente (zona de edición) será añadido temporalmente al archivo .htaccess a la raíz de su instalación de Chamilo.";
+

+ 1 - 1
plugin/maintenancemode/plugin.php

@@ -75,7 +75,7 @@ if ($editFile && api_is_platform_admin()) {
     $block = str_replace($endLine, '', $block);
 
     $form = new FormValidator('htaccess');
-    $form->addHtml('The following text will be added in the /.htaccess');
+    $form->addHtml($plugin->get_lang('TheFollowingTextWillBeAddedToHtaccess'));
     $element = $form->addText(
         'ip',
         [$plugin->get_lang('IPAdmin'), $plugin->get_lang('IPAdminDescription')]

+ 9 - 9
plugin/sepe/database.php

@@ -32,7 +32,7 @@ $sepeCenterTable->addColumn('url', \Doctrine\DBAL\Types\Type::STRING);
 $sepeCenterTable->addColumn('tracking_url', \Doctrine\DBAL\Types\Type::STRING);
 $sepeCenterTable->addColumn('phone', \Doctrine\DBAL\Types\Type::STRING);
 $sepeCenterTable->addColumn('mail', \Doctrine\DBAL\Types\Type::STRING);
-$sepeCenterTable->setPrimaryKey(array('d'));
+$sepeCenterTable->setPrimaryKey(array('id'));
 
 /* ========== PLUGIN_SEPE_ACTIONS ========== */
 $sepeActionsTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_ACTIONS);
@@ -248,7 +248,7 @@ $sepeCentrosTable->addColumn(
     \Doctrine\DBAL\Types\Type::STRING,
     array('length' => 16)
 );
-$sepeCentrosTable->setPrimaryKey(array('cod'));
+$sepeCentrosTable->setPrimaryKey(array('id'));
 
 /* ========== PLUGIN_SEPE_SPECIALTY_CLASSROOM ========== */
 $sepeSpecialtyClassroomTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_SPECIALTY_CLASSROOM);
@@ -267,7 +267,7 @@ $sepeSpecialtyClassroomTable->addColumn(
     \Doctrine\DBAL\Types\Type::INTEGER,
     array('unsigned' => true)
 );
-$sepeSpecialtyClassroomTable->setPrimaryKey(array('cod'));
+$sepeSpecialtyClassroomTable->setPrimaryKey(array('id'));
 $sepeSpecialtyClassroomTable->addForeignKeyConstraint(
     $sepeSpecialtyTable,
     array('specialty_id'),
@@ -416,7 +416,7 @@ $sepeTutorsCompanyTable->addColumn(
     \Doctrine\DBAL\Types\Type::STRING,
     array('length' => 2)
 );
-$sepeTutorsCompanyTable->setPrimaryKey(array('cod'));
+$sepeTutorsCompanyTable->setPrimaryKey(array('id'));
 
 /* ========== PLUGIN_SEPE_PARTICIPANTS ========== */ 
 $sepeParticipantsTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_PARTICIPANTS);
@@ -567,7 +567,7 @@ $sepeParticipantsSpecialtyTable->addColumn(
     \Doctrine\DBAL\Types\Type::STRING,
     array('length' => 4, 'notnull' => false)
 );
-$sepeParticipantsSpecialtyTable->setPrimaryKey(array('cod'));
+$sepeParticipantsSpecialtyTable->setPrimaryKey(array('id'));
 $sepeParticipantsSpecialtyTable->addForeignKeyConstraint(
     $sepeParticipantsTable,
     array('participant_id'),
@@ -624,7 +624,7 @@ $sepeCourseActionsTable->addColumn(
     \Doctrine\DBAL\Types\Type::INTEGER,
     array('unsigned' => true)
 );
-$sepeCourseActionsTable->setPrimaryKey(array('cod'));
+$sepeCourseActionsTable->setPrimaryKey(array('id'));
 $sepeCourseActionsTable->addForeignKeyConstraint(
     $sepeActionsTable,
     array('action_id'),
@@ -729,7 +729,7 @@ foreach ($competences as $competence) {
     Database::insert(
         $sepeTeachingCompetenceTable,
         array(
-            'cod' => $competence[0],
+            'id' => $competence[0],
             'code' => $competence[1],
             'value' => $competence[2]
         )
@@ -740,7 +740,7 @@ $sepeTutorsCompanyTable = Database::get_main_table(SepePlugin::TABLE_SEPE_TUTORS
 Database::insert(
     $sepeTutorsCompanyTable,
     array(
-        'cod' => 1,
+        'id' => 1,
         'alias' => 'Sin tutor',
         'company' => 'SI',
         'training' => 'SI'
@@ -814,7 +814,7 @@ $fielddefault = '';
 //$fieldoptions = ';Albacete;Alicante/Alacant;Almería;Araba/Álava;Asturias;Ávila;Badajoz;Balears, Illes;Barcelona;Bizkaia;Burgos;Cáceres;Cádiz;Cantabria;Castellón/Castelló;Ciudad Real;Córdoba;Coruña, A;Cuenca;Gipuzkoa;Girona;Granada;Guadalajara;Huelva;Huesca;Jaén;León;Lleida;Lugo;Madrid;Málaga;Murcia;Navarra;Ourense;Palencia;Palmas, Las;Pontevedr;Rioja, La;Salamanca;Santa Cruz de Tenerife;Segovia;Sevilla;Soria;Tarragona;Teruel;Toledo;Valencia/Valéncia;Valladolid;Zamora;Zaragoza;Ceuta;Melilla';
 $field_id = UserManager::create_extra_field($fieldlabel,$fieldtype,$fieldtitle,$fielddefault);
 $i = 1;
-foreach ($list_provincias as $value) {
+foreach ($list_provinces as $value) {
     $sql = "INSERT INTO extra_field_options (field_id, option_value, display_text, option_order) VALUES ('".$field_id."', '".$i."', '".$value."','".$i."');";
     Database::query($sql);
     $i++;