diff --git a/swad_changelog.h b/swad_changelog.h
index 795ee7233..b89cf0c03 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -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.15 (2019-10-07)"
+#define Log_PLATFORM_VERSION "SWAD 19.31.16 (2019-10-07)"
#define CSS_FILE "swad19.29.css"
#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: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
+ Version 19.31.16: Oct 07, 2019 Code refactoring in HTML tables. (247185 lines)
Version 19.31.15: Oct 07, 2019 Code refactoring in HTML tables. (247153 lines)
Version 19.31.14: Oct 07, 2019 Code refactoring in HTML tables. (247138 lines)
Version 19.31.13: Oct 07, 2019 Code refactoring in HTML tables. (247135 lines)
diff --git a/swad_place.c b/swad_place.c
index a86a9827f..8f87f38e5 100644
--- a/swad_place.c
+++ b/swad_place.c
@@ -141,14 +141,17 @@ void Plc_SeePlaces (void)
{
/* Write data of this place */
Tbl_StartRow ();
+
fprintf (Gbl.F.Out,"
"
- "%s"
- " "
- ""
- "%u"
- " ",
- Gbl.Plcs.Lst[NumPlc].FullName,
+ "%s",
+ Gbl.Plcs.Lst[NumPlc].FullName);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out,""
+ "%u",
Gbl.Plcs.Lst[NumPlc].NumCtrs);
+ Tbl_EndCell ();
+
Tbl_EndRow ();
NumCtrsWithPlc += Gbl.Plcs.Lst[NumPlc].NumCtrs;
}
@@ -156,34 +159,41 @@ void Plc_SeePlaces (void)
/***** Separation row *****/
Tbl_StartRow ();
fprintf (Gbl.F.Out," "
- " "
- " ");
+ " ");
+ Tbl_EndCell ();
Tbl_EndRow ();
/***** Write centres (of the current institution) with other place *****/
NumCtrsInOtherPlcs = Ctr_GetNumCtrsInPlc (0);
Tbl_StartRow ();
+
fprintf (Gbl.F.Out,""
- "%s"
- " "
- ""
- "%u"
- " ",
- Txt_Other_places,NumCtrsInOtherPlcs);
+ "%s",
+ Txt_Other_places);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out,""
+ "%u",
+ NumCtrsInOtherPlcs);
+ Tbl_EndCell ();
+
Tbl_EndRow ();
NumCtrsWithPlc += NumCtrsInOtherPlcs;
/***** Write centres (of the current institution) with no place *****/
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s"
- " "
- ""
- "%u"
- " ",
- Txt_Place_unspecified,
+ "%s",
+ Txt_Place_unspecified);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out,""
+ "%u",
Ctr_GetNumCtrsInIns (Gbl.Hierarchy.Ins.InsCod) -
NumCtrsWithPlc);
+ Tbl_EndCell ();
+
Tbl_EndRow ();
/***** End table *****/
@@ -538,9 +548,9 @@ static void Plc_ListPlacesForEdition (void)
/* Place code */
fprintf (Gbl.F.Out," "
- "%ld"
- " ",
+ "%ld",
Plc->PlcCod);
+ Tbl_EndCell ();
/* Place short name */
fprintf (Gbl.F.Out,"");
@@ -568,9 +578,10 @@ static void Plc_ListPlacesForEdition (void)
/* Number of centres */
fprintf (Gbl.F.Out," "
- "%u"
- " ",
+ "%u",
Plc->NumCtrs);
+ Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -806,33 +817,36 @@ static void Plc_PutFormToCreatePlace (void)
/***** Column to remove place, disabled here *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," ");
+ fprintf (Gbl.F.Out,"");
+ Tbl_EndCell ();
/***** Place code *****/
- fprintf (Gbl.F.Out," ");
+ fprintf (Gbl.F.Out,"");
+ Tbl_EndCell ();
/***** Place short name *****/
fprintf (Gbl.F.Out," "
" "
- " ",
+ " required=\"required\" />",
Plc_MAX_CHARS_PLACE_SHRT_NAME,Plc_EditingPlc->ShrtName);
+ Tbl_EndCell ();
/***** Place full name *****/
fprintf (Gbl.F.Out,""
" "
- " ",
+ " required=\"required\" />",
Plc_MAX_CHARS_PLACE_FULL_NAME,Plc_EditingPlc->FullName);
+ Tbl_EndCell ();
/***** Number of centres *****/
fprintf (Gbl.F.Out,""
- "0"
- " ");
+ "0");
+ Tbl_EndCell ();
+
Tbl_EndRow ();
/***** End table, send button and end box *****/
diff --git a/swad_plugin.c b/swad_plugin.c
index 17274b56c..6562c5cad 100644
--- a/swad_plugin.c
+++ b/swad_plugin.c
@@ -137,23 +137,26 @@ void Plg_ListPlugins (void)
/* Plugin logo */
// TODO: Change plugin icons to 32x32
Tbl_StartRow ();
+
fprintf (Gbl.F.Out,""
""
" "
- " "
- " "
- ""
- ""
- "%s"
- " "
- " ",
+ "",
URL,Plg->Name,
Cfg_URL_ICON_PLUGINS_PUBLIC,Gbl.Plugins.Lst[NumPlg].Logo,
- Plg->Name,Plg->Name,
+ Plg->Name,Plg->Name);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out,""
+ ""
+ "%s"
+ " ",
URL,Plg->Name,
Plg->Name);
+ Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -403,21 +406,21 @@ static void Plg_ListPluginsForEdition (void)
/* Plugin code */
fprintf (Gbl.F.Out," "
- "%ld"
- " ",
+ "%ld",
Plg->PlgCod);
+ Tbl_EndCell ();
/* Plugin logo */
// TODO: Change plugin icons to 32x32
fprintf (Gbl.F.Out,""
" "
- " ",
+ " class=\"ICO40x40\" />",
Cfg_URL_ICON_PLUGINS_PUBLIC,
Gbl.Plugins.Lst[NumPlg].Logo,
Gbl.Plugins.Lst[NumPlg].Name,
Gbl.Plugins.Lst[NumPlg].Name);
+ Tbl_EndCell ();
/* Plugin name */
fprintf (Gbl.F.Out,"");
@@ -920,49 +923,50 @@ static void Plg_PutFormToCreatePlugin (void)
fprintf (Gbl.F.Out," "
" "
- " ",
+ " required=\"required\" />",
Plg_MAX_CHARS_PLUGIN_NAME,Plg_EditingPlg->Name);
+ Tbl_EndCell ();
/***** Plugin description *****/
fprintf (Gbl.F.Out,""
" "
- " ",
+ " required=\"required\" />",
Plg_MAX_CHARS_PLUGIN_DESCRIPTION,Plg_EditingPlg->Description);
+ Tbl_EndCell ();
/***** Plugin logo *****/
fprintf (Gbl.F.Out,""
" "
- " ",
+ " required=\"required\" />",
Plg_MAX_CHARS_PLUGIN_LOGO,Plg_EditingPlg->Logo);
+ Tbl_EndCell ();
/***** Plugin application key *****/
fprintf (Gbl.F.Out,""
" "
- " ",
+ " required=\"required\" />",
Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg_EditingPlg->AppKey);
+ Tbl_EndCell ();
/***** Plugin URL *****/
fprintf (Gbl.F.Out,""
" "
- " ",
+ " required=\"required\" />",
Cns_MAX_CHARS_WWW,Plg_EditingPlg->URL);
+ Tbl_EndCell ();
/***** Plugin IP address *****/
fprintf (Gbl.F.Out,""
" "
- " ",
+ " required=\"required\" />",
Cns_MAX_CHARS_IP,Plg_EditingPlg->IP);
+ Tbl_EndCell ();
+
Tbl_EndRow ();
/***** End table, send button and end box *****/
diff --git a/swad_privacy.c b/swad_privacy.c
index 2573579f3..ec56f332d 100644
--- a/swad_privacy.c
+++ b/swad_privacy.c
@@ -159,9 +159,9 @@ static void Pri_PutFormVisibility (const char *TxtLabel,
/***** Select visibility *****/
fprintf (Gbl.F.Out,""
- "%s:"
- " ",
+ "%s:",
The_ClassFormInBox[Gbl.Prefs.Theme],TxtLabel);
+ Tbl_EndCell ();
/***** Form with list of options *****/
fprintf (Gbl.F.Out,"");
diff --git a/swad_profile.c b/swad_profile.c
index afc7a9580..ba24da488 100644
--- a/swad_profile.c
+++ b/swad_profile.c
@@ -1566,10 +1566,11 @@ void Prf_ShowRankingFigure (MYSQL_RES **mysql_res,unsigned NumUsrs)
Prf_ShowUsrInRanking (&UsrDat,Rank);
fprintf (Gbl.F.Out," "
- "%ld"
- " ",
+ "%ld",
Gbl.RowEvenOdd,
Figure);
+ Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -1762,15 +1763,15 @@ static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank)
fprintf (Gbl.F.Out,""
- "#%u"
- " "
- "",
+ "#%u",
Gbl.RowEvenOdd,
- Rank,
- Gbl.RowEvenOdd);
+ Rank);
+ Tbl_EndCell ();
/***** Check if I can see the public profile *****/
+ fprintf (Gbl.F.Out," ",
+ Gbl.RowEvenOdd);
if (Visible)
{
/***** User's photo *****/
@@ -1779,12 +1780,11 @@ static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank)
NULL,
"PHOTO30x40",Pho_ZOOM,false);
}
-
- fprintf (Gbl.F.Out," "
- "",
- Gbl.RowEvenOdd);
+ Tbl_EndCell ();
/***** Put form to go to public profile *****/
+ fprintf (Gbl.F.Out," ",
+ Gbl.RowEvenOdd);
if (Visible)
{
Frm_StartForm (ActSeeOthPubPrf);
@@ -1796,6 +1796,5 @@ static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank)
"");
Frm_EndForm ();
}
-
Tbl_EndCell ();
}
diff --git a/swad_project.c b/swad_project.c
index a9a3d10c3..8ddce908b 100644
--- a/swad_project.c
+++ b/swad_project.c
@@ -1027,10 +1027,10 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj,
""
- " ",
+ "",
UniqueId,Prj->CreatTime,
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
+ Tbl_EndCell ();
/* Modification date/time */
UniqueId++;
@@ -1044,10 +1044,10 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj,
""
- "",
+ "",
UniqueId,Prj->ModifTime,
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
+ Tbl_EndCell ();
/* Project title */
fprintf (Gbl.F.Out,""
- "%s:"
- " ",
+ "%s:",
Prj->Hidden == Prj_HIDDEN ? "ASG_LABEL_LIGHT" :
"ASG_LABEL",
Txt_Preassigned_QUESTION);
+ Tbl_EndCell ();
+
switch (ProjectView)
{
case Prj_LIST_PROJECTS:
@@ -1128,11 +1129,12 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj,
break;
}
fprintf (Gbl.F.Out," %s\">"
- "%s:"
- "",
+ "%s:",
Prj->Hidden == Prj_HIDDEN ? "ASG_LABEL_LIGHT" :
"ASG_LABEL",
Txt_Number_of_students);
+ Tbl_EndCell ();
+
switch (ProjectView)
{
case Prj_LIST_PROJECTS:
@@ -1144,11 +1146,12 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj,
break;
}
fprintf (Gbl.F.Out," %s\">"
- "%u"
- "",
+ "%u",
Prj->Hidden == Prj_HIDDEN ? "DAT_LIGHT" :
"DAT",
Prj->NumStds);
+ Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Project members *****/
@@ -1207,20 +1210,22 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj,
break;
}
fprintf (Gbl.F.Out," %s\">"
- "%s:"
- ""
- "Hidden == Prj_HIDDEN ? "ASG_LABEL_LIGHT" :
"ASG_LABEL",
Txt_Proposal);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," "
- "%s"
- " ",
+ "%s",
Prj->Hidden == Prj_HIDDEN ? "DAT_LIGHT" :
"DAT",
Txt_PROJECT_STATUS[Prj->Proposal]);
+ Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Write rows of data of this project *****/
@@ -1288,14 +1293,14 @@ static void Prj_ShowTableAllProjectsOneRow (struct Project *Prj)
""
- "",
+ "",
UniqueId,
Gbl.RowEvenOdd,
Prj->Hidden == Prj_HIDDEN ? "DATE_BLUE_LIGHT" :
"DATE_BLUE",
UniqueId,Prj->CreatTime,
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
+ Tbl_EndCell ();
/***** End date/time *****/
UniqueId++;
@@ -1303,45 +1308,45 @@ static void Prj_ShowTableAllProjectsOneRow (struct Project *Prj)
""
- "",
+ "",
UniqueId,
Gbl.RowEvenOdd,
Prj->Hidden == Prj_HIDDEN ? "DATE_BLUE_LIGHT" :
"DATE_BLUE",
UniqueId,Prj->ModifTime,
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
+ Tbl_EndCell ();
/***** Project title *****/
fprintf (Gbl.F.Out,""
- "%s"
- " ",
+ "%s",
Gbl.RowEvenOdd,
Prj->Hidden == Prj_HIDDEN ? "DAT_LIGHT" :
"DAT_N",
Prj->Title);
+ Tbl_EndCell ();
/***** Department *****/
Prj_ShowTableAllProjectsDepartment (Prj);
/***** Preassigned? *****/
fprintf (Gbl.F.Out,""
- "%s"
- " ",
+ "%s",
Gbl.RowEvenOdd,
Prj->Hidden == Prj_HIDDEN ? "DAT_LIGHT" :
"DAT",
(Prj->Preassigned == Prj_PREASSIGNED) ? Txt_Yes :
Txt_No);
+ Tbl_EndCell ();
/***** Number of students *****/
fprintf (Gbl.F.Out,""
- "%u"
- " ",
+ "%u",
Gbl.RowEvenOdd,
Prj->Hidden == Prj_HIDDEN ? "DAT_LIGHT" :
"DAT",
Prj->NumStds);
+ Tbl_EndCell ();
/***** Project members *****/
for (NumRoleToShow = 0;
@@ -1351,12 +1356,12 @@ static void Prj_ShowTableAllProjectsOneRow (struct Project *Prj)
/***** Proposal *****/
fprintf (Gbl.F.Out,""
- "%s"
- " ",
+ "%s",
Gbl.RowEvenOdd,
Prj->Hidden == Prj_HIDDEN ? "DAT_LIGHT" :
"DAT",
Txt_PROJECT_STATUS[Prj->Proposal]);
+ Tbl_EndCell ();
/***** Write rows of data of this project *****/
/* Description of the project */
@@ -1425,12 +1430,12 @@ static void Prj_ShowTableAllProjectsDepartment (const struct Project *Prj)
/***** Show department *****/
fprintf (Gbl.F.Out,""
- "%s"
- " ",
+ "%s",
Gbl.RowEvenOdd,
Prj->Hidden == Prj_HIDDEN ? "DAT_LIGHT" :
"DAT",
Dpt.FullName);
+ Tbl_EndCell ();
}
/*****************************************************************************/
@@ -1476,20 +1481,22 @@ static void Prj_ShowOneProjectTxtField (struct Project *Prj,
break;
}
fprintf (Gbl.F.Out," %s\">"
- "%s:"
- ""
- "Hidden == Prj_HIDDEN ? "ASG_LABEL_LIGHT" :
"ASG_LABEL",
Label);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," "
- "%s"
- " ",
+ "%s",
Prj->Hidden == Prj_HIDDEN ? "DAT_LIGHT" :
"DAT",
TxtField);
+ Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -1502,12 +1509,12 @@ static void Prj_ShowTableAllProjectsTxtField (struct Project *Prj,
/***** Write text *****/
fprintf (Gbl.F.Out,""
- "%s"
- " ",
+ "%s",
Gbl.RowEvenOdd,
Prj->Hidden == Prj_HIDDEN ? "DAT_LIGHT" :
"DAT",
TxtField);
+ Tbl_EndCell ();
}
/*****************************************************************************/
@@ -1544,12 +1551,13 @@ static void Prj_ShowOneProjectURL (const struct Project *Prj,
break;
}
fprintf (Gbl.F.Out," %s\">"
- "%s:"
- ""
- "Hidden == Prj_HIDDEN ? "ASG_LABEL_LIGHT" :
"ASG_LABEL",
Txt_URL);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ",
@@ -1561,6 +1569,7 @@ static void Prj_ShowOneProjectURL (const struct Project *Prj,
if (PutLink)
fprintf (Gbl.F.Out,"");
Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -1568,12 +1577,12 @@ static void Prj_ShowTableAllProjectsURL (const struct Project *Prj)
{
/***** Show URL *****/
fprintf (Gbl.F.Out," "
- "%s"
- " ",
+ "%s",
Gbl.RowEvenOdd,
Prj->Hidden == Prj_HIDDEN ? "DAT_LIGHT" :
"DAT",
Prj->URL);
+ Tbl_EndCell ();
}
/*****************************************************************************/
@@ -1642,35 +1651,36 @@ static void Prj_ShowOneProjectMembersWithARole (const struct Project *Prj,
{
case Prj_LIST_PROJECTS:
fprintf (Gbl.F.Out,""
- "%s:"
- " ",
+ "%s:",
Gbl.RowEvenOdd,
Prj->Hidden == Prj_HIDDEN ? "ASG_LABEL_LIGHT" :
"ASG_LABEL",
NumUsrs == 1 ? Txt_PROJECT_ROLES_SINGUL_Abc[RoleInProject] :
Txt_PROJECT_ROLES_PLURAL_Abc[RoleInProject]);
+ Tbl_EndCell ();
break;
case Prj_FILE_BROWSER_PROJECT:
fprintf (Gbl.F.Out,""
- "%s:"
- " ",
+ "%s:",
Prj->Hidden == Prj_HIDDEN ? "ASG_LABEL_LIGHT" :
"ASG_LABEL",
NumUsrs == 1 ? Txt_PROJECT_ROLES_SINGUL_Abc[RoleInProject] :
Txt_PROJECT_ROLES_PLURAL_Abc[RoleInProject]);
+ Tbl_EndCell ();
break;
case Prj_PRINT_ONE_PROJECT:
fprintf (Gbl.F.Out,""
- "%s:"
- " ",
+ "%s:",
Prj->Hidden == Prj_HIDDEN ? "ASG_LABEL_LIGHT" :
"ASG_LABEL",
NumUsrs == 1 ? Txt_PROJECT_ROLES_SINGUL_Abc[RoleInProject] :
Txt_PROJECT_ROLES_PLURAL_Abc[RoleInProject]);
+ Tbl_EndCell ();
break;
case Prj_EDIT_ONE_PROJECT:
- fprintf (Gbl.F.Out,"%s: ",
+ fprintf (Gbl.F.Out,"%s:",
Txt_PROJECT_ROLES_PLURAL_Abc[RoleInProject]);
+ Tbl_EndCell ();
break;
}
@@ -1732,8 +1742,9 @@ static void Prj_ShowOneProjectMembersWithARole (const struct Project *Prj,
Tbl_EndCell ();
/* Write user's name */
- fprintf (Gbl.F.Out," %s ",
+ fprintf (Gbl.F.Out,"%s",
Gbl.Usrs.Other.UsrDat.FullName);
+ Tbl_EndCell ();
/* End row for this user */
Tbl_EndRow ();
@@ -1753,9 +1764,14 @@ static void Prj_ShowOneProjectMembersWithARole (const struct Project *Prj,
Ico_PutContextualIconToAdd (ActionReqAddUsr[RoleInProject],NULL,
Prj_PutCurrentParams,
Gbl.Title);
- fprintf (Gbl.F.Out," "
- " " // Column for photo
- " "); // Column for name
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out,""); // Column for photo
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," "); // Column for name
+ Tbl_EndCell ();
+
Tbl_EndRow ();
break;
default:
@@ -3328,26 +3344,31 @@ static void Prj_PutFormProject (struct Project *Prj,bool ItsANewProject)
/* Project title */
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s: "
- " "
- ""
+ "%s: ",
+ The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Title);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," "
" "
- " ",
- The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Title,
+ " required=\"required\" />",
Prj_MAX_CHARS_PROJECT_TITLE,Prj->Title);
+ Tbl_EndCell ();
+
Tbl_EndRow ();
/* Department */
Tbl_StartRow ();
+
fprintf (Gbl.F.Out,""
- "%s: "
- " "
- "",
+ "%s: ",
Dpt_PARAM_DPT_COD_NAME,
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Department);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
Dpt_WriteSelectorDepartment (Gbl.Hierarchy.Ins.InsCod, // Departments in current institution
Prj->DptCod, // Selected department
"PRJ_INPUT", // Selector class
@@ -3355,17 +3376,20 @@ static void Prj_PutFormProject (struct Project *Prj,bool ItsANewProject)
Txt_Another_department, // Text when no department selected
false); // Don't submit on change
Tbl_EndCell ();
+
Tbl_EndRow ();
/* Preassigned? */
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s:"
- " "
- ""
- "",
+ "%s:",
The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_Preassigned_QUESTION);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out,""
+ "");
fprintf (Gbl.F.Out,"Preassigned == Prj_PREASSIGNED)
@@ -3377,33 +3401,39 @@ static void Prj_PutFormProject (struct Project *Prj,bool ItsANewProject)
fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s ",Txt_No);
- fprintf (Gbl.F.Out," "
- " ");
+ fprintf (Gbl.F.Out," ");
+ Tbl_EndCell ();
+
Tbl_EndRow ();
/* Number of students */
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s:"
- " "
- ""
- " "
- " ",
+ "%s:",
The_ClassFormInBox[Gbl.Prefs.Theme],
- Txt_Number_of_students,
+ Txt_Number_of_students);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out,""
+ " ",
Prj->NumStds);
+ Tbl_EndCell ();
+
Tbl_EndRow ();
/* Proposal */
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s:"
- " "
- ""
- "",
+ "%s:",
The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_Proposal);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out,""
+ "");
for (Proposal = (Prj_Proposal_t) 0;
Proposal <= (Prj_Proposal_t) (Prj_NUM_PROPOSAL_TYPES - 1);
Proposal++)
@@ -3414,8 +3444,9 @@ static void Prj_PutFormProject (struct Project *Prj,bool ItsANewProject)
fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s",Txt_PROJECT_STATUS[Proposal]);
}
- fprintf (Gbl.F.Out," "
- " ");
+ fprintf (Gbl.F.Out," ");
+ Tbl_EndCell ();
+
Tbl_EndRow ();
/* Description of the project */
@@ -3432,16 +3463,19 @@ static void Prj_PutFormProject (struct Project *Prj,bool ItsANewProject)
/* URL for additional info */
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s: "
- " "
- ""
- " "
- " ",
+ "%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],
- Txt_URL,
+ Txt_URL);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out,""
+ " ",
Cns_MAX_CHARS_WWW,Prj->URL);
+ Tbl_EndCell ();
+
Tbl_EndRow ();
/* End table, send button and end box */
@@ -3468,18 +3502,21 @@ static void Prj_EditOneProjectTxtArea (const char *Id,
extern const char *The_ClassFormInBox[The_NUM_THEMES];
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s: "
- " "
- ""
+ "%s: ",
+ Id,The_ClassFormInBox[Gbl.Prefs.Theme],Label);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," "
""
- " ",
- Id,The_ClassFormInBox[Gbl.Prefs.Theme],Label,
+ "",
Id,Id,
NumRows,
TxtField);
+ Tbl_EndCell ();
+
Tbl_EndRow ();
}
diff --git a/swad_record.c b/swad_record.c
index 618aa71b4..efc0bcdb1 100644
--- a/swad_record.c
+++ b/swad_record.c
@@ -386,17 +386,17 @@ void Rec_ShowFormCreateRecordField (void)
fprintf (Gbl.F.Out,""
" "
- " ",
+ " required=\"required\" />",
Rec_MAX_CHARS_NAME_FIELD,Gbl.Crs.Records.Field.Name);
+ Tbl_EndCell ();
/***** Number of lines in form ******/
fprintf (Gbl.F.Out,""
" "
- " ",
+ " required=\"required\" />",
Gbl.Crs.Records.Field.NumLines);
+ Tbl_EndCell ();
/***** Visibility to students *****/
fprintf (Gbl.F.Out,""
@@ -412,8 +412,9 @@ void Rec_ShowFormCreateRecordField (void)
Txt_RECORD_FIELD_VISIBILITY_MENU[Vis]);
}
- fprintf (Gbl.F.Out,""
- " ");
+ fprintf (Gbl.F.Out,"");
+ Tbl_EndCell ();
+
Tbl_EndRow ();
/***** End table, send button and end box *****/
@@ -1751,16 +1752,19 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
fprintf (Gbl.F.Out,"");
Tbl_StartTableWide ();
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," ",
Rec_DEGREE_LOGO_SIZE);
Log_DrawLogo (Hie_DEG,Gbl.Hierarchy.Deg.DegCod,
Gbl.Hierarchy.Deg.ShrtName,Rec_DEGREE_LOGO_SIZE,NULL,true);
- fprintf (Gbl.F.Out," "
- ""
- "%s %s %s"
- " ",
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out,""
+ "%s %s %s",
Gbl.Hierarchy.Deg.FullName,Gbl.Hierarchy.Crs.FullName,
UsrDat->FullName);
+ Tbl_EndCell ();
+
Tbl_EndRow ();
Tbl_EndTable ();
Tbl_EndCell ();
@@ -2760,8 +2764,8 @@ static void Rec_ShowFullName (struct UsrData *UsrDat)
/***** Surname 2 *****/
fprintf (Gbl.F.Out,"%s",UsrDat->Surname2);
- fprintf (Gbl.F.Out,""
- " ");
+ fprintf (Gbl.F.Out,"");
+ Tbl_EndCell ();
}
/*****************************************************************************/
@@ -2795,8 +2799,8 @@ static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks)
Frm_EndForm ();
}
}
- fprintf (Gbl.F.Out,""
- "");
+ fprintf (Gbl.F.Out,"");
+ Tbl_EndCell ();
}
/*****************************************************************************/
@@ -2835,11 +2839,13 @@ static void Rec_ShowEmail (struct UsrData *UsrDat,const char *ClassForm)
extern const char *Txt_Email;
Tbl_StartRow ();
+
fprintf (Gbl.F.Out,""
- "%s:"
- " "
- "",
+ "%s:",
ClassForm,Txt_Email);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
if (UsrDat->Email[0])
{
fprintf (Gbl.F.Out,""); // Limited width
@@ -2854,6 +2860,7 @@ static void Rec_ShowEmail (struct UsrData *UsrDat,const char *ClassForm)
fprintf (Gbl.F.Out,"
");
}
Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -2867,13 +2874,16 @@ static void Rec_ShowUsrIDs (struct UsrData *UsrDat,const char *ClassForm,
extern const char *Txt_ID;
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s:"
- " "
- "",
+ "%s:",
ClassForm,Txt_ID);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
ID_WriteUsrIDs (UsrDat,Anchor);
Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -2898,18 +2908,20 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
Rol_Role_t Role;
Usr_Sex_t Sex;
+ Tbl_StartRow ();
+
if (RoleForm)
{
/***** Form to select a role *****/
/* Get user's roles if not got */
Rol_GetRolesInAllCrssIfNotYetGot (UsrDat);
- Tbl_StartRow ();
fprintf (Gbl.F.Out," "
- "%s: "
- " "
- "",
+ "%s: ",
ClassForm,Txt_Role);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
switch (TypeOfView)
{
case Rec_SHA_SIGN_UP_IN_CRS_FORM: // I want to apply for enrolment
@@ -3098,16 +3110,16 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
break;
}
Tbl_EndCell ();
- Tbl_EndRow ();
}
else if (SexForm)
{
/***** Form to select a sex *****/
- Tbl_StartRow ();
fprintf (Gbl.F.Out," "
- "%s*: "
- "",
+ "%s*:",
ClassForm,Txt_Sex);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
for (Sex = Usr_SEX_FEMALE;
Sex <= Usr_SEX_MALE;
Sex++)
@@ -3123,23 +3135,23 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
Usr_StringsSexIcons[Sex],Txt_SEX_SINGULAR_Abc[Sex]);
}
Tbl_EndCell ();
- Tbl_EndRow ();
}
else // RoleForm == false, SexForm == false
{
/***** No form, only text *****/
- Tbl_StartRow ();
fprintf (Gbl.F.Out," "
- "%s:"
- " "
- ""
- "%s"
- " ",
+ "%s:",
ClassForm,
- Txt_Role,
+ Txt_Role);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out,""
+ "%s",
Txt_ROLES_SINGUL_Abc[UsrDat->Roles.InCurrentCrs.Role][UsrDat->Sex]);
- Tbl_EndRow ();
+ Tbl_EndCell ();
}
+
+ Tbl_EndRow ();
}
/*****************************************************************************/
@@ -3161,9 +3173,10 @@ static void Rec_ShowSurname1 (struct UsrData *UsrDat,
if (TypeOfView == Rec_SHA_MY_RECORD_FORM)
fprintf (Gbl.F.Out,"*");
fprintf (Gbl.F.Out,":"
- ""
- " "
- "");
+ "");
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
if (ICanEdit)
{
fprintf (Gbl.F.Out," "
""
"%s:"
- " "
- " "
- "",
+ "",
ClassForm,Txt_Surname_2);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
if (ICanEdit)
fprintf (Gbl.F.Out," Surname2[0])
fprintf (Gbl.F.Out,"%s ",UsrDat->Surname2);
Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -3226,6 +3242,7 @@ static void Rec_ShowFirstName (struct UsrData *UsrDat,
extern const char *Txt_First_name;
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
""
"%s",
@@ -3233,9 +3250,10 @@ static void Rec_ShowFirstName (struct UsrData *UsrDat,
if (TypeOfView == Rec_SHA_MY_RECORD_FORM)
fprintf (Gbl.F.Out,"*");
fprintf (Gbl.F.Out,":"
- " "
- " "
- "");
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
if (ICanEdit)
{
@@ -3252,6 +3270,7 @@ static void Rec_ShowFirstName (struct UsrData *UsrDat,
else if (UsrDat->FirstName[0])
fprintf (Gbl.F.Out,"%s ",UsrDat->FirstName);
Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -3275,14 +3294,16 @@ static void Rec_ShowCountry (struct UsrData *UsrDat,
}
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
"%s",
ClassForm,Txt_Country);
if (TypeOfView == Rec_SHA_MY_RECORD_FORM)
fprintf (Gbl.F.Out,"*");
- fprintf (Gbl.F.Out,": "
- " "
- "");
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
/***** Selector of country *****/
@@ -3305,8 +3326,9 @@ static void Rec_ShowCountry (struct UsrData *UsrDat,
fprintf (Gbl.F.Out,">%s",
Gbl.Hierarchy.Sys.Ctys.Lst[NumCty].Name[Gbl.Prefs.Language]);
}
- fprintf (Gbl.F.Out,""
- " ");
+ fprintf (Gbl.F.Out,"");
+ Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -3321,13 +3343,15 @@ static void Rec_ShowOriginPlace (struct UsrData *UsrDat,
extern const char *Txt_Place_of_origin;
Tbl_StartRow ();
+
fprintf (Gbl.F.Out,""
""
"%s:"
- " "
- " "
- "",
+ "",
ClassForm,Txt_Place_of_origin);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
if (ShowData)
{
if (ICanEdit)
@@ -3341,6 +3365,7 @@ static void Rec_ShowOriginPlace (struct UsrData *UsrDat,
fprintf (Gbl.F.Out,"%s",UsrDat->OriginPlace);
}
Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -3355,11 +3380,13 @@ static void Rec_ShowDateOfBirth (struct UsrData *UsrDat,
extern const char *Txt_Date_of_birth;
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s:"
- " "
- "",
+ "%s:",
ClassForm,Txt_Date_of_birth);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
if (ShowData)
{
if (ICanEdit)
@@ -3372,6 +3399,7 @@ static void Rec_ShowDateOfBirth (struct UsrData *UsrDat,
fprintf (Gbl.F.Out,"%s",UsrDat->StrBirthday);
}
Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -3386,13 +3414,15 @@ static void Rec_ShowLocalAddress (struct UsrData *UsrDat,
extern const char *Txt_Local_address;
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
""
"%s:"
- " "
- " "
- "",
+ "",
ClassForm,Txt_Local_address);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
if (ShowData)
{
if (ICanEdit)
@@ -3406,6 +3436,7 @@ static void Rec_ShowLocalAddress (struct UsrData *UsrDat,
fprintf (Gbl.F.Out,"%s",UsrDat->LocalAddress);
}
Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -3420,13 +3451,15 @@ static void Rec_ShowLocalPhone (struct UsrData *UsrDat,
extern const char *Txt_Phone;
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
""
"%s:"
- " "
- " "
- "",
+ "",
ClassForm,Txt_Phone);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
if (ShowData)
{
if (ICanEdit)
@@ -3442,6 +3475,7 @@ static void Rec_ShowLocalPhone (struct UsrData *UsrDat,
UsrDat->LocalPhone);
}
Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -3456,13 +3490,15 @@ static void Rec_ShowFamilyAddress (struct UsrData *UsrDat,
extern const char *Txt_Family_address;
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
""
"%s:"
- " "
- " "
- "",
+ "",
ClassForm,Txt_Family_address);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
if (ShowData)
{
if (ICanEdit)
@@ -3476,6 +3512,7 @@ static void Rec_ShowFamilyAddress (struct UsrData *UsrDat,
fprintf (Gbl.F.Out,"%s",UsrDat->FamilyAddress);
}
Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -3490,13 +3527,15 @@ static void Rec_ShowFamilyPhone (struct UsrData *UsrDat,
extern const char *Txt_Phone;
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
""
"%s:"
- " "
- " "
- "",
+ "",
ClassForm,Txt_Phone);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
if (ShowData)
{
if (ICanEdit)
@@ -3512,6 +3551,7 @@ static void Rec_ShowFamilyPhone (struct UsrData *UsrDat,
UsrDat->FamilyPhone);
}
Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -3526,11 +3566,13 @@ static void Rec_ShowComments (struct UsrData *UsrDat,
extern const char *Txt_USER_comments;
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s: "
- " "
- "",
+ "%s: ",
ClassForm,Txt_USER_comments);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
if (ShowData)
{
if (ICanEdit)
@@ -3547,6 +3589,7 @@ static void Rec_ShowComments (struct UsrData *UsrDat,
}
}
Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -3584,11 +3627,13 @@ static void Rec_ShowInstitution (struct Instit *Ins,
extern const char *Txt_Institution;
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s:"
- " "
- "",
+ "%s:",
ClassForm,Txt_Institution);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
if (ShowData)
if (Ins->InsCod > 0)
{
@@ -3601,6 +3646,7 @@ static void Rec_ShowInstitution (struct Instit *Ins,
fprintf (Gbl.F.Out,"");
}
Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -3615,11 +3661,13 @@ static void Rec_ShowCentre (struct UsrData *UsrDat,
struct Centre Ctr;
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s:"
- " "
- "",
+ "%s:",
ClassForm,Txt_Centre);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
if (ShowData)
{
if (UsrDat->Tch.CtrCod > 0)
@@ -3636,6 +3684,7 @@ static void Rec_ShowCentre (struct UsrData *UsrDat,
}
}
Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -3650,11 +3699,13 @@ static void Rec_ShowDepartment (struct UsrData *UsrDat,
struct Department Dpt;
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s:"
- " "
- "",
+ "%s:",
ClassForm,Txt_Department);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
if (ShowData)
{
if (UsrDat->Tch.DptCod > 0)
@@ -3671,6 +3722,7 @@ static void Rec_ShowDepartment (struct UsrData *UsrDat,
}
}
Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -3684,14 +3736,17 @@ static void Rec_ShowOffice (struct UsrData *UsrDat,
extern const char *Txt_Office;
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s:"
- " "
- "",
+ "%s:",
ClassForm,Txt_Office);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
if (ShowData)
fprintf (Gbl.F.Out,"%s",UsrDat->Tch.Office);
Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -3705,16 +3760,19 @@ static void Rec_ShowOfficePhone (struct UsrData *UsrDat,
extern const char *Txt_Phone;
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s:"
- " "
- "",
+ "%s:",
ClassForm,Txt_Phone);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
if (ShowData)
fprintf (Gbl.F.Out,"%s ",
UsrDat->Tch.OfficePhone,
UsrDat->Tch.OfficePhone);
Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -3990,11 +4048,13 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
/***** Country *****/
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s*: "
- " "
- "",
+ "%s*: ",
ClassForm,Txt_Country);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
/* If list of countries is empty, try to get it */
if (!Gbl.Hierarchy.Sys.Ctys.Num)
@@ -4027,15 +4087,18 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
fprintf (Gbl.F.Out,"");
Frm_EndForm ();
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Institution *****/
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s*: "
- " "
- "",
+ "%s*: ",
ClassForm,Txt_Institution);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
/* Get list of institutions in this country */
Ins_FreeListInstitutions ();
@@ -4071,17 +4134,20 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
fprintf (Gbl.F.Out,"");
Frm_EndForm ();
Tbl_EndCell ();
+
Tbl_EndRow ();
if (IAmATeacher)
{
/***** Centre *****/
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s*: "
- " "
- "",
+ "%s*: ",
ClassForm,Txt_Centre);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
/* Get list of centres in this institution */
Ctr_FreeListCentres ();
@@ -4117,15 +4183,18 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
fprintf (Gbl.F.Out,"");
Frm_EndForm ();
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Department *****/
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s*: "
- " "
- "",
+ "%s*: ",
Dpt_PARAM_DPT_COD_NAME,ClassForm,Txt_Department);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
Frm_StartFormAnchor (ActChgMyDpt,Rec_MY_INS_CTR_DPT_ID);
Dpt_WriteSelectorDepartment (Gbl.Usrs.Me.UsrDat.InsCod, // Departments in my institution
Gbl.Usrs.Me.UsrDat.Tch.DptCod, // Selected department
@@ -4135,17 +4204,20 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
true); // Submit on change
Frm_EndForm ();
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Office *****/
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
""
"%s:"
- " "
- " "
- "",
+ "",
ClassForm,Txt_Office);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
Frm_StartFormAnchor (ActChgMyOff,Rec_MY_INS_CTR_DPT_ID);
fprintf (Gbl.F.Out," "
""
"%s:"
- " "
- " "
- "",
+ "",
ClassForm,Txt_Phone);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
Frm_StartFormAnchor (ActChgMyOffPho,Rec_MY_INS_CTR_DPT_ID);
fprintf (Gbl.F.Out," %s:"
- " "
- "",
- The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Users,
+
+ fprintf (Gbl.F.Out," %s:",
+ The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Users);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ",
The_ClassFormInBox[Gbl.Prefs.Theme]);
Tbl_StartTable ();
Usr_ListUsersToSelect (Rol_TCH);
@@ -387,6 +390,7 @@ void Sta_AskShowCrsHits (void)
Usr_ListUsersToSelect (Rol_STD);
Tbl_EndTable ();
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Initial and final dates of the search *****/
@@ -397,9 +401,12 @@ void Sta_AskShowCrsHits (void)
/***** Option a) Listing of clicks distributed by some metric *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," %s: "
- "",
+
+ fprintf (Gbl.F.Out," %s:",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Show);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
if ((Gbl.Stat.ClicksGroupedBy < Sta_CLICKS_CRS_PER_USR ||
Gbl.Stat.ClicksGroupedBy > Sta_CLICKS_CRS_PER_ACTION) &&
@@ -463,8 +470,9 @@ void Sta_AskShowCrsHits (void)
fprintf (Gbl.F.Out,">%lu",RowsPerPage[i]);
}
fprintf (Gbl.F.Out,")"
- ""
- " ");
+ "");
+ Tbl_EndCell ();
+
Tbl_EndRow ();
Tbl_EndTable ();
@@ -538,12 +546,14 @@ void Sta_AskShowGblHits (void)
/***** Users' roles whose accesses we want to see *****/
Tbl_StartRow ();
+
fprintf (Gbl.F.Out,""
- "%s: "
- " "
- ""
- "",
+ "%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Users);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out,""
+ "");
for (RoleStat = (Sta_Role_t) 0;
RoleStat < Sta_NUM_ROLES_STAT;
RoleStat++)
@@ -553,8 +563,9 @@ void Sta_AskShowGblHits (void)
fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s",Txt_ROLE_STATS[RoleStat]);
}
- fprintf (Gbl.F.Out," "
- " ");
+ fprintf (Gbl.F.Out," ");
+ Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Selection of action *****/
@@ -562,11 +573,13 @@ void Sta_AskShowGblHits (void)
/***** Clicks made from anywhere, current centre, current degree or current course *****/
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s: "
- " "
- "",
+ "%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Scope);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
Gbl.Scope.Allowed = 1 << Hie_SYS |
1 << Hie_CTY |
1 << Hie_INS |
@@ -577,15 +590,18 @@ void Sta_AskShowGblHits (void)
Sco_GetScope ("ScopeSta");
Sco_PutSelectorScope ("ScopeSta",false);
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Count type for the statistic *****/
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s: "
- " "
- "",
+ "%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Show);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ");
Sta_WriteSelectorCountType ();
/***** Type of statistic *****/
@@ -608,8 +624,9 @@ void Sta_AskShowGblHits (void)
fprintf (Gbl.F.Out,">%s",Txt_STAT_CLICKS_GROUPED_BY[ClicksGroupedBy]);
}
fprintf (Gbl.F.Out,""
- ""
- " ");
+ "");
+ Tbl_EndCell ();
+
Tbl_EndRow ();
/***** End table *****/
@@ -698,13 +715,15 @@ static void Sta_WriteSelectorAction (void)
char ActTxt[Act_MAX_BYTES_ACTION_TXT + 1];
Tbl_StartRow ();
+
fprintf (Gbl.F.Out,""
- "%s: "
- " "
- ""
- "",
+ "%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Action);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out,""
+ "");
for (Action = (Act_Action_t) 0;
Action < Act_NUM_ACTIONS;
Action++)
@@ -721,9 +740,9 @@ static void Sta_WriteSelectorAction (void)
fprintf (Gbl.F.Out,"%s",
Act_GetActionTextFromDB (Act_GetActCod (Action),ActTxt));
}
+ fprintf (Gbl.F.Out," ");
+ Tbl_EndCell ();
- fprintf (Gbl.F.Out,""
- " ");
Tbl_EndRow ();
}
@@ -1610,11 +1629,11 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
fprintf (Gbl.F.Out,""
""
"%s %lu-%lu %s %lu (%s %ld %s %lu)"
- " "
- " ",
+ "",
Txt_Clicks,
FirstRow,LastRow,Txt_of_PART_OF_A_TOTAL,NumRows,
Txt_page,NumPagesBefore + 1,Txt_of_PART_OF_A_TOTAL,NumPagsTotal);
+ Tbl_EndCell ();
/* Put link to jump to next page (more recent clicks) */
if (LastRow < NumRows)
@@ -1702,55 +1721,55 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
/* Write the number of row */
Tbl_StartRow ();
fprintf (Gbl.F.Out,""
- "%ld "
- " ",
+ "%ld ",
Gbl.RowEvenOdd,NumRow);
+ Tbl_EndCell ();
/* Write the user's ID if user is a student */
fprintf (Gbl.F.Out,"",
Gbl.RowEvenOdd);
ID_WriteUsrIDs (&UsrDat,NULL);
- fprintf (Gbl.F.Out," ");
+ fprintf (Gbl.F.Out," ");
+ Tbl_EndCell ();
/* Write the first name and the surnames */
fprintf (Gbl.F.Out,""
- "%s "
- " ",
+ "%s ",
Gbl.RowEvenOdd,UsrDat.FullName);
+ Tbl_EndCell ();
/* Write the user's role */
fprintf (Gbl.F.Out,""
- "%s "
- " ",
+ "%s ",
Gbl.RowEvenOdd,
RoleFromLog < Rol_NUM_ROLES ? Txt_ROLES_SINGUL_Abc[RoleFromLog][UsrDat.Sex] :
"?");
+ Tbl_EndCell ();
/* Write the date-time (row[3]) */
fprintf (Gbl.F.Out,""
""
- " ",
+ "",
UniqueId,Gbl.RowEvenOdd,
UniqueId,(long) Dat_GetUNIXTimeFromStr (row[3]),
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
+ Tbl_EndCell ();
/* Write the action */
if (sscanf (row[4],"%ld",&ActCod) != 1)
Lay_ShowErrorAndExit ("Wrong action code.");
if (ActCod >= 0)
fprintf (Gbl.F.Out,""
- "%s "
- " ",
+ "%s ",
Gbl.RowEvenOdd,
Act_GetActionTextFromDB (ActCod,ActTxt));
else
fprintf (Gbl.F.Out,""
- "? "
- " ",
+ "? ",
Gbl.RowEvenOdd);
+ Tbl_EndCell ();
/* Write the comments of the access */
fprintf (Gbl.F.Out,"",
@@ -1850,12 +1869,13 @@ static void Sta_ShowNumHitsPerUsr (unsigned long NumRows,MYSQL_RES *mysql_res)
UsrDat.UsrCod = Str_ConvertStrCodToLongCod (row[0]);
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS); // Get the data of the user from the database
- /* Write the number of row */
Tbl_StartRow ();
+
+ /* Write the number of row */
fprintf (Gbl.F.Out," "
- "%ld "
- " ",
+ "%ld ",
Gbl.RowEvenOdd,NumRow);
+ Tbl_EndCell ();
/* Show the photo */
fprintf (Gbl.F.Out,"",
@@ -1870,20 +1890,21 @@ static void Sta_ShowNumHitsPerUsr (unsigned long NumRows,MYSQL_RES *mysql_res)
fprintf (Gbl.F.Out," ",
Gbl.RowEvenOdd);
ID_WriteUsrIDs (&UsrDat,NULL);
- fprintf (Gbl.F.Out," ");
+ fprintf (Gbl.F.Out," ");
+ Tbl_EndCell ();
/* Write the name and the surnames */
fprintf (Gbl.F.Out,""
- "%s "
- " ",
+ "%s ",
Gbl.RowEvenOdd,UsrDat.FullName);
+ Tbl_EndCell ();
/* Write user's role */
fprintf (Gbl.F.Out,""
- "%s "
- " ",
+ "%s ",
Gbl.RowEvenOdd,
Txt_ROLES_SINGUL_Abc[UsrDat.Roles.InCurrentCrs.Role][UsrDat.Sex]);
+ Tbl_EndCell ();
/* Write the number of clicks */
Hits.Num = Str_GetFloatNumFromStr (row[1]);
@@ -1910,7 +1931,9 @@ static void Sta_ShowNumHitsPerUsr (unsigned long NumRows,MYSQL_RES *mysql_res)
'r', // Non-editing teacher or teacher
BarWidth);
Str_WriteFloatNum (Gbl.F.Out,Hits.Num);
- fprintf (Gbl.F.Out," ");
+ fprintf (Gbl.F.Out," ");
+ Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -1986,23 +2009,24 @@ static void Sta_ShowNumHitsPerDay (unsigned long NumRows,MYSQL_RES *mysql_res)
{
NumDayWeek = Dat_GetDayOfWeek (Date.Year,Date.Month,Date.Day);
+ Tbl_StartRow ();
+
/* Write the date */
Dat_ConvDateToDateStr (&Date,StrDate);
- Tbl_StartRow ();
fprintf (Gbl.F.Out,""
- "%s "
- " ",
+ "%s ",
NumDayWeek == 6 ? "LOG_R" :
"LOG",
StrDate);
+ Tbl_EndCell ();
/* Write the day of the week */
fprintf (Gbl.F.Out,""
- "%s "
- " ",
+ "%s ",
NumDayWeek == 6 ? "LOG_R" :
"LOG",
Txt_DAYS_SMALL[NumDayWeek]);
+ Tbl_EndCell ();
/* Draw bar proportional to number of hits */
Sta_DrawBarNumHits (NumDayWeek == 6 ? 'r' : // red background
@@ -2011,6 +2035,8 @@ static void Sta_ShowNumHitsPerDay (unsigned long NumRows,MYSQL_RES *mysql_res)
0.0,
Hits.Max,Hits.Total,500);
+ Tbl_EndRow ();
+
/* Decrease day */
Dat_GetDateBefore (&Date,&Date);
}
@@ -2026,29 +2052,32 @@ static void Sta_ShowNumHitsPerDay (unsigned long NumRows,MYSQL_RES *mysql_res)
{
NumDayWeek = Dat_GetDayOfWeek (Date.Year,Date.Month,Date.Day);
+ Tbl_StartRow ();
+
/* Write the date */
Dat_ConvDateToDateStr (&Date,StrDate);
- Tbl_StartRow ();
fprintf (Gbl.F.Out,""
- "%s "
- " ",
+ "%s ",
NumDayWeek == 6 ? "LOG_R" :
"LOG",
StrDate);
+ Tbl_EndCell ();
/* Write the day of the week */
fprintf (Gbl.F.Out,""
- "%s "
- " ",
+ "%s ",
NumDayWeek == 6 ? "LOG_R" :
"LOG",
Txt_DAYS_SMALL[NumDayWeek]);
+ Tbl_EndCell ();
/* Draw bar proportional to number of hits */
Sta_DrawBarNumHits (NumDayWeek == 6 ? 'r' : // red background
'o', // orange background
0.0,Hits.Max,Hits.Total,500);
+ Tbl_EndRow ();
+
/* Decrease day */
Dat_GetDateBefore (&Date,&Date);
}
@@ -2171,10 +2200,12 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES
for (Hour = 0;
Hour < 24;
Hour++)
+ {
fprintf (Gbl.F.Out,""
- "%02uh"
- " ",
+ "%02uh",
GRAPH_DISTRIBUTION_PER_HOUR_HOUR_WIDTH,Hour);
+ Tbl_EndCell ();
+ }
Tbl_EndRow ();
/***** Write rows beginning by the most recent day and ending by the oldest one *****/
@@ -2220,19 +2251,19 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES
Dat_ConvDateToDateStr (&Date,StrDate);
Tbl_StartRow ();
fprintf (Gbl.F.Out,""
- "%s "
- " ",
+ "%s ",
NumDayWeek == 6 ? "LOG_R" :
"LOG",
StrDate);
+ Tbl_EndCell ();
/* Write the day of the week */
fprintf (Gbl.F.Out,""
- "%s "
- " ",
+ "%s ",
NumDayWeek == 6 ? "LOG_R" :
"LOG",
Txt_DAYS_SMALL[NumDayWeek]);
+ Tbl_EndCell ();
/* Draw a cell with the color proportional to the number of clicks */
if (D == NumDaysFromLastDateToCurrDate)
@@ -2271,19 +2302,19 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES
Dat_ConvDateToDateStr (&Date,StrDate);
Tbl_StartRow ();
fprintf (Gbl.F.Out,""
- "%s "
- " ",
+ "%s ",
NumDayWeek == 6 ? "LOG_R" :
"LOG",
StrDate);
+ Tbl_EndCell ();
/* Write the day of the week */
fprintf (Gbl.F.Out,""
- "%s "
- " ",
+ "%s ",
NumDayWeek == 6 ? "LOG_R" :
"LOG",
Txt_DAYS_SMALL[NumDayWeek]);
+ Tbl_EndCell ();
/* Draw the color proporcional al number of clicks */
if (D == NumDaysFromLastDateToCurrDate)
@@ -2306,26 +2337,28 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES
{
NumDayWeek = Dat_GetDayOfWeek (Date.Year,Date.Month,Date.Day);
+ Tbl_StartRow ();
+
/* Write the date */
Dat_ConvDateToDateStr (&Date,StrDate);
- Tbl_StartRow ();
fprintf (Gbl.F.Out,""
- "%s "
- " ",
+ "%s ",
NumDayWeek == 6 ? "LOG_R" :
"LOG",
StrDate);
+ Tbl_EndCell ();
/* Write the day of the week */
fprintf (Gbl.F.Out,""
- "%s "
- " ",
+ "%s ",
NumDayWeek == 6 ? "LOG_R" :
"LOG",
Txt_DAYS_SMALL[NumDayWeek]);
+ Tbl_EndCell ();
/* Draw the color proportional to number of clicks */
Sta_DrawAccessesPerHourForADay (SelectedColorType,NumAccPerHourZero,Hits.Max);
+
Tbl_EndRow ();
/* Decrease day */
@@ -2370,12 +2403,14 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,float HitsMax)
/***** Write numbers from 0 to Hits.Max *****/
Tbl_StartTableWide ();
Tbl_StartRow ();
+
fprintf (Gbl.F.Out,""
- "0"
- " ",
+ "0",
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2,
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2);
+ Tbl_EndCell ();
+
for (Interval = 1;
Interval <= 4;
Interval++)
@@ -2406,9 +2441,9 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,float HitsMax)
fprintf (Gbl.F.Out,""
" "
- " ",
+ " alt=\"\" title=\"\" />",
R,G,B,Cfg_URL_ICON_PUBLIC);
+ Tbl_EndCell ();
}
Tbl_EndRow ();
Tbl_EndTable ();
@@ -2433,9 +2468,9 @@ static void Sta_DrawAccessesPerHourForADay (Sta_ColorType_t ColorType,float Hits
fprintf (Gbl.F.Out,""
- " ",
+ " background-color:#%02X%02X%02X;\">",
GRAPH_DISTRIBUTION_PER_HOUR_HOUR_WIDTH,R,G,B);
+ Tbl_EndCell ();
}
}
@@ -2573,12 +2608,13 @@ static void Sta_ShowNumHitsPerWeek (unsigned long NumRows,
W <= NumWeeksBetweenLastDateAndCurDate;
W++)
{
- /* Write week */
Tbl_StartRow ();
+
+ /* Write week */
fprintf (Gbl.F.Out,""
- "%04u-%02u "
- " ",
+ "%04u-%02u ",
Date.Year,Date.Week);
+ Tbl_EndCell ();
/* Draw bar proportional to number of hits */
Sta_DrawBarNumHits ('o', // orange background
@@ -2586,6 +2622,8 @@ static void Sta_ShowNumHitsPerWeek (unsigned long NumRows,
0.0,
Hits.Max,Hits.Total,500);
+ Tbl_EndRow ();
+
/* Decrement week */
Dat_GetWeekBefore (&Date,&Date);
}
@@ -2600,17 +2638,20 @@ static void Sta_ShowNumHitsPerWeek (unsigned long NumRows,
W <= NumWeeksBetweenLastDateAndCurDate;
W++)
{
- /* Write week */
Tbl_StartRow ();
+
+ /* Write week */
fprintf (Gbl.F.Out,""
- "%04u-%02u "
- " ",
+ "%04u-%02u ",
Date.Year,Date.Week);
+ Tbl_EndCell ();
/* Draw bar proportional to number of hits */
Sta_DrawBarNumHits ('o', // orange background
0.0,Hits.Max,Hits.Total,500);
+ Tbl_EndRow ();
+
/* Decrement week */
Dat_GetWeekBefore (&Date,&Date);
}
@@ -2674,12 +2715,13 @@ static void Sta_ShowNumHitsPerMonth (unsigned long NumRows,
M <= NumMonthsBetweenLastDateAndCurDate;
M++)
{
- /* Write the month */
Tbl_StartRow ();
+
+ /* Write the month */
fprintf (Gbl.F.Out,""
- "%04u-%02u "
- " ",
+ "%04u-%02u ",
Date.Year,Date.Month);
+ Tbl_EndCell ();
/* Draw bar proportional to number of hits */
Sta_DrawBarNumHits ('o', // orange background
@@ -2687,6 +2729,8 @@ static void Sta_ShowNumHitsPerMonth (unsigned long NumRows,
0.0,
Hits.Max,Hits.Total,500);
+ Tbl_EndRow ();
+
/* Decrease month */
Dat_GetMonthBefore (&Date,&Date);
}
@@ -2700,17 +2744,20 @@ static void Sta_ShowNumHitsPerMonth (unsigned long NumRows,
M <= NumMonthsBetweenLastDateAndCurDate;
M++)
{
- /* Write the month */
Tbl_StartRow ();
+
+ /* Write the month */
fprintf (Gbl.F.Out,""
- "%04u-%02u "
- " ",
+ "%04u-%02u ",
Date.Year,Date.Month);
+ Tbl_EndCell ();
/* Draw bar proportional to number of hits */
Sta_DrawBarNumHits ('o', // orange background
0.0,Hits.Max,Hits.Total,500);
+ Tbl_EndRow ();
+
/* Decrease month */
Dat_GetMonthBefore (&Date,&Date);
}
@@ -2774,12 +2821,13 @@ static void Sta_ShowNumHitsPerYear (unsigned long NumRows,
Y <= NumYearsBetweenLastDateAndCurDate;
Y++)
{
- /* Write the year */
Tbl_StartRow ();
+
+ /* Write the year */
fprintf (Gbl.F.Out,""
- "%04u "
- " ",
+ "%04u ",
Date.Year);
+ Tbl_EndCell ();
/* Draw bar proportional to number of hits */
Sta_DrawBarNumHits ('o', // orange background
@@ -2787,6 +2835,8 @@ static void Sta_ShowNumHitsPerYear (unsigned long NumRows,
0.0,
Hits.Max,Hits.Total,500);
+ Tbl_EndRow ();
+
/* Decrease year */
Dat_GetYearBefore (&Date,&Date);
}
@@ -2800,17 +2850,20 @@ static void Sta_ShowNumHitsPerYear (unsigned long NumRows,
Y <= NumYearsBetweenLastDateAndCurDate;
Y++)
{
- /* Write the year */
Tbl_StartRow ();
+
+ /* Write the year */
fprintf (Gbl.F.Out,""
- "%04u "
- " ",
+ "%04u ",
Date.Year);
+ Tbl_EndCell ();
/* Draw bar proportional to number of hits */
Sta_DrawBarNumHits ('o', // orange background
0.0,Hits.Max,Hits.Total,500);
+ Tbl_EndRow ();
+
/* Decrease year */
Dat_GetYearBefore (&Date,&Date);
}
@@ -2912,7 +2965,8 @@ static void Sta_WriteAccessHour (unsigned Hour,struct Sta_Hits *Hits,unsigned Co
fprintf (Gbl.F.Out,"0%% 0");
/* Write the hour */
- fprintf (Gbl.F.Out," %uh",Hour);
+ fprintf (Gbl.F.Out," %uh",Hour);
+ Tbl_EndCell ();
}
/*****************************************************************************/
@@ -3001,35 +3055,41 @@ static void Sta_ShowAverageAccessesPerMinute (unsigned long NumRows,MYSQL_RES *m
Sta_WriteAccessMinute (i,NumClicksPerMin[i],MaxX);
/***** X axis *****/
- /* First division (left) */
Tbl_StartRow ();
+
+ /* First division (left) */
fprintf (Gbl.F.Out,""
" "
- " ",
+ " style=\"display:block; width:%upx; height:1px;\" />",
Sta_WIDTH_SEMIDIVISION_GRAPHIC,Cfg_URL_ICON_PUBLIC,
Sta_WIDTH_SEMIDIVISION_GRAPHIC);
+ Tbl_EndCell ();
+
/* All the intermediate divisions */
for (i = 0;
i < Sta_NUM_DIVISIONS_X * 2;
i++)
+ {
fprintf (Gbl.F.Out,""
" "
- " ",
+ " width:%upx; height:1px;\" />",
Sta_WIDTH_SEMIDIVISION_GRAPHIC,Cfg_URL_ICON_PUBLIC,
Sta_WIDTH_SEMIDIVISION_GRAPHIC);
+ Tbl_EndCell ();
+ }
+
/* Last division (right) */
fprintf (Gbl.F.Out,""
" "
- " ",
+ " style=\"display:block; width:%upx; height:1px;\" />",
Sta_WIDTH_SEMIDIVISION_GRAPHIC,Cfg_URL_ICON_PUBLIC,
Sta_WIDTH_SEMIDIVISION_GRAPHIC);
+ Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Write again the labels of the X axis *****/
@@ -3077,35 +3137,41 @@ static void Sta_WriteAccessMinute (unsigned Minute,float HitsNum,float MaxX)
/***** Labels of the Y axis, and Y axis *****/
if (!Minute)
+ {
// If minute 0
fprintf (Gbl.F.Out,""
- "00h"
- " ",
+ "00h",
Sta_WIDTH_SEMIDIVISION_GRAPHIC,Cfg_URL_ICON_PUBLIC);
+ Tbl_EndCell ();
+ }
else if (Minute == (Sta_NUM_MINUTES_PER_DAY - 30))
+ {
// If 23:30
fprintf (Gbl.F.Out,""
- "24h"
- " ",
+ "24h",
Sta_WIDTH_SEMIDIVISION_GRAPHIC,Cfg_URL_ICON_PUBLIC);
+ Tbl_EndCell ();
+ }
else if (!(Minute % 30) && (Minute % 60))
+ {
// If minute is multiple of 30 but not of 60 (i.e.: 30, 90, 150...)
fprintf (Gbl.F.Out,""
- "%02uh"
- " ",
+ "%02uh",
Sta_WIDTH_SEMIDIVISION_GRAPHIC,Cfg_URL_ICON_PUBLIC,(Minute + 30) / 60);
+ Tbl_EndCell ();
+ }
/***** Start cell for the graphic *****/
fprintf (Gbl.F.Out,"= 0)
- {
- Tbl_StartRow ();
fprintf (Gbl.F.Out," "
- "%s "
- " ",
+ "%s ",
Act_GetActionTextFromDB (ActCod,ActTxt));
- }
else
- {
- Tbl_StartRow ();
fprintf (Gbl.F.Out,""
- "? "
- " ");
- }
+ "? ");
+ Tbl_EndCell ();
/* Draw bar proportional to number of hits */
Hits.Num = Str_GetFloatNumFromStr (row[1]);
Sta_DrawBarNumHits ('o', // orange background
Hits.Num,Hits.Max,Hits.Total,500);
+
+ Tbl_EndRow ();
}
}
@@ -3235,21 +3298,25 @@ static void Sta_ShowNumHitsPerPlugin (unsigned long NumRows,
{
row = mysql_fetch_row (mysql_res);
+ Tbl_StartRow ();
+
/* Write the plugin */
if (sscanf (row[0],"%ld",&Plg.PlgCod) != 1)
Lay_ShowErrorAndExit ("Wrong plugin code.");
- Tbl_StartRow ();
fprintf (Gbl.F.Out,"");
if (Plg_GetDataOfPluginByCod (&Plg))
fprintf (Gbl.F.Out,"%s",Plg.Name);
else
fprintf (Gbl.F.Out,"?");
- fprintf (Gbl.F.Out," ");
+ fprintf (Gbl.F.Out," ");
+ Tbl_EndCell ();
/* Draw bar proportional to number of hits */
Hits.Num = Str_GetFloatNumFromStr (row[1]);
Sta_DrawBarNumHits ('o', // orange background
Hits.Num,Hits.Max,Hits.Total,500);
+
+ Tbl_EndRow ();
}
}
@@ -3290,19 +3357,23 @@ static void Sta_ShowNumHitsPerWSFunction (unsigned long NumRows,
{
row = mysql_fetch_row (mysql_res);
+ Tbl_StartRow ();
+
/* Write the plugin */
if (sscanf (row[0],"%ld",&FunCod) != 1)
Lay_ShowErrorAndExit ("Wrong function code.");
- Tbl_StartRow ();
+
fprintf (Gbl.F.Out,""
- "%s "
- " ",
+ "%s ",
API_GetFunctionNameFromFunCod (FunCod));
+ Tbl_EndCell ();
/* Draw bar proportional to number of hits */
Hits.Num = Str_GetFloatNumFromStr (row[1]);
Sta_DrawBarNumHits ('o', // orange background
Hits.Num,Hits.Max,Hits.Total,500);
+
+ Tbl_EndRow ();
}
}
@@ -3356,11 +3427,12 @@ static void Sta_ShowNumHitsPerBanner (unsigned long NumRows,
{
row = mysql_fetch_row (mysql_res);
+ Tbl_StartRow ();
+
/* Write the banner */
if (sscanf (row[0],"%ld",&(Ban.BanCod)) != 1)
Lay_ShowErrorAndExit ("Wrong banner code.");
Ban_GetDataOfBannerByCod (&Ban);
- Tbl_StartRow ();
fprintf (Gbl.F.Out,""
""
" ");
if (CtyCod > 0)
fprintf (Gbl.F.Out,"%lu",++Ranking);
- fprintf (Gbl.F.Out," "
- " ");
+ fprintf (Gbl.F.Out," ");
+ Tbl_EndCell ();
/* Write country */
Sta_WriteCountry (CtyCod);
@@ -3442,6 +3517,8 @@ static void Sta_ShowNumHitsPerCountry (unsigned long NumRows,
Hits.Num = Str_GetFloatNumFromStr (row[1]);
Sta_DrawBarNumHits ('o', // orange background
Hits.Num,Hits.Max,Hits.Total,375);
+
+ Tbl_EndRow ();
}
}
@@ -3521,13 +3598,14 @@ static void Sta_ShowNumHitsPerInstitution (unsigned long NumRows,
row = mysql_fetch_row (mysql_res);
InsCod = Str_ConvertStrCodToLongCod (row[0]);
- /* Write ranking of this institution */
Tbl_StartRow ();
+
+ /* Write ranking of this institution */
fprintf (Gbl.F.Out,"");
if (InsCod > 0)
fprintf (Gbl.F.Out,"%lu",++Ranking);
- fprintf (Gbl.F.Out," "
- " ");
+ fprintf (Gbl.F.Out," ");
+ Tbl_EndCell ();
/* Write institution */
Sta_WriteInstitution (InsCod);
@@ -3536,6 +3614,8 @@ static void Sta_ShowNumHitsPerInstitution (unsigned long NumRows,
Hits.Num = Str_GetFloatNumFromStr (row[1]);
Sta_DrawBarNumHits ('o', // orange background
Hits.Num,Hits.Max,Hits.Total,375);
+
+ Tbl_EndRow ();
}
}
@@ -3617,13 +3697,14 @@ static void Sta_ShowNumHitsPerCentre (unsigned long NumRows,
row = mysql_fetch_row (mysql_res);
CtrCod = Str_ConvertStrCodToLongCod (row[0]);
- /* Write ranking of this centre */
Tbl_StartRow ();
+
+ /* Write ranking of this centre */
fprintf (Gbl.F.Out,"");
if (CtrCod > 0)
fprintf (Gbl.F.Out,"%lu",++Ranking);
- fprintf (Gbl.F.Out," "
- " ");
+ fprintf (Gbl.F.Out," ");
+ Tbl_EndCell ();
/* Write centre */
Sta_WriteCentre (CtrCod);
@@ -3632,6 +3713,8 @@ static void Sta_ShowNumHitsPerCentre (unsigned long NumRows,
Hits.Num = Str_GetFloatNumFromStr (row[1]);
Sta_DrawBarNumHits ('o', // orange background
Hits.Num,Hits.Max,Hits.Total,375);
+
+ Tbl_StartRow ();
}
}
@@ -3713,8 +3796,9 @@ static void Sta_ShowNumHitsPerDegree (unsigned long NumRows,
row = mysql_fetch_row (mysql_res);
DegCod = Str_ConvertStrCodToLongCod (row[0]);
- /* Write ranking of this degree */
Tbl_StartRow ();
+
+ /* Write ranking of this degree */
fprintf (Gbl.F.Out,"");
if (DegCod > 0)
fprintf (Gbl.F.Out,"%lu",++Ranking);
@@ -3728,6 +3812,8 @@ static void Sta_ShowNumHitsPerDegree (unsigned long NumRows,
Hits.Num = Str_GetFloatNumFromStr (row[1]);
Sta_DrawBarNumHits ('o', // orange background
Hits.Num,Hits.Max,Hits.Total,375);
+
+ Tbl_StartRow ();
}
}
@@ -3827,22 +3913,24 @@ static void Sta_ShowNumHitsPerCourse (unsigned long NumRows,
/* Get data of current degree */
CrsOK = Crs_GetDataOfCourseByCod (&Crs);
- /* Write ranking of this course */
Tbl_StartRow ();
+
+ /* Write ranking of this course */
fprintf (Gbl.F.Out," ");
if (CrsOK)
fprintf (Gbl.F.Out,"%lu",++Ranking);
- fprintf (Gbl.F.Out," ");
+ fprintf (Gbl.F.Out," ");
+ Tbl_EndCell ();
/* Write degree */
Sta_WriteDegree (Crs.DegCod);
/* Write degree year */
fprintf (Gbl.F.Out,""
- "%s "
- " ",
+ "%s ",
CrsOK ? Txt_YEAR_OF_DEGREE[Crs.Year] :
"-");
+ Tbl_EndCell ();
/* Write course, including link */
fprintf (Gbl.F.Out,"");
@@ -3869,6 +3957,8 @@ static void Sta_ShowNumHitsPerCourse (unsigned long NumRows,
Hits.Num = Str_GetFloatNumFromStr (row[1]);
Sta_DrawBarNumHits ('o', // orange background
Hits.Num,Hits.Max,Hits.Total,375);
+
+ Tbl_StartRow ();
}
}
@@ -3941,9 +4031,8 @@ static void Sta_DrawBarNumHits (char Color,
/***** Write the number of clicks *****/
fprintf (Gbl.F.Out,"0 (0");
- fprintf (Gbl.F.Out,"%%) "
- " ");
- Tbl_EndRow ();
+ fprintf (Gbl.F.Out,"%%) ");
+ Tbl_EndCell ();
}
/*****************************************************************************/
@@ -4209,41 +4298,51 @@ void Sta_GetAndShowLastClicks (void)
/* Print table row */
Tbl_StartRow ();
+
fprintf (Gbl.F.Out,""
- "%s" // Click
- " "
- "" // Elapsed time
+ "%s", // Click
+ ClassRow,row[0]);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," " // Elapsed time
"",
- ClassRow,row[0],
ClassRow);
Dat_WriteHoursMinutesSecondsFromSeconds (TimeDiff);
- fprintf (Gbl.F.Out," "
- ""
- "%s" // Role
- " "
- ""
- "%s" // Country
- " "
- ""
- "%s" // Institution
- " "
- ""
- "%s" // Centre
- " "
- ""
- "%s" // Degree
- " "
- "",
- ClassRow,Txt_ROLES_SINGUL_Abc[Rol_ConvertUnsignedStrToRole (row[3])][Usr_SEX_UNKNOWN],
- ClassRow,Cty.Name[Gbl.Prefs.Language],
- ClassRow,Ins.ShrtName,
- ClassRow,Ctr.ShrtName,
- ClassRow,Deg.ShrtName,
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," "
+ "%s", // Role
+ ClassRow,
+ Txt_ROLES_SINGUL_Abc[Rol_ConvertUnsignedStrToRole (row[3])][Usr_SEX_UNKNOWN]);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," "
+ "%s", // Country
+ ClassRow,Cty.Name[Gbl.Prefs.Language]);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," "
+ "%s", // Institution
+ ClassRow,Ins.ShrtName);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," "
+ "%s", // Centre
+ ClassRow,Ctr.ShrtName);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," "
+ "%s", // Degree
+ ClassRow,Deg.ShrtName);
+ Tbl_EndCell ();
+
+ fprintf (Gbl.F.Out," ",
ClassRow);
if (row[8])
if (row[8][0])
fprintf (Gbl.F.Out,"%s",row[8]); // Action
Tbl_EndCell ();
+
Tbl_EndRow ();
}
Tbl_EndTable ();