Version19.40.1

This commit is contained in:
Antonio Cañas Vargas 2019-10-21 15:07:00 +02:00
parent 0b3d21b9e3
commit d9dddf5a65
12 changed files with 41 additions and 6 deletions

BIN
icon/score0_1x1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

BIN
icon/score1_1x1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

BIN
icon/score2_1x1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

BIN
icon/score3_1x1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

BIN
icon/score4_1x1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

BIN
icon/score5_1x1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

BIN
icon/score6_1x1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

BIN
icon/score7_1x1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

BIN
icon/score8_1x1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

BIN
icon/score9_1x1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

View File

@ -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)

View File

@ -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,"<img src=\"%s/o1x1.png\"" // Background
fprintf (Gbl.F.Out,"<img src=\"%s/score%u_1x1.png\"" // Background
" alt=\"\" class=\"MATCH_SCORE_BAR\""
" style=\"width:%u%%;\" />"
"&nbsp;%u",
Cfg_URL_ICON_PUBLIC,BarWidth,NumUsrs);
Cfg_URL_ICON_PUBLIC,Color,BarWidth,NumUsrs);
Tbl_TD_End ();
Tbl_TR_End ();