Version19.31.25

This commit is contained in:
Antonio Cañas Vargas 2019-10-08 23:28:51 +02:00
parent cd479d7d59
commit 6cf583240e
7 changed files with 203 additions and 202 deletions

View File

@ -604,14 +604,15 @@ static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,
if (NumID == 0) if (NumID == 0)
{ {
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_TOP\">"
"<label for=\"UsrID\" class=\"%s\">" Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_TOP\"");
fprintf (Gbl.F.Out,"<label for=\"UsrID\" class=\"%s\">"
"%s:" "%s:"
"</label>", "</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_ID); The_ClassFormInBox[Gbl.Prefs.Theme],Txt_ID);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT LEFT_TOP USR_ID\">"); Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_TOP USR_ID\"");
} }
else // NumID >= 1 else // NumID >= 1
fprintf (Gbl.F.Out,"<br />"); fprintf (Gbl.F.Out,"<br />");
@ -676,7 +677,7 @@ static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,
/***** Write help text *****/ /***** Write help text *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"DAT CENTER_MIDDLE\">"); Tbl_StartCellAttr ("colspan=\"2\" class=\"DAT CENTER_MIDDLE\"");
Ale_ShowAlert (Ale_INFO,Txt_The_ID_is_used_in_order_to_facilitate_); Ale_ShowAlert (Ale_INFO,Txt_The_ID_is_used_in_order_to_facilitate_);
Tbl_EndCell (); Tbl_EndCell ();
@ -685,14 +686,14 @@ static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,
/***** Form to enter new user's ID *****/ /***** Form to enter new user's ID *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_TOP\">" Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_TOP\"");
"<label for=\"NewID\" class=\"%s\">%s:</label>", fprintf (Gbl.F.Out,"<label for=\"NewID\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme], The_ClassFormInBox[Gbl.Prefs.Theme],
UsrDat->IDs.Num ? Txt_Another_ID : // A new user's ID UsrDat->IDs.Num ? Txt_Another_ID : // A new user's ID
Txt_ID); // The first user's ID Txt_ID); // The first user's ID
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT LEFT_TOP DAT\">"); Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_TOP DAT\"");
if (ItsMe) if (ItsMe)
Frm_StartFormAnchor (ActChgMyID,ID_ID_SECTION_ID); Frm_StartFormAnchor (ActChgMyID,ID_ID_SECTION_ID);
else else

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.31.24 (2019-10-08)" #define Log_PLATFORM_VERSION "SWAD 19.31.25 (2019-10-08)"
#define CSS_FILE "swad19.29.css" #define CSS_FILE "swad19.29.css"
#define JS_FILE "swad19.30.js" #define JS_FILE "swad19.30.js"
/* /*
@ -495,6 +495,7 @@ ps2pdf source.ps destination.pdf
// TODO: Un TFG preasignado sin estudiante tiene que salir un triángulo amarillo // TODO: Un TFG preasignado sin 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.31.25: Oct 08, 2019 Code refactoring in HTML tables. (246872 lines)
Version 19.31.24: Oct 08, 2019 Code refactoring in HTML tables. (246882 lines) Version 19.31.24: Oct 08, 2019 Code refactoring in HTML tables. (246882 lines)
Version 19.31.23: Oct 08, 2019 Code refactoring in HTML tables. (247076 lines) Version 19.31.23: Oct 08, 2019 Code refactoring in HTML tables. (247076 lines)
Version 19.31.22: Oct 08, 2019 Code refactoring in HTML tables. (247099 lines) Version 19.31.22: Oct 08, 2019 Code refactoring in HTML tables. (247099 lines)

View File

@ -402,10 +402,10 @@ void Gam_ShowOneGame (long GamCod,
/***** Icons related to this game *****/ /***** Icons related to this game *****/
if (Gam_CheckIfICanEditGames ()) if (Gam_CheckIfICanEditGames ())
{ {
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"CONTEXT_COL"); if (ShowOnlyThisGame)
if (!ShowOnlyThisGame) Tbl_StartCellAttr ("rowspan=\"2\" class=\"CONTEXT_COL\"");
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd); else
fprintf (Gbl.F.Out,"\">"); Tbl_StartCellAttr ("rowspan=\"2\" class=\"CONTEXT_COL COLOR%u\"",Gbl.RowEvenOdd);
/* Icons to remove/edit this game */ /* Icons to remove/edit this game */
Gam_PutFormsToRemEditOneGame (&Game,Anchor); Gam_PutFormsToRemEditOneGame (&Game,Anchor);
@ -419,13 +419,17 @@ void Gam_ShowOneGame (long GamCod,
StartEndTime <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1); StartEndTime <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1);
StartEndTime++) StartEndTime++)
{ {
fprintf (Gbl.F.Out,"<td id=\"gam_date_%u_%u\" class=\"%s LEFT_TOP", if (ShowOnlyThisGame)
(unsigned) StartEndTime,UniqueId, Tbl_StartCellAttr ("id=\"gam_date_%u_%u\" class=\"%s LEFT_TOP\"",
Game.Hidden ? "DATE_GREEN_LIGHT": (unsigned) StartEndTime,UniqueId,
"DATE_GREEN"); Game.Hidden ? "DATE_GREEN_LIGHT":
if (!ShowOnlyThisGame) "DATE_GREEN");
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd); else
fprintf (Gbl.F.Out,"\">"); Tbl_StartCellAttr ("id=\"gam_date_%u_%u\" class=\"%s LEFT_TOP COLOR%u\"",
(unsigned) StartEndTime,UniqueId,
Game.Hidden ? "DATE_GREEN_LIGHT":
"DATE_GREEN",
Gbl.RowEvenOdd);
if (Game.TimeUTC[Dat_START_TIME]) if (Game.TimeUTC[Dat_START_TIME])
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">" fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
"writeLocalDateHMSFromUTC('gam_date_%u_%u',%ld," "writeLocalDateHMSFromUTC('gam_date_%u_%u',%ld,"
@ -438,10 +442,10 @@ void Gam_ShowOneGame (long GamCod,
} }
/***** Game title and main data *****/ /***** Game title and main data *****/
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP"); if (ShowOnlyThisGame)
if (!ShowOnlyThisGame) Tbl_StartCellAttr ("class=\"LEFT_TOP\"");
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd); else
fprintf (Gbl.F.Out,"\">"); Tbl_StartCellAttr ("class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
/* Game title */ /* Game title */
Gam_SetParamCurrentGamCod (GamCod); // Used to pass parameter Gam_SetParamCurrentGamCod (GamCod); // Used to pass parameter
@ -466,10 +470,10 @@ void Gam_ShowOneGame (long GamCod,
Tbl_EndCell (); Tbl_EndCell ();
/***** Number of matches in game *****/ /***** Number of matches in game *****/
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP"); if (ShowOnlyThisGame)
if (!ShowOnlyThisGame) Tbl_StartCellAttr ("class=\"RIGHT_TOP\"");
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd); else
fprintf (Gbl.F.Out,"\">"); Tbl_StartCellAttr ("class=\"RIGHT_TOP COLOR%u\"",Gbl.RowEvenOdd);
Gam_SetParamCurrentGamCod (GamCod); // Used to pass parameter Gam_SetParamCurrentGamCod (GamCod); // Used to pass parameter
Frm_StartForm (ActSeeGam); Frm_StartForm (ActSeeGam);
@ -491,18 +495,18 @@ void Gam_ShowOneGame (long GamCod,
Tbl_StartRow (); Tbl_StartRow ();
/***** Author of the game *****/ /***** Author of the game *****/
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP"); if (ShowOnlyThisGame)
if (!ShowOnlyThisGame) Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP\"");
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd); else
fprintf (Gbl.F.Out,"\">"); Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
Gam_WriteAuthor (&Game); Gam_WriteAuthor (&Game);
Tbl_EndCell (); Tbl_EndCell ();
/***** Text of the game *****/ /***** Text of the game *****/
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP"); if (ShowOnlyThisGame)
if (!ShowOnlyThisGame) Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP\"");
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd); else
fprintf (Gbl.F.Out,"\">"); Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
Gam_GetGameTxtFromDB (Game.GamCod,Txt); Gam_GetGameTxtFromDB (Game.GamCod,Txt);
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to rigorous HTML Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to rigorous HTML
@ -1137,14 +1141,14 @@ static void Gam_PutFormsEditionGame (struct Game *Game,bool ItsANewGame)
/***** Game title *****/ /***** Game title *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">" Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
"<label for=\"Title\" class=\"%s\">%s:</label>", fprintf (Gbl.F.Out,"<label for=\"Title\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme], The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_Title); Txt_Title);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">" Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
"<input type=\"text\" id=\"Title\" name=\"Title\"" fprintf (Gbl.F.Out,"<input type=\"text\" id=\"Title\" name=\"Title\""
" size=\"45\" maxlength=\"%u\" value=\"%s\"" " size=\"45\" maxlength=\"%u\" value=\"%s\""
" required=\"required\" />", " required=\"required\" />",
Gam_MAX_CHARS_TITLE,Game->Title); Gam_MAX_CHARS_TITLE,Game->Title);
@ -1155,14 +1159,14 @@ static void Gam_PutFormsEditionGame (struct Game *Game,bool ItsANewGame)
/***** Game text *****/ /***** Game text *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">" Tbl_StartCellAttr ("class=\"RIGHT_TOP\"");
"<label for=\"Txt\" class=\"%s\">%s:</label>", fprintf (Gbl.F.Out,"<label for=\"Txt\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme], The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_Description); Txt_Description);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">" Tbl_StartCellAttr ("class=\"LEFT_TOP\"");
"<textarea id=\"Txt\" name=\"Txt\"" fprintf (Gbl.F.Out,"<textarea id=\"Txt\" name=\"Txt\""
" cols=\"60\" rows=\"10\">"); " cols=\"60\" rows=\"10\">");
if (!ItsANewGame) if (!ItsANewGame)
fprintf (Gbl.F.Out,"%s",Txt); fprintf (Gbl.F.Out,"%s",Txt);
@ -1692,7 +1696,8 @@ static void Gam_ListOneOrMoreQuestionsForEdition (long GamCod,unsigned NumQsts,
Gam_SetParamCurrentGamCod (GamCod); // Used to pass parameter Gam_SetParamCurrentGamCod (GamCod); // Used to pass parameter
Gam_CurrentQstInd = QstInd; Gam_CurrentQstInd = QstInd;
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"BT%u\"",Gbl.RowEvenOdd);
/* Put icon to remove the question */ /* Put icon to remove the question */
if (ICanEditQuestions) if (ICanEditQuestions)
@ -1739,10 +1744,8 @@ static void Gam_ListOneOrMoreQuestionsForEdition (long GamCod,unsigned NumQsts,
Tbl_EndCell (); Tbl_EndCell ();
/* Write number of question */ /* Write number of question */
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP COLOR%u\">" Tbl_StartCellAttr ("class=\"RIGHT_TOP COLOR%u\"",Gbl.RowEvenOdd);
"<div class=\"BIG_INDEX\">%s</div>", fprintf (Gbl.F.Out,"<div class=\"BIG_INDEX\">%s</div>",StrQstInd);
Gbl.RowEvenOdd,
StrQstInd);
/* Write answer type (row[2]) */ /* Write answer type (row[2]) */
Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]); Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]);
@ -1751,20 +1754,17 @@ static void Gam_ListOneOrMoreQuestionsForEdition (long GamCod,unsigned NumQsts,
Tbl_EndCell (); Tbl_EndCell ();
/* Write question code */ /* Write question code */
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">" Tbl_StartCellAttr ("class=\"DAT_SMALL CENTER_TOP COLOR%u\"",Gbl.RowEvenOdd);
"%ld&nbsp;", fprintf (Gbl.F.Out,"%ld&nbsp;",Gbl.Test.QstCod);
Gbl.RowEvenOdd,Gbl.Test.QstCod);
Tbl_EndCell (); Tbl_EndCell ();
/* Write the question tags */ /* Write the question tags */
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">", Tbl_StartCellAttr ("class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
Gbl.RowEvenOdd);
Tst_GetAndWriteTagsQst (Gbl.Test.QstCod); Tst_GetAndWriteTagsQst (Gbl.Test.QstCod);
Tbl_EndCell (); Tbl_EndCell ();
/* Write stem (row[3]) */ /* Write stem (row[3]) */
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">", Tbl_StartCellAttr ("class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
Gbl.RowEvenOdd);
Tst_WriteQstStem (row[3],"TEST_EDI"); Tst_WriteQstStem (row[3],"TEST_EDI");
/* Get media (row[5]) */ /* Get media (row[5]) */

View File

@ -1293,9 +1293,10 @@ static void Grp_ListGroupTypesForEdition (void)
NumGrpTyp < Gbl.Crs.Grps.GrpTypes.Num; NumGrpTyp < Gbl.Crs.Grps.GrpTypes.Num;
NumGrpTyp++, UniqueId++) NumGrpTyp++, UniqueId++)
{ {
/* Put icon to remove group type */
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"BM\">");
/* Put icon to remove group type */
Tbl_StartCellAttr ("class=\"BM\"");
Frm_StartFormAnchor (ActReqRemGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Frm_StartFormAnchor (ActReqRemGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
Ico_PutIconRemove (); Ico_PutIconRemove ();
@ -1303,7 +1304,7 @@ static void Grp_ListGroupTypesForEdition (void)
Tbl_EndCell (); Tbl_EndCell ();
/* Name of group type */ /* Name of group type */
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"); Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
Frm_StartFormAnchor (ActRenGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Frm_StartFormAnchor (ActRenGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"GrpTypName\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"GrpTypName\""
@ -1316,7 +1317,7 @@ static void Grp_ListGroupTypesForEdition (void)
Tbl_EndCell (); Tbl_EndCell ();
/* Is it mandatory to register in any group? */ /* Is it mandatory to register in any group? */
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"); Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
Frm_StartFormAnchor (ActChgMdtGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Frm_StartFormAnchor (ActChgMdtGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
fprintf (Gbl.F.Out,"<select name=\"MandatoryEnrolment\"" fprintf (Gbl.F.Out,"<select name=\"MandatoryEnrolment\""
@ -1338,7 +1339,7 @@ static void Grp_ListGroupTypesForEdition (void)
Tbl_EndCell (); Tbl_EndCell ();
/* Is it possible to register in multiple groups? */ /* Is it possible to register in multiple groups? */
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"); Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
Frm_StartFormAnchor (ActChgMulGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Frm_StartFormAnchor (ActChgMulGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
fprintf (Gbl.F.Out,"<select name=\"MultipleEnrolment\"" fprintf (Gbl.F.Out,"<select name=\"MultipleEnrolment\""
@ -1360,14 +1361,14 @@ static void Grp_ListGroupTypesForEdition (void)
Tbl_EndCell (); Tbl_EndCell ();
/* Open time */ /* Open time */
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"); Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
Frm_StartFormAnchor (ActChgTimGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Frm_StartFormAnchor (ActChgTimGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
Tbl_StartTableCenterPadding (2); Tbl_StartTableCenterPadding (2);
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:16px;\">" Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\" style=\"width:16px;\"");
"<img src=\"%s/clock.svg\"" fprintf (Gbl.F.Out,"<img src=\"%s/clock.svg\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"%sCONTEXT_ICO_16x16\" />", " class=\"%sCONTEXT_ICO_16x16\" />",
Cfg_URL_ICON_PUBLIC, Cfg_URL_ICON_PUBLIC,
@ -1379,7 +1380,7 @@ static void Grp_ListGroupTypesForEdition (void)
"ICO_HIDDEN "); "ICO_HIDDEN ");
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"); Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
snprintf (Id,sizeof (Id), snprintf (Id,sizeof (Id),
"open_time_%u", "open_time_%u",
UniqueId); UniqueId);
@ -1399,9 +1400,8 @@ static void Grp_ListGroupTypesForEdition (void)
Tbl_EndCell (); Tbl_EndCell ();
/* Number of groups of this type */ /* Number of groups of this type */
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_MIDDLE\">" Tbl_StartCellAttr ("class=\"DAT CENTER_MIDDLE\"");
"%u", fprintf (Gbl.F.Out,"%u",Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps);
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps);
Tbl_EndCell (); Tbl_EndCell ();
Tbl_EndRow (); Tbl_EndRow ();
@ -1513,9 +1513,10 @@ static void Grp_ListGroupsForEdition (void)
{ {
Grp = &(GrpTyp->LstGrps[NumGrpThisType]); Grp = &(GrpTyp->LstGrps[NumGrpThisType]);
/***** Icon to remove group *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"BM\">");
/***** Icon to remove group *****/
Tbl_StartCellAttr ("class=\"BM\"");
Frm_StartFormAnchor (ActReqRemGrp,Grp_GROUPS_SECTION_ID); Frm_StartFormAnchor (ActReqRemGrp,Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (Grp->GrpCod); Grp_PutParamGrpCod (Grp->GrpCod);
Ico_PutIconRemove (); Ico_PutIconRemove ();
@ -1523,7 +1524,7 @@ static void Grp_ListGroupsForEdition (void)
Tbl_EndCell (); Tbl_EndCell ();
/***** Icon to open/close group *****/ /***** Icon to open/close group *****/
fprintf (Gbl.F.Out,"<td class=\"BM\">"); Tbl_StartCellAttr ("class=\"BM\"");
Frm_StartFormAnchor (Grp->Open ? ActCloGrp : Frm_StartFormAnchor (Grp->Open ? ActCloGrp :
ActOpeGrp, ActOpeGrp,
Grp_GROUPS_SECTION_ID); Grp_GROUPS_SECTION_ID);
@ -1539,7 +1540,7 @@ static void Grp_ListGroupsForEdition (void)
Tbl_EndCell (); Tbl_EndCell ();
/***** Icon to activate file zones for this group *****/ /***** Icon to activate file zones for this group *****/
fprintf (Gbl.F.Out,"<td class=\"BM\">"); Tbl_StartCellAttr ("class=\"BM\"");
Frm_StartFormAnchor (Grp->FileZones ? ActDisFilZonGrp : Frm_StartFormAnchor (Grp->FileZones ? ActDisFilZonGrp :
ActEnaFilZonGrp, ActEnaFilZonGrp,
Grp_GROUPS_SECTION_ID); Grp_GROUPS_SECTION_ID);
@ -1556,7 +1557,7 @@ static void Grp_ListGroupsForEdition (void)
/***** Group type *****/ /***** Group type *****/
/* Start selector */ /* Start selector */
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"); Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
Frm_StartFormAnchor (ActChgGrpTyp,Grp_GROUPS_SECTION_ID); Frm_StartFormAnchor (ActChgGrpTyp,Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (Grp->GrpCod); Grp_PutParamGrpCod (Grp->GrpCod);
fprintf (Gbl.F.Out,"<select name=\"GrpTypCod\" style=\"width:100px;\"" fprintf (Gbl.F.Out,"<select name=\"GrpTypCod\" style=\"width:100px;\""
@ -1581,7 +1582,7 @@ static void Grp_ListGroupsForEdition (void)
Tbl_EndCell (); Tbl_EndCell ();
/***** Group name *****/ /***** Group name *****/
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"); Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
Frm_StartFormAnchor (ActRenGrp,Grp_GROUPS_SECTION_ID); Frm_StartFormAnchor (ActRenGrp,Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (Grp->GrpCod); Grp_PutParamGrpCod (Grp->GrpCod);
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"GrpName\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"GrpName\""
@ -1593,7 +1594,7 @@ static void Grp_ListGroupsForEdition (void)
/***** Classroom *****/ /***** Classroom *****/
/* Start selector */ /* Start selector */
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"); Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
Frm_StartFormAnchor (ActChgGrpCla,Grp_GROUPS_SECTION_ID); Frm_StartFormAnchor (ActChgGrpCla,Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (Grp->GrpCod); Grp_PutParamGrpCod (Grp->GrpCod);
fprintf (Gbl.F.Out,"<select name=\"ClaCod\" style=\"width:100px;\"" fprintf (Gbl.F.Out,"<select name=\"ClaCod\" style=\"width:100px;\""
@ -1637,14 +1638,13 @@ static void Grp_ListGroupsForEdition (void)
Role >= Rol_STD; Role >= Rol_STD;
Role--) Role--)
{ {
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_MIDDLE\">" Tbl_StartCellAttr ("class=\"DAT CENTER_MIDDLE\"");
"%d", fprintf (Gbl.F.Out,"%d",Grp->NumUsrs[Role]);
Grp->NumUsrs[Role]);
Tbl_EndCell (); Tbl_EndCell ();
} }
/***** Maximum number of students of the group (row[3]) *****/ /***** Maximum number of students of the group (row[3]) *****/
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"); Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
Frm_StartFormAnchor (ActChgMaxStdGrp,Grp_GROUPS_SECTION_ID); Frm_StartFormAnchor (ActChgMaxStdGrp,Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (Grp->GrpCod); Grp_PutParamGrpCod (Grp->GrpCod);
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"MaxStudents\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"MaxStudents\""
@ -1654,6 +1654,7 @@ static void Grp_ListGroupsForEdition (void)
Gbl.Form.Id); Gbl.Form.Id);
Frm_EndForm (); Frm_EndForm ();
Tbl_EndCell (); Tbl_EndCell ();
Tbl_EndRow (); Tbl_EndRow ();
} }
} }
@ -1737,11 +1738,12 @@ void Grp_ListGrpsToEditAsgAttSvyMch (struct GroupType *GrpTyp,long Cod,
/* Put checkbox to select the group */ /* Put checkbox to select the group */
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE");
if (IBelongToThisGroup) if (IBelongToThisGroup)
fprintf (Gbl.F.Out," LIGHT_BLUE"); Tbl_StartCellAttr ("class=\"LEFT_MIDDLE LIGHT_BLUE\"");
fprintf (Gbl.F.Out,"\">" else
"<input type=\"checkbox\"" Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"<input type=\"checkbox\""
" id=\"Grp%ld\" name=\"GrpCods\" value=\"%ld\"", " id=\"Grp%ld\" name=\"GrpCods\" value=\"%ld\"",
Grp->GrpCod, Grp->GrpCod,
Grp->GrpCod); Grp->GrpCod);
@ -2023,10 +2025,11 @@ static bool Grp_ListGrpsForChangeMySelection (struct GroupType *GrpTyp,
/* Put radio item or checkbox to select the group */ /* Put radio item or checkbox to select the group */
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE");
if (IBelongToThisGroup) if (IBelongToThisGroup)
fprintf (Gbl.F.Out," LIGHT_BLUE"); Tbl_StartCellAttr ("class=\"LEFT_MIDDLE LIGHT_BLUE\"");
fprintf (Gbl.F.Out,"\">"); else
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
if (Gbl.Usrs.Me.Role.Logged == Rol_STD && // If I am a student if (Gbl.Usrs.Me.Role.Logged == Rol_STD && // If I am a student
!GrpTyp->MultipleEnrolment && // ...and the enrolment is single !GrpTyp->MultipleEnrolment && // ...and the enrolment is single
@ -2154,10 +2157,10 @@ static void Grp_ListGrpsToAddOrRemUsrs (struct GroupType *GrpTyp,long UsrCod)
Tbl_StartRow (); Tbl_StartRow ();
/* Start cell for checkbox */ /* Start cell for checkbox */
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE");
if (UsrBelongsToThisGroup) if (UsrBelongsToThisGroup)
fprintf (Gbl.F.Out," LIGHT_BLUE"); Tbl_StartCellAttr ("class=\"LEFT_MIDDLE LIGHT_BLUE\"");
fprintf (Gbl.F.Out,"\">"); else
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
/* Put checkbox to select the group */ /* Put checkbox to select the group */
// Always checkbox, not radio, because the role in the form may be teacher, // Always checkbox, not radio, because the role in the form may be teacher,
@ -2243,11 +2246,12 @@ static void Grp_ListGrpsForMultipleSelection (struct GroupType *GrpTyp,
/* Put checkbox to select the group */ /* Put checkbox to select the group */
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE");
if (IBelongToThisGroup) if (IBelongToThisGroup)
fprintf (Gbl.F.Out," LIGHT_BLUE"); Tbl_StartCellAttr ("class=\"LEFT_MIDDLE LIGHT_BLUE\"");
fprintf (Gbl.F.Out,"\">" else
"<input type=\"checkbox\"" Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"<input type=\"checkbox\""
" id=\"Grp%ld\" name=\"GrpCods\" value=\"%ld\"", " id=\"Grp%ld\" name=\"GrpCods\" value=\"%ld\"",
Grp->GrpCod, Grp->GrpCod,
Grp->GrpCod); Grp->GrpCod);
@ -2283,8 +2287,8 @@ static void Grp_ListGrpsForMultipleSelection (struct GroupType *GrpTyp,
ICanSelUnselGroup = (Gbl.Usrs.Me.Role.Logged >= Rol_STD); ICanSelUnselGroup = (Gbl.Usrs.Me.Role.Logged >= Rol_STD);
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">" Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
"<input type=\"checkbox\" id=\"Grp%ld\" name=\"GrpCods\"" fprintf (Gbl.F.Out,"<input type=\"checkbox\" id=\"Grp%ld\" name=\"GrpCods\""
" value=\"%ld\"", " value=\"%ld\"",
-(GrpTyp->GrpTypCod), -(GrpTyp->GrpTypCod),
-(GrpTyp->GrpTypCod)); -(GrpTyp->GrpTypCod));
@ -2308,17 +2312,17 @@ static void Grp_ListGrpsForMultipleSelection (struct GroupType *GrpTyp,
Tbl_EndCell (); Tbl_EndCell ();
/* Column closed/open */ /* Column closed/open */
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"); Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
Tbl_EndCell (); Tbl_EndCell ();
/* Group name = students with no group */ /* Group name = students with no group */
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">" Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
"<label for=\"Grp%ld\">%s</label>", fprintf (Gbl.F.Out,"<label for=\"Grp%ld\">%s</label>",
-(GrpTyp->GrpTypCod),Txt_users_with_no_group); -(GrpTyp->GrpTypCod),Txt_users_with_no_group);
Tbl_EndCell (); Tbl_EndCell ();
/* Classroom */ /* Classroom */
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"); Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
Tbl_EndCell (); Tbl_EndCell ();
/* Number of students who don't belong to any group of this type */ /* Number of students who don't belong to any group of this type */
@ -2326,9 +2330,8 @@ static void Grp_ListGrpsForMultipleSelection (struct GroupType *GrpTyp,
Role >= Rol_STD; Role >= Rol_STD;
Role--) Role--)
{ {
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_MIDDLE\">" Tbl_StartCellAttr ("class=\"DAT CENTER_MIDDLE\"");
"%lu", fprintf (Gbl.F.Out,"%lu",Grp_CountNumUsrsInNoGrpsOfType (Role,GrpTyp->GrpTypCod));
Grp_CountNumUsrsInNoGrpsOfType (Role,GrpTyp->GrpTypCod));
Tbl_EndCell (); Tbl_EndCell ();
} }
@ -2356,9 +2359,8 @@ static void Grp_WriteGrpHead (struct GroupType *GrpTyp)
/***** Name of group type *****/ /***** Name of group type *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td colspan=\"9\" class=\"GRP_TITLE LEFT_MIDDLE\">" Tbl_StartCellAttr ("colspan=\"9\" class=\"GRP_TITLE LEFT_MIDDLE\"");
"<br />%s", fprintf (Gbl.F.Out,"<br />%s",GrpTyp->GrpTypName);
GrpTyp->GrpTypName);
if (GrpTyp->MustBeOpened) if (GrpTyp->MustBeOpened)
{ {
UniqueId++; UniqueId++;
@ -2421,21 +2423,21 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight)
Grp->Open ? Txt_Group_X_open : Grp->Open ? Txt_Group_X_open :
Txt_Group_X_closed, Txt_Group_X_closed,
Grp->GrpName); Grp->GrpName);
fprintf (Gbl.F.Out,"<td class=\"BM");
if (Highlight) if (Highlight)
fprintf (Gbl.F.Out," LIGHT_BLUE"); Tbl_StartCellAttr ("class=\"BM LIGHT_BLUE\"");
fprintf (Gbl.F.Out,"\" >"); else
Tbl_StartCellAttr ("class=\"BM\"");
Ico_PutIconOff (Grp->Open ? "unlock.svg" : Ico_PutIconOff (Grp->Open ? "unlock.svg" :
"lock.svg", "lock.svg",
Gbl.Title); Gbl.Title);
Tbl_EndCell (); Tbl_EndCell ();
/***** Group name *****/ /***** Group name *****/
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE");
if (Highlight) if (Highlight)
fprintf (Gbl.F.Out," LIGHT_BLUE"); Tbl_StartCellAttr ("class=\"LEFT_MIDDLE LIGHT_BLUE\"");
fprintf (Gbl.F.Out,"\">" else
"<label for=\"Grp%ld\" class=\"DAT\">" Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"<label for=\"Grp%ld\" class=\"DAT\">"
"%s" "%s"
"</label>", "</label>",
Grp->GrpCod, Grp->GrpCod,
@ -2443,12 +2445,11 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight)
Tbl_EndCell (); Tbl_EndCell ();
/***** Classroom *****/ /***** Classroom *****/
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE");
if (Highlight) if (Highlight)
fprintf (Gbl.F.Out," LIGHT_BLUE"); Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE LIGHT_BLUE\"");
fprintf (Gbl.F.Out,"\">" else
"%s", Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
Grp->Classroom.ShrtName); fprintf (Gbl.F.Out,"%s",Grp->Classroom.ShrtName);
Tbl_EndCell (); Tbl_EndCell ();
/***** Current number of users in this group *****/ /***** Current number of users in this group *****/
@ -2456,29 +2457,28 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight)
Role >= Rol_STD; Role >= Rol_STD;
Role--) Role--)
{ {
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_MIDDLE");
if (Highlight) if (Highlight)
fprintf (Gbl.F.Out," LIGHT_BLUE"); Tbl_StartCellAttr ("class=\"DAT CENTER_MIDDLE LIGHT_BLUE\"");
fprintf (Gbl.F.Out,"\">" else
"%d", Tbl_StartCellAttr ("class=\"DAT CENTER_MIDDLE\"");
Grp->NumUsrs[Role]); fprintf (Gbl.F.Out,"%d",Grp->NumUsrs[Role]);
Tbl_EndCell (); Tbl_EndCell ();
} }
/***** Max. number of students in this group *****/ /***** Max. number of students in this group *****/
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_MIDDLE");
if (Highlight) if (Highlight)
fprintf (Gbl.F.Out," LIGHT_BLUE"); Tbl_StartCellAttr ("class=\"DAT CENTER_MIDDLE LIGHT_BLUE\"");
fprintf (Gbl.F.Out,"\">"); else
Tbl_StartCellAttr ("class=\"DAT CENTER_MIDDLE\"");
Grp_WriteMaxStds (Grp->MaxStudents); Grp_WriteMaxStds (Grp->MaxStudents);
fprintf (Gbl.F.Out,"&nbsp;"); fprintf (Gbl.F.Out,"&nbsp;");
Tbl_EndCell (); Tbl_EndCell ();
/***** Vacants in this group *****/ /***** Vacants in this group *****/
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_MIDDLE");
if (Highlight) if (Highlight)
fprintf (Gbl.F.Out," LIGHT_BLUE"); Tbl_StartCellAttr ("class=\"DAT CENTER_MIDDLE LIGHT_BLUE\"");
fprintf (Gbl.F.Out,"\">"); else
Tbl_StartCellAttr ("class=\"DAT CENTER_MIDDLE\"");
if (Grp->MaxStudents <= Grp_MAX_STUDENTS_IN_A_GROUP) if (Grp->MaxStudents <= Grp_MAX_STUDENTS_IN_A_GROUP)
{ {
Vacant = (int) Grp->MaxStudents - (int) Grp->NumUsrs[Rol_STD]; Vacant = (int) Grp->MaxStudents - (int) Grp->NumUsrs[Rol_STD];
@ -2515,22 +2515,23 @@ static void Grp_PutFormToCreateGroupType (void)
/***** Write heading *****/ /***** Write heading *****/
Grp_WriteHeadingGroupTypes (); Grp_WriteHeadingGroupTypes ();
/***** Column to remove group type, disabled here *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"BM\">");
/***** Column to remove group type, disabled here *****/
Tbl_StartCellAttr ("class=\"BM\"");
Tbl_EndCell (); Tbl_EndCell ();
/***** Name of group type *****/ /***** Name of group type *****/
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">" Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
"<input type=\"text\" name=\"GrpTypName\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"GrpTypName\""
" size=\"12\" maxlength=\"%u\" value=\"%s\"" " size=\"12\" maxlength=\"%u\" value=\"%s\""
" required=\"required\" />", " required=\"required\" />",
Grp_MAX_CHARS_GROUP_TYPE_NAME,Gbl.Crs.Grps.GrpTyp.GrpTypName); Grp_MAX_CHARS_GROUP_TYPE_NAME,Gbl.Crs.Grps.GrpTyp.GrpTypName);
Tbl_EndCell (); Tbl_EndCell ();
/***** Is it mandatory to register in any groups of this type? *****/ /***** Is it mandatory to register in any groups of this type? *****/
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">" Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
"<select name=\"MandatoryEnrolment\"" fprintf (Gbl.F.Out,"<select name=\"MandatoryEnrolment\""
" style=\"width:150px;\">" " style=\"width:150px;\">"
"<option value=\"N\""); "<option value=\"N\"");
if (!Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment) if (!Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment)
@ -2546,8 +2547,8 @@ static void Grp_PutFormToCreateGroupType (void)
Tbl_EndCell (); Tbl_EndCell ();
/***** Is it possible to register in multiple groups of this type? *****/ /***** Is it possible to register in multiple groups of this type? *****/
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">" Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
"<select name=\"MultipleEnrolment\"" fprintf (Gbl.F.Out,"<select name=\"MultipleEnrolment\""
" style=\"width:150px;\">" " style=\"width:150px;\">"
"<option value=\"N\""); "<option value=\"N\"");
if (!Gbl.Crs.Grps.GrpTyp.MultipleEnrolment) if (!Gbl.Crs.Grps.GrpTyp.MultipleEnrolment)
@ -2563,12 +2564,12 @@ static void Grp_PutFormToCreateGroupType (void)
Tbl_EndCell (); Tbl_EndCell ();
/***** Open time *****/ /***** Open time *****/
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"); Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
Tbl_StartTablePadding (2); Tbl_StartTablePadding (2);
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:20px;\">" Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\" style=\"width:20px;\"");
"<img src=\"%s/clock.svg\"" fprintf (Gbl.F.Out,"<img src=\"%s/clock.svg\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"%sCONTEXT_ICO_16x16\" />", " class=\"%sCONTEXT_ICO_16x16\" />",
Cfg_URL_ICON_PUBLIC, Cfg_URL_ICON_PUBLIC,
@ -2580,7 +2581,7 @@ static void Grp_PutFormToCreateGroupType (void)
"ICO_HIDDEN "); "ICO_HIDDEN ");
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"); Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
Dat_WriteFormClientLocalDateTimeFromTimeUTC ("open_time", Dat_WriteFormClientLocalDateTimeFromTimeUTC ("open_time",
"Open", "Open",
Gbl.Crs.Grps.GrpTyp.OpenTimeUTC, Gbl.Crs.Grps.GrpTyp.OpenTimeUTC,
@ -2596,8 +2597,8 @@ static void Grp_PutFormToCreateGroupType (void)
Tbl_EndCell (); Tbl_EndCell ();
/***** Number of groups of this type *****/ /***** Number of groups of this type *****/
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_MIDDLE\">" Tbl_StartCellAttr ("class=\"DAT CENTER_MIDDLE\"");
"0"); // It's a new group type ==> 0 groups fprintf (Gbl.F.Out,"0"); // It's a new group type ==> 0 groups
Tbl_EndCell (); Tbl_EndCell ();
Tbl_EndRow (); Tbl_EndRow ();
@ -2637,25 +2638,26 @@ static void Grp_PutFormToCreateGroup (void)
/***** Write heading *****/ /***** Write heading *****/
Grp_WriteHeadingGroups (); Grp_WriteHeadingGroups ();
/***** Empty column to remove *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"BM\">");
/***** Empty column to remove *****/
Tbl_StartCellAttr ("class=\"BM\"");
Tbl_EndCell (); Tbl_EndCell ();
/***** Disabled icon to open group *****/ /***** Disabled icon to open group *****/
fprintf (Gbl.F.Out,"<td class=\"BM\">"); Tbl_StartCellAttr ("class=\"BM\"");
Ico_PutIconOff ("lock.svg",Txt_Group_closed); Ico_PutIconOff ("lock.svg",Txt_Group_closed);
Tbl_EndCell (); Tbl_EndCell ();
/***** Disabled icon for archive zone *****/ /***** Disabled icon for archive zone *****/
fprintf (Gbl.F.Out,"<td class=\"BM\">"); Tbl_StartCellAttr ("class=\"BM\"");
Ico_PutIconOff ("folder-red.svg",Txt_File_zones_disabled); Ico_PutIconOff ("folder-red.svg",Txt_File_zones_disabled);
Tbl_EndCell (); Tbl_EndCell ();
/***** Group type *****/ /***** Group type *****/
/* Start selector */ /* Start selector */
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">" Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
"<select name=\"GrpTypCod\" style=\"width:100px;\">"); fprintf (Gbl.F.Out,"<select name=\"GrpTypCod\" style=\"width:100px;\">");
/* Options for group types */ /* Options for group types */
for (NumGrpTyp = 0; for (NumGrpTyp = 0;
@ -2676,8 +2678,8 @@ static void Grp_PutFormToCreateGroup (void)
Tbl_EndCell (); Tbl_EndCell ();
/***** Group name *****/ /***** Group name *****/
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">" Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
"<input type=\"text\" name=\"GrpName\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"GrpName\""
" size=\"20\" maxlength=\"%u\" value=\"%s\"" " size=\"20\" maxlength=\"%u\" value=\"%s\""
" required=\"required\" />", " required=\"required\" />",
Grp_MAX_CHARS_GROUP_NAME,Gbl.Crs.Grps.GrpName); Grp_MAX_CHARS_GROUP_NAME,Gbl.Crs.Grps.GrpName);
@ -2685,8 +2687,8 @@ static void Grp_PutFormToCreateGroup (void)
/***** Classroom *****/ /***** Classroom *****/
/* Start selector */ /* Start selector */
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">" Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
"<select name=\"ClaCod\" style=\"width:100px;\">"); fprintf (Gbl.F.Out,"<select name=\"ClaCod\" style=\"width:100px;\">");
/* Option for no assigned classroom */ /* Option for no assigned classroom */
fprintf (Gbl.F.Out,"<option value=\"-1\""); fprintf (Gbl.F.Out,"<option value=\"-1\"");
@ -2724,14 +2726,14 @@ static void Grp_PutFormToCreateGroup (void)
Role >= Rol_STD; Role >= Rol_STD;
Role--) Role--)
{ {
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_MIDDLE\">" Tbl_StartCellAttr ("class=\"DAT CENTER_MIDDLE\"");
"0"); fprintf (Gbl.F.Out,"0");
Tbl_EndCell (); Tbl_EndCell ();
} }
/***** Maximum number of students *****/ /***** Maximum number of students *****/
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">" Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
"<input type=\"text\" name=\"MaxStudents\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"MaxStudents\""
" size=\"3\" maxlength=\"10\" value=\""); " size=\"3\" maxlength=\"10\" value=\"");
Grp_WriteMaxStds (Gbl.Crs.Grps.MaxStudents); Grp_WriteMaxStds (Gbl.Crs.Grps.MaxStudents);
fprintf (Gbl.F.Out,"\" />"); fprintf (Gbl.F.Out,"\" />");

View File

@ -273,13 +273,12 @@ static void Hlp_ShowRowHelpWhatWouldYouLikeToDo (const char *Description,
Tbl_StartRow (); Tbl_StartRow ();
/***** Description *****/ /***** Description *****/
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">" Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
"%s:", fprintf (Gbl.F.Out,"%s:",Description);
Description);
Tbl_EndCell (); Tbl_EndCell ();
/***** Button *****/ /***** Button *****/
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"); Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
Frm_StartForm (Action); Frm_StartForm (Action);
Btn_PutButtonInline (Button,TxtButton); Btn_PutButtonInline (Button,TxtButton);
Frm_EndForm (); Frm_EndForm ();

View File

@ -105,12 +105,12 @@ void Hie_WriteMenuHierarchy (void)
with all the countries *****/ with all the countries *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">" Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
"<label for=\"cty\" class=\"%s\">%s:</label>", fprintf (Gbl.F.Out,"<label for=\"cty\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Country); The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Country);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"); Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
Cty_WriteSelectorOfCountry (); Cty_WriteSelectorOfCountry ();
Tbl_EndCell (); Tbl_EndCell ();
@ -122,12 +122,12 @@ void Hie_WriteMenuHierarchy (void)
with the institutions of selected country *****/ with the institutions of selected country *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">" Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
"<label for=\"ins\" class=\"%s\">%s:</label>", fprintf (Gbl.F.Out,"<label for=\"ins\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Institution); The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Institution);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"); Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
Ins_WriteSelectorOfInstitution (); Ins_WriteSelectorOfInstitution ();
Tbl_EndCell (); Tbl_EndCell ();
@ -139,12 +139,12 @@ void Hie_WriteMenuHierarchy (void)
with all the centres of selected institution *****/ with all the centres of selected institution *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">" Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
"<label for=\"ctr\" class=\"%s\">%s:</label>", fprintf (Gbl.F.Out,"<label for=\"ctr\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Centre); The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Centre);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"); Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
Ctr_WriteSelectorOfCentre (); Ctr_WriteSelectorOfCentre ();
Tbl_EndCell (); Tbl_EndCell ();
@ -156,12 +156,12 @@ void Hie_WriteMenuHierarchy (void)
with all the degrees of selected centre *****/ with all the degrees of selected centre *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">" Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
"<label for=\"deg\" class=\"%s\">%s:</label>", fprintf (Gbl.F.Out,"<label for=\"deg\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Degree); The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Degree);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"); Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
Deg_WriteSelectorOfDegree (); Deg_WriteSelectorOfDegree ();
Tbl_EndCell (); Tbl_EndCell ();
@ -173,12 +173,12 @@ void Hie_WriteMenuHierarchy (void)
with all the courses of selected degree *****/ with all the courses of selected degree *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">" Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
"<label for=\"crs\" class=\"%s\">%s:</label>", fprintf (Gbl.F.Out,"<label for=\"crs\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Course); The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Course);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"); Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
Crs_WriteSelectorOfCourse (); Crs_WriteSelectorOfCourse ();
Tbl_EndCell (); Tbl_EndCell ();

View File

@ -151,20 +151,19 @@ void Hld_SeeHolidays (void)
/* Write data of this holiday */ /* Write data of this holiday */
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">" Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
"%s", fprintf (Gbl.F.Out,"%s",
Gbl.Hlds.Lst[NumHld].PlcCod <= 0 ? Txt_All_places : Gbl.Hlds.Lst[NumHld].PlcCod <= 0 ? Txt_All_places :
Gbl.Hlds.Lst[NumHld].PlaceFullName); Gbl.Hlds.Lst[NumHld].PlaceFullName);
Tbl_EndCell (); Tbl_EndCell ();
Dat_ConvDateToDateStr (&Gbl.Hlds.Lst[NumHld].StartDate,StrDate); Dat_ConvDateToDateStr (&Gbl.Hlds.Lst[NumHld].StartDate,StrDate);
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">" Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
"&nbsp;%s", fprintf (Gbl.F.Out,"&nbsp;%s",StrDate);
StrDate);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">" Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
"&nbsp;"); fprintf (Gbl.F.Out,"&nbsp;");
switch (Gbl.Hlds.Lst[NumHld].HldTyp) switch (Gbl.Hlds.Lst[NumHld].HldTyp)
{ {
case Hld_HOLIDAY: case Hld_HOLIDAY:
@ -176,9 +175,8 @@ void Hld_SeeHolidays (void)
} }
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">" Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
"&nbsp;%s", fprintf (Gbl.F.Out,"&nbsp;%s",Gbl.Hlds.Lst[NumHld].Name);
Gbl.Hlds.Lst[NumHld].Name);
Tbl_EndCell (); Tbl_EndCell ();
Tbl_EndRow (); Tbl_EndRow ();
@ -566,9 +564,10 @@ static void Hld_ListHolidaysForEdition (void)
{ {
Hld = &Gbl.Hlds.Lst[NumHld]; Hld = &Gbl.Hlds.Lst[NumHld];
/* Put icon to remove holiday */
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"BM\">");
/* Put icon to remove holiday */
Tbl_StartCellAttr ("class=\"BM\"");
Frm_StartForm (ActRemHld); Frm_StartForm (ActRemHld);
Hld_PutParamHldCod (Hld->HldCod); Hld_PutParamHldCod (Hld->HldCod);
Ico_PutIconRemove (); Ico_PutIconRemove ();
@ -576,13 +575,12 @@ static void Hld_ListHolidaysForEdition (void)
Tbl_EndCell (); Tbl_EndCell ();
/* Holiday code */ /* Holiday code */
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">" Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
"%ld&nbsp;", fprintf (Gbl.F.Out,"%ld&nbsp;",Hld->HldCod);
Hld->HldCod);
Tbl_EndCell (); Tbl_EndCell ();
/* Holiday place */ /* Holiday place */
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"); Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
Frm_StartForm (ActChgHldPlc); Frm_StartForm (ActChgHldPlc);
Hld_PutParamHldCod (Hld->HldCod); Hld_PutParamHldCod (Hld->HldCod);
fprintf (Gbl.F.Out,"<select name=\"PlcCod\" style=\"width:62px;\"" fprintf (Gbl.F.Out,"<select name=\"PlcCod\" style=\"width:62px;\""
@ -605,7 +603,7 @@ static void Hld_ListHolidaysForEdition (void)
Tbl_EndCell (); Tbl_EndCell ();
/* Holiday type */ /* Holiday type */
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"); Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
Frm_StartForm (ActChgHldTyp); Frm_StartForm (ActChgHldTyp);
Hld_PutParamHldCod (Hld->HldCod); Hld_PutParamHldCod (Hld->HldCod);
fprintf (Gbl.F.Out,"<select name=\"HldTyp\" style=\"width:62px;\"" fprintf (Gbl.F.Out,"<select name=\"HldTyp\" style=\"width:62px;\""
@ -624,7 +622,7 @@ static void Hld_ListHolidaysForEdition (void)
Tbl_EndCell (); Tbl_EndCell ();
/* Holiday date / Non school period start date */ /* Holiday date / Non school period start date */
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"); Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
Frm_StartForm (ActChgHldStrDat); Frm_StartForm (ActChgHldStrDat);
Hld_PutParamHldCod (Hld->HldCod); Hld_PutParamHldCod (Hld->HldCod);
Dat_WriteFormDate (Gbl.Now.Date.Year - 1, Dat_WriteFormDate (Gbl.Now.Date.Year - 1,
@ -636,7 +634,7 @@ static void Hld_ListHolidaysForEdition (void)
Tbl_EndCell (); Tbl_EndCell ();
/* Non school period end date */ /* Non school period end date */
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"); Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
Frm_StartForm (ActChgHldEndDat); Frm_StartForm (ActChgHldEndDat);
Hld_PutParamHldCod (Hld->HldCod); Hld_PutParamHldCod (Hld->HldCod);
Dat_WriteFormDate (Gbl.Now.Date.Year - 1, Dat_WriteFormDate (Gbl.Now.Date.Year - 1,
@ -648,7 +646,7 @@ static void Hld_ListHolidaysForEdition (void)
Tbl_EndCell (); Tbl_EndCell ();
/* Holiday name */ /* Holiday name */
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"); Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
Frm_StartForm (ActRenHld); Frm_StartForm (ActRenHld);
Hld_PutParamHldCod (Hld->HldCod); Hld_PutParamHldCod (Hld->HldCod);
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Name\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Name\""
@ -1000,8 +998,8 @@ static void Hld_PutFormToCreateHoliday (void)
Tbl_StartRow (); Tbl_StartRow ();
/***** Holiday place *****/ /***** Holiday place *****/
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">" Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
"<select name=\"PlcCod\" style=\"width:62px;\">" fprintf (Gbl.F.Out,"<select name=\"PlcCod\" style=\"width:62px;\">"
"<option value=\"-1\""); "<option value=\"-1\"");
if (Hld_EditingHld->PlcCod <= 0) if (Hld_EditingHld->PlcCod <= 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
@ -1018,8 +1016,8 @@ static void Hld_PutFormToCreateHoliday (void)
Tbl_EndCell (); Tbl_EndCell ();
/***** Holiday type *****/ /***** Holiday type *****/
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">" Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
"<select name=\"HldTyp\" style=\"width:62px;\">"); fprintf (Gbl.F.Out,"<select name=\"HldTyp\" style=\"width:62px;\">");
for (HolidayType = (Hld_HolidayType_t) 0; for (HolidayType = (Hld_HolidayType_t) 0;
HolidayType < Hld_NUM_TYPES_HOLIDAY; HolidayType < Hld_NUM_TYPES_HOLIDAY;
HolidayType++) HolidayType++)
@ -1032,7 +1030,7 @@ static void Hld_PutFormToCreateHoliday (void)
Tbl_EndCell (); Tbl_EndCell ();
/***** Holiday date / Non school period start date *****/ /***** Holiday date / Non school period start date *****/
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"); Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
Dat_WriteFormDate (Gbl.Now.Date.Year - 1, Dat_WriteFormDate (Gbl.Now.Date.Year - 1,
Gbl.Now.Date.Year + 1, Gbl.Now.Date.Year + 1,
"Start", "Start",
@ -1041,7 +1039,7 @@ static void Hld_PutFormToCreateHoliday (void)
Tbl_EndCell (); Tbl_EndCell ();
/***** Non school period end date *****/ /***** Non school period end date *****/
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"); Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
Dat_WriteFormDate (Gbl.Now.Date.Year - 1, Dat_WriteFormDate (Gbl.Now.Date.Year - 1,
Gbl.Now.Date.Year + 1, Gbl.Now.Date.Year + 1,
"End", "End",
@ -1050,8 +1048,8 @@ static void Hld_PutFormToCreateHoliday (void)
Tbl_EndCell (); Tbl_EndCell ();
/***** Holiday name *****/ /***** Holiday name *****/
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">" Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
"<input type=\"text\" name=\"Name\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Name\""
" size=\"20\" maxlength=\"%u\" value=\"%s\"" " size=\"20\" maxlength=\"%u\" value=\"%s\""
" required=\"required\" />", " required=\"required\" />",
Hld_MAX_CHARS_HOLIDAY_NAME,Hld_EditingHld->Name); Hld_MAX_CHARS_HOLIDAY_NAME,Hld_EditingHld->Name);