mirror of https://github.com/acanas/swad-core.git
Version19.14.5
This commit is contained in:
parent
d61988cfc4
commit
55b7d0a883
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
110
swad_match.c
110
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,"<div class=\"MATCH_RIGHT\">");
|
||||
|
||||
/* Top row: match title */
|
||||
Mch_ShowMatchTitle (Match);
|
||||
|
||||
/* Bottom row: current question and possible answers */
|
||||
Mch_ShowQuestionAndAnswersTch (Match);
|
||||
|
||||
/* End right container */
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
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,"<div class=\"MATCH_RIGHT\">");
|
||||
|
||||
/***** Top row *****/
|
||||
Mch_ShowMatchTitle (Match);
|
||||
|
||||
/***** Bottom row *****/
|
||||
if (Match->Status.QstInd < Mch_AFTER_LAST_QUESTION) // Unfinished
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div class=\"MATCH_BOTTOM\">");
|
||||
|
||||
/***** 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,"</div>");
|
||||
}
|
||||
|
||||
/* End right container */
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
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,"<div class=\"MATCH_RIGHT\">");
|
||||
|
||||
/***** Top row: match title *****/
|
||||
Mch_ShowMatchTitle (Match);
|
||||
|
||||
/***** Bottom row: current question and possible answers *****/
|
||||
Mch_ShowQuestionAndAnswersTch (Match);
|
||||
|
||||
/***** End right container *****/
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********** 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,"</div>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********** 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,"<div class=\"MATCH_RIGHT\">");
|
||||
|
||||
/***** Top row *****/
|
||||
Mch_ShowMatchTitle (Match);
|
||||
|
||||
/***** Bottom row *****/
|
||||
if (Match->Status.QstInd < Mch_AFTER_LAST_QUESTION) // Unfinished
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div class=\"MATCH_BOTTOM\">");
|
||||
|
||||
/***** 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,"</div>");
|
||||
}
|
||||
|
||||
/***** End right container *****/
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************* Show number of question in game ***********************/
|
||||
/*****************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue