diff --git a/sql/swad.sql b/sql/swad.sql index ca690f70e..4f344d22e 100644 --- a/sql/swad.sql +++ b/sql/swad.sql @@ -640,7 +640,6 @@ CREATE TABLE IF NOT EXISTS gam_matches ( QstCod INT NOT NULL DEFAULT -1, QstStartTime DATETIME NOT NULL, ShowingAnswers ENUM('N','Y') NOT NULL DEFAULT 'N', - Finished ENUM('N','Y') NOT NULL DEFAULT 'N', UNIQUE INDEX(MchCod), INDEX(GamCod)); -- diff --git a/swad_changelog.h b/swad_changelog.h index eae9323f5..ee5b1e458 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -460,11 +460,17 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.138.3 (2019-07-31)" +#define Log_PLATFORM_VERSION "SWAD 18.138.5 (2019-08-01)" #define CSS_FILE "swad18.138.css" #define JS_FILE "swad18.130.2.js" /* - Version 18.138.4: Jul 31, 2019 Time of current match and current match question are stored in database. (? lines) + 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.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; + + Version 18.138.4: Aug 01, 2019 Changes in backward and forward behaviour and buttons in matches. (244121 lines) Version 18.138.3: Jul 31, 2019 Button backward on finished match. (244118 lines) Version 18.138.2: Jul 31, 2019 Changes in backward and forward behaviour and buttons in matches. (244111 lines) Version 18.138.1: Jul 31, 2019 Close button in games always present. diff --git a/swad_database.c b/swad_database.c index f3eee7d64..cbe34fc83 100644 --- a/swad_database.c +++ b/swad_database.c @@ -1382,9 +1382,8 @@ mysql> DESCRIBE gam_matches; | QstCod | int(11) | NO | | -1 | | | QstStartTime | datetime | NO | | NULL | | | ShowingAnswers | enum('N','Y') | NO | | N | | -| Finished | enum('N','Y') | NO | | N | | +----------------+---------------+------+-----+---------+----------------+ -11 rows in set (0.00 sec) +10 rows in set (0.00 sec) */ DB_CreateTable ("CREATE TABLE IF NOT EXISTS gam_matches (" "MchCod INT NOT NULL AUTO_INCREMENT," @@ -1397,7 +1396,6 @@ mysql> DESCRIBE gam_matches; "QstCod INT NOT NULL DEFAULT -1," "QstStartTime DATETIME NOT NULL," "ShowingAnswers ENUM('N','Y') NOT NULL DEFAULT 'N'," - "Finished ENUM('N','Y') NOT NULL DEFAULT 'N'," "UNIQUE INDEX(MchCod)," "INDEX(GamCod)"); diff --git a/swad_game.c b/swad_game.c index 4daa6675c..b77cb3260 100644 --- a/swad_game.c +++ b/swad_game.c @@ -74,6 +74,8 @@ const char *Gam_StrAnswerTypesDB[Gam_NUM_ANS_TYPES] = #define Gam_NEW_MATCH_SECTION_ID "new_match" +#define Gam_AFTER_LAST_QUESTION ((unsigned)((1UL << 31) - 1)) // 2^31 - 1, don't change this number because it is used in database to indicate that a match is finished + /*****************************************************************************/ /******************************* Private types *******************************/ /*****************************************************************************/ @@ -91,7 +93,6 @@ struct Match long QstCod; time_t QstStartTimeUTC; bool ShowingAnswers; - bool Finished; bool BeingPlayed; unsigned NumPlayers; } Status; @@ -488,10 +489,8 @@ static void Gam_ShowOneGame (long GamCod, UniqueId++; fprintf (Gbl.F.Out,"