Version19.4.1

This commit is contained in:
Antonio Cañas Vargas 2019-09-17 08:43:50 +02:00
parent d21844b547
commit fbb0f13fb1
2 changed files with 11 additions and 5 deletions

View File

@ -464,10 +464,11 @@ can not remove the groups associated to matches of a game
Type of answer not valid in a game. Type of answer not valid in a game.
*/ */
#define Log_PLATFORM_VERSION "SWAD 19.4 (2019-09-17)" #define Log_PLATFORM_VERSION "SWAD 19.4.1 (2019-09-17)"
#define CSS_FILE "swad19.3.css" #define CSS_FILE "swad19.3.css"
#define JS_FILE "swad18.130.2.js" #define JS_FILE "swad18.130.2.js"
/* /*
Version 19.4.1: Sep 17, 2019 Fixed bug when removing a question in a game. (244650 lines)
Version 19.4: Sep 17, 2019 Changes in games ans matches tables. (244644 lines) Version 19.4: Sep 17, 2019 Changes in games ans matches tables. (244644 lines)
8 changes necessary in database: 8 changes necessary in database:
RENAME TABLE gam_answers TO mch_answers; RENAME TABLE gam_answers TO mch_answers;

View File

@ -904,7 +904,8 @@ void Gam_RemoveGame (void)
/***** Remove all the matches in this game *****/ /***** Remove all the matches in this game *****/
/* Remove groups in matches of the game */ /* Remove groups in matches of the game */
DB_QueryDELETE ("can not remove the groups associated to matches of a game", DB_QueryDELETE ("can not remove the groups associated to matches of a game",
"DELETE FROM mch_groups USING mch_groups,mch_matches" "DELETE FROM mch_groups"
" USING mch_matches,mch_groups"
" WHERE mch_matches.GrpCod=%ld" " WHERE mch_matches.GrpCod=%ld"
" AND mch_matches.MchCod=mch_groups.MchCod", " AND mch_matches.MchCod=mch_groups.MchCod",
Game.GamCod); Game.GamCod);
@ -1331,7 +1332,8 @@ void Gam_RemoveGroupsOfType (long GrpTypCod)
/***** Remove group from all the matches *****/ /***** Remove group from all the matches *****/
DB_QueryDELETE ("can not remove groups of a type" DB_QueryDELETE ("can not remove groups of a type"
" from the associations between matches and groups", " from the associations between matches and groups",
"DELETE FROM mch_groups USING crs_grp,mch_groups" "DELETE FROM mch_groups"
" USING crs_grp,mch_groups"
" WHERE crs_grp.GrpTypCod=%ld" " WHERE crs_grp.GrpTypCod=%ld"
" AND crs_grp.GrpCod=mch_groups.GrpCod", " AND crs_grp.GrpCod=mch_groups.GrpCod",
GrpTypCod); GrpTypCod);
@ -1462,10 +1464,13 @@ unsigned Gam_GetQstIndFromStr (const char *UnsignedStr)
static void Gam_RemAnswersOfAQuestion (long GamCod,unsigned QstInd) static void Gam_RemAnswersOfAQuestion (long GamCod,unsigned QstInd)
{ {
/***** Remove answers *****/ /***** Remove answers from all matches of this game *****/
DB_QueryDELETE ("can not remove the answers of a question", DB_QueryDELETE ("can not remove the answers of a question",
"DELETE FROM mch_answers" "DELETE FROM mch_answers"
" WHERE GamCod=%ld AND QstInd=%u", " USING mch_matches,mch_answers"
" WHERE mch_matches.GamCod=%ld" // From all matches of this game...
" AND mch_matches.MchCod=mch_answers.MchCod"
" AND mch_answers.QstInd=%u", // ...remove only answers to this question
GamCod,QstInd); GamCod,QstInd);
} }