From 90f1ff025b802e5c0ac959d1b04fc2b48f6179d0 Mon Sep 17 00:00:00 2001 From: acanas Date: Tue, 10 Sep 2024 14:08:21 +0200 Subject: [PATCH] Version 23.87.9: Sep 10, 2024 Fixed bug removing student's photo. --- swad_action_list.c | 6 +++--- swad_changelog.h | 6 +++++- swad_group.c | 4 ++-- swad_photo.c | 10 +++++----- swad_photo.h | 2 +- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/swad_action_list.c b/swad_action_list.c index 4459184a2..dacb746d8 100644 --- a/swad_action_list.c +++ b/swad_action_list.c @@ -1332,7 +1332,7 @@ const struct Act_Actions ActLst_Actions[ActLst_NUM_ACTIONS] = [ActPrnRecSevStd ] = { 111, 1,TabUsr,NULL ,Rec_ListRecordsStdsPrint ,{{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{0x200,0x238}},Act_NORM,Act_NEW}, [ActReqMdfOneStd ] = {1415, 1,TabUsr,NULL ,Enr_ReqRegRemStd ,{{ 0, 0},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3F8}},Act_NORM,Act_1ST}, [ActReqMdfStd ] = {1419, 1,TabUsr,NULL ,Enr_AskIfRegRemAnotherStd ,{{ 0, 0},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3F8}},Act_NORM,Act_1ST}, - [ActReqStdPho ] = {1433, 1,TabUsr,NULL ,Pho_SendPhotoUsr ,{{ 0, 0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3E0}},Act_NORM,Act_1ST}, + [ActReqStdPho ] = {1433, 1,TabUsr,NULL ,Pho_ReqPhotoUsr ,{{ 0, 0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3E0}},Act_NORM,Act_1ST}, [ActDetStdPho ] = {1436, 1,TabUsr,NULL ,Pho_RecOtherUsrPhotoDetFaces ,{{ 0, 0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3E0}},Act_DATA,Act_1ST}, [ActChgStdPho ] = {1439, 1,TabUsr,Pho_ChangeUsrPhoto1 ,Pho_ChangeUsrPhoto2 ,{{ 0, 0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3E0}},Act_NORM,Act_1ST}, [ActReqRemStdPho ] = {1575, 1,TabUsr,NULL ,Pho_ReqRemUsrPhoto ,{{ 0, 0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3E0}},Act_NORM,Act_1ST}, @@ -1381,7 +1381,7 @@ const struct Act_Actions ActLst_Actions[ActLst_NUM_ACTIONS] = [ActReqMdfOneTch ] = {1416, 2,TabUsr,NULL ,Enr_ReqRegRemTch ,{{ 0, 0},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3F8}},Act_NORM,Act_1ST}, [ActReqMdfNET ] = {1644, 2,TabUsr,NULL ,Enr_AskIfRegRemAnotherTch ,{{ 0, 0},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3F8}},Act_NORM,Act_1ST}, [ActReqMdfTch ] = {1420, 2,TabUsr,NULL ,Enr_AskIfRegRemAnotherTch ,{{ 0, 0},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3F8}},Act_NORM,Act_1ST}, - [ActReqTchPho ] = {1434, 2,TabUsr,NULL ,Pho_SendPhotoUsr ,{{ 0, 0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3E0}},Act_NORM,Act_1ST}, + [ActReqTchPho ] = {1434, 2,TabUsr,NULL ,Pho_ReqPhotoUsr ,{{ 0, 0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3E0}},Act_NORM,Act_1ST}, [ActDetTchPho ] = {1437, 2,TabUsr,NULL ,Pho_RecOtherUsrPhotoDetFaces ,{{ 0, 0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3E0}},Act_DATA,Act_1ST}, [ActChgTchPho ] = {1440, 2,TabUsr,Pho_ChangeUsrPhoto1 ,Pho_ChangeUsrPhoto2 ,{{ 0, 0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3E0}},Act_NORM,Act_1ST}, [ActReqRemTchPho ] = {1576, 2,TabUsr,NULL ,Pho_ReqRemUsrPhoto ,{{ 0, 0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3E0}},Act_NORM,Act_1ST}, @@ -1436,7 +1436,7 @@ const struct Act_Actions ActLst_Actions[ActLst_NUM_ACTIONS] = [ActPrnRecSevGst ] = {1188, 3,TabUsr,NULL ,Rec_ListRecordsGstsPrint ,{{ 0, 0},{0x200,0x200},{0x200,0x200},{0x200,0x200},{0x200,0x200},{0x200,0x200},{0x200,0x200}},Act_NORM,Act_NEW}, [ActReqMdfOneOth ] = {1414, 3,TabUsr,NULL ,Enr_ReqRegRemOth ,{{ 0, 0},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3F8}},Act_NORM,Act_1ST}, [ActReqMdfOth ] = {1418, 3,TabUsr,NULL ,Enr_AskIfRegRemAnotherOth ,{{ 0, 0},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3C6},{0x3C6,0x3F8}},Act_NORM,Act_1ST}, - [ActReqOthPho ] = {1432, 3,TabUsr,NULL ,Pho_SendPhotoUsr ,{{ 0, 0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3E0}},Act_NORM,Act_1ST}, + [ActReqOthPho ] = {1432, 3,TabUsr,NULL ,Pho_ReqPhotoUsr ,{{ 0, 0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3E0}},Act_NORM,Act_1ST}, [ActDetOthPho ] = {1435, 3,TabUsr,NULL ,Pho_RecOtherUsrPhotoDetFaces ,{{ 0, 0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3E0}},Act_DATA,Act_1ST}, [ActChgOthPho ] = {1438, 3,TabUsr,Pho_ChangeUsrPhoto1 ,Pho_ChangeUsrPhoto2 ,{{ 0, 0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3E0}},Act_NORM,Act_1ST}, [ActReqRemOthPho ] = {1574, 3,TabUsr,NULL ,Pho_ReqRemUsrPhoto ,{{ 0, 0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3C0},{0x3C0,0x3E0}},Act_NORM,Act_1ST}, diff --git a/swad_changelog.h b/swad_changelog.h index 8051a5421..80b96699c 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -633,10 +633,14 @@ Me sale este error, no s "can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod') */ -#define Log_PLATFORM_VERSION "SWAD 23.87.7 (2024-08-29)" +#define Log_PLATFORM_VERSION "SWAD 23.87.9 (2024-09-10)" #define CSS_FILE "swad23.67.2.css" #define JS_FILE "swad23.79.js" /* + * Buscar HTM_DISABLED en swad_group.c y revisar bien!!!!!! + * + Version 23.87.9: Sep 10, 2024 Fixed bug removing student's photo. (335312 lines) + Version 23.87.8: Sep 02, 2024 Fixed bug in groups. (335311 lines) Version 23.87.7: Aug 29, 2024 Fixed bug in record card. Reported by Emilce Barrera Mesa. (335308 lines) Version 23.87.6: Aug 28, 2024 Fixed bugs in timeline and projects. (335307 lines) Version 23.87.5: Jul 23, 2024 Fixed bug in list of projects. (335272 lines) diff --git a/swad_group.c b/swad_group.c index 73100940e..a417b320a 100644 --- a/swad_group.c +++ b/swad_group.c @@ -1965,8 +1965,8 @@ static Usr_Can_t Grp_ListGrpsForChangeMySelection (const struct GroupType *GrpTy "class=\"LM\""); Attributes = (IBelongToThisGroup ? HTM_CHECKED : HTM_NO_ATTR) | - (ICanChangeMySelectionForThisGrp ? HTM_NO_ATTR : - HTM_DISABLED); + ((ICanChangeMySelectionForThisGrp == Usr_CAN) ? HTM_NO_ATTR : + HTM_NO_ATTR); // HTM_DISABLED !!!!!!!!!!!!!!!!! snprintf (StrGrpCod,sizeof (StrGrpCod),"GrpCod%ld",GrpTyp->GrpTypCod); if (Gbl.Usrs.Me.Role.Logged == Rol_STD && // If I am a student !GrpTyp->MultipleEnrolment && // ...and the enrolment is single diff --git a/swad_photo.c b/swad_photo.c index ca6f838cd..66d92f4e3 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -157,8 +157,8 @@ Usr_Can_t Pho_ICanChangeOtherUsrPhoto (struct Usr_Data *UsrDat) /* It's a student in this course, check if he/she has accepted registration */ - return (UsrDat->Accepted = Enr_CheckIfUsrHasAcceptedInCurrentCrs (UsrDat)) ? Usr_CAN : - Usr_CAN_NOT; + return ((UsrDat->Accepted = Enr_CheckIfUsrHasAcceptedInCurrentCrs (UsrDat))) ? Usr_CAN : + Usr_CAN_NOT; case Rol_DEG_ADM: case Rol_CTR_ADM: case Rol_INS_ADM: @@ -341,10 +341,10 @@ static void Pho_ReqPhoto (const struct Usr_Data *UsrDat) } /*****************************************************************************/ -/*********************** Send another user's photograph **********************/ +/**** Request the change (sending or removing) another user's photograph *****/ /*****************************************************************************/ -void Pho_SendPhotoUsr (void) +void Pho_ReqPhotoUsr (void) { /***** Get user whose photo must be sent or removed *****/ if (!Usr_GetParOtherUsrCodEncryptedAndGetUsrData ()) @@ -518,7 +518,7 @@ void Pho_ReqRemUsrPhoto (void) /***** Get password, user type and user's data from database *****/ if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat, Usr_DONT_GET_PREFS, - Usr_DONT_GET_ROLE_IN_CRS)) + Usr_GET_ROLE_IN_CRS)) switch (Pho_ICanChangeOtherUsrPhoto (&Gbl.Usrs.Other.UsrDat)) { case Usr_CAN: diff --git a/swad_photo.h b/swad_photo.h index f1073b748..eaf4b26e8 100644 --- a/swad_photo.h +++ b/swad_photo.h @@ -98,7 +98,7 @@ struct Pho_DegPhotos Usr_Can_t Pho_ICanChangeOtherUsrPhoto (struct Usr_Data *UsrDat); void Pho_PutIconToChangeUsrPhoto (struct Usr_Data *UsrDat); void Pho_ReqMyPhoto (void); -void Pho_SendPhotoUsr (void); +void Pho_ReqPhotoUsr (void); void Pho_RecMyPhotoDetFaces (void); void Pho_RecOtherUsrPhotoDetFaces (void);