From bc4a63ca02c27fc6b9c1627773e5b51ac91fd29d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Fri, 4 Jan 2019 23:15:00 +0100 Subject: [PATCH] Version 18.27.7 --- swad_changelog.h | 3 ++- swad_group.c | 30 ++++++++++++++++++++++++------ swad_group.h | 7 ++++++- 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 42861a84f..8dc73f0b4 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.6 (2019-01-04)" +#define Log_PLATFORM_VERSION "SWAD 18.27.7 (2019-01-04)" #define CSS_FILE "swad18.22.css" #define JS_FILE "swad17.17.1.js" /* + 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) Version 18.27.5: Jan 04, 2019 Selection of classroom in form to create group. (238964 lines) Version 18.27.4: Jan 04, 2019 New field in groups table to select a classroom. (238881 lines) diff --git a/swad_group.c b/swad_group.c index 1a1ad1e2e..d7add4495 100644 --- a/swad_group.c +++ b/swad_group.c @@ -1625,14 +1625,14 @@ static void Grp_ListGroupsForEdition (void) /* Option for no assigned classroom */ fprintf (Gbl.F.Out,"", Txt_No_assigned_classroom); /* Option for another classroom */ fprintf (Gbl.F.Out,"", Txt_Another_classroom); @@ -1644,7 +1644,7 @@ static void Grp_ListGroupsForEdition (void) { fprintf (Gbl.F.Out,"", Gbl.Classrooms.Lst[NumCla].ShrtName); @@ -2362,6 +2362,10 @@ static void Grp_ListGrpsForMultipleSelection (struct GroupType *GrpTyp, "", -(GrpTyp->GrpTypCod),Txt_users_with_no_group); + /* Classroom */ + fprintf (Gbl.F.Out,"" + ""); + /* Number of students who don't belong to any group of this type */ for (Role = Rol_TCH; Role >= Rol_STD; @@ -2386,6 +2390,7 @@ static void Grp_WriteGrpHead (struct GroupType *GrpTyp) extern const char *Txt_Opening_of_groups; extern const char *Txt_Today; extern const char *Txt_Group; + extern const char *Txt_Classroom; extern const char *Txt_Max_BR_students; extern const char *Txt_ROLES_PLURAL_BRIEF_Abc[Rol_NUM_ROLES]; extern const char *Txt_Vacants; @@ -2394,7 +2399,7 @@ static void Grp_WriteGrpHead (struct GroupType *GrpTyp) /***** Name of group type *****/ fprintf (Gbl.F.Out,"" - "" + "" "
%s", GrpTyp->GrpTypName); if (GrpTyp->MustBeOpened) @@ -2419,8 +2424,12 @@ static void Grp_WriteGrpHead (struct GroupType *GrpTyp) "" "" "%s" + "" + "" + "%s" "", - Txt_Group); + Txt_Group, + Txt_Classroom); for (Role = Rol_TCH; Role >= Rol_STD; Role--) @@ -2480,6 +2489,15 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight) Grp->GrpCod, Grp->GrpName); + /***** Classroom *****/ + fprintf (Gbl.F.Out,"" + "%s" + "", + Grp->Classroom.ShrtName); + /***** Current number of users in this group *****/ for (Role = Rol_TCH; Role >= Rol_STD; @@ -2996,7 +3014,7 @@ void Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_WhichGroupTypes_t WhichGroupTypes) Grp_MAX_BYTES_GROUP_NAME); /* Get classroom code (row[2]) */ - Grp->ClaCod = Str_ConvertStrCodToLongCod (row[2]); + Grp->Classroom.ClaCod = Str_ConvertStrCodToLongCod (row[2]); /* Get number of current users in group */ for (Role = Rol_TCH; diff --git a/swad_group.h b/swad_group.h index 0e6b7d781..4789753ed 100644 --- a/swad_group.h +++ b/swad_group.h @@ -27,6 +27,7 @@ /********************************* Headers ***********************************/ /*****************************************************************************/ +#include "swad_classroom.h" #include "swad_info.h" #include "swad_user.h" @@ -74,7 +75,11 @@ struct Group { long GrpCod; // Code of group char GrpName[Grp_MAX_BYTES_GROUP_NAME + 1]; // Name of group - long ClaCod; // Classroom code + struct + { + long ClaCod; // Classroom code + char ShrtName[Cla_MAX_BYTES_SHRT_NAME + 1]; // Classroom short name + } Classroom; unsigned NumUsrs[Rol_NUM_ROLES]; // Number of users in the group unsigned MaxStudents; // Maximum number of students in the group bool Open; // Group is open?