diff --git a/swad_HTML.c b/swad_HTML.c
index 0355bbc1c..d29456647 100644
--- a/swad_HTML.c
+++ b/swad_HTML.c
@@ -1520,6 +1520,11 @@ void HTM_TxtColon (const char *Txt)
HTM_Txt (":");
}
+void HTM_NBSP (void)
+ {
+ HTM_Txt (" ");
+ }
+
void HTM_Unsigned (unsigned Num)
{
fprintf (Gbl.F.Out,"%u",Num);
diff --git a/swad_HTML.h b/swad_HTML.h
index 89cfca18a..050cc2fbf 100644
--- a/swad_HTML.h
+++ b/swad_HTML.h
@@ -151,6 +151,7 @@ void HTM_BR (void);
void HTM_Txt (const char *Txt);
void HTM_TxtColon (const char *Txt);
+void HTM_NBSP (void);
void HTM_Unsigned (unsigned Num);
void HTM_Long (long Num);
diff --git a/swad_assignment.c b/swad_assignment.c
index 6a7d62840..44caa4e9b 100644
--- a/swad_assignment.c
+++ b/swad_assignment.c
@@ -1656,7 +1656,7 @@ static void Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (struct Assignment *Asg)
fprintf (Gbl.F.Out," %s ",Txt_and);
if (NumRows >= 3)
if (NumRow < NumRows-2)
- fprintf (Gbl.F.Out,", ");
+ HTM_Txt (", ");
}
}
}
diff --git a/swad_attendance.c b/swad_attendance.c
index fbf0e6053..66b449461 100644
--- a/swad_attendance.c
+++ b/swad_attendance.c
@@ -1547,7 +1547,7 @@ static void Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (struct AttendanceEve
fprintf (Gbl.F.Out," %s ",Txt_and);
if (NumGrps >= 3)
if (NumGrp < NumGrps - 2)
- fprintf (Gbl.F.Out,", ");
+ HTM_Txt (", ");
}
}
}
diff --git a/swad_centre.c b/swad_centre.c
index 161e57087..e714429c0 100644
--- a/swad_centre.c
+++ b/swad_centre.c
@@ -2527,17 +2527,17 @@ static void Ctr_PutFormToCreateCentre (void)
/***** Number of users who claim to belong to this centre *****/
HTM_TD_Begin ("class=\"DAT RM\"");
- fprintf (Gbl.F.Out,"0");
+ HTM_Unsigned (0);
HTM_TD_End ();
/***** Number of degrees *****/
HTM_TD_Begin ("class=\"DAT RM\"");
- fprintf (Gbl.F.Out,"0");
+ HTM_Unsigned (0);
HTM_TD_End ();
/***** Number of users in courses of this centre *****/
HTM_TD_Begin ("class=\"DAT RM\"");
- fprintf (Gbl.F.Out,"0");
+ HTM_Unsigned (0);
HTM_TD_End ();
/***** Centre requester *****/
diff --git a/swad_changelog.h b/swad_changelog.h
index bb8c50bf0..7edddca2d 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.61.3 (2019-11-10)"
+#define Log_PLATFORM_VERSION "SWAD 19.61.4 (2019-11-10)"
#define CSS_FILE "swad19.47.css"
#define JS_FILE "swad19.39.js"
/*
@@ -495,6 +495,7 @@ ps2pdf source.ps destination.pdf
// TODO: Impedir la creación y edición de proyectos si no son editables.
// TODO: Importante: filtrar proyectos por usuarios (igual que en trabajos o en asistencia)
+ Version 19.61.4: Nov 10, 2019 Code refactoring in HTML long printing. (246303 lines)
Version 19.61.3: Nov 10, 2019 Code refactoring in HTML long printing. (246297 lines)
Version 19.61.2: Nov 10, 2019 Code refactoring in HTML unsigned printing. (246291 lines)
Version 19.61.1: Nov 10, 2019 Code refactoring in HTML text printing. (246291 lines)
diff --git a/swad_country.c b/swad_country.c
index 35c10b55f..0086273d4 100644
--- a/swad_country.c
+++ b/swad_country.c
@@ -546,7 +546,7 @@ void Cty_ListCountries2 (void)
/***** Separation row *****/
HTM_TR_Begin (NULL);
HTM_TD_Begin ("colspan=\"8\" class=\"DAT CM\"");
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_TD_End ();
HTM_TR_End ();
@@ -617,7 +617,7 @@ void Cty_ListCountries2 (void)
HTM_TD_End ();
HTM_TD_Begin ("class=\"DAT RM\"");
- fprintf (Gbl.F.Out,"0");
+ HTM_Unsigned (0);
HTM_TD_End ();
HTM_TR_End ();
@@ -2063,12 +2063,12 @@ static void Cty_PutFormToCreateCountry (void)
/***** Number of users *****/
HTM_TD_Begin ("rowspan=\"%u\" class=\"DAT RT\"",1 + Lan_NUM_LANGUAGES);
- fprintf (Gbl.F.Out,"0");
+ HTM_Unsigned (0);
HTM_TD_End ();
/***** Number of institutions *****/
HTM_TD_Begin ("rowspan=\"%u\" class=\"DAT RT\"",1 + Lan_NUM_LANGUAGES);
- fprintf (Gbl.F.Out,"0");
+ HTM_Unsigned (0);
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_course.c b/swad_course.c
index 096a81b6c..cbabab148 100644
--- a/swad_course.c
+++ b/swad_course.c
@@ -1680,12 +1680,12 @@ static void Crs_PutFormToCreateCourse (void)
/***** Current number of teachers in this course *****/
HTM_TD_Begin ("class=\"DAT RM\"");
- fprintf (Gbl.F.Out,"0");
+ HTM_Unsigned (0);
HTM_TD_End ();
/***** Current number of students in this course *****/
HTM_TD_Begin ("class=\"DAT RM\"");
- fprintf (Gbl.F.Out,"0");
+ HTM_Unsigned (0);
HTM_TD_End ();
/***** Course requester *****/
@@ -3276,7 +3276,7 @@ void Crs_AskRemoveOldCrss (void)
i == MonthsWithoutAccess,false,
"%u",i);
HTM_SELECT_End ();
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
fprintf (Gbl.F.Out,Txt_Eliminate_all_courses_whithout_users_PART_2_OF_2,
Cfg_PLATFORM_SHORT_NAME);
HTM_LABEL_End ();
diff --git a/swad_degree.c b/swad_degree.c
index b99dbcf2f..b347a9978 100644
--- a/swad_degree.c
+++ b/swad_degree.c
@@ -982,7 +982,7 @@ static void Deg_PutFormToCreateDegree (void)
/***** Current number of courses in this degree *****/
HTM_TD_Begin ("class=\"DAT RM\"");
- fprintf (Gbl.F.Out,"0");
+ HTM_Unsigned (0);
HTM_TD_End ();
/***** Degree requester *****/
diff --git a/swad_degree_type.c b/swad_degree_type.c
index bac2b177a..dd15f199b 100644
--- a/swad_degree_type.c
+++ b/swad_degree_type.c
@@ -478,7 +478,7 @@ static void DT_PutFormToCreateDegreeType (void)
/***** Number of degrees of this degree type ****/
HTM_TD_Begin ("class=\"DAT RM\"");
- fprintf (Gbl.F.Out,"0");
+ HTM_Unsigned (0);
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_department.c b/swad_department.c
index 5f2df9d2d..4a479dfdd 100644
--- a/swad_department.c
+++ b/swad_department.c
@@ -171,7 +171,7 @@ void Dpt_SeeDepts (void)
/***** Separation row *****/
HTM_TR_Begin (NULL);
HTM_TD_Begin ("colspan=\"3\" class=\"DAT\"");
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_enrolment.c b/swad_enrolment.c
index 0c9a47e47..fd1ea62e9 100644
--- a/swad_enrolment.c
+++ b/swad_enrolment.c
@@ -815,7 +815,7 @@ void Enr_AskRemoveOldUsrs (void)
Months == Usr_DEF_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_USRS,false,
"%u",Months);
HTM_SELECT_End ();
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
fprintf (Gbl.F.Out,Txt_Eliminate_all_users_who_are_not_enroled_on_any_courses_PART_2_OF_2,
Cfg_PLATFORM_SHORT_NAME);
HTM_LABEL_End ();
diff --git a/swad_exam.c b/swad_exam.c
index cb0988d1b..199de8459 100644
--- a/swad_exam.c
+++ b/swad_exam.c
@@ -1076,7 +1076,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
/***** Title *****/
HTM_TR_Begin (NULL);
HTM_TD_Begin ("colspan=\"2\" class=\"%s CM\"",StyleNormal);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_BR ();
fprintf (Gbl.F.Out,"%s",Txt_EXAM_ANNOUNCEMENT);
HTM_TD_End ();
@@ -1084,7 +1084,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
HTM_TR_Begin (NULL);
HTM_TD_Begin ("colspan=\"2\" class=\"%s LM\"",StyleNormal);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_figure.c b/swad_figure.c
index e08a345e0..e4e04f292 100644
--- a/swad_figure.c
+++ b/swad_figure.c
@@ -1479,7 +1479,7 @@ static void Fig_ShowInss (MYSQL_RES **mysql_res,unsigned NumInss,
{
Log_DrawLogo (Hie_INS,Ins.InsCod,Ins.ShrtName,
40,NULL,true);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
}
HTM_Txt (Ins.FullName);
Frm_LinkFormEnd ();
diff --git a/swad_file_browser.c b/swad_file_browser.c
index c210ce546..a0657d1a2 100644
--- a/swad_file_browser.c
+++ b/swad_file_browser.c
@@ -4125,7 +4125,7 @@ static void Brw_ShowAndStoreSizeOfFileTree (void)
Brw_StoreSizeOfFileTreeInDB ();
}
else
- fprintf (Gbl.F.Out," "); // Blank to occupy the same space as the text for the browser size
+ HTM_NBSP (); // Blank to occupy the same space as the text for the browser size
HTM_DIV_End ();
}
@@ -6256,7 +6256,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic)
}
/***** Write name of the folder *****/
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
if (Gbl.FileBrowser.ICanEditFileOrFolder) // Can I rename this folder?
{
HTM_INPUT_TEXT ("NewFolderName",Brw_MAX_CHARS_FOLDER,Gbl.FileBrowser.FilFolLnk.Name,true,
@@ -6293,7 +6293,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic)
HTM_TD_Begin ("class=\"%s LM\" style=\"width:99%%;\"",
Gbl.FileBrowser.TxtStyle);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_DIV_Begin ("class=\"FILENAME\"");
Frm_StartForm (Brw_ActDowFile[Gbl.FileBrowser.Type]);
@@ -6439,7 +6439,7 @@ static void Brw_WriteFileSizeAndDate (struct FileMetadata *FileMetadata)
/***** Write the date *****/
HTM_TD_Begin ("class=\"%s RM COLOR%u\"",
Gbl.FileBrowser.TxtStyle,Gbl.RowEvenOdd);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
if (Gbl.FileBrowser.FilFolLnk.Type == Brw_IS_FILE ||
Gbl.FileBrowser.FilFolLnk.Type == Brw_IS_LINK)
{
@@ -11809,13 +11809,13 @@ void Brw_ListDocsFound (MYSQL_RES **mysql_res,unsigned long NumDocs,
/* Number of documents not hidden found */
HTM_TH_Begin (1,7,"CM");
- fprintf (Gbl.F.Out,"(");
+ HTM_Txt ("(");
NumDocsHidden = NumDocs - NumDocsNotHidden;
if (NumDocsHidden == 1)
fprintf (Gbl.F.Out,"1 %s",Txt_hidden_document);
else
fprintf (Gbl.F.Out,"%lu %s",NumDocsHidden,Txt_hidden_documents);
- fprintf (Gbl.F.Out,")");
+ HTM_Txt (")");
HTM_TH_End ();
HTM_TR_End ();
@@ -12141,7 +12141,7 @@ void Brw_AskRemoveOldFiles (void)
Months == Brw_DEF_MONTHS_TO_REMOVE_OLD_FILES,false,
"%u",Months);
HTM_SELECT_End ();
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
fprintf (Gbl.F.Out,Txt_Remove_files_older_than_PART_2_OF_2,
Cfg_PLATFORM_SHORT_NAME);
HTM_LABEL_End ();
diff --git a/swad_group.c b/swad_group.c
index 0a1eb0436..e7f13586b 100644
--- a/swad_group.c
+++ b/swad_group.c
@@ -2541,7 +2541,7 @@ static void Grp_PutFormToCreateGroupType (void)
/***** Number of groups of this type *****/
HTM_TD_Begin ("class=\"DAT CM\"");
- fprintf (Gbl.F.Out,"0"); // It's a new group type ==> 0 groups
+ HTM_Unsigned (0); // It's a new group type ==> 0 groups
HTM_TD_End ();
HTM_TR_End ();
@@ -2655,7 +2655,7 @@ static void Grp_PutFormToCreateGroup (void)
Role--)
{
HTM_TD_Begin ("class=\"DAT CM\"");
- fprintf (Gbl.F.Out,"0");
+ HTM_Unsigned (0);
HTM_TD_End ();
}
diff --git a/swad_hierarchy.c b/swad_hierarchy.c
index 290788c07..59c0e289e 100644
--- a/swad_hierarchy.c
+++ b/swad_hierarchy.c
@@ -212,7 +212,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
/***** Form to go to the system *****/
HTM_DIV_Begin ("class=\"BC %s\"",ClassTxt);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
Frm_StartFormGoTo (ActMnu);
Par_PutHiddenParamUnsigned (NULL,"NxtTab",(unsigned) TabSys);
diff --git a/swad_holiday.c b/swad_holiday.c
index 8e0147a76..93c7e0ebd 100644
--- a/swad_holiday.c
+++ b/swad_holiday.c
@@ -164,7 +164,7 @@ void Hld_SeeHolidays (void)
HTM_TD_End ();
HTM_TD_Begin ("class=\"DAT LM\"");
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
switch (Gbl.Hlds.Lst[NumHld].HldTyp)
{
case Hld_HOLIDAY:
diff --git a/swad_indicator.c b/swad_indicator.c
index 6d849a273..9c75f9e52 100644
--- a/swad_indicator.c
+++ b/swad_indicator.c
@@ -149,7 +149,7 @@ void Ind_ReqIndicatorsCourses (void)
fprintf (Gbl.F.Out," (");
fprintf (Gbl.F.Out,Txt_only_if_the_scope_is_X,
Cfg_PLATFORM_SHORT_NAME);
- fprintf (Gbl.F.Out,")");
+ HTM_Txt (")");
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_institution.c b/swad_institution.c
index 4e8ef227e..23dcbc419 100644
--- a/swad_institution.c
+++ b/swad_institution.c
@@ -2221,17 +2221,17 @@ static void Ins_PutFormToCreateInstitution (void)
/***** Number of users who claim to belong to this institution ****/
HTM_TD_Begin ("class=\"DAT RM\"");
- fprintf (Gbl.F.Out,"0");
+ HTM_Unsigned (0);
HTM_TD_End ();
/***** Number of centres *****/
HTM_TD_Begin ("class=\"DAT RM\"");
- fprintf (Gbl.F.Out,"0");
+ HTM_Unsigned (0);
HTM_TD_End ();
/***** Number of users in courses of this institution ****/
HTM_TD_Begin ("class=\"DAT RM\"");
- fprintf (Gbl.F.Out,"0");
+ HTM_Unsigned (0);
HTM_TD_End ();
/***** Institution requester *****/
diff --git a/swad_match.c b/swad_match.c
index 809773b1d..95aa4204b 100644
--- a/swad_match.c
+++ b/swad_match.c
@@ -2735,12 +2735,12 @@ static void Mch_DrawEmptyRowScore (unsigned NumRow,double MinScore,double MaxSco
if (NumRow == 0)
{
Str_WriteFloatNumToFile (Gbl.F.Out,MaxScore);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
}
else if (NumRow == Mch_NUM_ROWS_SCORE - 1)
{
Str_WriteFloatNumToFile (Gbl.F.Out,MinScore);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
}
HTM_TD_End ();
@@ -2805,7 +2805,7 @@ static void Mch_DrawScoreRow (double Score,double MinScore,double MaxScore,
/* Write score */
HTM_TD_Begin ("class=\"MCH_SCO_SCO\"");
Str_WriteFloatNumToFile (Gbl.F.Out,Score);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_TD_End ();
/* Draw bar and write number of users for this score */
diff --git a/swad_message.c b/swad_message.c
index e3b3df891..be0b08a5a 100644
--- a/swad_message.c
+++ b/swad_message.c
@@ -3378,7 +3378,7 @@ static void Msg_WriteMsgFrom (struct UsrData *UsrDat,bool Deleted)
HTM_Txt (UsrDat->FullName);
if (Act_GetSuperAction (Gbl.Action.Act) == ActSeeRcvMsg)
{
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
if (Msg_CheckIfUsrIsBanned (UsrDat->UsrCod,Gbl.Usrs.Me.UsrDat.UsrCod))
// Sender is banned
Msg_PutFormToUnbanSender (UsrDat);
diff --git a/swad_place.c b/swad_place.c
index 8397f5d20..062d21412 100644
--- a/swad_place.c
+++ b/swad_place.c
@@ -159,7 +159,7 @@ void Plc_SeePlaces (void)
/***** Separation row *****/
HTM_TR_Begin (NULL);
HTM_TD_Begin ("colspan=\"2\" class=\"DAT\"");
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_TD_End ();
HTM_TR_End ();
@@ -828,7 +828,7 @@ static void Plc_PutFormToCreatePlace (void)
/***** Number of centres *****/
HTM_TD_Begin ("class=\"DAT RM\"");
- fprintf (Gbl.F.Out,"0");
+ HTM_Unsigned (0);
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_profile.c b/swad_profile.c
index b889f7a5b..63424b63e 100644
--- a/swad_profile.c
+++ b/swad_profile.c
@@ -500,7 +500,7 @@ static void Prf_ShowTimeSinceFirstClick (const struct UsrData *UsrDat,
(UsrFigures->NumDays == 1) ? Txt_day :
Txt_days);
}
- fprintf (Gbl.F.Out,")");
+ HTM_Txt (")");
}
Dat_WriteLocalDateHMSFromUTC (IdFirstClickTime,UsrFigures->FirstClickTimeUTC,
Gbl.Prefs.DateFormat,Dat_SEPARATOR_COMMA,
@@ -606,7 +606,7 @@ static void Prf_ShowNumClicks (const struct UsrData *UsrDat,
fprintf (Gbl.F.Out,"/%s ",Txt_day);
Prf_ShowRanking (Prf_GetRankingNumClicksPerDay (UsrDat->UsrCod),
Prf_GetNumUsrsWithNumClicksPerDay ());
- fprintf (Gbl.F.Out,")");
+ HTM_Txt (")");
}
}
else // Number of clicks is unknown
diff --git a/swad_record.c b/swad_record.c
index 957168566..97924220a 100644
--- a/swad_record.c
+++ b/swad_record.c
@@ -1494,7 +1494,7 @@ static void Rec_ShowLinkToPrintPreviewOfRecords (void)
Txt_Print);
Frm_LinkFormEnd ();
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
- fprintf (Gbl.F.Out,"(");
+ HTM_Txt ("(");
HTM_SELECT_Begin (false,
"name=\"RecsPerPag\"");
for (i = Rec_MIN_RECORDS_PER_PAGE;
diff --git a/swad_statistic.c b/swad_statistic.c
index fa826037d..ebc806426 100644
--- a/swad_statistic.c
+++ b/swad_statistic.c
@@ -463,7 +463,7 @@ void Sta_AskShowCrsHits (void)
RowsPerPage[i] == Gbl.Stat.RowsPerPage,false,
"%u",RowsPerPage[i]);
HTM_SELECT_End ();
- fprintf (Gbl.F.Out,")");
+ HTM_Txt (")");
HTM_LABEL_End ();
HTM_TD_End ();
@@ -1708,7 +1708,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
/* Write the user's ID if user is a student */
HTM_TD_Begin ("class=\"LOG CT COLOR%u\"",Gbl.RowEvenOdd);
ID_WriteUsrIDs (&UsrDat,NULL);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_TD_End ();
/* Write the first name and the surnames */
@@ -1848,7 +1848,7 @@ static void Sta_ShowNumHitsPerUsr (unsigned long NumRows,MYSQL_RES *mysql_res)
/* Write the user's ID if user is a student in current course */
HTM_TD_Begin ("class=\"LOG LT COLOR%u\"",Gbl.RowEvenOdd);
ID_WriteUsrIDs (&UsrDat,NULL);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_TD_End ();
/* Write the name and the surnames */
@@ -1884,7 +1884,7 @@ static void Sta_ShowNumHitsPerUsr (unsigned long NumRows,MYSQL_RES *mysql_res)
NULL,
"class=\"LT\" style=\"width:%upx; height:10px; padding-top:4px;\"",
BarWidth);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
}
Str_WriteFloatNumToFile (Gbl.F.Out,Hits.Num);
HTM_TD_End ();
@@ -2326,7 +2326,7 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,float HitsMax)
HTM_TD_Begin ("colspan=\"%u\" class=\"LOG LB\" style=\"width:%upx;\"",
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2,
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2);
- fprintf (Gbl.F.Out,"0");
+ HTM_Unsigned (0);
HTM_TD_End ();
for (Interval = 1;
@@ -2867,7 +2867,7 @@ static void Sta_WriteAccessHour (unsigned Hour,struct Sta_Hits *Hits,unsigned Co
{
fprintf (Gbl.F.Out,"0%%");
HTM_BR ();
- fprintf (Gbl.F.Out,"0");
+ HTM_Unsigned (0);
}
/* Write the hour */
@@ -3198,7 +3198,7 @@ static void Sta_ShowNumHitsPerPlugin (unsigned long NumRows,
HTM_Txt (Plg.Name);
else
fprintf (Gbl.F.Out,"?");
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_TD_End ();
/* Draw bar proportional to number of hits */
@@ -3375,7 +3375,7 @@ static void Sta_ShowNumHitsPerCountry (unsigned long NumRows,
HTM_TD_Begin ("class=\"LOG RM\"");
if (CtyCod > 0)
fprintf (Gbl.F.Out,"%lu",++Ranking);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_TD_End ();
/* Write country */
@@ -3465,7 +3465,7 @@ static void Sta_ShowNumHitsPerInstitution (unsigned long NumRows,
HTM_TD_Begin ("class=\"LOG RT\"");
if (InsCod > 0)
fprintf (Gbl.F.Out,"%lu",++Ranking);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_TD_End ();
/* Write institution */
@@ -3557,7 +3557,7 @@ static void Sta_ShowNumHitsPerCentre (unsigned long NumRows,
HTM_TD_Begin ("class=\"LOG RT\"");
if (CtrCod > 0)
fprintf (Gbl.F.Out,"%lu",++Ranking);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_TD_End ();
/* Write centre */
@@ -3649,7 +3649,7 @@ static void Sta_ShowNumHitsPerDegree (unsigned long NumRows,
HTM_TD_Begin ("class=\"LOG RT\"");
if (DegCod > 0)
fprintf (Gbl.F.Out,"%lu",++Ranking);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_TD_End ();
/* Write degree */
@@ -3753,7 +3753,7 @@ static void Sta_ShowNumHitsPerCourse (unsigned long NumRows,
HTM_TD_Begin ("class=\"LOG RT\"");
if (CrsOK)
fprintf (Gbl.F.Out,"%lu",++Ranking);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_TD_End ();
/* Write degree */
@@ -3781,7 +3781,7 @@ static void Sta_ShowNumHitsPerCourse (unsigned long NumRows,
}
else
fprintf (Gbl.F.Out,"-");
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
if (CrsOK)
Frm_EndForm ();
HTM_TD_End ();
@@ -3855,7 +3855,7 @@ static void Sta_DrawBarNumHits (char Color,
free (Icon);
/***** Write the number of hits *****/
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
Str_WriteFloatNumToFile (Gbl.F.Out,HitsNum);
fprintf (Gbl.F.Out," (%u",
(unsigned) (((HitsNum * 100.0) /
diff --git a/swad_syllabus.c b/swad_syllabus.c
index 919843a4f..632fa8d22 100644
--- a/swad_syllabus.c
+++ b/swad_syllabus.c
@@ -709,7 +709,7 @@ static void Syl_ShowRowSyllabus (unsigned NumItem,
StyleSyllabus[Level],Gbl.RowEvenOdd,
Level * Syl_WIDTH_NUM_SYLLABUS);
if (Level == 1)
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
fprintf (Gbl.F.Out,"%s ",StrItemCod);
HTM_TD_End ();
@@ -900,9 +900,9 @@ static void Syl_PutFormItemSyllabus (bool NewItem,unsigned NumItem,int Level,int
StyleSyllabus[Level],Gbl.RowEvenOdd,
Level * Syl_WIDTH_NUM_SYLLABUS);
if (Level == 1)
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
Syl_WriteNumItem (NULL,Gbl.F.Out,Level,CodItem);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_TD_End ();
}
diff --git a/swad_test.c b/swad_test.c
index c1bc1afba..183e9a5e0 100644
--- a/swad_test.c
+++ b/swad_test.c
@@ -3327,9 +3327,9 @@ void Tst_WriteAnswersEdit (long QstCod)
Tst_CheckIfNumberOfAnswersIsOne ();
row = mysql_fetch_row (mysql_res);
HTM_SPAN_Begin ("class=\"TEST_EDI\"");
- fprintf (Gbl.F.Out,"(");
+ HTM_Txt ("(");
Tst_WriteAnsTF (row[1][0]);
- fprintf (Gbl.F.Out,")");
+ HTM_Txt (")");
HTM_SPAN_End ();
break;
case Tst_ANS_UNIQUE_CHOICE:
@@ -3547,7 +3547,7 @@ void Tst_WriteAnsTF (char AnsTF)
HTM_Txt (Txt_TF_QST[1]);
break;
default: // no answer
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
break;
}
}
diff --git a/swad_test_import.c b/swad_test_import.c
index 3e4d9226c..77e7d1d48 100644
--- a/swad_test_import.c
+++ b/swad_test_import.c
@@ -1083,9 +1083,9 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
break;
case Tst_ANS_TRUE_FALSE:
HTM_SPAN_Begin ("class=\"%s\"",ClassStem);
- fprintf (Gbl.F.Out,"(");
+ HTM_Txt ("(");
Tst_WriteAnsTF (Gbl.Test.Answer.TF);
- fprintf (Gbl.F.Out,")");
+ HTM_Txt (")");
HTM_SPAN_End ();
break;
case Tst_ANS_UNIQUE_CHOICE:
diff --git a/swad_timeline.c b/swad_timeline.c
index 91fd40d1d..67abdc061 100644
--- a/swad_timeline.c
+++ b/swad_timeline.c
@@ -1403,9 +1403,9 @@ static void TL_PutLinkToViewNewPublications (void)
The_ClassFormInBoxBold[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s (",Txt_See_new_activity);
HTM_SPAN_Begin ("id=\"view_new_posts_count\"");
- fprintf (Gbl.F.Out,"0");
+ HTM_Unsigned (0);
HTM_SPAN_End ();
- fprintf (Gbl.F.Out,")");
+ HTM_Txt (")");
HTM_A_End ();
HTM_DIV_End ();
}
diff --git a/swad_user.c b/swad_user.c
index f50cf270a..d16db1f71 100644
--- a/swad_user.c
+++ b/swad_user.c
@@ -2812,7 +2812,7 @@ void Usr_WriteLoggedUsrHead (void)
else
{
Rol_PutFormToChangeMyRole ("SEL_ROLE");
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
}
/***** Show my photo *****/
@@ -3725,7 +3725,7 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat)
/****** Write user's ID ******/
HTM_TD_Begin ("class=\"DAT_SMALL LM COLOR%u\"",Gbl.RowEvenOdd);
ID_WriteUsrIDs (UsrDat,NULL);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_TD_End ();
/***** Write rest of guest's main data *****/
@@ -3829,7 +3829,7 @@ static void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames)
"DAT_SMALL",
Gbl.RowEvenOdd);
ID_WriteUsrIDs (UsrDat,NULL);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_TD_End ();
/***** Write rest of main student's data *****/
@@ -3948,7 +3948,7 @@ static void Usr_WriteRowTchAllData (struct UsrData *UsrDat)
"DAT_SMALL",
Gbl.RowEvenOdd);
ID_WriteUsrIDs (UsrDat,NULL);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_TD_End ();
/***** Write rest of main teacher's data *****/
@@ -4026,7 +4026,7 @@ static void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat)
"DAT_SMALL",
Gbl.RowEvenOdd);
ID_WriteUsrIDs (UsrDat,NULL);
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_TD_End ();
/***** Write rest of main administrator's data *****/
@@ -4122,7 +4122,7 @@ static void Usr_WriteUsrData (const char *BgColor,
/***** Write data *****/
HTM_Txt (Data);
if (NonBreak)
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
/***** End link *****/
if (Link)
@@ -8901,17 +8901,17 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType,
if (UsrDat.FirstName[0])
HTM_Txt (UsrDat.FirstName);
else
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_BR ();
if (UsrDat.Surname1[0])
HTM_Txt (UsrDat.Surname1);
else
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_BR ();
if (UsrDat.Surname2[0])
HTM_Txt (UsrDat.Surname2);
else
- fprintf (Gbl.F.Out," ");
+ HTM_NBSP ();
HTM_DIV_End ();