Version18.135.4

This commit is contained in:
Antonio Cañas Vargas 2019-07-17 21:43:34 +02:00
parent 89e8119901
commit 35587c9950
3 changed files with 31 additions and 14 deletions

View File

@ -2686,13 +2686,6 @@ a:hover img.CENTRE_PHOTO_SHOW
{
box-shadow: 0px 0px 18px 12px rgba(0,128,0,1);
}
/*
.GAM_PLAY_TCH_BUTTON:hover, .GAM_PLAY_STD_BUTTON:hover
{
background-image:-webkit-linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.2)); Safari
background-image:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.2));
}
*/
.BT_A {background-color:#e21c3d; border-color:#a9152d;} /* red */
.BT_B {background-color:#1369ce; border-color:#0e519c;} /* blue */

View File

@ -458,10 +458,11 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 18.135.3 (2019-07-17)"
#define Log_PLATFORM_VERSION "SWAD 18.135.4 (2019-07-17)"
#define CSS_FILE "swad18.132.2.css"
#define JS_FILE "swad18.130.2.js"
/*
Version 18.135.4: Jul 17, 2019 Changes and bug fixing while removing a match. (243682 lines)
Version 18.135.3: Jul 17, 2019 Removed unused code in games.
Optimization in match buttons. (243668 lines)
8 changes necessary in database:

View File

@ -3076,17 +3076,40 @@ void Gam_RemoveMatchTch (void)
Gam_GetDataOfMatchByCod (&Match);
/***** Remove the match from all the tables *****/
/* Remove match players */
DB_QueryDELETE ("can not remove match players",
"DELETE FROM gam_players"
" USING gam_players,gam_matches,games"
" WHERE gam_players.MchCod=%ld"
" AND gam_players.MchCod=gam_matches.MchCod"
" AND gam_matches.GamCod=games.GamCod"
" AND games.CrsCod=%ld", // Extra check
Match.MchCod,Gbl.Hierarchy.Crs.CrsCod);
/* Remove match from list of matches being played */
DB_QueryDELETE ("can not remove match from matches being played",
"DELETE FROM gam_mch_being_played"
" USING gam_mch_being_played,gam_matches,games"
" WHERE gam_mch_being_played.MchCod=%ld"
" AND gam_mch_being_played.MchCod=gam_matches.MchCod"
" AND gam_matches.GamCod=games.GamCod"
" AND games.CrsCod=%ld", // Extra check
Match.MchCod,Gbl.Hierarchy.Crs.CrsCod);
/* Remove groups associated to the match */
DB_QueryDELETE ("can not remove the groups associated to matches of a game",
"DELETE FROM gam_grp USING gam_grp,gam_matches,games"
DB_QueryDELETE ("can not remove the groups associated to a match",
"DELETE FROM gam_grp"
" USING gam_grp,gam_matches,games"
" WHERE gam_grp.MchCod=%ld"
" AND gam_grp.MchCod=gam_matches.MchCod"
" AND gam_matches.GamCod=games.GamCod"
" AND games.CrsCod=%ld", // Extra check
Match.MchCod);
Match.MchCod,Gbl.Hierarchy.Crs.CrsCod);
/* Remove the match itself */
DB_QueryDELETE ("can not remove a match",
"DELETE FROM gam_matches USING gam_matches,games"
"DELETE FROM gam_matches"
" USING gam_matches,games"
" WHERE gam_matches.MchCod=%ld"
" AND gam_matches.GamCod=games.GamCod"
" AND games.CrsCod=%ld", // Extra check
@ -3883,13 +3906,13 @@ static void Gam_ShowMatchStatusForStd (struct Match *Match)
Gam_PutParamAnswer (Index); // Index for this option
fprintf (Gbl.F.Out,"<button type=\"submit\""
" onmousedown=\"document.getElementById('%s').submit();"
"return false;\" class=\"");
"return false;\" class=\"",
Gbl.Form.Id);
if (StdAnsInd == (int) NumOpt) // Student's answer
fprintf (Gbl.F.Out,"GAM_PLAY_STD_ANSWER_SELECTED ");
fprintf (Gbl.F.Out,"GAM_PLAY_STD_BUTTON BT_%c\">"
"%c"
"</button>",
Gbl.Form.Id,
'A' + (char) NumOpt,
'a' + (char) NumOpt);
Frm_EndForm ();