From d9dddf5a65ca3297f45834626a9fdd732054ca88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Mon, 21 Oct 2019 15:07:00 +0200 Subject: [PATCH] Version19.40.1 --- icon/score0_1x1.png | Bin 0 -> 91 bytes icon/score1_1x1.png | Bin 0 -> 91 bytes icon/score2_1x1.png | Bin 0 -> 91 bytes icon/score3_1x1.png | Bin 0 -> 91 bytes icon/score4_1x1.png | Bin 0 -> 91 bytes icon/score5_1x1.png | Bin 0 -> 91 bytes icon/score6_1x1.png | Bin 0 -> 91 bytes icon/score7_1x1.png | Bin 0 -> 91 bytes icon/score8_1x1.png | Bin 0 -> 91 bytes icon/score9_1x1.png | Bin 0 -> 91 bytes swad_changelog.h | 6 +++++- swad_match.c | 41 ++++++++++++++++++++++++++++++++++++----- 12 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 icon/score0_1x1.png create mode 100644 icon/score1_1x1.png create mode 100644 icon/score2_1x1.png create mode 100644 icon/score3_1x1.png create mode 100644 icon/score4_1x1.png create mode 100644 icon/score5_1x1.png create mode 100644 icon/score6_1x1.png create mode 100644 icon/score7_1x1.png create mode 100644 icon/score8_1x1.png create mode 100644 icon/score9_1x1.png diff --git a/icon/score0_1x1.png b/icon/score0_1x1.png new file mode 100644 index 0000000000000000000000000000000000000000..5f4fb21c459e3bdb543791435dfd472a696d6ff7 GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k8}bl&H|6fVg?3oVGw3ym^DWND9G#S k;uyklJ^9D^10UoWSQ!}q7tIMu2TCw_y85}Sb4q9e0Ji%ROaK4? literal 0 HcmV?d00001 diff --git a/icon/score1_1x1.png b/icon/score1_1x1.png new file mode 100644 index 0000000000000000000000000000000000000000..621c54c76537cc56247517a4b7d0ebfcf9db6d75 GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k8}bl&H|6fVg?3oVGw3ym^DWND9G#S k;uyklJ^9D`<-g<^*i4v;*bih}0ZK4c8>~Y-gF4Ph@!81C(I!boFyt=akR{0JrKBjsO4v literal 0 HcmV?d00001 diff --git a/icon/score3_1x1.png b/icon/score3_1x1.png new file mode 100644 index 0000000000000000000000000000000000000000..9b17edf835cef9b5de4365e697015512b5b26269 GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k8}bl&H|6fVg?3oVGw3ym^DWND9G#S k;uyklJ^9D}dr#~c*h`rno!1V^0!lD=y85}Sb4q9e0KhvFxBvhE literal 0 HcmV?d00001 diff --git a/icon/score4_1x1.png b/icon/score4_1x1.png new file mode 100644 index 0000000000000000000000000000000000000000..804e4c9fc978ac7daac1c08526ba0bfc762f4f12 GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k8}bl&H|6fVg?3oVGw3ym^DWND9G#S k;uyklJ^9D~6aVZPI8>Mw4ALYsww#7_4Pg|=C03{eaUHx3vIVCg!0HNv- literal 0 HcmV?d00001 diff --git a/icon/score9_1x1.png b/icon/score9_1x1.png new file mode 100644 index 0000000000000000000000000000000000000000..fd44bba742e7ad56194c1edcf8718586ececed49 GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k8}bl&H|6fVg?3oVGw3ym^DWND9G#S j;uyklJvkvG;RinhQww7QBZFl+P=dkJ)z4*}Q$iB}gJTfE literal 0 HcmV?d00001 diff --git a/swad_changelog.h b/swad_changelog.h index 4c62f5ba..d88a50a8 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -487,13 +487,17 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.40 (2019-10-21)" +#define Log_PLATFORM_VERSION "SWAD 19.40.1 (2019-10-21)" #define CSS_FILE "swad19.40.css" #define JS_FILE "swad19.39.js" /* // TODO: Perico: poner un candado de bloqueo de creación/edición de proyectos (por ejemplo en asignaturas obsoletas) // TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.) + Version 19.40.1: Oct 21, 2019 Coloured bars in score table. (245774 lines) + Copy the following 10 icons to icon public directory: +sudo cp -a icon/score*_1x1.png /var/www/html/swad/icon/ + Version 19.40: Oct 21, 2019 Match podium has been replaced by score table. (245741 lines) Version 19.39.2: Oct 18, 2019 Fixed HTML bug in listing of registration requests. (245659 lines) Version 19.39.1: Oct 18, 2019 Changes in layout and behaviour of matches. (245656 lines) diff --git a/swad_match.c b/swad_match.c index 98c388df..72ef3de9 100644 --- a/swad_match.c +++ b/swad_match.c @@ -163,7 +163,8 @@ static void Mch_ShowQuestionAndAnswersStd (struct Match *Match); static void Mch_ShowMatchScore (struct Match *Match); static void Mch_DrawEmptyRowScore (unsigned NumRow,double MinScore,double MaxScore); -static void Mch_DrawScoreRow (double Score,unsigned MaxUsrs,unsigned NumUsrs); +static void Mch_DrawScoreRow (double Score,double MinScore,double MaxScore, + unsigned NumUsrs,unsigned MaxUsrs); static void Mch_PutParamNumOpt (unsigned NumOpt); static unsigned Mch_GetParamNumOpt (void); @@ -2576,7 +2577,7 @@ static void Mch_ShowMatchScore (struct Match *Match) Mch_DrawEmptyRowScore (NumRow,MinScore,MaxScore); /***** Draw row for this score *****/ - Mch_DrawScoreRow (Score,MaxUsrs,NumUsrs); + Mch_DrawScoreRow (Score,MinScore,MaxScore,NumUsrs,MaxUsrs); NumRow++; } @@ -2619,10 +2620,40 @@ static void Mch_DrawEmptyRowScore (unsigned NumRow,double MinScore,double MaxSco Tbl_TR_End (); } -static void Mch_DrawScoreRow (double Score,unsigned MaxUsrs,unsigned NumUsrs) +static void Mch_DrawScoreRow (double Score,double MinScore,double MaxScore, + unsigned NumUsrs,unsigned MaxUsrs) { + unsigned Color; unsigned BarWidth; + /***** Compute color *****/ + /* + +----------------- MaxScore + | score9_1x1.png + +----------------- + | score8_1x1.png + +----------------- + | score7_1x1.png + +----------------- + | score6_1x1.png + +----------------- + | score5_1x1.png + +----------------- + | score4_1x1.png + +----------------- + | score3_1x1.png + +----------------- + | score2_1x1.png + +----------------- + | score1_1x1.png + +----------------- + | score0_1x1.png + +----------------- MinScore + */ + Color = (unsigned) (((Score - MinScore) / (MaxScore - MinScore)) * 10.0); + if (Color >= 10) + Color = 9; + /***** Compute bar width *****/ if (MaxUsrs > 0) { @@ -2644,11 +2675,11 @@ static void Mch_DrawScoreRow (double Score,unsigned MaxUsrs,unsigned NumUsrs) /* Draw bar and write number of users for this score */ Tbl_TD_Begin ("class=\"MATCH_SCORE_NUM\""); - fprintf (Gbl.F.Out,"\"\"" " %u", - Cfg_URL_ICON_PUBLIC,BarWidth,NumUsrs); + Cfg_URL_ICON_PUBLIC,Color,BarWidth,NumUsrs); Tbl_TD_End (); Tbl_TR_End ();