diff --git a/swad_changelog.h b/swad_changelog.h index 6f8529e8..f1db605d 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -345,6 +345,9 @@ Buenos d // TODO: Al crear un evento de asistencia, podría tener por defecto el aula asignada al grupo elegido. +// TODO: En la edición del horario de clases, tomar las aulas de la tabla classrooms. +// El actual campo Place puede dejarse sin cambiar en la base de datos y usarse para otras aclaraciones (renombrándolo simplemente). + /*****************************************************************************/ /****************************** Public constants *****************************/ /*****************************************************************************/ @@ -364,10 +367,11 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.27.10 (2019-01-05)" +#define Log_PLATFORM_VERSION "SWAD 18.27.11 (2019-01-07)" #define CSS_FILE "swad18.22.css" #define JS_FILE "swad17.17.1.js" /* + Version 18.27.11: Jan 07, 2019 Changes in edition of timetable related to classrooms. (239185 lines) Version 18.27.10: Jan 05, 2019 Remove all classrooms in a centre when it is removed. (239151 lines) 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) diff --git a/swad_timetable.c b/swad_timetable.c index 1425b849..57cc7589 100644 --- a/swad_timetable.c +++ b/swad_timetable.c @@ -25,8 +25,9 @@ /*********************************** Headers *********************************/ /*****************************************************************************/ +#define _GNU_SOURCE // For asprintf #include // For NULL -#include // For fprintf, etc. +#include // For asprintf #include // For malloc, calloc, free #include // For string functions @@ -1448,6 +1449,7 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co "TT_PRAC", // TT_PRACTICAL (practical class) "TT_TUTO", // TT_TUTORING (tutoring/office hour) }; + char *CellStr; // Unique string for this cell used in labels struct GroupData GrpDat; unsigned NumGrpTyp; unsigned NumGrp; @@ -1457,6 +1459,8 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co unsigned RowSpan = 0; TT_ClassType_t CT; struct Course Crs; + struct GroupType *GrpTyp; + struct Group *Grp; /***** Compute row span and background color depending on hour type *****/ switch (IntervalType) @@ -1557,6 +1561,12 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co break; case TT_CRS_EDIT: case TT_TUT_EDIT: + /***** Create unique string for this cell used in labels *****/ + if (asprintf (&CellStr,"%02u%02u%02u", + Weekday,Interval,Column) < 0) + Lay_NotEnoughMemoryExit (); + + /***** Put hidden parameters *****/ Par_PutHiddenParamUnsigned ("TTDay",Weekday); Par_PutHiddenParamUnsigned ("TTInt",Interval); Par_PutHiddenParamUnsigned ("TTCol",Column); @@ -1629,12 +1639,16 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co { /***** Group *****/ fprintf (Gbl.F.Out,"
" - "