From b481e03724bd94a64a40394759e27348e8fe2f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sun, 7 Oct 2018 15:13:24 +0200 Subject: [PATCH] Version 18.1.1 --- icon/bb1x1.gif | Bin 77 -> 0 bytes icon/bg1x1.gif | Bin 77 -> 0 bytes icon/c1x14.gif | Bin 92 -> 0 bytes icon/c8x1.gif | Bin 89 -> 0 bytes icon/o1x1.png | Bin 0 -> 103 bytes icon/r1x1.png | Bin 0 -> 103 bytes icon/r1x14.gif | Bin 92 -> 0 bytes icon/v1x14.gif | Bin 92 -> 0 bytes swad_changelog.h | 5 +++ swad_statistic.c | 80 ++++++++++++++++++++++++++++------------------- 10 files changed, 53 insertions(+), 32 deletions(-) delete mode 100644 icon/bb1x1.gif delete mode 100644 icon/bg1x1.gif delete mode 100644 icon/c1x14.gif delete mode 100644 icon/c8x1.gif create mode 100644 icon/o1x1.png create mode 100644 icon/r1x1.png delete mode 100644 icon/r1x14.gif delete mode 100644 icon/v1x14.gif diff --git a/icon/bb1x1.gif b/icon/bb1x1.gif deleted file mode 100644 index e55809e7a1dc9b911aead90ec0d48261f8c45fc2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 77 mcmZ?wbhEHbWMp7u*v!CCa`+7cDL@CL7^Ihhg-O7L!5RQHWd%e4 diff --git a/icon/bg1x1.gif b/icon/bg1x1.gif deleted file mode 100644 index 22941f532c87df735cb7bf8ca576e83e6b1a498e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 77 pcmZ?wbhEHbWMp7u*v!D-GI>wQ;WrFK109e`kX{BBCIJ@)YXFh42G;-p diff --git a/icon/c1x14.gif b/icon/c1x14.gif deleted file mode 100644 index d37c3db9324307f974a402e0524ba908c2a9dfcd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 92 zcmZ?wbhEHbWMtrD*v!DN`Ot;kr*0j(aR2z#=V$M{x$^ky^=H3sz5Wjb4A_9;PZmZ7 b1`Y-tkR-?q1{O|%lfp+7jxuyAF<1it23sDc diff --git a/icon/c8x1.gif b/icon/c8x1.gif deleted file mode 100644 index 2f3b0272f2634a6263ce07f6f5c5f340e7d48a2f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 89 zcmZ?wbhEHbs01R$Gz9%CSj!PC{xWt~$(69DGb6&nBm literal 0 HcmV?d00001 diff --git a/icon/r1x1.png b/icon/r1x1.png new file mode 100644 index 0000000000000000000000000000000000000000..8ac551fbdaab54d6465082ab2eba91cce7359e62 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga%mF?juFndcmOTD>7|7);@Q5sC tVBi)8VMc~ob0mO*T%InDAsp9}6M$?c2F6EY73BZ` literal 0 HcmV?d00001 diff --git a/icon/r1x14.gif b/icon/r1x14.gif deleted file mode 100644 index a1f08010aadb4a74e2c1b38245dfad4e84c43353..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 92 zcmZ?wbhEHbWMtrD*v!E2Y0{)Gixz!bv*!Eu?LQ73`gP&L@9Wq9+`ISx|9=K-K=CIF cBLf2mgAPa%WCjBZr@%?!BML_uI+Yl#0nDl$$^ZZW diff --git a/icon/v1x14.gif b/icon/v1x14.gif deleted file mode 100644 index 4bbae162b53926ddfff64c0e9430efb43f3b4f88..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 92 zcmZ?wbhEHbWMtrD*v!DN{%y^!_x%Sy%|7*c#l", Gbl.RowEvenOdd); if (BarWidth) - fprintf (Gbl.F.Out,"\"\"" " ", Gbl.Prefs.IconsURL, - UsrDat.Roles.InCurrentCrs.Role == Rol_STD ? 'c' : // Student - 'v', // Non-editing teacher or teacher + UsrDat.Roles.InCurrentCrs.Role == Rol_STD ? 'o' : // Student + 'r', // Non-editing teacher or teacher BarWidth); Str_WriteFloatNum (Gbl.F.Out,Hits.Num); fprintf (Gbl.F.Out," " @@ -2100,8 +2102,8 @@ static void Sta_ShowNumHitsPerDay (unsigned long NumRows,MYSQL_RES *mysql_res) Txt_DAYS_SMALL[NumDayWeek]); /* Draw bar proportional to number of hits */ - Sta_DrawBarNumHits (NumDayWeek == 6 ? 'r' : - 'c', + Sta_DrawBarNumHits (NumDayWeek == 6 ? 'r' : // red background + 'o', // orange background D == NumDaysFromLastDateToCurrDate ? Hits.Num : 0.0, Hits.Max,Hits.Total,500); @@ -2140,8 +2142,8 @@ static void Sta_ShowNumHitsPerDay (unsigned long NumRows,MYSQL_RES *mysql_res) Txt_DAYS_SMALL[NumDayWeek]); /* Draw bar proportional to number of hits */ - Sta_DrawBarNumHits (NumDayWeek == 6 ? 'r' : - 'c', + Sta_DrawBarNumHits (NumDayWeek == 6 ? 'r' : // red background + 'o', // orange background 0.0,Hits.Max,Hits.Total,500); /* Decrease day */ @@ -2664,7 +2666,7 @@ static void Sta_ShowNumHitsPerWeek (unsigned long NumRows, Date.Year,Date.Week); /* Draw bar proportional to number of hits */ - Sta_DrawBarNumHits ('c', + Sta_DrawBarNumHits ('o', // orange background W == NumWeeksBetweenLastDateAndCurDate ? Hits.Num : 0.0, Hits.Max,Hits.Total,500); @@ -2691,7 +2693,8 @@ static void Sta_ShowNumHitsPerWeek (unsigned long NumRows, Date.Year,Date.Week); /* Draw bar proportional to number of hits */ - Sta_DrawBarNumHits ('c',0.0,Hits.Max,Hits.Total,500); + Sta_DrawBarNumHits ('o', // orange background + 0.0,Hits.Max,Hits.Total,500); /* Decrement week */ Dat_GetWeekBefore (&Date,&Date); @@ -2764,7 +2767,7 @@ static void Sta_ShowNumHitsPerMonth (unsigned long NumRows, Date.Year,Date.Month); /* Draw bar proportional to number of hits */ - Sta_DrawBarNumHits ('c', + Sta_DrawBarNumHits ('o', // orange background M == NumMonthsBetweenLastDateAndCurDate ? Hits.Num : 0.0, Hits.Max,Hits.Total,500); @@ -2790,7 +2793,8 @@ static void Sta_ShowNumHitsPerMonth (unsigned long NumRows, Date.Year,Date.Month); /* Draw bar proportional to number of hits */ - Sta_DrawBarNumHits ('c',0.0,Hits.Max,Hits.Total,500); + Sta_DrawBarNumHits ('o', // orange background + 0.0,Hits.Max,Hits.Total,500); /* Decrease month */ Dat_GetMonthBefore (&Date,&Date); @@ -2863,7 +2867,7 @@ static void Sta_ShowNumHitsPerYear (unsigned long NumRows, Date.Year); /* Draw bar proportional to number of hits */ - Sta_DrawBarNumHits ('c', + Sta_DrawBarNumHits ('o', // orange background Y == NumYearsBetweenLastDateAndCurDate ? Hits.Num : 0.0, Hits.Max,Hits.Total,500); @@ -2889,7 +2893,8 @@ static void Sta_ShowNumHitsPerYear (unsigned long NumRows, Date.Year); /* Draw bar proportional to number of hits */ - Sta_DrawBarNumHits ('c',0.0,Hits.Max,Hits.Total,500); + Sta_DrawBarNumHits ('o', // orange background + 0.0,Hits.Max,Hits.Total,500); /* Decrease year */ Dat_GetYearBefore (&Date,&Date); @@ -2983,9 +2988,9 @@ static void Sta_WriteAccessHour (unsigned Hour,struct Sta_Hits *Hits,unsigned Co BarHeight = (unsigned) (((Hits->Num * 500.0) / Hits->Max) + 0.5); if (BarHeight == 0) BarHeight = 1; - fprintf (Gbl.F.Out,"\"\"", + " style=\"width:14px; height:%upx;\" />", Gbl.Prefs.IconsURL,BarHeight); } else @@ -3197,16 +3202,16 @@ static void Sta_WriteAccessMinute (unsigned Minute,float HitsNum,float MaxX) (Minute % 60) == 0 ? 'v' : 'h'); - /***** Draw bar with anchura proporcional al number of clicks *****/ + /***** Draw bar with a width proportional to the number of hits *****/ if (HitsNum != 0.0) if ((BarWidth = (unsigned) (((HitsNum * (float) Sta_WIDTH_GRAPHIC / MaxX)) + 0.5)) != 0) - fprintf (Gbl.F.Out,"\"\"", Gbl.Prefs.IconsURL, - (Minute % 60) == 0 ? 'g' : - 'b', + (Minute % 60) == 0 ? 'r' : // red background + 'o', // orange background BarWidth); /***** End cell of graphic and end row *****/ @@ -3269,7 +3274,8 @@ static void Sta_ShowNumHitsPerAction (unsigned long NumRows, /* Draw bar proportional to number of hits */ Hits.Num = Str_GetFloatNumFromStr (row[1]); - Sta_DrawBarNumHits ('c',Hits.Num,Hits.Max,Hits.Total,500); + Sta_DrawBarNumHits ('o', // orange background + Hits.Num,Hits.Max,Hits.Total,500); } } @@ -3323,7 +3329,8 @@ static void Sta_ShowNumHitsPerPlugin (unsigned long NumRows, /* Draw bar proportional to number of hits */ Hits.Num = Str_GetFloatNumFromStr (row[1]); - Sta_DrawBarNumHits ('c',Hits.Num,Hits.Max,Hits.Total,500); + Sta_DrawBarNumHits ('o', // orange background + Hits.Num,Hits.Max,Hits.Total,500); } } @@ -3375,7 +3382,8 @@ static void Sta_ShowNumHitsPerWSFunction (unsigned long NumRows, /* Draw bar proportional to number of hits */ Hits.Num = Str_GetFloatNumFromStr (row[1]); - Sta_DrawBarNumHits ('c',Hits.Num,Hits.Max,Hits.Total,500); + Sta_DrawBarNumHits ('o', // orange background + Hits.Num,Hits.Max,Hits.Total,500); } } @@ -3450,7 +3458,8 @@ static void Sta_ShowNumHitsPerBanner (unsigned long NumRows, /* Draw bar proportional to number of clicks */ NumClicks = Str_GetFloatNumFromStr (row[1]); - Sta_DrawBarNumHits ('c',NumClicks,MaxClicks,TotalClicks,500); + Sta_DrawBarNumHits ('o', // orange background + NumClicks,MaxClicks,TotalClicks,500); } } @@ -3512,7 +3521,8 @@ static void Sta_ShowNumHitsPerCountry (unsigned long NumRows, /* Draw bar proportional to number of hits */ Hits.Num = Str_GetFloatNumFromStr (row[1]); - Sta_DrawBarNumHits ('c',Hits.Num,Hits.Max,Hits.Total,375); + Sta_DrawBarNumHits ('o', // orange background + Hits.Num,Hits.Max,Hits.Total,375); } } @@ -3605,7 +3615,8 @@ static void Sta_ShowNumHitsPerInstitution (unsigned long NumRows, /* Draw bar proportional to number of hits */ Hits.Num = Str_GetFloatNumFromStr (row[1]); - Sta_DrawBarNumHits ('c',Hits.Num,Hits.Max,Hits.Total,375); + Sta_DrawBarNumHits ('o', // orange background + Hits.Num,Hits.Max,Hits.Total,375); } } @@ -3700,7 +3711,8 @@ static void Sta_ShowNumHitsPerCentre (unsigned long NumRows, /* Draw bar proportional to number of hits */ Hits.Num = Str_GetFloatNumFromStr (row[1]); - Sta_DrawBarNumHits ('c',Hits.Num,Hits.Max,Hits.Total,375); + Sta_DrawBarNumHits ('o', // orange background + Hits.Num,Hits.Max,Hits.Total,375); } } @@ -3795,7 +3807,8 @@ static void Sta_ShowNumHitsPerDegree (unsigned long NumRows, /* Draw bar proportional to number of hits */ Hits.Num = Str_GetFloatNumFromStr (row[1]); - Sta_DrawBarNumHits ('c',Hits.Num,Hits.Max,Hits.Total,375); + Sta_DrawBarNumHits ('o', // orange background + Hits.Num,Hits.Max,Hits.Total,375); } } @@ -3933,7 +3946,8 @@ static void Sta_ShowNumHitsPerCourse (unsigned long NumRows, /* Draw bar proportional to number of hits */ Hits.Num = Str_GetFloatNumFromStr (row[1]); - Sta_DrawBarNumHits ('c',Hits.Num,Hits.Max,Hits.Total,375); + Sta_DrawBarNumHits ('o', // orange background + Hits.Num,Hits.Max,Hits.Total,375); } } @@ -3975,7 +3989,9 @@ void Sta_ComputeMaxAndTotalHits (struct Sta_Hits *Hits, /********************* Draw a bar with the number of hits ********************/ /*****************************************************************************/ -static void Sta_DrawBarNumHits (char Color,float HitsNum,float HitsMax,float HitsTotal,unsigned MaxBarWidth) +static void Sta_DrawBarNumHits (char Color, + float HitsNum,float HitsMax,float HitsTotal, + unsigned MaxBarWidth) { unsigned BarWidth; @@ -3987,10 +4003,10 @@ static void Sta_DrawBarNumHits (char Color,float HitsNum,float HitsMax,float Hit BarWidth = (unsigned) (((HitsNum * (float) MaxBarWidth) / HitsMax) + 0.5); if (BarWidth == 0) BarWidth = 1; - fprintf (Gbl.F.Out,"\"\"" + " style=\"width:%upx; height:14px;\" />" " ", Gbl.Prefs.IconsURL,Color,BarWidth);