mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-01 22:35:28 +02:00
Version19.13.3
This commit is contained in:
parent
27fb49de8f
commit
aa6d36d72c
|
@ -470,10 +470,14 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.13.2 (2019-09-25)"
|
#define Log_PLATFORM_VERSION "SWAD 19.13.3 (2019-09-25)"
|
||||||
#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"
|
||||||
/*
|
/*
|
||||||
|
// TODO: Poner columna en listado de juegos que indique el número de partidas
|
||||||
|
// TODO: Imposibilitar la edición de preguntas de un juego cuando tenga partidas
|
||||||
|
|
||||||
|
Version 19.13.3: Sep 25, 2019 Code refactoring in match listing. (246123 lines)
|
||||||
Version 19.13.2: Sep 25, 2019 Code refactoring in match listing. (246086 lines)
|
Version 19.13.2: Sep 25, 2019 Code refactoring in match listing. (246086 lines)
|
||||||
Version 19.13.1: Sep 25, 2019 Code refactoring in match listing. (246061 lines)
|
Version 19.13.1: Sep 25, 2019 Code refactoring in match listing. (246061 lines)
|
||||||
Version 19.13: Sep 25, 2019 Column for visibility in match listing. (246044 lines)
|
Version 19.13: Sep 25, 2019 Column for visibility in match listing. (246044 lines)
|
||||||
|
|
99
swad_match.c
99
swad_match.c
|
@ -136,9 +136,13 @@ static void Mch_ListOneOrMoreMatches (struct Game *Game,
|
||||||
unsigned NumMatches,
|
unsigned NumMatches,
|
||||||
MYSQL_RES *mysql_res);
|
MYSQL_RES *mysql_res);
|
||||||
static void Mch_ListOneOrMoreMatchesHeading (void);
|
static void Mch_ListOneOrMoreMatchesHeading (void);
|
||||||
|
static void Mch_ListOneOrMoreMatchesIcons (const struct Match *Match);
|
||||||
|
static void Mch_ListOneOrMoreMatchesNumMatch (unsigned NumMatch);
|
||||||
|
static void Mch_ListOneOrMoreMatchesAuthor (const struct Match *Match);
|
||||||
static void Mch_ListOneOrMoreMatchesTimes (const struct Match *Match,unsigned UniqueId);
|
static void Mch_ListOneOrMoreMatchesTimes (const struct Match *Match,unsigned UniqueId);
|
||||||
static void Mch_ListOneOrMoreMatchesTitleGrps (const struct Match *Match);
|
static void Mch_ListOneOrMoreMatchesTitleGrps (const struct Match *Match);
|
||||||
static void Mch_GetAndWriteNamesOfGrpsAssociatedToMatch (const struct Match *Match);
|
static void Mch_GetAndWriteNamesOfGrpsAssociatedToMatch (const struct Match *Match);
|
||||||
|
static void Mch_ListOneOrMoreMatchesNumPlayers (const struct Match *Match);
|
||||||
static void Mch_ListOneOrMoreMatchesStatus (const struct Match *Match,unsigned NumQsts);
|
static void Mch_ListOneOrMoreMatchesStatus (const struct Match *Match,unsigned NumQsts);
|
||||||
static void Mch_ListOneOrMoreMatchesResult (const struct Match *Match);
|
static void Mch_ListOneOrMoreMatchesResult (const struct Match *Match);
|
||||||
|
|
||||||
|
@ -412,45 +416,31 @@ static void Mch_ListOneOrMoreMatches (struct Game *Game,
|
||||||
/***** Get match data from row *****/
|
/***** Get match data from row *****/
|
||||||
Mch_GetMatchDataFromRow (mysql_res,&Match);
|
Mch_GetMatchDataFromRow (mysql_res,&Match);
|
||||||
|
|
||||||
/***** Icons *****/
|
/***** Write row for this match ****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>");
|
||||||
"<td class=\"BT%u\">",Gbl.RowEvenOdd);
|
|
||||||
|
|
||||||
/* Put icon to remove the match */
|
/* Icons */
|
||||||
Frm_StartForm (ActReqRemMchTch);
|
Mch_ListOneOrMoreMatchesIcons (&Match);
|
||||||
Mch_PutParamMchCod (Match.MchCod);
|
|
||||||
Ico_PutIconRemove ();
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
/* Number of match **/
|
||||||
|
Mch_ListOneOrMoreMatchesNumMatch (NumMatch);
|
||||||
|
|
||||||
/***** Number of match ******/
|
/* Match player */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"BIG_INDEX RIGHT_TOP COLOR%u\">%u</td>",
|
Mch_ListOneOrMoreMatchesAuthor (&Match);
|
||||||
Gbl.RowEvenOdd,NumMatch + 1);
|
|
||||||
|
|
||||||
/***** Match player *****/
|
/* Start/end date/time */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",
|
|
||||||
Gbl.RowEvenOdd);
|
|
||||||
Usr_WriteAuthor1Line (Match.UsrCod,false);
|
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
|
||||||
|
|
||||||
/***** Start/end date/time *****/
|
|
||||||
Mch_ListOneOrMoreMatchesTimes (&Match,UniqueId);
|
Mch_ListOneOrMoreMatchesTimes (&Match,UniqueId);
|
||||||
|
|
||||||
/***** Title and groups *****/
|
/* Title and groups */
|
||||||
Mch_ListOneOrMoreMatchesTitleGrps (&Match);
|
Mch_ListOneOrMoreMatchesTitleGrps (&Match);
|
||||||
|
|
||||||
/***** Number of players who have answered any question in the match ******/
|
/* Number of players who have answered any question in the match */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP COLOR%u\">"
|
Mch_ListOneOrMoreMatchesNumPlayers (&Match);
|
||||||
"%u"
|
|
||||||
"</td>",
|
|
||||||
Gbl.RowEvenOdd,
|
|
||||||
Mch_GetNumUsrsWhoHaveAnswerMch (Match.MchCod));
|
|
||||||
|
|
||||||
/***** Match status ******/
|
/* Match status */
|
||||||
Mch_ListOneOrMoreMatchesStatus (&Match,Game->NumQsts);
|
Mch_ListOneOrMoreMatchesStatus (&Match,Game->NumQsts);
|
||||||
|
|
||||||
/***** Match result visible? *****/
|
/* Match result visible? */
|
||||||
Mch_ListOneOrMoreMatchesResult (&Match);
|
Mch_ListOneOrMoreMatchesResult (&Match);
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
fprintf (Gbl.F.Out,"</tr>");
|
||||||
|
@ -511,6 +501,45 @@ static void Mch_ListOneOrMoreMatchesHeading (void)
|
||||||
Txt_Result);
|
Txt_Result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/************************* Put a column for icons ****************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Mch_ListOneOrMoreMatchesIcons (const struct Match *Match)
|
||||||
|
{
|
||||||
|
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",Gbl.RowEvenOdd);
|
||||||
|
|
||||||
|
/* Put icon to remove the match */
|
||||||
|
Frm_StartForm (ActReqRemMchTch);
|
||||||
|
Mch_PutParamMchCod (Match->MchCod);
|
||||||
|
Ico_PutIconRemove ();
|
||||||
|
Frm_EndForm ();
|
||||||
|
|
||||||
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/********************* Put a column for number of match **********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Mch_ListOneOrMoreMatchesNumMatch (unsigned NumMatch)
|
||||||
|
{
|
||||||
|
fprintf (Gbl.F.Out,"<td class=\"BIG_INDEX RIGHT_TOP COLOR%u\">%u</td>",
|
||||||
|
Gbl.RowEvenOdd,NumMatch + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/************* Put a column for teacher who created the match ****************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Mch_ListOneOrMoreMatchesAuthor (const struct Match *Match)
|
||||||
|
{
|
||||||
|
/***** Match author (teacher) *****/
|
||||||
|
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||||
|
Usr_WriteAuthor1Line (Match->UsrCod,false);
|
||||||
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************** Put a column for match start and end times ****************/
|
/***************** Put a column for match start and end times ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -623,6 +652,20 @@ static void Mch_GetAndWriteNamesOfGrpsAssociatedToMatch (const struct Match *Mat
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/******************* Put a column for number of players **********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Mch_ListOneOrMoreMatchesNumPlayers (const struct Match *Match)
|
||||||
|
{
|
||||||
|
/***** Number of players who have answered any question in the match ******/
|
||||||
|
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP COLOR%u\">"
|
||||||
|
"%u"
|
||||||
|
"</td>",
|
||||||
|
Gbl.RowEvenOdd,
|
||||||
|
Mch_GetNumUsrsWhoHaveAnswerMch (Match->MchCod));
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********************** Put a column for match status ************************/
|
/********************** Put a column for match status ************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user