Version19.33.7

This commit is contained in:
Antonio Cañas Vargas 2019-10-13 18:19:26 +02:00
parent 75061c2cdb
commit 768cee410a
4 changed files with 40 additions and 6 deletions

View File

@ -487,7 +487,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD: En OpenSWAD:
ps2pdf source.ps destination.pdf ps2pdf source.ps destination.pdf
*/ */
#define Log_PLATFORM_VERSION "SWAD 19.33.5 (2019-10-13)" #define Log_PLATFORM_VERSION "SWAD 19.33.7 (2019-10-13)"
#define CSS_FILE "swad19.33.css" #define CSS_FILE "swad19.33.css"
#define JS_FILE "swad19.30.js" #define JS_FILE "swad19.30.js"
/* /*
@ -496,6 +496,8 @@ ps2pdf source.ps destination.pdf
// TODO: En un TFG no preasignado con estudiante tiene que salir un triángulo amarillo // TODO: En un TFG no preasignado con estudiante tiene que salir un triángulo amarillo
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.) // TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
Version 19.33.7: Oct 13, 2019 Fixed bug in surveys. (245317 lines)
Version 19.33.6: Oct 13, 2019 Fixed bug in exam announcements. (245299 lines)
Version 19.33.5: Oct 13, 2019 Fixed bug in file browser. (245298 lines) Version 19.33.5: Oct 13, 2019 Fixed bug in file browser. (245298 lines)
Version 19.33.4: Oct 13, 2019 Code refactoring in HTML table headings. (245291 lines) Version 19.33.4: Oct 13, 2019 Code refactoring in HTML table headings. (245291 lines)
Version 19.33.3: Oct 13, 2019 Code refactoring in HTML table headings. (245499 lines) Version 19.33.3: Oct 13, 2019 Code refactoring in HTML table headings. (245499 lines)

View File

@ -1040,8 +1040,8 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
} }
/***** Start table *****/ /***** Start table *****/
Tbl_TABLE_Begin ("%s CELLS_PAD_2\">", Tbl_TABLE_Begin ("%s CELLS_PAD_2",
ClassExaAnnouncement[TypeViewExamAnnouncement][Gbl.ExamAnns.ExaDat.Status]); ClassExaAnnouncement[TypeViewExamAnnouncement][Gbl.ExamAnns.ExaDat.Status]);
/***** Institution logo *****/ /***** Institution logo *****/
Tbl_TR_Begin (NULL); Tbl_TR_Begin (NULL);

View File

@ -3278,6 +3278,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,
Svy_WriteQstStem (row[3]); Svy_WriteQstStem (row[3]);
Svy_WriteAnswersOfAQst (Svy,SvyQst,PutFormAnswerSurvey); Svy_WriteAnswersOfAQst (Svy,SvyQst,PutFormAnswerSurvey);
Tbl_TD_End (); Tbl_TD_End ();
Tbl_TR_End (); Tbl_TR_End ();
} }
@ -3396,6 +3397,7 @@ static void Svy_WriteAnswersOfAQst (struct Survey *Svy,
/* Write one row for each answer */ /* Write one row for each answer */
Tbl_TABLE_BeginPadding (5); Tbl_TABLE_BeginPadding (5);
for (NumAns = 0; for (NumAns = 0;
NumAns < NumAnswers; NumAns < NumAnswers;
NumAns++) NumAns++)
@ -3461,6 +3463,7 @@ static void Svy_WriteAnswersOfAQst (struct Survey *Svy,
/* Free memory allocated for the answer */ /* Free memory allocated for the answer */
Svy_FreeTextChoiceAnswer (SvyQst,NumAns); Svy_FreeTextChoiceAnswer (SvyQst,NumAns);
} }
Tbl_TABLE_End (); Tbl_TABLE_End ();
} }
@ -3491,8 +3494,9 @@ static void Svy_DrawBarNumUsrs (unsigned NumUsrs,unsigned MaxUsrs)
"0&nbsp;(0%%&nbsp;%s&nbsp;%u)", "0&nbsp;(0%%&nbsp;%s&nbsp;%u)",
Txt_of_PART_OF_A_TOTAL,MaxUsrs); Txt_of_PART_OF_A_TOTAL,MaxUsrs);
/***** Draw bar with a with proportional to the number of clicks *****/
Tbl_TD_Begin ("class=\"DAT LEFT_TOP\" style=\"width:%upx;\"",Svy_MAX_BAR_WIDTH + 125); Tbl_TD_Begin ("class=\"DAT LEFT_TOP\" style=\"width:%upx;\"",Svy_MAX_BAR_WIDTH + 125);
/***** Draw bar with a with proportional to the number of clicks *****/
if (NumUsrs && MaxUsrs) if (NumUsrs && MaxUsrs)
BarWidth = (unsigned) ((((float) NumUsrs * (float) Svy_MAX_BAR_WIDTH) / BarWidth = (unsigned) ((((float) NumUsrs * (float) Svy_MAX_BAR_WIDTH) /
(float) MaxUsrs) + 0.5); (float) MaxUsrs) + 0.5);
@ -3511,9 +3515,8 @@ static void Svy_DrawBarNumUsrs (unsigned NumUsrs,unsigned MaxUsrs)
/***** Write the number of users *****/ /***** Write the number of users *****/
fprintf (Gbl.F.Out,"%s", fprintf (Gbl.F.Out,"%s",
Gbl.Title); Gbl.Title);
Tbl_TD_End ();
Tbl_TR_End (); Tbl_TD_End ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -51,6 +51,14 @@ extern struct Globals Gbl;
/******************************* Private types *******************************/ /******************************* Private types *******************************/
/*****************************************************************************/ /*****************************************************************************/
/*****************************************************************************/
/***************************** Private vatiables *****************************/
/*****************************************************************************/
static unsigned Tbl_TR_NestingLevel = 0;
static unsigned Tbl_TH_NestingLevel = 0;
static unsigned Tbl_TD_NestingLevel = 0;
/*****************************************************************************/ /*****************************************************************************/
/***************************** Private prototypes ****************************/ /***************************** Private prototypes ****************************/
/*****************************************************************************/ /*****************************************************************************/
@ -190,6 +198,8 @@ void Tbl_TR_Begin (const char *fmt,...)
} }
else else
Tbl_TR_BeginWithoutAttr (); Tbl_TR_BeginWithoutAttr ();
Tbl_TR_NestingLevel++;
} }
static void Tbl_TR_BeginWithoutAttr (void) static void Tbl_TR_BeginWithoutAttr (void)
@ -199,7 +209,12 @@ static void Tbl_TR_BeginWithoutAttr (void)
void Tbl_TR_End (void) void Tbl_TR_End (void)
{ {
if (Tbl_TR_NestingLevel == 0) // No TR open
Lay_ShowErrorAndExit ("Trying to close unopened TR.");
fprintf (Gbl.F.Out,"</tr>"); fprintf (Gbl.F.Out,"</tr>");
Tbl_TR_NestingLevel--;
} }
/*****************************************************************************/ /*****************************************************************************/
@ -283,6 +298,8 @@ static void Tbl_TH_BeginAttr (const char *fmt,...)
} }
else else
Tbl_TH_BeginWithoutAttr (); Tbl_TH_BeginWithoutAttr ();
Tbl_TH_NestingLevel++;
} }
static void Tbl_TH_BeginWithoutAttr (void) static void Tbl_TH_BeginWithoutAttr (void)
@ -292,7 +309,12 @@ static void Tbl_TH_BeginWithoutAttr (void)
void Tbl_TH_End (void) void Tbl_TH_End (void)
{ {
if (Tbl_TH_NestingLevel == 0) // No TH open
Lay_ShowErrorAndExit ("Trying to close unopened TR.");
fprintf (Gbl.F.Out,"</th>"); fprintf (Gbl.F.Out,"</th>");
Tbl_TH_NestingLevel--;
} }
void Tbl_TH_Empty (unsigned NumColumns) void Tbl_TH_Empty (unsigned NumColumns)
@ -341,6 +363,8 @@ void Tbl_TD_Begin (const char *fmt,...)
} }
else else
Tbl_TD_BeginWithoutAttr (); Tbl_TD_BeginWithoutAttr ();
Tbl_TD_NestingLevel++;
} }
static void Tbl_TD_BeginWithoutAttr (void) static void Tbl_TD_BeginWithoutAttr (void)
@ -350,7 +374,12 @@ static void Tbl_TD_BeginWithoutAttr (void)
void Tbl_TD_End (void) void Tbl_TD_End (void)
{ {
if (Tbl_TD_NestingLevel == 0) // No TH open
Lay_ShowErrorAndExit ("Trying to close unopened TR.");
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
Tbl_TD_NestingLevel--;
} }
void Tbl_TD_Empty (unsigned NumColumns) void Tbl_TD_Empty (unsigned NumColumns)