Version19.33.8

This commit is contained in:
Antonio Cañas Vargas 2019-10-13 22:13:17 +02:00
parent 768cee410a
commit a1fbdc99a1
15 changed files with 64 additions and 29 deletions

View File

@ -3519,7 +3519,7 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
/***** Write user's ID ******/
Tbl_TD_Begin ("class=\"LEFT_MIDDLE COLOR%u\"",Gbl.RowEvenOdd);
Tbl_TABLE_BeginWithoutAttr ();
Tbl_TABLE_Begin (NULL);
Tbl_TR_Begin (NULL);
Tbl_TD_Begin ("class=\"%s LEFT_MIDDLE\"",

View File

@ -487,7 +487,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 19.33.7 (2019-10-13)"
#define Log_PLATFORM_VERSION "SWAD 19.33.8 (2019-10-13)"
#define CSS_FILE "swad19.33.css"
#define JS_FILE "swad19.30.js"
/*
@ -496,6 +496,7 @@ ps2pdf source.ps destination.pdf
// 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.)
Version 19.33.8: Oct 13, 2019 Fixed bug in tables. (245339 lines)
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)

View File

@ -557,7 +557,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
/***** Start table *****/
Tbl_TABLE_BeginWithoutAttr ();
Tbl_TABLE_Begin (NULL);
Tbl_TR_Begin (NULL);
/***** Year *****/
@ -824,7 +824,7 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
unsigned NumDaysSelectedMonth;
/***** Start table *****/
Tbl_TABLE_BeginWithoutAttr ();
Tbl_TABLE_Begin (NULL);
Tbl_TR_Begin (NULL);
/***** Year *****/

View File

@ -2510,8 +2510,8 @@ void Hie_GetAndWriteInsCtrDegAdminBy (long UsrCod,unsigned ColSpan)
Tbl_TD_End ();
/***** Write institution, centre, degree *****/
Tbl_TD_Begin ("colspan=\"%u\" class=\"DAT_SMALL_NOBR LEFT_TOP COLOR%u\">",
ColSpan - 1,Gbl.RowEvenOdd);
Tbl_TD_Begin ("colspan=\"%u\" class=\"DAT_SMALL_NOBR LEFT_TOP COLOR%u\"",
ColSpan - 1,Gbl.RowEvenOdd);
/* Get next institution, centre, degree */
row = mysql_fetch_row (mysql_res);

View File

@ -5596,7 +5596,7 @@ static bool Brw_WriteRowFileBrowser (unsigned Level,const char *RowId,
/* Start column */
Tbl_TD_Begin ("class=\"NO_BR LEFT_TOP COLOR%u\" style=\"width:99%%;\"",Gbl.RowEvenOdd);
Tbl_TABLE_BeginWithoutAttr ();
Tbl_TABLE_Begin (NULL);
Tbl_TR_Begin (NULL);
/* Indent depending on level */
@ -5824,7 +5824,7 @@ static void Brw_IndentAndWriteIconExpandContract (unsigned Level,
Brw_IconTree_t IconThisRow)
{
Tbl_TD_Begin ("class=\"LEFT_MIDDLE\"");
Tbl_TABLE_BeginWithoutAttr ();
Tbl_TABLE_Begin (NULL);
Tbl_TR_Begin (NULL);
Brw_IndentDependingOnLevel (Level);
@ -8512,7 +8512,7 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow)
FileNameToShow);
/***** URL *****/
Tbl_TABLE_BeginWithoutAttr ();
Tbl_TABLE_Begin (NULL);
Tbl_TR_Begin (NULL);
Tbl_TD_Begin ("class=\"RIGHT_MIDDLE\"");

View File

@ -217,7 +217,7 @@ void Fol_SuggestUsrsToFollowMainZoneOnRightColumn (void)
Frm_EndForm ();
/***** Start table *****/
Tbl_TABLE_BeginWithoutAttr ();
Tbl_TABLE_Begin (NULL);
/***** Initialize structure with user's data *****/
Usr_UsrDataConstructor (&UsrDat);

View File

@ -1616,11 +1616,11 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
Crs_GetDataOfCourseByCod (&Crs);
/***** Start table *****/
fprintf (Gbl.F.Out,"<table style=\"width:100%%; padding:12px;\">"); // TODO: Change inline style to class
Tbl_TABLE_BeginWidePadding (10);
Tbl_TR_Begin (NULL);
/***** First column: institution logo *****/
Tbl_TD_Begin ("class=\"LEFT_TOP\" style=\"width:80px;\"");
Tbl_TD_Begin ("class=\"LEFT_TOP\" style=\"width:60px;\"");
if (InsCod > 0)
{
if (!PrintView)
@ -1668,7 +1668,7 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
Tbl_TD_End ();
/***** Third column: degree logo *****/
Tbl_TD_Begin ("class=\"RIGHT_TOP\" style=\"width:80px;\"");
Tbl_TD_Begin ("class=\"RIGHT_TOP\" style=\"width:60px;\"");
if (DegCod > 0)
{
if (!PrintView)

View File

@ -3363,7 +3363,7 @@ static void Msg_WriteMsgFrom (struct UsrData *UsrDat,bool Deleted)
bool ShowPhoto;
char PhotoURL[PATH_MAX + 1];
Tbl_TABLE_BeginWithoutAttr ();
Tbl_TABLE_Begin (NULL);
Tbl_TR_Begin (NULL);
/***** Put an icon to show if user has read the message *****/
@ -3492,7 +3492,7 @@ static void Msg_WriteMsgTo (long MsgCod)
if (NumRecipientsTotal)
{
/***** Start table *****/
Tbl_TABLE_BeginWithoutAttr ();
Tbl_TABLE_Begin (NULL);
/***** How many recipients will be shown? *****/
if (NumRecipientsKnown <= Msg_MAX_RECIPIENTS_TO_SHOW)

View File

@ -1538,7 +1538,7 @@ void Prf_ShowRankingFigure (MYSQL_RES **mysql_res,unsigned NumUsrs)
/***** Initialize structure with user's data *****/
Usr_UsrDataConstructor (&UsrDat);
Tbl_TABLE_BeginWithoutAttr ();
Tbl_TABLE_Begin (NULL);
for (NumUsr = 1, Rank = 1, Gbl.RowEvenOdd = 0;
NumUsr <= NumUsrs;
@ -1707,7 +1707,7 @@ void Prf_GetAndShowRankingClicksPerDay (void)
/***** Initialize structure with user's data *****/
Usr_UsrDataConstructor (&UsrDat);
Tbl_TABLE_BeginWithoutAttr ();
Tbl_TABLE_Begin (NULL);
for (NumUsr = 1, Rank = 1, Gbl.RowEvenOdd = 0;
NumUsr <= NumUsrs;

View File

@ -383,7 +383,7 @@ void Sta_AskShowCrsHits (void)
Tbl_TD_End ();
Tbl_TD_Begin ("colspan=\"2\" class=\"%s LEFT_TOP\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
Tbl_TABLE_BeginWithoutAttr ();
Tbl_TABLE_Begin (NULL);
Usr_ListUsersToSelect (Rol_TCH);
Usr_ListUsersToSelect (Rol_NET);
Usr_ListUsersToSelect (Rol_STD);

View File

@ -55,6 +55,7 @@ extern struct Globals Gbl;
/***************************** Private vatiables *****************************/
/*****************************************************************************/
static unsigned Tbl_TABLE_NestingLevel = 0;
static unsigned Tbl_TR_NestingLevel = 0;
static unsigned Tbl_TH_NestingLevel = 0;
static unsigned Tbl_TD_NestingLevel = 0;
@ -63,10 +64,13 @@ static unsigned Tbl_TD_NestingLevel = 0;
/***************************** Private prototypes ****************************/
/*****************************************************************************/
static void Tbl_TR_BeginWithoutAttr (void);
static void Tbl_TH_BeginWithoutAttr (void);
static void Tbl_TABLE_BeginWithoutAttr (void);
static void Tbl_TR_BeginWithoutAttr (void);
static void Tbl_TH_BeginWithoutAttr (void);
static void Tbl_TH_BeginAttr (const char *fmt,...);
static void Tbl_TD_BeginWithoutAttr (void);
/*****************************************************************************/
@ -95,6 +99,8 @@ void Tbl_TABLE_Begin (const char *fmt,...)
/***** Print HTML *****/
fprintf (Gbl.F.Out,"<table class=\"%s\">",Class);
Tbl_TABLE_NestingLevel++;
free ((void *) Class);
}
else
@ -107,22 +113,32 @@ void Tbl_TABLE_Begin (const char *fmt,...)
void Tbl_TABLE_BeginPadding (unsigned CellPadding)
{
if (CellPadding)
{
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_%u\">",
CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
Tbl_TABLE_NestingLevel++;
}
else
Tbl_TABLE_BeginWithoutAttr ();
}
void Tbl_TABLE_BeginWithoutAttr (void)
static void Tbl_TABLE_BeginWithoutAttr (void)
{
fprintf (Gbl.F.Out,"<table>");
Tbl_TABLE_NestingLevel++;
}
void Tbl_TABLE_BeginCenterPadding (unsigned CellPadding)
{
if (CellPadding)
{
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_CENTER CELLS_PAD_%u\">",
CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
Tbl_TABLE_NestingLevel++;
}
else
Tbl_TABLE_BeginCenter ();
}
@ -130,13 +146,19 @@ void Tbl_TABLE_BeginCenterPadding (unsigned CellPadding)
void Tbl_TABLE_BeginCenter (void)
{
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_CENTER\">");
Tbl_TABLE_NestingLevel++;
}
void Tbl_TABLE_BeginWidePadding (unsigned CellPadding)
{
if (CellPadding)
{
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_WIDE CELLS_PAD_%u\">",
CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
Tbl_TABLE_NestingLevel++;
}
else
Tbl_TABLE_BeginWide ();
}
@ -144,13 +166,19 @@ void Tbl_TABLE_BeginWidePadding (unsigned CellPadding)
void Tbl_TABLE_BeginWide (void)
{
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_WIDE\">");
Tbl_TABLE_NestingLevel++;
}
void Tbl_TABLE_BeginWideMarginPadding (unsigned CellPadding)
{
if (CellPadding)
{
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_WIDE_MARGIN CELLS_PAD_%u\">",
CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
Tbl_TABLE_NestingLevel++;
}
else
Tbl_TABLE_BeginWideMargin ();
}
@ -158,11 +186,18 @@ void Tbl_TABLE_BeginWideMarginPadding (unsigned CellPadding)
void Tbl_TABLE_BeginWideMargin (void)
{
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_WIDE_MARGIN\">");
Tbl_TABLE_NestingLevel++;
}
void Tbl_TABLE_End (void)
{
if (Tbl_TABLE_NestingLevel == 0) // No TABLE open
Ale_ShowAlert (Ale_ERROR,"Trying to close unopened TABLE.");
fprintf (Gbl.F.Out,"</table>");
Tbl_TABLE_NestingLevel--;
}
/*****************************************************************************/
@ -210,7 +245,7 @@ static void Tbl_TR_BeginWithoutAttr (void)
void Tbl_TR_End (void)
{
if (Tbl_TR_NestingLevel == 0) // No TR open
Lay_ShowErrorAndExit ("Trying to close unopened TR.");
Ale_ShowAlert (Ale_ERROR,"Trying to close unopened TR.");
fprintf (Gbl.F.Out,"</tr>");
@ -310,7 +345,7 @@ static void Tbl_TH_BeginWithoutAttr (void)
void Tbl_TH_End (void)
{
if (Tbl_TH_NestingLevel == 0) // No TH open
Lay_ShowErrorAndExit ("Trying to close unopened TR.");
Ale_ShowAlert (Ale_ERROR,"Trying to close unopened TR.");
fprintf (Gbl.F.Out,"</th>");
@ -375,7 +410,7 @@ static void Tbl_TD_BeginWithoutAttr (void)
void Tbl_TD_End (void)
{
if (Tbl_TD_NestingLevel == 0) // No TH open
Lay_ShowErrorAndExit ("Trying to close unopened TR.");
Ale_ShowAlert (Ale_ERROR,"Trying to close unopened TR.");
fprintf (Gbl.F.Out,"</td>");

View File

@ -41,7 +41,6 @@
void Tbl_TABLE_Begin (const char *fmt,...);
void Tbl_TABLE_BeginPadding (unsigned CellPadding);
void Tbl_TABLE_BeginWithoutAttr (void);
void Tbl_TABLE_BeginCenterPadding (unsigned CellPadding);
void Tbl_TABLE_BeginCenter (void);
void Tbl_TABLE_BeginWidePadding (unsigned CellPadding);

View File

@ -1031,7 +1031,7 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
if (Gbl.Test.Tags.Num)
{
/***** Write the tags *****/
Tbl_TABLE_BeginWithoutAttr ();
Tbl_TABLE_Begin (NULL);
for (NumTag = 0;
NumTag < Gbl.Test.Tags.Num;
NumTag++)
@ -1099,7 +1099,7 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
case Tst_ANS_UNIQUE_CHOICE:
case Tst_ANS_MULTIPLE_CHOICE:
case Tst_ANS_TEXT:
Tbl_TABLE_BeginWithoutAttr ();
Tbl_TABLE_Begin (NULL);
for (NumOpt = 0;
NumOpt < Gbl.Test.Answer.NumOptions;
NumOpt++)

View File

@ -1126,7 +1126,7 @@ static void TT_DrawTimeTable (void)
unsigned ContinuousFreeMinicolumns;
/***** Start table *****/
fprintf (Gbl.F.Out,"<table id=\"timetable\">");
Tbl_TABLE_Begin ("id=\"timetable\"");
/***** Top row used for column adjustement *****/
TT_TimeTableDrawAdjustRow ();

View File

@ -7374,7 +7374,7 @@ void Usr_ListDataAdms (void)
fprintf (Gbl.F.Out,"</div>");
/***** Heading row with column names *****/
Tbl_TABLE_BeginWithoutAttr ();
Tbl_TABLE_Begin (NULL);
Tbl_TR_Begin (NULL);
for (NumCol = 0;