From 1559be56e052f8979b3c98cc2b7e7ae4521c311c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Fri, 8 Mar 2019 01:18:31 +0100 Subject: [PATCH] Version18.68.1 --- swad_changelog.h | 3 ++- swad_group.c | 20 +++++--------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 4f0baf71..b227c16f 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -447,10 +447,11 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.68 (2019-03-07)" +#define Log_PLATFORM_VERSION "SWAD 18.68.1 (2019-03-08)" #define CSS_FILE "swad18.67.css" #define JS_FILE "swad18.64.js" /* + Version 18.68.1: Mar 08, 2019 A teacher can register students in groups, even if he/she doesn't belong to them. (238910 lines) Version 18.68: Mar 07, 2019 Photo is zoomed even in record card. Teachers record cards are only visible inside courses. Fixed bug in notifications. (238918 lines) diff --git a/swad_group.c b/swad_group.c index 3cbf9b9c..7f57b324 100644 --- a/swad_group.c +++ b/swad_group.c @@ -2085,7 +2085,7 @@ static bool Grp_ListGrpsForChangeMySelection (struct GroupType *GrpTyp, /*****************************************************************************/ /*************** Show list of groups to register/remove users ****************/ /*****************************************************************************/ -// If UsrCod > 0 ==> mark her/his groups as checked +// If UsrCod > 0 ==> mark her/his groups as checked // If UsrCod <= 0 ==> do not mark any group as checked void Grp_ShowLstGrpsToChgOtherUsrsGrps (long UsrCod) @@ -2118,26 +2118,20 @@ void Grp_ShowLstGrpsToChgOtherUsrsGrps (long UsrCod) /*****************************************************************************/ /*************** List groups of a type to add or remove users ****************/ /*****************************************************************************/ -// If UsrCod > 0 ==> mark her/his groups as checked +// If UsrCod > 0 ==> mark her/his groups as checked // If UsrCod <= 0 ==> do not mark any group as checked static void Grp_ListGrpsToAddOrRemUsrs (struct GroupType *GrpTyp,long UsrCod) { - struct ListCodGrps LstGrpsIBelong; struct ListCodGrps LstGrpsUsrBelongs; unsigned NumGrpThisType; - bool IBelongToThisGroup; bool UsrBelongsToThisGroup; struct Group *Grp; /***** Write heading *****/ Grp_WriteGrpHead (GrpTyp); - /***** Query from the database the groups of this type which I belong to *****/ - Grp_GetLstCodGrpsUsrBelongs (Gbl.CurrentCrs.Crs.CrsCod,GrpTyp->GrpTypCod, - Gbl.Usrs.Me.UsrDat.UsrCod,&LstGrpsIBelong); - - /***** Query from the database the groups of this type which I belong to *****/ + /***** Query the groups of this type which the user belongs to *****/ if (UsrCod > 0) Grp_GetLstCodGrpsUsrBelongs (Gbl.CurrentCrs.Crs.CrsCod,GrpTyp->GrpTypCod, Gbl.Usrs.Other.UsrDat.UsrCod,&LstGrpsUsrBelongs); @@ -2148,7 +2142,6 @@ static void Grp_ListGrpsToAddOrRemUsrs (struct GroupType *GrpTyp,long UsrCod) NumGrpThisType++) { Grp = &(GrpTyp->LstGrps[NumGrpThisType]); - IBelongToThisGroup = Grp_CheckIfGrpIsInList (Grp->GrpCod,&LstGrpsIBelong); UsrBelongsToThisGroup = (UsrCod > 0) ? Grp_CheckIfGrpIsInList (Grp->GrpCod,&LstGrpsUsrBelongs) : false; @@ -2164,10 +2157,8 @@ static void Grp_ListGrpsToAddOrRemUsrs (struct GroupType *GrpTyp,long UsrCod) Grp->GrpCod); if (UsrBelongsToThisGroup) fprintf (Gbl.F.Out," checked=\"checked\""); - if (!(IBelongToThisGroup || - Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)) - fprintf (Gbl.F.Out," disabled=\"disabled\""); - fprintf (Gbl.F.Out," />"); + fprintf (Gbl.F.Out," />" + ""); Grp_WriteRowGrp (Grp,UsrBelongsToThisGroup); @@ -2177,7 +2168,6 @@ static void Grp_ListGrpsToAddOrRemUsrs (struct GroupType *GrpTyp,long UsrCod) /***** Free memory with the lists of groups *****/ if (UsrCod > 0) Grp_FreeListCodGrp (&LstGrpsUsrBelongs); - Grp_FreeListCodGrp (&LstGrpsIBelong); } /*****************************************************************************/