Version19.19.2

This commit is contained in:
Antonio Cañas Vargas 2019-09-29 18:44:40 +02:00
parent f97c3d8ad1
commit c3d247c91a
3 changed files with 37 additions and 14 deletions

View File

@ -471,10 +471,11 @@ 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.19 (2019-09-29)" #define Log_PLATFORM_VERSION "SWAD 19.19.2 (2019-09-29)"
#define CSS_FILE "swad19.15.css" #define CSS_FILE "swad19.15.css"
#define JS_FILE "swad19.15.js" #define JS_FILE "swad19.15.js"
/* /*
Version 19.19.2: Sep 29, 2019 Students will not see icons to remove matches. (246619 lines)
Version 19.19.1: Sep 29, 2019 Students will not see matches for groups to which they don't belong. (246601 lines) Version 19.19.1: Sep 29, 2019 Students will not see matches for groups to which they don't belong. (246601 lines)
Version 19.19: Sep 29, 2019 Selections of my groups/all groups in listing of matches. Version 19.19: Sep 29, 2019 Selections of my groups/all groups in listing of matches.
Removed column with number of match. (246596 lines) Removed column with number of match. (246596 lines)

View File

@ -274,7 +274,7 @@ static void Gam_ListAllGames (void)
} }
/*****************************************************************************/ /*****************************************************************************/
/******************* Check if I can create a new game **********************/ /************************ Check if I can edit games **************************/
/*****************************************************************************/ /*****************************************************************************/
static bool Gam_CheckIfICanEditGames (void) static bool Gam_CheckIfICanEditGames (void)
@ -282,9 +282,6 @@ static bool Gam_CheckIfICanEditGames (void)
switch (Gbl.Usrs.Me.Role.Logged) switch (Gbl.Usrs.Me.Role.Logged)
{ {
case Rol_TCH: case Rol_TCH:
case Rol_DEG_ADM:
case Rol_CTR_ADM:
case Rol_INS_ADM:
case Rol_SYS_ADM: case Rol_SYS_ADM:
return true; return true;
default: default:

View File

@ -116,6 +116,7 @@ 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 bool Mch_CheckIfICanEditMatches (void);
static void Mch_ListOneOrMoreMatchesIcons (const struct Match *Match); static void Mch_ListOneOrMoreMatchesIcons (const struct Match *Match);
static void Mch_ListOneOrMoreMatchesAuthor (const struct Match *Match); 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);
@ -398,7 +399,8 @@ static void Mch_ListOneOrMoreMatches (struct Game *Game,
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
/* Icons */ /* Icons */
Mch_ListOneOrMoreMatchesIcons (&Match); if (Mch_CheckIfICanEditMatches ())
Mch_ListOneOrMoreMatchesIcons (&Match);
/* Match player */ /* Match player */
Mch_ListOneOrMoreMatchesAuthor (&Match); Mch_ListOneOrMoreMatchesAuthor (&Match);
@ -438,9 +440,15 @@ static void Mch_ListOneOrMoreMatchesHeading (void)
extern const char *Txt_Status; extern const char *Txt_Status;
extern const char *Txt_Result; extern const char *Txt_Result;
fprintf (Gbl.F.Out,"<tr>" /***** Start row *****/
"<th></th>" fprintf (Gbl.F.Out,"<tr>");
"<th class=\"LEFT_TOP\">"
/***** Column for icons *****/
if (Mch_CheckIfICanEditMatches ())
fprintf (Gbl.F.Out,"<th></th>");
/***** The rest of columns *****/
fprintf (Gbl.F.Out,"<th class=\"LEFT_TOP\">"
"%s" "%s"
"</th>" "</th>"
"<th class=\"LEFT_TOP\">" "<th class=\"LEFT_TOP\">"
@ -460,8 +468,7 @@ static void Mch_ListOneOrMoreMatchesHeading (void)
"</th>" "</th>"
"<th class=\"CENTER_TOP\">" "<th class=\"CENTER_TOP\">"
"%s" "%s"
"</th>" "</th>",
"</tr>",
Txt_ROLES_SINGUL_Abc[Rol_TCH][Usr_SEX_UNKNOWN], Txt_ROLES_SINGUL_Abc[Rol_TCH][Usr_SEX_UNKNOWN],
Txt_START_END_TIME[Gam_ORDER_BY_START_DATE], Txt_START_END_TIME[Gam_ORDER_BY_START_DATE],
Txt_START_END_TIME[Gam_ORDER_BY_END_DATE], Txt_START_END_TIME[Gam_ORDER_BY_END_DATE],
@ -469,6 +476,27 @@ static void Mch_ListOneOrMoreMatchesHeading (void)
Txt_Players, Txt_Players,
Txt_Status, Txt_Status,
Txt_Result); Txt_Result);
/***** End row *****/
fprintf (Gbl.F.Out,"</tr>");
}
/*****************************************************************************/
/************************ Check if I can edit games **************************/
/*****************************************************************************/
static bool Mch_CheckIfICanEditMatches (void)
{
switch (Gbl.Usrs.Me.Role.Logged)
{
case Rol_NET:
case Rol_TCH:
case Rol_SYS_ADM:
return true;
default:
return false;
}
return false;
} }
/*****************************************************************************/ /*****************************************************************************/
@ -661,9 +689,6 @@ static void Mch_ListOneOrMoreMatchesStatus (const struct Match *Match,unsigned N
break; break;
case Rol_NET: case Rol_NET:
case Rol_TCH: case Rol_TCH:
case Rol_DEG_ADM:
case Rol_CTR_ADM:
case Rol_INS_ADM:
case Rol_SYS_ADM: case Rol_SYS_ADM:
/* Icon to resume */ /* Icon to resume */
Mch_CurrentMchCod = Match->MchCod; Mch_CurrentMchCod = Match->MchCod;