From 223907b7f4efa702dbd47bccac23e198c35e8a28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Tue, 22 Oct 2019 22:39:37 +0200 Subject: [PATCH] Version19.40.5 --- icon/th.svg | 2 +- swad_changelog.h | 11 ++++++++-- swad_match.c | 56 +++++++++++++++++++++++++++++++++++++++++------- swad_match.h | 1 + swad_project.c | 2 +- swad_project.h | 2 +- 6 files changed, 61 insertions(+), 13 deletions(-) diff --git a/icon/th.svg b/icon/th.svg index 52c3b6b4..2073ff01 100644 --- a/icon/th.svg +++ b/icon/th.svg @@ -1 +1 @@ - + diff --git a/swad_changelog.h b/swad_changelog.h index b060a24f..00f78408 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -487,15 +487,22 @@ 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.4 (2019-10-22)" +#define Log_PLATFORM_VERSION "SWAD 19.40.5 (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.) +// TODO: Change icon to upload file in timeline to photo-video.svg + + Version 19.40.5: Oct 22, 2019 New icons to view match in two columns. (245882 lines) + Copy the following 3 icons to icon public directory: +sudo cp -a icon/bars.svg /var/www/html/swad/icon/ +sudo cp -a icon/grip-vertical.svg /var/www/html/swad/icon/ +sudo cp -a icon/th.svg /var/www/html/swad/icon/ 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: + Copy the following icon 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) diff --git a/swad_match.c b/swad_match.c index d2f42c7e..457708f7 100644 --- a/swad_match.c +++ b/swad_match.c @@ -77,6 +77,9 @@ const char *Mch_ShowingStringsDB[Mch_NUM_SHOWING] = "results", }; +#define Mch_NUM_COLS 3 +#define Mch_NUM_COLS_DEFAULT 1 + /*****************************************************************************/ /***************************** Private variables *****************************/ /*****************************************************************************/ @@ -156,7 +159,8 @@ static void Mch_ShowRightColumnStd (struct Match *Match); static void Mch_ShowNumQstInMatch (struct Match *Match); static void Mch_PutMatchControlButtons (struct Match *Match); -static void Mch_PutCheckboxResult (struct Match *Match); +static void Mch_ShowFormColumns (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); @@ -338,6 +342,7 @@ void Mch_GetDataOfMatchByCod (struct Match *Match) Match->Status.Showing = Mch_STEM; Match->Status.Playing = false; Match->Status.NumPlayers = 0; + Match->Status.NumCols = Mch_NUM_COLS_DEFAULT; Match->Status.ShowQstResults = false; Match->Status.ShowUsrResults = false; } @@ -2065,6 +2070,7 @@ static void Mch_ShowLeftColumnTch (struct Match *Match) /***** Put forms to choice which projects to show *****/ /* 1st. row */ Set_StartSettingsHead (); + Mch_ShowFormColumns (Match); Mch_ShowFormViewResult (Match); Set_EndSettingsHead (); @@ -2289,21 +2295,55 @@ static void Mch_PutMatchControlButtons (struct Match *Match) } /*****************************************************************************/ -/***************** Put checkbox to select if show results ********************/ +/** Show form to choice whether to show answers in one column or two columns */ /*****************************************************************************/ +static void Mch_ShowFormColumns (struct Match *Match) + { + extern const char *Txt_columns; + unsigned NumCols; + static const char *NumColsIcon[Mch_NUM_COLS] = + { + "bars.svg", // 1 column + "grip-vertical.svg", // 2 columns + "th.svg", // 3 columns + }; + + Set_StartOneSettingSelector (); + for (NumCols = 0; + NumCols < Mch_NUM_COLS; + NumCols++) + { + fprintf (Gbl.F.Out,"
", + (Match->Status.NumCols == NumCols) ? "PREF_ON" : + "PREF_OFF"); + /***** Begin form *****/ + Frm_StartForm (ActChgVisResMchQst); + Mch_PutParamMchCod (Match->MchCod); // Current match being played + + Ico_PutSettingIconLink (NumColsIcon[NumCols],Txt_columns); + Frm_EndForm (); + fprintf (Gbl.F.Out,"
"); + } + Set_EndOneSettingSelector (); + } + +/*****************************************************************************/ +/***************** Put checkbox to select if show results ********************/ +/*****************************************************************************/ +/* static void Mch_PutCheckboxResult (struct Match *Match) { extern const char *Txt_View_results; - /***** Start container *****/ + ***** Start container ***** fprintf (Gbl.F.Out,"
"); - /***** Begin form *****/ + ***** Begin form ***** Frm_StartForm (ActChgVisResMchQst); Mch_PutParamMchCod (Match->MchCod); // Current match being played - /***** Put icon with link *****/ + ***** Put icon with link ***** fprintf (Gbl.F.Out,""); } diff --git a/swad_project.h b/swad_project.h index 4eac261b..35a3e388 100644 --- a/swad_project.h +++ b/swad_project.h @@ -36,7 +36,7 @@ /************************** Public types and constants ***********************/ /*****************************************************************************/ -/***** Filters to list departments *****/ +/***** Filters to list projects *****/ /* My projects / all projects */ #define Prj_NUM_WHOSE_PROJECTS 2 typedef enum