diff --git a/swad_changelog.h b/swad_changelog.h index f553f46ea..5d9455940 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -459,10 +459,11 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.6.1 (2019-09-17)" +#define Log_PLATFORM_VERSION "SWAD 19.6.2 (2019-09-17)" #define CSS_FILE "swad19.3.css" #define JS_FILE "swad18.130.2.js" /* + Version 19.6.2: Sep 17, 2019 Link to see the matches results. Not finished. (244649 lines) Version 19.6.1: Sep 17, 2019 Fixed bug while removing a game. (244601 lines) Version 19.6: Sep 17, 2019 Remove actions to reset a game. (244600 lines) 1 change necessary in database: diff --git a/swad_game.c b/swad_game.c index d4eb1a9ea..79b6e5f83 100644 --- a/swad_game.c +++ b/swad_game.c @@ -156,6 +156,21 @@ static void Gam_ListAllGames (void) struct Pagination Pagination; unsigned NumGame; + /***** Put link to view matches results *****/ + switch (Gbl.Usrs.Me.Role.Logged) + { + case Rol_STD: + Mch_PutFormToViewResultsOfMatches (ActReqSeeMyTstRes); // TODO: Change action!!!! + break; + case Rol_NET: + case Rol_TCH: + case Rol_SYS_ADM: + Mch_PutFormToViewResultsOfMatches (ActReqSeeUsrTstRes); // TODO: Change action!!!! + break; + default: + break; + } + /***** Get number of groups in current course *****/ if (!Gbl.Crs.Grps.NumGrps) Gbl.Crs.Grps.WhichGrps = Grp_ALL_GROUPS; diff --git a/swad_match.c b/swad_match.c index 7ad0667aa..08b4bb9fe 100644 --- a/swad_match.c +++ b/swad_match.c @@ -2437,3 +2437,18 @@ static void Mch_DrawBarNumUsrs (unsigned NumAnswerersAns,unsigned NumAnswerersQs /***** End container *****/ fprintf (Gbl.F.Out,""); } + +/*****************************************************************************/ +/****************** Write a form to go to result of matches ******************/ +/*****************************************************************************/ + +void Mch_PutFormToViewResultsOfMatches (Act_Action_t Action) + { + extern const char *Txt_Matches_results; + + fprintf (Gbl.F.Out,"
"); + Lay_PutContextualLinkIconText (Action,NULL,NULL, + "tasks.svg", + Txt_Matches_results); + fprintf (Gbl.F.Out,"
"); + } diff --git a/swad_match.h b/swad_match.h index 492e73c82..87d075ea8 100644 --- a/swad_match.h +++ b/swad_match.h @@ -67,4 +67,6 @@ void Mch_GetAndDrawBarNumUsrsWhoHaveChosenAns (long MchCod,unsigned QstInd,unsig unsigned NumAnswerersQst,bool Correct); unsigned Mch_GetNumUsrsWhoHaveAnswerQst (long MchCod,unsigned QstInd); +void Mch_PutFormToViewResultsOfMatches (Act_Action_t Action); + #endif diff --git a/swad_text.c b/swad_text.c index 4cf5a180c..f3086ef97 100644 --- a/swad_text.c +++ b/swad_text.c @@ -18054,7 +18054,28 @@ const char *Txt_Matches = // of a game #elif L==8 // pl "Mecze"; #elif L==9 // pt - "Jogos"; + "Partidas"; +#endif + +const char *Txt_Matches_results = +#if L==1 // ca + "Resultats de partides"; +#elif L==2 // de + "Spielergebnisse"; +#elif L==3 // en + "Matches results"; +#elif L==4 // es + "Resultados de las partidas"; +#elif L==5 // fr + "Résultats des matchs"; +#elif L==6 // gn + "Resultados de las partidas"; // Okoteve traducción +#elif L==7 // it + "Risultati delle partite"; +#elif L==8 // pl + "Wyniki meczów"; +#elif L==9 // pt + "Resultados das partidas"; #endif const char *Txt_Materials =