Version 14.63.4

This commit is contained in:
Antonio Cañas Vargas 2015-01-21 23:44:13 +01:00
parent f7c05289fe
commit 4e3b9508d5
2 changed files with 12 additions and 9 deletions

View File

@ -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)

View File

@ -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,"<tr>"
"<td style=\"text-align:right;"
" background-color:%s;\">"
"<img src=\"%s/%s16x16.gif\" alt=\"\""
" class=\"ICON16x16\""
" style=\"vertical-align:top;\" />"
"<img src=\"%s/%s20x20.gif\" alt=\"\""
" style=\"width:20px; height:20px;"
" vertical-align:top;\" />"
"</td>",
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,"</td>"
"</tr>");
}
}
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);