From b8b64e3f4a054729e971a0f84415168acf4d8598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sun, 8 Feb 2015 14:29:44 +0100 Subject: [PATCH] Version 14.74.2 --- swad_banner.c | 22 +++++++++++++--------- swad_changelog.h | 6 +++++- swad_config.h | 4 ++-- swad_import.c | 7 ++++--- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/swad_banner.c b/swad_banner.c index 33fca5542..9c0589680 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -237,13 +237,14 @@ void Ban_GetDataOfBannerByCod (struct Banner *Ban) unsigned long NumRows; /***** Clear data *****/ + Ban->IsHidden = false; Ban->ShortName[0] = Ban->FullName[0] = Ban->Img[0] = Ban->WWW[0] = '\0'; /***** Check if banner code is correct *****/ if (Ban->BanCod > 0) { /***** Get data of a banner from database *****/ - sprintf (Query,"SELECT ShortName,FullName,Img,WWW" + sprintf (Query,"SELECT Hidden,ShortName,FullName,Img,WWW" " FROM banners WHERE BanCod='%ld'", Ban->BanCod); NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get data of a banner"); @@ -253,17 +254,20 @@ void Ban_GetDataOfBannerByCod (struct Banner *Ban) /* Get row */ row = mysql_fetch_row (mysql_res); - /* Get the short name of the banner (row[0]) */ - strcpy (Ban->ShortName,row[0]); + /* Get if the banner is hidden (row[0]) */ + Ban->IsHidden = (row[0][0] == 'Y'); - /* Get the full name of the banner (row[1]) */ - strcpy (Ban->FullName,row[1]); + /* Get the short name of the banner (row[1]) */ + strcpy (Ban->ShortName,row[1]); - /* Get the image of the banner (row[2]) */ - strcpy (Ban->Img,row[2]); + /* Get the full name of the banner (row[2]) */ + strcpy (Ban->FullName,row[2]); - /* Get the URL of the banner (row[3]) */ - strcpy (Ban->WWW,row[3]); + /* Get the image of the banner (row[3]) */ + strcpy (Ban->Img,row[3]); + + /* Get the URL of the banner (row[4]) */ + strcpy (Ban->WWW,row[4]); } /***** Free structure that stores the query result *****/ diff --git a/swad_changelog.h b/swad_changelog.h index c936831ce..2eaaf76c4 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -41,11 +41,15 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.74.1 (2015/02/06)" +#define Log_PLATFORM_VERSION "SWAD 14.74.2 (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.2: Feb 08, 2015 Fixed bug in banners. (177994 lines) Version 14.74.1: Feb 06, 2015 Fixed bug in shared files. (177986 lines) Version 14.74: Feb 05, 2015 Shared files for institution, centre and degree. (177982 lines) Version 14.73.5: Feb 05, 2015 New message when user does not belong to any course. (177170 lines) diff --git a/swad_config.h b/swad_config.h index 026614fa1..406a14d79 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_import.c b/swad_import.c index c23523725..af102602e 100644 --- a/swad_import.c +++ b/swad_import.c @@ -414,7 +414,6 @@ static void Imp_ListMyImpGrpsAndStds (bool ItsAFormToRegRemStds) /***** Write message depending on return code *****/ ReturnCode = WEXITSTATUS(ReturnCode); - switch (ReturnCode) { case 0: // Success @@ -496,9 +495,11 @@ static unsigned Imp_GetAndListImpGrpsAndStdsFromDB (bool ItsAFormToRegRemStds) MYSQL_RES *mysql_res_std; MYSQL_ROW row; char ExternalCrsCod[Crs_LENGTH_INSTITUTIONAL_CRS_COD+1]; - unsigned NumGrps,NumGrp; + unsigned NumGrps; + unsigned NumGrp; long GrpCod; - unsigned NumStds,NumStd; + unsigned NumStds; + unsigned NumStd; /***** Get data of imported groups from database *****/ sprintf (Query,"SELECT GrpCod,ExternalCrsCod,DegName,CrsName,GrpName,GrpType"