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,"
" ""); } - +*/ static void Mch_ShowFormViewResult (struct Match *Match) { extern const char *Txt_View_results; diff --git a/swad_match.h b/swad_match.h index a91c1c3c..a25a7f28 100644 --- a/swad_match.h +++ b/swad_match.h @@ -60,6 +60,7 @@ struct Match long QstCod; time_t QstStartTimeUTC; Mch_Showing_t Showing; // What is shown on teacher's screen + unsigned NumCols; // Number of columns for answers on teacher's screen bool ShowQstResults; // Show global results of current question while playing bool ShowUsrResults; // Show exam with results of all questions for the student bool Playing; // Is being played now? diff --git a/swad_project.c b/swad_project.c index f3dac44a..5e2a5afc 100644 --- a/swad_project.c +++ b/swad_project.c @@ -432,7 +432,7 @@ static void Prj_ShowFormToFilterByMy_All (void) Gbl.Prjs.CurrentPage, -1L); Ico_PutSettingIconLink (WhoseProjectsIcon[My_All], - Txt_PROJECT_MY_ALL_PROJECTS[My_All]); + Txt_PROJECT_MY_ALL_PROJECTS[My_All]); Frm_EndForm (); 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