From a1b3ecd3316a3ae657f5a115a665aa47eafaadb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sun, 8 Feb 2015 18:20:52 +0100 Subject: [PATCH] Version 14.74.4 --- swad_changelog.h | 7 +++---- swad_config.h | 4 ++-- swad_enrollment.c | 31 +++++++++++++++---------------- swad_import.c | 5 +---- swad_text.c | 21 --------------------- swad_user.c | 10 ++++------ 6 files changed, 25 insertions(+), 53 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 697d6dce6..1e400cc3e 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -36,19 +36,18 @@ // Sería completa esta aplicación, si la asistencia se incluyera, automáticamente, en el apartado de evaluación de cada alumno. De esta forma podríamos ver sus trabajos y asistencias de forma personalizada. // TODO: OpenSWAD.org: ¿Qué debería tener una buena gestión de grupos? Es para tomar ideas ;) // José Raúl Canay @raulcanay: por ejemplo, que puedas sacar un listado exportable de en qué grupos está una persona de quienes están en un grupo. +// TODO: Remove debug in PRADO /*****************************************************************************/ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.74.3 (2015/02/08)" +#define Log_PLATFORM_VERSION "SWAD 14.74.4 (2015/02/08)" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h | tail -1 /* -Mejorar formulario de inscripción de usuarios poniéndole marco blanco -Quitar debug en llamada a PRADO - + Version 14.74.4: Feb 08, 2015 Changes in layout of form to register/remove users. (178000 lines) Version 14.74.3: Feb 08, 2015 Button to view banners. Button to view mail domains. Button to view institutional links. diff --git a/swad_config.h b/swad_config.h index 406a14d79..026614fa1 100644 --- a/swad_config.h +++ b/swad_config.h @@ -28,9 +28,9 @@ /** Uncomment one of the following installations of SWAD or create your own **/ /*****************************************************************************/ -//#define LOCALHOST_UBUNTU // Comment this line if not applicable +#define LOCALHOST_UBUNTU // Comment this line if not applicable //#define OPENSWAD_ORG // Comment this line if not applicable -#define SWAD_UGR_ES // Comment this line if not applicable +//#define SWAD_UGR_ES // Comment this line if not applicable //#define WWW_CEVUNA_UNA_PY // Comment this line if not applicable /*****************************************************************************/ diff --git a/swad_enrollment.c b/swad_enrollment.c index bbcc475ac..8f21f6f0c 100644 --- a/swad_enrollment.c +++ b/swad_enrollment.c @@ -502,7 +502,6 @@ static void Enr_ShowFormRegRemSeveralUsrs (void) extern const char *The_ClassTitle[The_NUM_THEMES]; extern const char *Txt_Step_1_Provide_a_list_of_users; extern const char *Txt_Option_a_Import_students_from_the_official_lists; - extern const char *Txt_There_is_no_external_service_for_authentication_and_official_lists; extern const char *Txt_Select_the_groups_of_students_you_want_to_register_in_remove_from_this_course; extern const char *Txt_Option_b_Type_or_paste_a_list_of_users; extern const char *Txt_Type_or_paste_a_list_of_IDs_nicks_or_emails_; @@ -513,6 +512,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (void) extern const char *Txt_No_groups_have_been_created_in_the_course_X_Therefore_; extern const char *Txt_Step_5_Confirm_the_enrollment_removing; extern const char *Txt_Confirm; + bool ExternalUsrsServiceAvailable = (Cfg_EXTERNAL_LOGIN_CLIENT_COMMAND[0] != '\0'); fprintf (Gbl.F.Out,"
"); @@ -537,26 +537,25 @@ static void Enr_ShowFormRegRemSeveralUsrs (void) The_ClassTitle[Gbl.Prefs.Theme], Txt_Step_1_Provide_a_list_of_users); - /* Option a: get students from official lists */ - fprintf (Gbl.F.Out,"
" - "
%s
 " - "
", - The_ClassTitle[Gbl.Prefs.Theme], - Txt_Option_a_Import_students_from_the_official_lists); - if (Cfg_EXTERNAL_LOGIN_CLIENT_COMMAND[0] == '\0') - Lay_ShowAlert (Lay_INFO,Txt_There_is_no_external_service_for_authentication_and_official_lists); - else + if (ExternalUsrsServiceAvailable) { + /* Option a: get students from official lists */ + fprintf (Gbl.F.Out,"
" + "
%s
 " + "
", + The_ClassTitle[Gbl.Prefs.Theme], + Txt_Option_a_Import_students_from_the_official_lists); Lay_ShowAlert (Lay_INFO,Txt_Select_the_groups_of_students_you_want_to_register_in_remove_from_this_course); Imp_ListMyImpGrpsAndStdsForm (); + + /* Option b: get students' IDs from pasted text */ + fprintf (Gbl.F.Out,"
" + "
%s
 " + "
", + The_ClassTitle[Gbl.Prefs.Theme], + Txt_Option_b_Type_or_paste_a_list_of_users); } - /* Option b: get students' IDs from pasted text */ - fprintf (Gbl.F.Out,"
" - "
%s
 " - "
", - The_ClassTitle[Gbl.Prefs.Theme], - Txt_Option_b_Type_or_paste_a_list_of_users); Lay_ShowAlert (Lay_INFO,Txt_Type_or_paste_a_list_of_IDs_nicks_or_emails_); Enr_PutAreaToEnterUsrsIDs (); diff --git a/swad_import.c b/swad_import.c index af102602e..40ef1e94e 100644 --- a/swad_import.c +++ b/swad_import.c @@ -364,7 +364,6 @@ void Imp_ListMyImpGrpsAndStdsForm (void) static void Imp_ListMyImpGrpsAndStds (bool ItsAFormToRegRemStds) { - extern const char *Txt_There_is_no_external_service_for_authentication_and_official_lists; extern const char *Txt_Could_not_get_the_official_list_of_your_groups_and_students_; extern const char *Txt_To_get_the_official_list_of_your_groups_and_students_; char PathRelParamsToCommandsPriv[PATH_MAX+1]; @@ -373,10 +372,8 @@ static void Imp_ListMyImpGrpsAndStds (bool ItsAFormToRegRemStds) char Command[2048]; int ReturnCode; - if (Cfg_EXTERNAL_LOGIN_CLIENT_COMMAND[0] == '\0') - Lay_ShowAlert (Lay_WARNING,Txt_There_is_no_external_service_for_authentication_and_official_lists); /***** Try to get lists from database *****/ - else if (!Imp_GetAndListImpGrpsAndStdsFromDB (ItsAFormToRegRemStds)) + if (!Imp_GetAndListImpGrpsAndStdsFromDB (ItsAFormToRegRemStds)) { /***** Remove old imported students and groups *****/ Imp_RemoveOldImpStdsAndGrps (); diff --git a/swad_text.c b/swad_text.c index cae58dea4..34d4b8071 100644 --- a/swad_text.c +++ b/swad_text.c @@ -43301,27 +43301,6 @@ const char *Txt_There_is_already_a_non_empty_folder_named_X = // Warning: it is "There is already a non-empty folder named %s."; // Necessita de tradução #endif -const char *Txt_There_is_no_external_service_for_authentication_and_official_lists = -#if L==0 - "No hi ha cap servei extern d'autenticació i llistes oficials."; -#elif L==1 - "Es gibt keinen externen Dienstleister für die Authentifizierung und offiziellen Listen."; -#elif L==2 - "There is no external service for authentication and official lists."; -#elif L==3 - "No existe ningún servicio externo de autenticación y listas oficiales."; -#elif L==4 - "Il n'ya pas de service externe pour authentification et listes officiels."; -#elif L==5 - "No existe ningún servicio externo de autenticación y listas oficiales."; // Okoteve traducción -#elif L==6 - "Non c'è nessun servizio esterno per autenticazione e liste ufficiale."; -#elif L==7 - "Nie ma zewnętrznych usług uwierzytelniania."; -#elif L==8 - "Não há serviço externo de autenticação e listas oficiales."; -#endif - const char *Txt_There_is_no_knowing_how_many_users_not_logged_have_accessed = #if L==0 "No se puede saber cuántos usuarios distintos han accedido sin identificarse."; // Necessita traduccio diff --git a/swad_user.c b/swad_user.c index e74b257e2..f65c1c76c 100644 --- a/swad_user.c +++ b/swad_user.c @@ -1967,7 +1967,6 @@ static bool Usr_ChkUsrAndGetUsrDataFromExternalLogin (void) { extern const char *Txt_The_user_does_not_exist_or_password_is_incorrect; extern const char *Txt_There_are_more_than_one_user_with_the_ID_X_Please_type_a_nick_or_email; - extern const char *Txt_There_is_no_external_service_for_authentication_and_official_lists; extern const char *Txt_There_is_no_user_in_X_with_ID_Y_If_you_already_have_an_account_on_Z_; struct ListUsrCods ListUsrCods; bool ItSeemsANewUsrIsEnteringFromExternalSite = false; @@ -2067,10 +2066,8 @@ static bool Usr_ChkUsrAndGetUsrDataFromExternalLogin (void) /***** Validate session: the call to SWAD is really coming from external site? *****/ - if (Cfg_EXTERNAL_LOGIN_CLIENT_COMMAND[0] == '\0') - Lay_ShowAlert (Lay_WARNING,Txt_There_is_no_external_service_for_authentication_and_official_lists); - else if (Gbl.Imported.ExternalUsrId[0] && - Gbl.Imported.ExternalSesId[0]) + if (Gbl.Imported.ExternalUsrId[0] && + Gbl.Imported.ExternalSesId[0]) { /***** Parameters to command used to import data are passed through a temporary file *****/ /* If the private directory does not exist, create it */ @@ -6643,8 +6640,9 @@ static void Usr_PutLinkToListOfficialStudents (void) { extern const char *The_ClassFormul[The_NUM_THEMES]; extern const char *Txt_Official_students; + bool ExternalUsrsServiceAvailable = (Cfg_EXTERNAL_LOGIN_CLIENT_COMMAND[0] != '\0'); - if (Cfg_EXTERNAL_LOGIN_CLIENT_COMMAND[0] && // There is an external service for authentication and official lists + if (ExternalUsrsServiceAvailable && // There is an external service for authentication and official lists Gbl.Imported.ExternalUsrId[0] && // I was authenticated from external service... Gbl.Imported.ExternalSesId[0] && Gbl.Imported.ExternalRole == Rol_ROLE_TEACHER) // ...as a teacher