mirror of https://github.com/acanas/swad-core.git
Version19.4.1
This commit is contained in:
parent
d21844b547
commit
fbb0f13fb1
|
@ -464,10 +464,11 @@ can not remove the groups associated to matches of 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 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)
|
||||
8 changes necessary in database:
|
||||
RENAME TABLE gam_answers TO mch_answers;
|
||||
|
|
13
swad_game.c
13
swad_game.c
|
@ -904,7 +904,8 @@ void Gam_RemoveGame (void)
|
|||
/***** Remove all the matches in this game *****/
|
||||
/* Remove groups in matches of the 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"
|
||||
" AND mch_matches.MchCod=mch_groups.MchCod",
|
||||
Game.GamCod);
|
||||
|
@ -1331,7 +1332,8 @@ void Gam_RemoveGroupsOfType (long GrpTypCod)
|
|||
/***** Remove group from all the matches *****/
|
||||
DB_QueryDELETE ("can not remove groups of a type"
|
||||
" 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"
|
||||
" AND crs_grp.GrpCod=mch_groups.GrpCod",
|
||||
GrpTypCod);
|
||||
|
@ -1462,10 +1464,13 @@ unsigned Gam_GetQstIndFromStr (const char *UnsignedStr)
|
|||
|
||||
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",
|
||||
"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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue