From 2549a8708d8ebf76dd539b0ee54193f6a5d8d7f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sat, 5 Jan 2019 11:39:42 +0100 Subject: [PATCH] Version 18.27.9 --- swad_changelog.h | 3 ++- swad_classroom.c | 6 ++++++ swad_group.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 1d0edbd9f..e3602f994 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -364,10 +364,11 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.27.8 (2019-01-05)" +#define Log_PLATFORM_VERSION "SWAD 18.27.9 (2019-01-05)" #define CSS_FILE "swad18.22.css" #define JS_FILE "swad17.17.1.js" /* + Version 18.27.9: Jan 05, 2019 When a classroom is removed, if it is assigned to groups, remove the association in groups. (239136 lines) Version 18.27.8: Jan 05, 2019 Get classroom short name from database in listing of groups. (239130 lines) Version 18.27.7: Jan 04, 2019 Show classroom in listing of groups. (239121 lines) Version 18.27.6: Jan 04, 2019 Selection of classroom in form to edit group. (239099 lines) diff --git a/swad_classroom.c b/swad_classroom.c index 74d7a59e0..c057daa1f 100644 --- a/swad_classroom.c +++ b/swad_classroom.c @@ -569,6 +569,12 @@ void Cla_RemoveClassroom (void) /***** Get data of the classroom from database *****/ Cla_GetDataOfClassroomByCod (Cla); + /***** Update groups assigned to this classroom *****/ + DB_QueryUPDATE ("can not update classroom in groups", + "UPDATE crs_grp SET ClaCod=0" // 0 means another classroom + " WHERE ClaCod=%ld", + Cla->ClaCod); + /***** Remove classroom *****/ DB_QueryDELETE ("can not remove a classroom", "DELETE FROM classrooms WHERE ClaCod=%ld", diff --git a/swad_group.c b/swad_group.c index 90cd2916f..51f4d79f7 100644 --- a/swad_group.c +++ b/swad_group.c @@ -2490,7 +2490,7 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight) Grp->GrpName); /***** Classroom *****/ - fprintf (Gbl.F.Out,""