diff --git a/swad_changelog.h b/swad_changelog.h index ee5b1e458..c5a410a26 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -460,12 +460,12 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.138.5 (2019-08-01)" +#define Log_PLATFORM_VERSION "SWAD 18.138.6 (2019-08-02)" #define CSS_FILE "swad18.138.css" #define JS_FILE "swad18.130.2.js" /* Version 18.138.7: Aug 01, 2019 Time of current match and current match question are stored in database. (? lines) - Version 18.138.6: Aug 01, 2019 Matches finished can be played again from list of matches. (? lines) + Version 18.138.6: Aug 02, 2019 Matches finished can be played again from list of matches. (? lines) Version 18.138.5: Aug 01, 2019 Finished column in matches replaced by a special value in question index. (244108 lines) 1 change necessary in database: ALTER TABLE gam_matches DROP COLUMN Finished; diff --git a/swad_game.c b/swad_game.c index b77cb3260..18a1aa570 100644 --- a/swad_game.c +++ b/swad_game.c @@ -2788,7 +2788,6 @@ static void Gam_ListOneOrMoreMatches (struct Game *Game, extern const char *Txt_Play; extern const char *Txt_Resume; extern const char *Txt_Today; - extern const char *Txt_View_game_results; unsigned NumMatch; unsigned UniqueId; struct Match Match; @@ -2900,46 +2899,41 @@ static void Gam_ListOneOrMoreMatches (struct Game *Game, /***** Match status ******/ fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); - if (Match.Status.QstInd >= Gam_AFTER_LAST_QUESTION) // Finished match - /* Icon to inform about finished match */ - // Ico_PutIconOff ("flag-checkered.svg",Txt_Finished_match); - Lay_PutContextualLinkOnlyIcon (ActShoMchTch,NULL, - Gam_PutParamCurrentMchCod, - "flag-checkered.svg", - Txt_View_game_results); - else // Unfinished match - { + + if (Match.Status.QstInd < Gam_AFTER_LAST_QUESTION) // Unfinished match /* Current question index / total of questions */ - fprintf (Gbl.F.Out,"
%u/%u
", + fprintf (Gbl.F.Out,"
%u/%u
", Match.Status.QstInd,Game->NumQsts); - switch (Gbl.Usrs.Me.Role.Logged) - { - case Rol_STD: - /* Icon to play as student */ - Gam_CurrentMchCod = Match.MchCod; - Lay_PutContextualLinkOnlyIcon (ActPlyMchStd,NULL, - Gam_PutParamCurrentMchCod, - "play.svg", - Txt_Play); - break; - case Rol_NET: - case Rol_TCH: - case Rol_DEG_ADM: - case Rol_CTR_ADM: - case Rol_INS_ADM: - case Rol_SYS_ADM: - /* Icon to resume */ - Gam_CurrentMchCod = Match.MchCod; - Lay_PutContextualLinkOnlyIcon (ActResMchTch,NULL, - Gam_PutParamCurrentMchCod, - "play.svg", - Txt_Resume); - break; - default: - break; - } + switch (Gbl.Usrs.Me.Role.Logged) + { + case Rol_STD: + /* Icon to play as student */ + Gam_CurrentMchCod = Match.MchCod; + Lay_PutContextualLinkOnlyIcon (ActPlyMchStd,NULL, + Gam_PutParamCurrentMchCod, + Match.Status.QstInd < Gam_AFTER_LAST_QUESTION ? "play.svg" : + "flag-checkered.svg", + Txt_Play); + break; + case Rol_NET: + case Rol_TCH: + case Rol_DEG_ADM: + case Rol_CTR_ADM: + case Rol_INS_ADM: + case Rol_SYS_ADM: + /* Icon to resume */ + Gam_CurrentMchCod = Match.MchCod; + Lay_PutContextualLinkOnlyIcon (ActResMchTch,NULL, + Gam_PutParamCurrentMchCod, + Match.Status.QstInd < Gam_AFTER_LAST_QUESTION ? "play.svg" : + "flag-checkered.svg", + Txt_Resume); + break; + default: + break; } + fprintf (Gbl.F.Out,""); fprintf (Gbl.F.Out,""); diff --git a/swad_text.c b/swad_text.c index e274b8806..019f9633b 100644 --- a/swad_text.c +++ b/swad_text.c @@ -52659,7 +52659,7 @@ const char *Txt_View_game = #elif L==9 // pt "Ver jogo"; #endif - +/* const char *Txt_View_game_results = #if L==1 // ca "Veure resultats"; @@ -52680,7 +52680,7 @@ const char *Txt_View_game_results = #elif L==9 // pt "Ver resultados"; #endif - +*/ const char *Txt_View_in_a_new_window = #if L==1 // ca "Mostrar en una finestra nova";