Version 16.135.2

This commit is contained in:
Antonio Cañas Vargas 2017-02-09 18:56:29 +01:00
parent 1cc5b9db1b
commit fba656b698
2 changed files with 31 additions and 38 deletions

View File

@ -196,13 +196,14 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.135.1 (2017-02-09)" #define Log_PLATFORM_VERSION "SWAD 16.135.2 (2017-02-09)"
#define CSS_FILE "swad16.135.css" #define CSS_FILE "swad16.135.css"
#define JS_FILE "swad16.123.js" #define JS_FILE "swad16.123.js"
// Number of lines (includes comments but not blank lines) has been got with the following command: // 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 sql/swad*.sql | tail -1 // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
/* /*
Version 16.135.2: Feb 09, 2017 Changes in layout of stats on degrees. (212456 lines)
Version 16.135.1: Feb 09, 2017 Link from current date to calendar depending on scope. (212461 lines) Version 16.135.1: Feb 09, 2017 Link from current date to calendar depending on scope. (212461 lines)
Version 16.135: Feb 09, 2017 Changes in layout of tabs. (212452 lines) Version 16.135: Feb 09, 2017 Changes in layout of tabs. (212452 lines)
Version 16.134.3: Feb 09, 2017 Changes in visible tabs depending on scope. (212451 lines) Version 16.134.3: Feb 09, 2017 Changes in visible tabs depending on scope. (212451 lines)

View File

@ -1604,6 +1604,9 @@ void Pho_PrintPhotoDegree (void)
void Pho_ShowOrPrintPhotoDegree (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint) void Pho_ShowOrPrintPhotoDegree (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
{ {
extern const char *Hlp_STATS_Degrees;
extern const char *Txt_Degrees;
/***** Get photo size from form *****/ /***** Get photo size from form *****/
Gbl.Stat.DegPhotos.HowComputePhotoSize = Pho_GetHowComputePhotoSizeFromForm (); Gbl.Stat.DegPhotos.HowComputePhotoSize = Pho_GetHowComputePhotoSizeFromForm ();
@ -1615,24 +1618,35 @@ void Pho_ShowOrPrintPhotoDegree (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
and preference about view photos *****/ and preference about view photos *****/
Usr_GetAndUpdatePrefsAboutUsrList (); Usr_GetAndUpdatePrefsAboutUsrList ();
if (SeeOrPrint == Pho_DEGREES_SEE) switch (SeeOrPrint)
{ {
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_2\"" case Pho_DEGREES_SEE:
" style=\"margin:0 auto;\">"); /***** Link to computation of average photos *****/
Pho_PutLinkToCalculateDegreeStats ();
/***** Put a selector for the type of average *****/ /***** Start frame *****/
Pho_PutSelectorForTypeOfAvg (); Lay_StartRoundFrame (NULL,Txt_Degrees,
Pho_PutIconToPrintDegreeStats,
Hlp_STATS_Degrees);
/***** Put a selector for the size of photos *****/ fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_2\""
Pho_PutSelectorForHowComputePhotoSize (); " style=\"margin:0 auto;\">");
/***** Put a selector for the order of degrees *****/ /***** Put a selector for the type of average *****/
Pho_PutSelectorForHowOrderDegrees (); Pho_PutSelectorForTypeOfAvg ();
fprintf (Gbl.F.Out,"</table>"); /***** Put a selector for the size of photos *****/
Pho_PutSelectorForHowComputePhotoSize ();
/***** Link to computation of average photos *****/ /***** Put a selector for the order of degrees *****/
Pho_PutLinkToCalculateDegreeStats (); Pho_PutSelectorForHowOrderDegrees ();
fprintf (Gbl.F.Out,"</table>");
break;
case Pho_DEGREES_PRINT:
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_Degrees,NULL,NULL);
break;
} }
/***** Get maximum number of students /***** Get maximum number of students
@ -1652,6 +1666,9 @@ void Pho_ShowOrPrintPhotoDegree (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
default: default:
break; break;
} }
/***** End frame *****/
Lay_EndRoundFrame ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1987,8 +2004,6 @@ static void Pho_GetMaxStdsPerDegree (void)
static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint) static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
{ {
extern const char *Hlp_STATS_Degrees;
extern const char *Txt_Degrees;
extern const char *Txt_No_users_found[Rol_NUM_ROLES]; extern const char *Txt_No_users_found[Rol_NUM_ROLES];
char Query[512]; char Query[512];
MYSQL_RES *mysql_res; MYSQL_RES *mysql_res;
@ -2005,13 +2020,6 @@ static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrin
Pho_BuildQueryOfDegrees (Query); Pho_BuildQueryOfDegrees (Query);
NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get degrees"); NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get degrees");
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_Degrees,
SeeOrPrint == Pho_DEGREES_SEE ? Pho_PutIconToPrintDegreeStats :
NULL,
SeeOrPrint == Pho_DEGREES_SEE ? Hlp_STATS_Degrees :
NULL);
if (NumRows) // Degrees with students found if (NumRows) // Degrees with students found
{ {
/***** Form to select type of list used to display degree photos *****/ /***** Form to select type of list used to display degree photos *****/
@ -2065,12 +2073,8 @@ static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrin
else // No degrees with students found else // No degrees with students found
Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_STUDENT]); Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_STUDENT]);
/***** End frame *****/
Lay_EndRoundFrame ();
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2079,8 +2083,6 @@ static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrin
static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint) static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
{ {
extern const char *Hlp_STATS_Degrees;
extern const char *Txt_Degrees;
extern const char *Txt_No_INDEX; extern const char *Txt_No_INDEX;
extern const char *Txt_Degree; extern const char *Txt_Degree;
extern const char *Txt_SEX_PLURAL_Abc[Usr_NUM_SEXS]; extern const char *Txt_SEX_PLURAL_Abc[Usr_NUM_SEXS];
@ -2100,13 +2102,6 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
Pho_BuildQueryOfDegrees (Query); Pho_BuildQueryOfDegrees (Query);
NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get degrees"); NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get degrees");
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_Degrees,
SeeOrPrint == Pho_DEGREES_SEE ? Pho_PutIconToPrintDegreeStats :
NULL,
SeeOrPrint == Pho_DEGREES_SEE ? Hlp_STATS_Degrees :
NULL);
if (NumRows) // Degrees with students found if (NumRows) // Degrees with students found
{ {
/***** Class photo start *****/ /***** Class photo start *****/
@ -2193,9 +2188,6 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
else // No degrees with students found! else // No degrees with students found!
Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_STUDENT]); Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_STUDENT]);
/***** End frame *****/
Lay_EndRoundFrame ();
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
} }