From 0f2e8adccc01ef36df979f1bc611a3da7637af87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Thu, 26 Sep 2019 23:57:10 +0200 Subject: [PATCH] Version19.16.2 --- swad_action.c | 1 - swad_changelog.h | 4 +++- swad_game.c | 17 ++++++++++------- swad_survey.c | 7 +++++-- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/swad_action.c b/swad_action.c index 9388004f7..6db9dfef2 100644 --- a/swad_action.c +++ b/swad_action.c @@ -2034,7 +2034,6 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActSeePrj */{1674, 2,TabAss,ActSeePrj ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prj_SeeProjects ,"file-alt" }, /* ActReqTst */{ 103, 3,TabAss,ActReqTst ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowFormAskTst ,"check" }, /* ActSeeAllGam */{1649, 4,TabAss,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_SeeAllGames ,"gamepad" }, -// /* ActSeeAllGam */{1649, 4,TabAss,ActSeeAllGam ,0x200,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_SeeAllGames ,"gamepad" }, /* ActSeeAllSvy */{ 966, 5,TabAss,ActSeeAllSvy ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Svy_SeeAllSurveys ,"poll" }, /* ActSeeAllExaAnn */{ 85, 6,TabAss,ActSeeAllExaAnn ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Exa_ListExamAnnouncementsSee ,"bullhorn" }, diff --git a/swad_changelog.h b/swad_changelog.h index a7fda4d64..22a3297eb 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -470,10 +470,12 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.16.1 (2019-09-26)" +#define Log_PLATFORM_VERSION "SWAD 19.16.2 (2019-09-26)" #define CSS_FILE "swad19.15.css" #define JS_FILE "swad19.15.js" /* + Version 19.16.2: Sep 26, 2019 Fixed bugs in edition of games. + Changed listing of games and surveys. (246422 lines) Version 19.16.1: Sep 26, 2019 Code refactoring in edition of games. (246416 lines) Version 19.16: Sep 26, 2019 Make it impossible to edit a game when it has matches. (246424 lines) Version 19.15: Sep 26, 2019 Refresh only left part of the teacher's screen when playing a match. (246332 lines) diff --git a/swad_game.c b/swad_game.c index e2486d332..11aaf4a6f 100644 --- a/swad_game.c +++ b/swad_game.c @@ -131,7 +131,7 @@ static void Gam_ExchangeQuestions (long GamCod, static bool Gam_GetNumMchsGameAndCheckIfEditable (struct Game *Game); /*****************************************************************************/ -/*************************** List all the games ******************************/ +/***************************** List all games ********************************/ /*****************************************************************************/ void Gam_SeeAllGames (void) @@ -141,7 +141,7 @@ void Gam_SeeAllGames (void) Grp_GetParamWhichGrps (); Gbl.Games.CurrentPage = Pag_GetParamPagNum (Pag_GAMES); - /***** Show all the games *****/ + /***** Show all games *****/ Gam_ListAllGames (); } @@ -537,12 +537,12 @@ void Gam_ShowOneGame (long GamCod, if (ShowOnlyThisGame) { - /***** List matches *****/ - Mch_ListMatches (&Game,PutFormNewMatch); - - /***** Write questions of this game *****/ if (ListGameQuestions) + /***** Write questions of this game *****/ Gam_ListGameQuestions (&Game); + else + /***** List matches *****/ + Mch_ListMatches (&Game,PutFormNewMatch); /***** End box *****/ Box_EndBox (); @@ -1149,6 +1149,9 @@ void Gam_RequestCreatOrEditGame (void) if (!ItsANewGame) Gam_ListGameQuestions (&Game); } + + /***** Show all games *****/ + Gam_ListAllGames (); } /*****************************************************************************/ @@ -2072,7 +2075,7 @@ void Gam_RemoveQst (void) "UPDATE mch_answers,mch_matches" " SET mch_answers.QstInd=mch_answers.QstInd-1" " WHERE mch_matches.GamCod=%ld" - " WHERE mch_matches.MchCod=mch_answers.MchCod" + " AND mch_matches.MchCod=mch_answers.MchCod" " AND mch_answers.QstInd>%u", Game.GamCod,QstInd); DB_QueryUPDATE ("can not update indexes of questions", diff --git a/swad_survey.c b/swad_survey.c index 4699b95b8..aaf046c7d 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -172,7 +172,7 @@ static bool Svy_CheckIfIHaveAnsweredSvy (long SvyCod); static unsigned Svy_GetNumUsrsWhoHaveAnsweredSvy (long SvyCod); /*****************************************************************************/ -/************************** List all the surveys *****************************/ +/***************************** List all surveys ******************************/ /*****************************************************************************/ void Svy_SeeAllSurveys (void) @@ -187,7 +187,7 @@ void Svy_SeeAllSurveys (void) Grp_GetParamWhichGrps (); Gbl.Svys.CurrentPage = Pag_GetParamPagNum (Pag_SURVEYS); - /***** Show all the surveys *****/ + /***** Show all surveys *****/ Svy_ListAllSurveys (&SvyQst); } @@ -1922,6 +1922,9 @@ void Svy_RequestCreatOrEditSvy (void) /***** Show questions of the survey ready to be edited *****/ if (!ItsANewSurvey) Svy_ListSvyQuestions (&Svy,&SvyQst); + + /***** Show all surveys *****/ + Svy_ListAllSurveys (&SvyQst); } /*****************************************************************************/