mirror of https://github.com/acanas/swad-core.git
Version19.31.38
This commit is contained in:
parent
e99957efd5
commit
1c065cbf99
|
@ -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.31.37 (2019-10-10)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.31.38 (2019-10-10)"
|
||||
#define CSS_FILE "swad19.29.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.31.38: Oct 10, 2019 Code refactoring in HTML tables. (246657 lines)
|
||||
Version 19.31.37: Oct 10, 2019 Code refactoring in HTML tables. (246626 lines)
|
||||
Version 19.31.36: Oct 10, 2019 Code refactoring in HTML tables. (246620 lines)
|
||||
Version 19.31.35: Oct 10, 2019 Code refactoring in HTML tables. (246629 lines)
|
||||
|
|
19
swad_test.c
19
swad_test.c
|
@ -4512,28 +4512,29 @@ static void Tst_WriteIntAnsAssessTest (struct UsrData *UsrDat,
|
|||
Tbl_StartRow ();
|
||||
|
||||
/***** Write the user answer *****/
|
||||
fprintf (Gbl.F.Out,"<td");
|
||||
if (Gbl.Test.StrAnswersOneQst[NumQst][0]) // If user has answered the question
|
||||
{
|
||||
if (sscanf (Gbl.Test.StrAnswersOneQst[NumQst],"%ld",&IntAnswerUsr) == 1)
|
||||
fprintf (Gbl.F.Out," class=\"%s CENTER_MIDDLE\">"
|
||||
"%ld",
|
||||
{
|
||||
Tbl_StartCellAttr ("class=\"%s CENTER_MIDDLE\"",
|
||||
(Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD ||
|
||||
Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) ?
|
||||
(IntAnswerUsr == IntAnswerCorr ? "ANS_OK" :
|
||||
"ANS_BAD") :
|
||||
"ANS_0",
|
||||
IntAnswerUsr);
|
||||
"ANS_0");
|
||||
fprintf (Gbl.F.Out,"%ld",IntAnswerUsr);
|
||||
Tbl_EndCell ();
|
||||
}
|
||||
else
|
||||
{
|
||||
Gbl.Test.StrAnswersOneQst[NumQst][0] = '\0';
|
||||
fprintf (Gbl.F.Out," class=\"ANS_0 CENTER_MIDDLE\">"
|
||||
"?");
|
||||
Tbl_StartCellAttr ("class=\"ANS_0 CENTER_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"?");
|
||||
Tbl_EndCell ();
|
||||
}
|
||||
}
|
||||
else // If user has omitted the answer
|
||||
fprintf (Gbl.F.Out,">");
|
||||
Tbl_EndCell ();
|
||||
Tbl_PutEmptyCells (1);
|
||||
|
||||
/***** Write the correct answer *****/
|
||||
Tbl_StartCellAttr ("class=\"ANS_0 CENTER_MIDDLE\"");
|
||||
|
|
|
@ -1135,7 +1135,7 @@ static void TT_DrawTimeTable (void)
|
|||
Tbl_StartRow ();
|
||||
|
||||
Tbl_StartCellAttr ("rowspan=\"2\" class=\"TT_HOUR_BIG RIGHT_MIDDLE\""
|
||||
" style=\"width:%u%%;\">",
|
||||
" style=\"width:%u%%;\"",
|
||||
TT_PERCENT_WIDTH_OF_AN_HOUR_COLUMN);
|
||||
fprintf (Gbl.F.Out,"%02u:00",Gbl.TimeTable.Config.Range.Hours.Start);
|
||||
Tbl_EndCell ();
|
||||
|
@ -1145,7 +1145,7 @@ static void TT_DrawTimeTable (void)
|
|||
TT_DrawCellAlignTimeTable ();
|
||||
|
||||
Tbl_StartCellAttr ("rowspan=\"2\" class=\"TT_HOUR_BIG LEFT_MIDDLE\""
|
||||
" style=\"width:%u%%;\">",
|
||||
" style=\"width:%u%%;\"",
|
||||
TT_PERCENT_WIDTH_OF_AN_HOUR_COLUMN);
|
||||
fprintf (Gbl.F.Out,"%02u:00",Gbl.TimeTable.Config.Range.Hours.Start);
|
||||
Tbl_EndCell ();
|
||||
|
@ -1452,6 +1452,9 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co
|
|||
unsigned Dur;
|
||||
unsigned MaxDuration;
|
||||
unsigned RowSpan = 0;
|
||||
char *RowSpanStr;
|
||||
char *ColSpanStr;
|
||||
char *ClassStr;
|
||||
TT_ClassType_t CT;
|
||||
struct Course Crs;
|
||||
struct GroupType *GrpTyp;
|
||||
|
@ -1486,17 +1489,45 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co
|
|||
}
|
||||
|
||||
/***** Cell start *****/
|
||||
fprintf (Gbl.F.Out,"<td");
|
||||
/* Create rowspan, colspan and class strings */
|
||||
if (RowSpan > 1)
|
||||
fprintf (Gbl.F.Out," rowspan=\"%u\"",RowSpan);
|
||||
if (ColSpan > 1)
|
||||
fprintf (Gbl.F.Out," colspan=\"%u\"",ColSpan);
|
||||
fprintf (Gbl.F.Out," class=\"%s",TimeTableClasses[ClassType]);
|
||||
if (ClassType == TT_FREE)
|
||||
fprintf (Gbl.F.Out,"%u",Interval % 4);
|
||||
{
|
||||
if (asprintf (&RowSpanStr,"%s","") < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
}
|
||||
else
|
||||
fprintf (Gbl.F.Out," CENTER_MIDDLE DAT_SMALL");
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
{
|
||||
if (asprintf (&RowSpanStr,"rowspan=\"%u\" ",RowSpan) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
}
|
||||
if (ColSpan > 1)
|
||||
{
|
||||
if (asprintf (&ColSpanStr,"%s","") < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (asprintf (&ColSpanStr,"colspan=\"%u\" ",ColSpan) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
}
|
||||
if (ClassType == TT_FREE)
|
||||
{
|
||||
if (asprintf (&ClassStr,"%s%u",TimeTableClasses[ClassType],Interval % 4) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (asprintf (&ClassStr,"%s CENTER_MIDDLE DAT_SMALL",TimeTableClasses[ClassType]) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
}
|
||||
|
||||
/* Start cell */
|
||||
Tbl_StartCellAttr ("%s%sclass=\"%s\"",RowSpanStr,ColSpanStr,ClassStr);
|
||||
|
||||
/* Free allocated memory for rowspan, colspan and class strings */
|
||||
free ((void *) RowSpanStr);
|
||||
free ((void *) ColSpanStr);
|
||||
free ((void *) ClassStr);
|
||||
|
||||
/***** Form to modify this cell *****/
|
||||
if (Gbl.TimeTable.View == TT_CRS_EDIT)
|
||||
|
|
Loading…
Reference in New Issue