mirror of https://github.com/acanas/swad-core.git
Version19.31.6
This commit is contained in:
parent
9ee310f364
commit
fed625a9ee
|
@ -3578,7 +3578,7 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
|
||||
/***** Write a row for this event *****/
|
||||
Tbl_StartRow ();
|
||||
Tbl_PutEmptyCells (1);
|
||||
Tbl_PutEmptyColouredCells (1);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">"
|
||||
"%u:"
|
||||
"</td>"
|
||||
|
@ -3610,7 +3610,7 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
if (ShowCommentStd || ShowCommentTch)
|
||||
{
|
||||
Tbl_StartRow ();
|
||||
Tbl_PutEmptyCells (2);
|
||||
Tbl_PutEmptyColouredCells (2);
|
||||
fprintf (Gbl.F.Out,"<td class=\"BT%u\"></td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE COLOR%u\">"
|
||||
"<dl>",
|
||||
|
|
|
@ -866,8 +866,8 @@ static void Ban_PutFormToCreateBanner (void)
|
|||
/***** Banner code *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM\"></td>"
|
||||
"<td class=\"BM\"></td>"
|
||||
"<td></td>");
|
||||
"<td class=\"BM\"></td>");
|
||||
Tbl_PutEmptyCells (1);
|
||||
|
||||
/***** Banner short name *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||
|
|
|
@ -487,12 +487,13 @@ 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.5 (2019-10-05)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.31.6 (2019-10-05)"
|
||||
#define CSS_FILE "swad19.29.css"
|
||||
#define JS_FILE "swad19.30.js"
|
||||
/*
|
||||
// TODO: Perico: poner un candado de bloqueo de creación/edición de proyectos (por ejemplo en asignaturas obsoletas)
|
||||
|
||||
Version 19.31.6: Oct 05, 2019 Code refactoring in HTML tables. (247066 lines)
|
||||
Version 19.31.5: Oct 05, 2019 Code refactoring in HTML tables. (247044 lines)
|
||||
Version 19.31.4: Oct 04, 2019 Code refactoring in HTML tables. (247043 lines)
|
||||
Version 19.31.3: Oct 04, 2019 Code refactoring in HTML tables. (247039 lines)
|
||||
|
|
|
@ -1610,8 +1610,9 @@ static void Cty_ListCountriesForEdition (void)
|
|||
{
|
||||
Cty = &Gbl.Hierarchy.Sys.Ctys.Lst[NumCty];
|
||||
|
||||
/* Put icon to remove country */
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Put icon to remove country */
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"BT\">",
|
||||
1 + Lan_NUM_LANGUAGES);
|
||||
if (Cty->Inss.Num ||
|
||||
|
@ -1639,9 +1640,7 @@ static void Cty_ListCountriesForEdition (void)
|
|||
"</td>",
|
||||
1 + Lan_NUM_LANGUAGES,Cty->Alpha2);
|
||||
|
||||
fprintf (Gbl.F.Out,"<td></td>"
|
||||
"<td></td>"
|
||||
"<td></td>");
|
||||
Tbl_PutEmptyCells (3);
|
||||
|
||||
/* Number of users */
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"DAT RIGHT_TOP\">"
|
||||
|
@ -1654,6 +1653,7 @@ static void Cty_ListCountriesForEdition (void)
|
|||
"%u"
|
||||
"</td>",
|
||||
1 + Lan_NUM_LANGUAGES,Cty->Inss.Num);
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/* Country name in several languages */
|
||||
|
@ -1661,8 +1661,9 @@ static void Cty_ListCountriesForEdition (void)
|
|||
Lan <= Lan_NUM_LANGUAGES;
|
||||
Lan++)
|
||||
{
|
||||
/* Language */
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Language */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>",
|
||||
|
@ -1694,6 +1695,7 @@ static void Cty_ListCountriesForEdition (void)
|
|||
Cty->WWW[Lan],Gbl.Form.Id);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
}
|
||||
|
@ -2048,8 +2050,9 @@ static void Cty_PutFormToCreateCountry (void)
|
|||
/***** Write heading *****/
|
||||
Cty_PutHeadCountriesForEdition ();
|
||||
|
||||
/***** Column to remove country, disabled here *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Column to remove country, disabled here *****/
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"BT\"></td>",
|
||||
1 + Lan_NUM_LANGUAGES);
|
||||
|
||||
|
@ -2071,21 +2074,20 @@ static void Cty_PutFormToCreateCountry (void)
|
|||
"</td>",
|
||||
1 + Lan_NUM_LANGUAGES,Cty_EditingCty->Alpha2);
|
||||
|
||||
fprintf (Gbl.F.Out,"<td></td>"
|
||||
"<td></td>"
|
||||
"<td></td>");
|
||||
Tbl_PutEmptyCells (3);
|
||||
|
||||
/* Number of users */
|
||||
/***** Number of users *****/
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"DAT RIGHT_TOP\">"
|
||||
"0"
|
||||
"</td>",
|
||||
1 + Lan_NUM_LANGUAGES);
|
||||
|
||||
/* Number of institutions */
|
||||
/***** Number of institutions *****/
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"DAT RIGHT_TOP\">"
|
||||
"0"
|
||||
"</td>",
|
||||
1 + Lan_NUM_LANGUAGES);
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Country name in several languages *****/
|
||||
|
@ -2093,8 +2095,9 @@ static void Cty_PutFormToCreateCountry (void)
|
|||
Lan <= Lan_NUM_LANGUAGES;
|
||||
Lan++)
|
||||
{
|
||||
/* Language */
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Language */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
|
@ -2119,6 +2122,7 @@ static void Cty_PutFormToCreateCountry (void)
|
|||
Lan_STR_LANG_ID[Lan],
|
||||
Cns_MAX_CHARS_WWW,
|
||||
Cty_EditingCty->WWW[Lan]);
|
||||
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
|
|
|
@ -8534,7 +8534,7 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow)
|
|||
"<input type=\"text\""
|
||||
" id=\"NewLinkName\" name=\"NewLinkName\""
|
||||
" size=\"30\" maxlength=\"%u\" value=\"\" />"
|
||||
"</td>"
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Save_as,Txt_optional,
|
||||
Brw_MAX_CHARS_FOLDER);
|
||||
Tbl_EndRow ();
|
||||
|
|
|
@ -2275,6 +2275,7 @@ static void Grp_ListGrpsForMultipleSelection (struct GroupType *GrpTyp,
|
|||
/* Write checkbox to select the group */
|
||||
ICanSelUnselGroup = (Gbl.Usrs.Me.Role.Logged >= Rol_STD);
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"checkbox\" id=\"Grp%ld\" name=\"GrpCods\""
|
||||
" value=\"%ld\"",
|
||||
|
@ -2322,9 +2323,9 @@ static void Grp_ListGrpsForMultipleSelection (struct GroupType *GrpTyp,
|
|||
"</td>",
|
||||
Grp_CountNumUsrsInNoGrpsOfType (Role,GrpTyp->GrpTypCod));
|
||||
|
||||
/* Last void columns for max. students and vacants */
|
||||
fprintf (Gbl.F.Out,"<td></td>"
|
||||
"<td></td>");
|
||||
/* Last empty columns for max. students and vacants */
|
||||
Tbl_PutEmptyCells (2);
|
||||
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
|
|
|
@ -992,8 +992,9 @@ static void Hld_PutFormToCreateHoliday (void)
|
|||
Txt_Holiday);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Holiday place *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Holiday place *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||
"<select name=\"PlcCod\" style=\"width:62px;\">"
|
||||
"<option value=\"-1\"");
|
||||
|
@ -1048,9 +1049,11 @@ static void Hld_PutFormToCreateHoliday (void)
|
|||
"<input type=\"text\" name=\"Name\""
|
||||
" size=\"20\" maxlength=\"%u\" value=\"%s\""
|
||||
" required=\"required\" />"
|
||||
"</td>"
|
||||
"<td></td>",
|
||||
"</td>",
|
||||
Hld_MAX_CHARS_HOLIDAY_NAME,Hld_EditingHld->Name);
|
||||
|
||||
Tbl_PutEmptyCells (1);
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** End table, send button and end box *****/
|
||||
|
|
|
@ -745,10 +745,11 @@ static void Lnk_PutFormToCreateLink (void)
|
|||
/***** Write heading *****/
|
||||
Lnk_PutHeadLinks ();
|
||||
|
||||
/***** Link code *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM\"></td>"
|
||||
"<td></td>");
|
||||
|
||||
/***** Link code *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM\"></td>");
|
||||
Tbl_PutEmptyCells (1);
|
||||
|
||||
/***** Link short name *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||
|
@ -776,6 +777,7 @@ static void Lnk_PutFormToCreateLink (void)
|
|||
" required=\"required\" />"
|
||||
"</td>",
|
||||
Cns_MAX_CHARS_WWW,Lnk_EditingLnk->WWW);
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** End table, send button and end box *****/
|
||||
|
|
10
swad_mail.c
10
swad_mail.c
|
@ -762,8 +762,9 @@ static void Mai_PutFormToCreateMailDomain (void)
|
|||
Txt_EMAIL_DOMAIN_ORDER[Mai_ORDER_BY_INFO ]);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Mail domain *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Mail domain *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||
"<input type=\"text\" name=\"Domain\""
|
||||
" size=\"15\" maxlength=\"%u\" value=\"%s\""
|
||||
|
@ -776,11 +777,12 @@ static void Mai_PutFormToCreateMailDomain (void)
|
|||
"<input type=\"text\" name=\"Info\""
|
||||
" size=\"40\" maxlength=\"%u\" value=\"%s\""
|
||||
" required=\"required\" />"
|
||||
"</td>"
|
||||
"<td></td>",
|
||||
"</td>",
|
||||
Mai_MAX_CHARS_MAIL_INFO,Mai_EditingMai->Info);
|
||||
Tbl_EndRow ();
|
||||
|
||||
Tbl_PutEmptyCells (1);
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** End table, send button and end box *****/
|
||||
Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_email_domain);
|
||||
|
|
|
@ -114,7 +114,7 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void)
|
|||
struct MarksProperties Marks;
|
||||
|
||||
if (Gbl.FileBrowser.FilFolLnk.Type == Brw_IS_FOLDER)
|
||||
Tbl_PutEmptyCells (2);
|
||||
Tbl_PutEmptyColouredCells (2);
|
||||
else // File or link
|
||||
{
|
||||
/***** Get number of rows in header or footer *****/
|
||||
|
|
|
@ -3147,7 +3147,7 @@ static void Mch_DrawBarNumUsrs (unsigned NumAnswerersAns,unsigned NumAnswerersQs
|
|||
|
||||
/***** Bar proportional to number of users *****/
|
||||
Tbl_StartTableWide ();
|
||||
fprintf (Gbl.F.Out,"<tr class=\"MATCH_RES_TR\">");
|
||||
Tbl_StartClass ("MATCH_RES_TR");
|
||||
for (i = 0;
|
||||
i < 100;
|
||||
i++)
|
||||
|
|
|
@ -561,7 +561,7 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther)
|
|||
}
|
||||
else
|
||||
{
|
||||
Tbl_PutEmptyCells (8);
|
||||
Tbl_PutEmptyColouredCells (8);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
|
|
|
@ -2720,10 +2720,12 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst,
|
|||
Tbl_EndRow ();
|
||||
|
||||
/***** Answers *****/
|
||||
/* Unique or multiple choice answers */
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td></td>"
|
||||
"<td class=\"LEFT_TOP\">");
|
||||
|
||||
Tbl_PutEmptyCells (1);
|
||||
|
||||
/* Unique or multiple choice answers */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
Tbl_StartTablePadding (2);
|
||||
for (NumAns = 0;
|
||||
NumAns < Svy_MAX_ANSWERS_PER_QUESTION;
|
||||
|
@ -2749,6 +2751,7 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst,
|
|||
}
|
||||
Tbl_EndTable ();
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** End table *****/
|
||||
|
|
28
swad_table.c
28
swad_table.c
|
@ -161,6 +161,23 @@ void Tbl_EndTable (void)
|
|||
"</table>");
|
||||
}
|
||||
|
||||
void Tbl_StartClass (const char *Class)
|
||||
{
|
||||
if (Class)
|
||||
{
|
||||
if (Class[0])
|
||||
{
|
||||
fprintf (Gbl.F.Out,
|
||||
"<tr class=\"%s\">",
|
||||
Class);
|
||||
}
|
||||
else
|
||||
Tbl_StartRow ();
|
||||
}
|
||||
else
|
||||
Tbl_StartRow ();
|
||||
}
|
||||
|
||||
void Tbl_StartRow (void)
|
||||
{
|
||||
fprintf (Gbl.F.Out,
|
||||
|
@ -174,6 +191,17 @@ void Tbl_EndRow (void)
|
|||
}
|
||||
|
||||
void Tbl_PutEmptyCells (unsigned NumColumns)
|
||||
{
|
||||
unsigned NumCol;
|
||||
|
||||
for (NumCol = 0;
|
||||
NumCol < NumColumns;
|
||||
NumCol++)
|
||||
fprintf (Gbl.F.Out,
|
||||
"<td></td>");
|
||||
}
|
||||
|
||||
void Tbl_PutEmptyColouredCells (unsigned NumColumns)
|
||||
{
|
||||
unsigned NumCol;
|
||||
|
||||
|
|
|
@ -55,9 +55,11 @@ void Tbl_StartTableWideMargin (void);
|
|||
|
||||
void Tbl_EndTable (void);
|
||||
|
||||
void Tbl_StartClass (const char *Class);
|
||||
void Tbl_StartRow (void);
|
||||
void Tbl_EndRow (void);
|
||||
|
||||
void Tbl_PutEmptyCells (unsigned NumColumns);
|
||||
void Tbl_PutEmptyColouredCells (unsigned NumColumns);
|
||||
|
||||
#endif
|
||||
|
|
27
swad_test.c
27
swad_test.c
|
@ -1709,7 +1709,7 @@ static void Tst_ShowFormSelTags (unsigned long NumRows,MYSQL_RES *mysql_res,
|
|||
Tbl_StartTablePadding (2);
|
||||
Tbl_StartRow ();
|
||||
if (!ShowOnlyEnabledTags)
|
||||
fprintf (Gbl.F.Out,"<td></td>");
|
||||
Tbl_PutEmptyCells (1);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
"<label class=\"%s\">"
|
||||
"<input type=\"checkbox\" name=\"AllTags\" value=\"Y\"",
|
||||
|
@ -3844,8 +3844,7 @@ static void Tst_WriteChoiceAnsAssessTest (struct UsrData *UsrDat,
|
|||
Tbl_StartTablePadding (2);
|
||||
Tbl_StartRow ();
|
||||
Tst_WriteHeadUserCorrect (UsrDat);
|
||||
fprintf (Gbl.F.Out,"<td></td>"
|
||||
"<td></td>");
|
||||
Tbl_PutEmptyCells (2);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Write answers (one row per answer) *****/
|
||||
|
@ -3881,7 +3880,7 @@ static void Tst_WriteChoiceAnsAssessTest (struct UsrData *UsrDat,
|
|||
Ans.Class,Txt_TST_Answer_given_by_the_user,Ans.Str);
|
||||
}
|
||||
else // This answer has NOT been selected by the user
|
||||
fprintf (Gbl.F.Out,"<td></td>");
|
||||
Tbl_PutEmptyCells (1);
|
||||
|
||||
/* Draw icon that indicates whether the answer is correct */
|
||||
if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD ||
|
||||
|
@ -3891,7 +3890,7 @@ static void Tst_WriteChoiceAnsAssessTest (struct UsrData *UsrDat,
|
|||
fprintf (Gbl.F.Out,"<td class=\"ANS_0 CENTER_TOP\" title=\"%s\">•</td>",
|
||||
Txt_TST_Answer_given_by_the_teachers);
|
||||
else
|
||||
fprintf (Gbl.F.Out,"<td></td>");
|
||||
Tbl_PutEmptyCells (1);
|
||||
}
|
||||
else
|
||||
fprintf (Gbl.F.Out,"<td class=\"ANS_0 CENTER_TOP\">?</td>");
|
||||
|
@ -5229,8 +5228,8 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
|
|||
|
||||
/* Floating point answer */
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td></td>"
|
||||
"<td class=\"LEFT_TOP\">");
|
||||
Tbl_PutEmptyCells (1);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
Tst_PutFloatInputField (Txt_Real_number_between_A_and_B_1,"AnsFloatMin",
|
||||
Gbl.Test.Answer.FloatingPoint[0]);
|
||||
Tst_PutFloatInputField (Txt_Real_number_between_A_and_B_2,"AnsFloatMax",
|
||||
|
@ -5240,8 +5239,8 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
|
|||
|
||||
/* T/F answer */
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td></td>"
|
||||
"<td class=\"LEFT_TOP\">");
|
||||
Tbl_PutEmptyCells (1);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
Tst_PutTFInputField (Txt_TF_QST[0],'T');
|
||||
Tst_PutTFInputField (Txt_TF_QST[1],'F');
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
@ -5249,8 +5248,8 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
|
|||
|
||||
/* Questions can be shuffled? */
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td></td>"
|
||||
"<td class=\"LEFT_TOP\">"
|
||||
Tbl_PutEmptyCells (1);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
|
||||
"<label class=\"%s\">"
|
||||
"<input type=\"checkbox\" name=\"Shuffle\" value=\"Y\"",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
|
@ -5268,8 +5267,8 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
|
|||
|
||||
/* Simple or multiple choice answers */
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td></td>"
|
||||
"<td class=\"LEFT_TOP\">");
|
||||
Tbl_PutEmptyCells (1);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
Tbl_StartTablePadding (2); // Table with choice answers
|
||||
|
||||
OptionsDisabled = Gbl.Test.AnswerType != Tst_ANS_UNIQUE_CHOICE &&
|
||||
|
@ -7890,7 +7889,7 @@ static void Tst_ShowTstResults (struct UsrData *UsrDat)
|
|||
}
|
||||
else
|
||||
{
|
||||
Tbl_PutEmptyCells (7);
|
||||
Tbl_PutEmptyColouredCells (7);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue