From f3836e3f0dabcfcdb6607aed27115ed8adac3356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Tue, 22 Oct 2019 20:43:03 +0200 Subject: [PATCH] Version19.40.4 --- css/swad19.40.3.css | 1 + swad_changelog.h | 6 +++++- swad_match.c | 33 ++++++++++++++++++++++++++++++++- swad_statistic.c | 12 ++++++------ 4 files changed, 44 insertions(+), 8 deletions(-) diff --git a/css/swad19.40.3.css b/css/swad19.40.3.css index a899ce268..caa2775cd 100644 --- a/css/swad19.40.3.css +++ b/css/swad19.40.3.css @@ -3019,6 +3019,7 @@ a:hover img.CENTRE_PHOTO_SHOW .PREF_CONTAINERS { margin:0 auto; + text-align:center; } .PREF_CONTAINER { diff --git a/swad_changelog.h b/swad_changelog.h index 5849885c4..b060a24fd 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.3 (2019-10-21)" +#define Log_PLATFORM_VERSION "SWAD 19.40.4 (2019-10-22)" #define CSS_FILE "swad19.40.3.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.4: Oct 22, 2019 New icon to view results in matches. (245838 lines) + Copy the following 10 icons to icon public directory: +sudo cp -a icon/poll-h.svg /var/www/html/swad/icon/ + Version 19.40.3: Oct 21, 2019 Changes in score table. (245810 lines) Version 19.40.2: Oct 21, 2019 Fixed bug in score table. (245777 lines) Version 19.40.1: Oct 21, 2019 Coloured bars in score table. (245774 lines) diff --git a/swad_match.c b/swad_match.c index 84648ad01..d2f42c7e5 100644 --- a/swad_match.c +++ b/swad_match.c @@ -158,6 +158,7 @@ static void Mch_ShowNumQstInMatch (struct Match *Match); static void Mch_PutMatchControlButtons (struct Match *Match); static void Mch_PutCheckboxResult (struct Match *Match); static void Mch_ShowMatchTitle (struct Match *Match); +static void Mch_ShowFormViewResult (struct Match *Match); static void Mch_ShowQuestionAndAnswersTch (struct Match *Match); static void Mch_ShowQuestionAndAnswersStd (struct Match *Match); @@ -2061,8 +2062,14 @@ static void Mch_ShowLeftColumnTch (struct Match *Match) /***** Buttons *****/ Mch_PutMatchControlButtons (Match); + /***** Put forms to choice which projects to show *****/ + /* 1st. row */ + Set_StartSettingsHead (); + Mch_ShowFormViewResult (Match); + Set_EndSettingsHead (); + /***** Write button to request viewing results *****/ - Mch_PutCheckboxResult (Match); + // Mch_PutCheckboxResult (Match); /***** End left container *****/ fprintf (Gbl.F.Out,""); @@ -2319,6 +2326,30 @@ static void Mch_PutCheckboxResult (struct Match *Match) fprintf (Gbl.F.Out,""); } +static void Mch_ShowFormViewResult (struct Match *Match) + { + extern const char *Txt_View_results; + + /***** Begin selector *****/ + Set_StartOneSettingSelector (); + fprintf (Gbl.F.Out,"
", + (Match->Status.ShowQstResults) ? "PREF_ON" : + "PREF_OFF"); + + /***** Begin form *****/ + Frm_StartForm (ActChgVisResMchQst); + Mch_PutParamMchCod (Match->MchCod); // Current match being played + + Ico_PutSettingIconLink ("poll-h.svg",Txt_View_results); + + /***** End form *****/ + Frm_EndForm (); + + /***** End selector *****/ + fprintf (Gbl.F.Out,"
"); + Set_EndOneSettingSelector (); + } + /*****************************************************************************/ /***************************** Show match title ******************************/ /*****************************************************************************/ diff --git a/swad_statistic.c b/swad_statistic.c index 35da3a70c..de8e57459 100644 --- a/swad_statistic.c +++ b/swad_statistic.c @@ -2318,9 +2318,9 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,float HitsMax) { unsigned Interval; unsigned NumColor; - unsigned R; - unsigned G; - unsigned B; + unsigned R = 0; // Initialized to avoid warning + unsigned G = 0; // Initialized to avoid warning + unsigned B = 0; // Initialized to avoid warning /***** Write numbers from 0 to Hits.Max *****/ Tbl_TABLE_BeginWide (); @@ -2376,9 +2376,9 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,float HitsMax) static void Sta_DrawAccessesPerHourForADay (Sta_ColorType_t ColorType,float HitsNum[24],float HitsMax) { unsigned Hour; - unsigned R; - unsigned G; - unsigned B; + unsigned R = 0; // Initialized to avoid warning + unsigned G = 0; // Initialized to avoid warning + unsigned B = 0; // Initialized to avoid warning char *Str; for (Hour = 0;