diff --git a/css/swad19.3.css b/css/swad19.3.css
index d7d511461..c3ef1da81 100644
--- a/css/swad19.3.css
+++ b/css/swad19.3.css
@@ -2579,6 +2579,7 @@ a:hover img.CENTRE_PHOTO_SHOW
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
+ border:1px solid red;
}
.MATCH_RIGHT
{
@@ -2586,6 +2587,7 @@ a:hover img.CENTRE_PHOTO_SHOW
display:table;
float:left;
width:75%;
+ border:1px solid red;
}
.MATCH_TOP
{
diff --git a/swad_changelog.h b/swad_changelog.h
index bbef07e59..b8629f935 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -470,18 +470,23 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
-#define Log_PLATFORM_VERSION "SWAD 19.14.4 (2019-09-26)"
+#define Log_PLATFORM_VERSION "SWAD 19.14.5 (2019-09-26)"
#define CSS_FILE "swad19.3.css"
#define JS_FILE "swad18.130.2.js"
/*
-// TODO: Imposibilitar la edición (creación/eliminación/movimiento) de preguntas de un juego cuando tenga partidas
+// Version 19.*: Sep 26, 2019 TODO: Make it impossible to edit (create/delete/move) questions from a game when it has matches. (? lines)
- Version 19.14.4: Sep 26, 2019 Fixed bug creating a new match. (246270 lines)
- 8 changes necessary in database:
+ Version 19.15: Sep 26, 2019 Refresh only left part of the teacher's screen when playing a match. (? lines)
+ Version 19.14.5: Sep 26, 2019 Code refactoring related to match playing. (246291 lines)
+ Version 19.14.4: Sep 26, 2019 Fixed bug creating a new match. (246273 lines)
+ 6 changes necessary in database:
Only if you use MyISAM:
+ALTER TABLE hidden_params ENGINE=MyISAM;
ALTER TABLE mch_indexes ENGINE=MyISAM;
ALTER TABLE mch_results ENGINE=MyISAM;
ALTER TABLE mch_times ENGINE=MyISAM;
+ALTER TABLE timetable_tut ENGINE=MyISAM;
+SELECT TABLE_NAME,ENGINE FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'swad';
Version 19.14.3: Sep 26, 2019 Column in game row with the number of matches. (246264 lines)
Version 19.14.2: Sep 26, 2019 Student can not see a match result if hidden. (246227 lines)
diff --git a/swad_match.c b/swad_match.c
index c9821387c..7a6915bb1 100644
--- a/swad_match.c
+++ b/swad_match.c
@@ -188,8 +188,12 @@ static void Mch_SetMatchStatusToEnd (struct Match *Match);
static void Mch_ShowMatchStatusForTch (struct Match *Match);
static void Mch_ShowMatchStatusForStd (struct Match *Match);
static bool Mch_CheckIfIPlayThisMatchBasedOnGrps (long MchCod);
+
static void Mch_ShowLeftColumnTch (struct Match *Match);
+static void Mch_ShowRightColumnTch (struct Match *Match);
static void Mch_ShowLeftColumnStd (struct Match *Match);
+static void Mch_ShowRightColumnStd (struct Match *Match);
+
static void Mch_ShowNumQstInMatch (struct Match *Match);
static void Mch_PutMatchControlButtons (struct Match *Match);
static void Mch_PutCheckboxResult (struct Match *Match);
@@ -1907,24 +1911,11 @@ static void Mch_SetMatchStatusToEnd (struct Match *Match)
static void Mch_ShowMatchStatusForTch (struct Match *Match)
{
- /***** Get current number of players *****/
- Mch_GetNumPlayers (Match);
-
/***** Left column *****/
Mch_ShowLeftColumnTch (Match);
/***** Right column *****/
- /* Start right container */
- fprintf (Gbl.F.Out,"
");
-
- /* Top row: match title */
- Mch_ShowMatchTitle (Match);
-
- /* Bottom row: current question and possible answers */
- Mch_ShowQuestionAndAnswersTch (Match);
-
- /* End right container */
- fprintf (Gbl.F.Out,"
");
+ Mch_ShowRightColumnTch (Match);
}
/*****************************************************************************/
@@ -1933,7 +1924,6 @@ static void Mch_ShowMatchStatusForTch (struct Match *Match)
static void Mch_ShowMatchStatusForStd (struct Match *Match)
{
- extern const char *Txt_Please_wait_;
bool IBelongToGroups;
/***** Do I belong to valid groups to play this match? *****/
@@ -1942,38 +1932,11 @@ static void Mch_ShowMatchStatusForStd (struct Match *Match)
if (!IBelongToGroups)
Lay_ShowErrorAndExit ("You can not play this match!");
- /***** Get current number of players *****/
- Mch_GetNumPlayers (Match);
-
/***** Left column *****/
Mch_ShowLeftColumnStd (Match);
/***** Right column *****/
- /* Start right container */
- fprintf (Gbl.F.Out,"");
-
- /***** Top row *****/
- Mch_ShowMatchTitle (Match);
-
- /***** Bottom row *****/
- if (Match->Status.QstInd < Mch_AFTER_LAST_QUESTION) // Unfinished
- {
- fprintf (Gbl.F.Out,"
");
-
- /***** Update players ******/
- Mch_RegisterMeAsPlayerInMatch (Match->MchCod);
-
- if (Match->Status.Playing)
- /* Show current question and possible answers */
- Mch_ShowQuestionAndAnswersStd (Match);
- else // Not being played
- Mch_ShowWaitImage (Txt_Please_wait_);
-
- fprintf (Gbl.F.Out,"
");
- }
-
- /* End right container */
- fprintf (Gbl.F.Out,"
");
+ Mch_ShowRightColumnStd (Match);
}
/*****************************************************************************/
@@ -2008,7 +1971,7 @@ static bool Mch_CheckIfIPlayThisMatchBasedOnGrps (long MchCod)
}
/*****************************************************************************/
-/******** Show left botton column when playing a match (as a teacher) ********/
+/*********** Show left column when playing a match (as a teacher) ************/
/*****************************************************************************/
static void Mch_ShowLeftColumnTch (struct Match *Match)
@@ -2050,6 +2013,9 @@ static void Mch_ShowLeftColumnTch (struct Match *Match)
/***** Write button to request viewing results *****/
Mch_PutCheckboxResult (Match);
+ /***** Get current number of players *****/
+ Mch_GetNumPlayers (Match);
+
/***** Number of players *****/
Mch_ShowNumPlayers (Match);
@@ -2071,7 +2037,26 @@ static void Mch_ShowLeftColumnTch (struct Match *Match)
}
/*****************************************************************************/
-/******** Show left botton column when playing a match (as a student) ********/
+/********** Show right column when playing a match (as a teacher) ************/
+/*****************************************************************************/
+
+static void Mch_ShowRightColumnTch (struct Match *Match)
+ {
+ /***** Start right container *****/
+ fprintf (Gbl.F.Out,"");
+
+ /***** Top row: match title *****/
+ Mch_ShowMatchTitle (Match);
+
+ /***** Bottom row: current question and possible answers *****/
+ Mch_ShowQuestionAndAnswersTch (Match);
+
+ /***** End right container *****/
+ fprintf (Gbl.F.Out,"
");
+ }
+
+/*****************************************************************************/
+/*********** Show left column when playing a match (as a student) ************/
/*****************************************************************************/
static void Mch_ShowLeftColumnStd (struct Match *Match)
@@ -2089,6 +2074,41 @@ static void Mch_ShowLeftColumnStd (struct Match *Match)
fprintf (Gbl.F.Out,"");
}
+/*****************************************************************************/
+/********** Show right column when playing a match (as a student) ************/
+/*****************************************************************************/
+
+static void Mch_ShowRightColumnStd (struct Match *Match)
+ {
+ extern const char *Txt_Please_wait_;
+
+ /***** Start right container *****/
+ fprintf (Gbl.F.Out,"");
+
+ /***** Top row *****/
+ Mch_ShowMatchTitle (Match);
+
+ /***** Bottom row *****/
+ if (Match->Status.QstInd < Mch_AFTER_LAST_QUESTION) // Unfinished
+ {
+ fprintf (Gbl.F.Out,"
");
+
+ /***** Update players ******/
+ Mch_RegisterMeAsPlayerInMatch (Match->MchCod);
+
+ if (Match->Status.Playing)
+ /* Show current question and possible answers */
+ Mch_ShowQuestionAndAnswersStd (Match);
+ else // Not being played
+ Mch_ShowWaitImage (Txt_Please_wait_);
+
+ fprintf (Gbl.F.Out,"
");
+ }
+
+ /***** End right container *****/
+ fprintf (Gbl.F.Out,"
");
+ }
+
/*****************************************************************************/
/********************* Show number of question in game ***********************/
/*****************************************************************************/