From 4e3b9508d5f067b05d89795e4be7f0af8882b22e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Wed, 21 Jan 2015 23:44:13 +0100 Subject: [PATCH] Version 14.63.4 --- swad_changelog.h | 3 ++- swad_degree.c | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 5adaaf219..1be7e26b5 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -39,11 +39,12 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.63.3 (2015/01/21)" +#define Log_PLATFORM_VERSION "SWAD 14.63.4 (2015/01/21)" // 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 /* + Version 14.63.4: Jan 21, 2015 Fixed bug in listing of degree administrators, reported by Antonio Fernández Ares. (175548 lines) Version 14.63.3: Jan 21, 2015 Fixed bug when expanding folders, reported by Nadir Román Guerrero and others. (175545 lines) Version 14.63.2: Jan 21, 2015 Fixed bug in search of courses. (175542 lines) Version 14.63.1: Jan 21, 2015 Remove last accesses to file browsers related with an institution, a centre or a degree. (175531 lines) diff --git a/swad_degree.c b/swad_degree.c index 5ee5c09ab..62b1ec0ab 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -3893,14 +3893,17 @@ void Deg_GetAndWriteDegreesAdminBy (long UsrCod,unsigned ColSpan) long DegCod; /***** Get degrees admin by a user from database *****/ - sprintf (Query,"(SELECT DegCod,'','' AS ShortName,'' FROM deg_admin WHERE UsrCod='%ld' AND DegCod<'0')" + sprintf (Query,"(SELECT DegCod,'' AS ShortName,''" + " FROM deg_admin" + " WHERE UsrCod='%ld' AND DegCod<'0')" " UNION " - "(SELECT degrees.DegCod,degrees.ShortName AS ShortName,degrees.FullName FROM deg_admin,degrees" - " WHERE deg_admin.UsrCod='%ld' AND deg_admin.DegCod>='0' AND deg_admin.DegCod=degrees.DegCod)" + "(SELECT degrees.DegCod,degrees.ShortName AS ShortName,degrees.FullName" + " FROM deg_admin,degrees" + " WHERE deg_admin.UsrCod='%ld' AND deg_admin.DegCod>='0'" + " AND deg_admin.DegCod=degrees.DegCod)" " ORDER BY ShortName", UsrCod,UsrCod); if ((NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get degrees admin by a user"))) // If degrees found for this administrator - { /***** Get the list of degrees *****/ for (NumRow = 1; NumRow <= NumRows; @@ -3910,9 +3913,9 @@ void Deg_GetAndWriteDegreesAdminBy (long UsrCod,unsigned ColSpan) fprintf (Gbl.F.Out,"" "" - "\"\""" + "\"\""" "", Gbl.ColorRows[Gbl.RowEvenOdd],Gbl.Prefs.IconsURL, NumRow == NumRows ? "subend" : @@ -3952,7 +3955,6 @@ void Deg_GetAndWriteDegreesAdminBy (long UsrCod,unsigned ColSpan) fprintf (Gbl.F.Out,"" ""); } - } /***** Free structure that stores the query result *****/ DB_FreeMySQLResult (&mysql_res);