From 3d325bf2b7b8f49cc25db5adfca144f6cbcea4f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Tue, 30 May 2017 17:34:49 +0200 Subject: [PATCH] Version 16.228.2 --- swad_changelog.h | 3 ++- swad_duplicate.c | 4 ++-- swad_user.c | 46 +++++++++++++++++++++++++--------------------- swad_user.h | 3 +-- 4 files changed, 30 insertions(+), 26 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 554bb3e9c..3f25299b0 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -231,13 +231,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.228.1 (2017-05-30)" +#define Log_PLATFORM_VERSION "SWAD 16.228.2 (2017-05-30)" #define CSS_FILE "swad16.226.css" #define JS_FILE "swad16.206.3.js" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1 /* + Version 16.228.2: May 30, 2017 Fixed bug in selection of users. (220726 lines) Version 16.228.1: May 30, 2017 By default, photos are displayed in listing of users. (220722 lines) Version 16.228: May 30, 2017 Non-editing teachers can not change their selection of groups. Removed alert with origin of copy when pasting. (220722 lines) diff --git a/swad_duplicate.c b/swad_duplicate.c index 4d45cd503..f4c33ac28 100644 --- a/swad_duplicate.c +++ b/swad_duplicate.c @@ -183,7 +183,7 @@ void Dup_ListDuplicateUsrs (void) UsrDat.Accepted = false; /* Write data of this user */ - Usr_WriteRowUsrMainData (NumUsrs - NumUsr,&UsrDat,false); + Usr_WriteRowUsrMainData (NumUsrs - NumUsr,&UsrDat,false,Rol_UNK); fprintf (Gbl.F.Out,"" "" @@ -315,7 +315,7 @@ static void Dup_ListSimilarUsrs (void) UsrDat.Accepted = false; /* Write data of this user */ - Usr_WriteRowUsrMainData (NumUsrs - NumUsr,&UsrDat,false); + Usr_WriteRowUsrMainData (NumUsrs - NumUsr,&UsrDat,false,Rol_UNK); fprintf (Gbl.F.Out,"" "" diff --git a/swad_user.c b/swad_user.c index f2af9b248..c5669ecc7 100644 --- a/swad_user.c +++ b/swad_user.c @@ -110,7 +110,7 @@ static const char *Usr_ParamUsrCod[Rol_NUM_ROLES] = { "UsrCodAll", // Rol_UNK (here means all users) "UsrCodGst", // Rol_GST - NULL, // Rol_USR + NULL, // Rol_USR "UsrCodStd", // Rol_STD "UsrCodNET", // Rol_NET "UsrCodTch", // Rol_TCH @@ -195,12 +195,15 @@ static void Usr_FormToSelectUsrListType (Act_Action_t NextAction,Usr_ShowUsrsTyp static Usr_Sex_t Usr_GetSexOfUsrsLst (Rol_Role_t Role); -static void Usr_PutCheckboxToSelectUser (struct UsrData *UsrDat,bool UsrIsTheMsgSender); +static void Usr_PutCheckboxToSelectUser (Rol_Role_t Role, + const char *EncryptedUsrCod, + bool UsrIsTheMsgSender); static void Usr_PutCheckboxListWithPhotos (void); static void Usr_ListMainDataGsts (bool PutCheckBoxToSelectUsr); static void Usr_ListMainDataStds (bool PutCheckBoxToSelectUsr); static void Usr_ListMainDataTchs (Rol_Role_t Role,bool PutCheckBoxToSelectUsr); +static void Usr_ListUsrsForSelection (Rol_Role_t Role); static void Usr_ListRowsAllDataTchs (Rol_Role_t Role, const char *FieldNames[Usr_NUM_ALL_FIELDS_DATA_TCH], unsigned NumColumns); @@ -3202,7 +3205,7 @@ static void Usr_InsertMyLastData (void) #define Usr_MAX_BYTES_BG_COLOR (16 - 1) void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat, - bool PutCheckBoxToSelectUsr) + bool PutCheckBoxToSelectUsr,Rol_Role_t Role) { extern const char *Txt_Enrolment_confirmed; extern const char *Txt_Enrolment_not_confirmed; @@ -3227,7 +3230,7 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat, if (PutCheckBoxToSelectUsr) { fprintf (Gbl.F.Out,"",BgColor); - Usr_PutCheckboxToSelectUser (UsrDat,UsrIsTheMsgSender); + Usr_PutCheckboxToSelectUser (Role,UsrDat->EncryptedUsrCod,UsrIsTheMsgSender); fprintf (Gbl.F.Out,""); } @@ -5732,8 +5735,7 @@ void Usr_PutCheckboxToSelectAllUsers (Rol_Role_t Role) "" "