diff --git a/swad_changelog.h b/swad_changelog.h index ce533c824..c49782b3a 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -490,7 +490,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.84.2 (2019-12-06)" +#define Log_PLATFORM_VERSION "SWAD 19.84.3 (2019-12-06)" #define CSS_FILE "swad19.82.3.css" #define JS_FILE "swad19.70.js" /* @@ -498,6 +498,8 @@ ps2pdf source.ps destination.pdf // TODO: Impedir la creación y edición de proyectos si no son editables. // TODO: En cada juego, poder listar los resultados en una tabla como la de resultados globales + Version 19.84.3: Dec 06, 2019 Contextual icon to show matches results. + Fixed bug in matches results. (247875 lines) Version 19.84.2: Dec 06, 2019 Contextual icon to show tests results. Fixed bug in tests results. (247889 lines) Version 19.84.1: Dec 06, 2019 Fixed bug in forms to edit dates. diff --git a/swad_game.c b/swad_game.c index ad793eda5..2a0addc2e 100644 --- a/swad_game.c +++ b/swad_game.c @@ -188,26 +188,6 @@ 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: - McR_PutFormToViewMchResults (ActSeeMyMchRes); - break; - case Rol_NET: - case Rol_TCH: - case Rol_SYS_ADM: - McR_PutFormToViewMchResults (ActReqSeeUsrMchRes); - break; - case Rol_DEG_ADM: - case Rol_CTR_ADM: - case Rol_INS_ADM: - break; - default: - Rol_WrongRoleExit (); - break; - } - /***** Get number of groups in current course *****/ if (!Gbl.Crs.Grps.NumGrps) Gbl.Crs.Grps.WhichGrps = Grp_ALL_GROUPS; @@ -324,6 +304,21 @@ static void Gam_PutIconsListGames (void) if (Gam_CheckIfICanEditGames ()) Gam_PutIconToCreateNewGame (); + /***** Put icon to view matches results *****/ + switch (Gbl.Usrs.Me.Role.Logged) + { + case Rol_STD: + Ico_PutContextualIconToShowResults (ActSeeMyMchRes,NULL); + break; + case Rol_NET: + case Rol_TCH: + case Rol_SYS_ADM: + Ico_PutContextualIconToShowResults (ActReqSeeUsrMchRes,NULL); + break; + default: + break; + } + /***** Put icon to show a figure *****/ Gbl.Figures.FigureType = Fig_GAMES; Fig_PutIconToShowFigure (); diff --git a/swad_match_result.c b/swad_match_result.c index 1acf3723b..d2e801a12 100644 --- a/swad_match_result.c +++ b/swad_match_result.c @@ -90,22 +90,6 @@ static void McR_GetMatchResultDataByMchCod (long MchCod,long UsrCod, static bool McR_CheckIfICanSeeMatchResult (long MchCod,long UsrCod); static bool McR_GetVisibilityMchResultFromDB (long MchCod); -/*****************************************************************************/ -/****************** Write a form to go to result of matches ******************/ -/*****************************************************************************/ - -void McR_PutFormToViewMchResults (Act_Action_t Action) - { - extern const char *Txt_Results; - - /***** Contextual menu *****/ - Mnu_ContextMenuBegin (); - Lay_PutContextualLinkIconText (Action,NULL,NULL, - "tasks.svg", - Txt_Results); // View match results - Mnu_ContextMenuEnd (); - } - /*****************************************************************************/ /*************************** Show my matches results *************************/ /*****************************************************************************/ @@ -321,8 +305,11 @@ static void McR_ShowUsrsMchResults (void) Usr_GetUsrCodFromEncryptedUsrCod (&Gbl.Usrs.Other.UsrDat); if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat,Usr_DONT_GET_PREFS)) if (Usr_CheckIfICanViewMch (&Gbl.Usrs.Other.UsrDat)) + { /***** Show matches results *****/ + Gbl.Usrs.Other.UsrDat.Accepted = Usr_CheckIfUsrHasAcceptedInCurrentCrs (&Gbl.Usrs.Other.UsrDat); McR_ShowMchResults (Usr_OTHER,NumGamesSelected); + } } /***** End table *****/ diff --git a/swad_match_result.h b/swad_match_result.h index b2221107b..c5a8e68d0 100644 --- a/swad_match_result.h +++ b/swad_match_result.h @@ -35,7 +35,6 @@ /***************************** Public prototypes *****************************/ /*****************************************************************************/ -void McR_PutFormToViewMchResults (Act_Action_t Action); void McR_ShowMyMchResults (void); void McR_SelUsrsToViewUsrsMchResults (void); void McR_GetUsrsAndShowMchResults (void); diff --git a/swad_test.c b/swad_test.c index 9f2d45e35..38bb20624 100644 --- a/swad_test.c +++ b/swad_test.c @@ -1402,7 +1402,7 @@ static void Tst_PutIconsTests (void) Ico_PutContextualIconToConfigure (ActCfgTst,NULL); } - /***** Put icon to show results *****/ + /***** Put icon to view tests results *****/ switch (Gbl.Usrs.Me.Role.Logged) { case Rol_STD: