diff --git a/swad_changelog.h b/swad_changelog.h index b7c1e8368..618324bf5 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -143,13 +143,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.11.2 (2016-10-04)" +#define Log_PLATFORM_VERSION "SWAD 16.11.3 (2016-10-04)" #define CSS_FILE "swad15.229.css" #define JS_FILE "swad15.238.1.js" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1 /* + Version 16.11.3: Oct 04, 2016 Code refactoring in user's usage report. (205834 lines) Version 16.11.2: Oct 04, 2016 Code refactoring in user's usage report. (205829 lines) Version 16.11.1: Oct 04, 2016 Code refactoring in user's usage report. (205824 lines) Version 16.11: Oct 03, 2016 Created permalinks to report files. (205793 lines) diff --git a/swad_info.c b/swad_info.c index 1cc7e1c81..1b2c274ad 100644 --- a/swad_info.c +++ b/swad_info.c @@ -1914,10 +1914,10 @@ int Inf_WritePlainTextIntoHTMLBuffer (char **HTMLBuffer) /***** Write start of HTML code *****/ Lay_StartHTMLFile (FileHTMLTmp,Txt_INFO_TITLE[Gbl.CurrentCrs.Info.Type]); + fprintf (FileHTMLTmp,"\n" + "
\n"); /***** Write plain text into text buffer *****/ - fprintf (FileHTMLTmp,"
\n"); - /* Convert to respectful HTML and insert links */ Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, TxtHTML,Cns_MAX_BYTES_LONG_TEXT,false); // Convert from HTML to recpectful HTML diff --git a/swad_layout.c b/swad_layout.c index 9827d9ae2..eef303173 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -1784,8 +1784,7 @@ void Lay_StartHTMLFile (FILE *File,const char *Title) "\n" "%s\n" - "\n" - "\n", + "\n", Txt_STR_LANG_ID[Gbl.Prefs.Language], // Language Title); // Page title } diff --git a/swad_report.c b/swad_report.c index 0a853b1c3..9d24f181f 100644 --- a/swad_report.c +++ b/swad_report.c @@ -25,9 +25,6 @@ /*********************************** Headers *********************************/ /*****************************************************************************/ -// #include // For boolean type -// #include // For sprintf -// #include // For string functions #include // For unlink #include "swad_database.h" @@ -44,14 +41,15 @@ /*****************************************************************************/ #define Rep_MIN_CLICKS_CRS 100 // Minimum number of clicks to show a course in historic log -#define Rep_MAX_BAR_WIDTH 40 // Maximum width of graphic bar +#define Rep_MAX_BAR_WIDTH 50 // Maximum width of graphic bar // #define Rep_BLOCK "═" // HTML code for a block in graphic bar // #define Rep_BLOCK "▒" // HTML code for a block in graphic bar // #define Rep_BLOCK "█" // HTML code for a block in graphic bar // #define Rep_BLOCK "≡" // HTML code for a block in graphic bar // #define Rep_BLOCK "•" // HTML code for a block in graphic bar -#define Rep_BLOCK "▪" // HTML code for a block in graphic bar +// #define Rep_BLOCK "▪" // HTML code for a block in graphic bar +#define Rep_BLOCK "-" /*****************************************************************************/ /****************************** Internal types *******************************/ @@ -207,7 +205,8 @@ static void Rep_CreateMyUsageReport (struct CurrentTimeUTC *CurrentTimeUTC, /***** Start file *****/ Lay_StartHTMLFile (Gbl.F.Rep,Txt_Report); - fprintf (Gbl.F.Rep,"
\n"); + fprintf (Gbl.F.Rep,"\n"); /***** Header *****/ Rep_WriteHeader (CurrentTimeUTC,Permalink); @@ -240,8 +239,7 @@ static void Rep_CreateMyUsageReport (struct CurrentTimeUTC *CurrentTimeUTC, MaxHitsPerYear); /***** End file *****/ - fprintf (Gbl.F.Rep,"
\n" - "\n" + fprintf (Gbl.F.Rep,"\n" "\n"); /***** Close report file *****/ @@ -293,7 +291,7 @@ static void Rep_PutLinkToMyUsageReport (struct CurrentTimeUTC *CurrentTimeUTC, static void Req_TitleReport (struct CurrentTimeUTC *CurrentTimeUTC) { - fprintf (Gbl.F.Out,"
" + fprintf (Gbl.F.Out,"
" "%s",Gbl.Usrs.Me.UsrDat.FullName); if (CurrentTimeUTC->StrDate[0]) fprintf (Gbl.F.Out,"
%s",CurrentTimeUTC->StrDate); @@ -310,7 +308,7 @@ static void Rep_WriteHeader (struct CurrentTimeUTC *CurrentTimeUTC, extern const char *Txt_Report_of_use_of_PLATFORM; /***** Start of header *****/ - fprintf (Gbl.F.Rep,"
"); + fprintf (Gbl.F.Rep,"
"); /***** Main title *****/ sprintf (Gbl.Title,Txt_Report_of_use_of_PLATFORM,Cfg_PLATFORM_SHORT_NAME); @@ -1034,10 +1032,15 @@ static void Rep_DrawBarNumHits (float HitsNum,float HitsMax, { /***** Draw bar with a with proportional to the number of hits *****/ BarWidth = (unsigned) (((HitsNum * (float) MaxBarWidth) / HitsMax) + 0.5); - for (i = 0; - i < BarWidth; - i++) - fprintf (Gbl.F.Rep,Rep_BLOCK); + if (BarWidth) + { + fprintf (Gbl.F.Rep,""); + for (i = 0; + i < BarWidth; + i++) + fprintf (Gbl.F.Rep,Rep_BLOCK); + fprintf (Gbl.F.Rep,""); + } /***** Write the number of hits *****/ fprintf (Gbl.F.Rep," "); diff --git a/swad_syllabus.c b/swad_syllabus.c index 970677b57..885116124 100644 --- a/swad_syllabus.c +++ b/swad_syllabus.c @@ -842,7 +842,8 @@ static void Syl_WriteSyllabusIntoHTMLTmpFile (FILE *FileHTMLTmp) /***** Write start of HTML code *****/ Lay_StartHTMLFile (FileHTMLTmp,Txt_INFO_TITLE[Gbl.CurrentCrs.Info.Type]); - fprintf (FileHTMLTmp,"\n"); + fprintf (FileHTMLTmp,"\n" + "
\n"); /***** Set width of columns of the table *****/ fprintf (FileHTMLTmp,"\n"); @@ -852,7 +853,7 @@ static void Syl_WriteSyllabusIntoHTMLTmpFile (FILE *FileHTMLTmp) fprintf (FileHTMLTmp,"\n", i * Syl_WIDTH_NUM_SYLLABUS); fprintf (FileHTMLTmp,"\n" - "\n"); + "\n"); /***** Write all items of the current syllabus into text buffer *****/ for (NumItem = 0; @@ -880,8 +881,8 @@ static void Syl_WriteSyllabusIntoHTMLTmpFile (FILE *FileHTMLTmp) /***** Text of the item *****/ fprintf (FileHTMLTmp,"", + "%s" + "", LstItemsSyllabus.NumLevels - LstItemsSyllabus.Lst[NumItem].Level + 1, StyleSyllabus[LstItemsSyllabus.Lst[NumItem].Level], LstItemsSyllabus.Lst[NumItem].Text); @@ -891,8 +892,8 @@ static void Syl_WriteSyllabusIntoHTMLTmpFile (FILE *FileHTMLTmp) } fprintf (FileHTMLTmp,"
" - "%s" - "
\n" - "\n" - "\n"); + "\n" + "\n"); } /*****************************************************************************/