diff --git a/swad_changelog.h b/swad_changelog.h index f73d44ee1..f6990bcfc 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -487,15 +487,15 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.33.8 (2019-10-13)" +#define Log_PLATFORM_VERSION "SWAD 19.34 (2019-10-14)" #define CSS_FILE "swad19.33.css" #define JS_FILE "swad19.30.js" /* // TODO: Perico: poner un candado de bloqueo de creación/edición de proyectos (por ejemplo en asignaturas obsoletas) -// TODO: En un TFG preasignado sin estudiante tiene que salir un triángulo amarillo -// TODO: En un TFG no preasignado con estudiante tiene que salir un triángulo amarillo // TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.) + Version 19.34: Oct 14, 2019 Code refactoring in projects. + Show warning if preassigned project without students. (245320 lines) Version 19.33.8: Oct 13, 2019 Fixed bug in tables. (245339 lines) Version 19.33.7: Oct 13, 2019 Fixed bug in surveys. (245317 lines) Version 19.33.6: Oct 13, 2019 Fixed bug in exam announcements. (245299 lines) diff --git a/swad_project.c b/swad_project.c index 9e2ca35ba..af005d5d3 100644 --- a/swad_project.c +++ b/swad_project.c @@ -169,6 +169,7 @@ static void Prj_ShowOneProjectMembersWithARole (const struct Project *Prj, static void Prj_ShowTableAllProjectsMembersWithARole (const struct Project *Prj, Prj_RoleInProject_t RoleInProject); +static unsigned Prj_GetNumUsrsInPrj (long PrjCod,Prj_RoleInProject_t RoleInProject); static unsigned Prj_GetUsrsInPrj (long PrjCod,Prj_RoleInProject_t RoleInProject, MYSQL_RES **mysql_res); @@ -963,8 +964,23 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj, extern const char *Txt_Required_knowledge; extern const char *Txt_Required_materials; char *Anchor = NULL; - static unsigned UniqueId = 0; bool ICanViewProjectFiles = Prj_CheckIfICanViewProjectFiles (Prj_GetMyRolesInProject (Prj->PrjCod)); + const char *ClassLabel; + const char *ClassDate; + const char *ClassTitle; + const char *ClassData; + unsigned NumStdsInPrj; + static unsigned UniqueId = 0; + + /***** Set CSS classes *****/ + ClassLabel = (Prj->Hidden == Prj_HIDDEN) ? "ASG_LABEL_LIGHT" : + "ASG_LABEL"; + ClassDate = (Prj->Hidden == Prj_HIDDEN) ? "DATE_BLUE_LIGHT" : + "DATE_BLUE"; + ClassTitle = (Prj->Hidden == Prj_HIDDEN) ? "ASG_TITLE_LIGHT" : + "ASG_TITLE"; + ClassData = (Prj->Hidden == Prj_HIDDEN) ? "DAT_LIGHT" : + "DAT"; /***** Set anchor string *****/ Frm_SetAnchorStr (Prj->PrjCod,&Anchor); @@ -976,9 +992,7 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj, switch (ProjectView) { case Prj_LIST_PROJECTS: - Tbl_TD_Begin ("rowspan=\"3\" class=\"BIG_INDEX %s RIGHT_TOP COLOR%u\"", - Prj->Hidden == Prj_HIDDEN ? "DATE_BLUE_LIGHT" : - "DATE_BLUE", + Tbl_TD_Begin ("rowspan=\"3\" class=\"BIG_INDEX RIGHT_TOP COLOR%u\"", Gbl.RowEvenOdd); fprintf (Gbl.F.Out,"%u",NumIndex); Tbl_TD_End (); @@ -1010,16 +1024,11 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj, { case Prj_LIST_PROJECTS: Tbl_TD_Begin ("id=\"prj_creat_%u\" class=\"%s LEFT_TOP COLOR%u\"", - UniqueId, - Prj->Hidden == Prj_HIDDEN ? "DATE_BLUE_LIGHT" : - "DATE_BLUE", - Gbl.RowEvenOdd); + UniqueId,ClassDate,Gbl.RowEvenOdd); break; default: Tbl_TD_Begin ("id=\"prj_creat_%u\" class=\"%s LEFT_TOP\"", - UniqueId, - Prj->Hidden == Prj_HIDDEN ? "DATE_BLUE_LIGHT" : - "DATE_BLUE"); + UniqueId,ClassDate); break; } fprintf (Gbl.F.Out,"