diff --git a/swad_action.c b/swad_action.c index e721b8df5..c1d8e56e5 100644 --- a/swad_action.c +++ b/swad_action.c @@ -841,7 +841,7 @@ Assessment: 690. ActChgNumRowFooGrp Change the number of rows of pie of a file of marks in group Users: 691. ActReqSelGrp Request the selection of groups of students - 692. ActLstInv Show class photo or list of guests + 692. ActLstGst Show class photo or list of guests 693. ActLstStd Show class photo or list of students 694. ActSeeAtt Show attendance events 695. ActLstTch Show class photo or list of teachers @@ -875,7 +875,7 @@ Users: 722. ActPrnInvPho Show the class photo of guests ready to be printed 723. ActPrnStdPho Show the class photo of students ready to be printed 724. ActPrnTchPho Show the class photo of teachers ready to be printed - 725. ActLstInvAll List in another window the full data of guests + 725. ActLstGstAll List in another window the full data of guests 726. ActLstStdAll List in another window the full data of students 727. ActLstTchAll List in another window the full data of teachers 728. ActSeeRecOneStd Show record of one selected student @@ -926,7 +926,9 @@ Users: 763c. ActReqMdfStd Request enrollment/removing of a user 763d. ActReqMdfTch Request enrollment/removing of a user 763e. ActReqMdfAdm Request enrollment/removing of a user - 764. ActReqUsrPho Show form to send the photo of another user + 764b. ActReqGstPho Show form to send the photo of another user + 764c. ActReqStdPho Show form to send the photo of another user + 764d. ActReqTchPho Show form to send the photo of another user 765. ActDetUsrPho Receive other user's photo and detect faces on it 766. ActUpdUsrPho Update other user's photo 767. ActRemUsrPho Remove the photo of otro user @@ -1360,7 +1362,7 @@ const struct Act_Menu Act_Menu[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] = { {ActReqSelGrp ,true }, - {ActLstInv ,false}, + {ActLstGst ,false}, {ActLstStd ,false}, {ActSeeAtt ,false}, {ActLstTch ,false}, @@ -2230,7 +2232,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = // TabUsr ****************************************************************** // Actions in menu: /* ActReqSelGrp */{ 116, 0,TabUsr,ActReqSelGrp ,0x118,0x100,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Grp_ReqRegisterInGrps ,"mygroups" }, - /* ActLstInv */{1186, 1,TabUsr,ActLstInv ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Usr_SeeGuests ,"usrs" }, + /* ActLstGst */{1186, 1,TabUsr,ActLstGst ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Usr_SeeGuests ,"usrs" }, /* ActLstStd */{ 678, 2,TabUsr,ActLstStd ,0x1F8,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Usr_SeeStudents ,"usrs" }, /* ActSeeAtt */{ 861, 3,TabUsr,ActSeeAtt ,0x118,0x100,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Att_SeeAttEvents ,"rollcall" }, /* ActLstTch */{ 679, 4,TabUsr,ActLstTch ,0x1FF,0x1FF,0x1FF,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Usr_SeeTeachers ,"tch" }, @@ -2268,16 +2270,16 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActPrnInvPho */{1190,-1,TabUsr,ActLstStd ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_NEW_WINDOW ,NULL ,Usr_SeeGstClassPhotoPrn ,NULL}, /* ActPrnStdPho */{ 120,-1,TabUsr,ActLstStd ,0x1F8,0x1E0,0x1E0,Act_CONTENT_NORM,Act_NEW_WINDOW ,NULL ,Usr_SeeStdClassPhotoPrn ,NULL}, /* ActPrnTchPho */{ 443,-1,TabUsr,ActLstTch ,0x1FF,0x1FF,0x1FF,Act_CONTENT_NORM,Act_NEW_WINDOW ,NULL ,Usr_SeeTchClassPhotoPrn ,NULL}, - /* ActLstInvAll */{1189,-1,TabUsr,ActLstInv ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_NEW_WINDOW ,NULL ,Usr_ListAllDataGsts ,NULL}, + /* ActLstGstAll */{1189,-1,TabUsr,ActLstGst ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_NEW_WINDOW ,NULL ,Usr_ListAllDataGsts ,NULL}, /* ActLstStdAll */{ 42,-1,TabUsr,ActLstStd ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_NEW_WINDOW ,NULL ,Usr_ListAllDataStds ,NULL}, /* ActLstTchAll */{ 578,-1,TabUsr,ActLstTch ,0x1F0,0x1F0,0x1E0,Act_CONTENT_NORM,Act_NEW_WINDOW ,NULL ,Usr_ListAllDataTchs ,NULL}, /* ActSeeRecOneStd */{1174,-1,TabUsr,ActLstStd ,0x118,0x100,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Rec_GetUsrAndShowRecordOneStdCrs,NULL}, /* ActSeeRecOneTch */{1175,-1,TabUsr,ActLstTch ,0x1FE,0x1FE,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Rec_GetUsrAndShowRecordOneTchCrs,NULL}, - /* ActSeeRecSevInv */{1187,-1,TabUsr,ActLstInv ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Rec_ListRecordsInvs ,NULL}, + /* ActSeeRecSevInv */{1187,-1,TabUsr,ActLstGst ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Rec_ListRecordsInvs ,NULL}, /* ActSeeRecSevStd */{ 89,-1,TabUsr,ActLstStd ,0x118,0x100,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Rec_ListRecordsStdsCrs ,NULL}, /* ActSeeRecSevTch */{ 22,-1,TabUsr,ActLstTch ,0x1FF,0x1FF,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Rec_ListRecordsTchsCrs ,NULL}, - /* ActPrnRecSevInv */{1188,-1,TabUsr,ActLstInv ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_NEW_WINDOW ,NULL ,Rec_ListRecordsInvs ,NULL}, + /* ActPrnRecSevInv */{1188,-1,TabUsr,ActLstGst ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_NEW_WINDOW ,NULL ,Rec_ListRecordsInvs ,NULL}, /* ActPrnRecSevStd */{ 111,-1,TabUsr,ActLstStd ,0x118,0x100,0x000,Act_CONTENT_NORM,Act_NEW_WINDOW ,NULL ,Rec_ListRecordsStdsCrs ,NULL}, /* ActPrnRecSevTch */{ 127,-1,TabUsr,ActLstTch ,0x1FF,0x1FF,0x000,Act_CONTENT_NORM,Act_NEW_WINDOW ,NULL ,Rec_ListRecordsTchsCrs ,NULL}, @@ -2313,23 +2315,26 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActReqRejSignUp */{1058,-1,TabUsr,ActSeeSignUpReq ,0x1F0,0x1F0,0x1F0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_AskIfRejectSignUp ,NULL}, /* ActRejSignUp */{1059,-1,TabUsr,ActSeeSignUpReq ,0x1F0,0x1F0,0x1F0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_RejectSignUp ,NULL}, - /* ActReqMdfOneGst */{1414,-1,TabUsr,ActLstInv ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReqRegRemGst ,NULL}, + /* ActReqMdfOneGst */{1414,-1,TabUsr,ActLstGst ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReqRegRemGst ,NULL}, /* ActReqMdfOneStd */{1415,-1,TabUsr,ActLstStd ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReqRegRemStd ,NULL}, /* ActReqMdfOneTch */{1416,-1,TabUsr,ActLstTch ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReqRegRemTch ,NULL}, /* ActReqMdfOneAdm */{1417,-1,TabUsr,ActLstAdm ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReqRegRemAdm ,NULL}, - /* ActReqMdfUsr */{1418,-1,TabUsr,ActLstInv ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_AskIfRegRemAnotherGst ,NULL}, + /* ActReqMdfUsr */{1418,-1,TabUsr,ActLstGst ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_AskIfRegRemAnotherGst ,NULL}, /* ActReqMdfUsr */{1419,-1,TabUsr,ActLstStd ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_AskIfRegRemAnotherStd ,NULL}, /* ActReqMdfUsr */{1420,-1,TabUsr,ActLstTch ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_AskIfRegRemAnotherTch ,NULL}, /* ActReqMdfUsr */{1421,-1,TabUsr,ActLstAdm ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_AskIfRegRemAnotherAdm ,NULL}, - /* ActReqUsrPho */{ 375,-1,TabUsr,ActLstStd ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pho_SendPhotoUsr ,NULL}, + /* ActReqGstPho */{1432,-1,TabUsr,ActLstGst ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pho_SendPhotoUsr ,NULL}, + /* ActReqStdPho */{1433,-1,TabUsr,ActLstStd ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pho_SendPhotoUsr ,NULL}, + /* ActReqTchPho */{1434,-1,TabUsr,ActLstTch ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pho_SendPhotoUsr ,NULL}, + /* ActDetUsrPho */{ 695,-1,TabUsr,ActLstStd ,0x1F0,0x1E0,0x1E0,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,Pho_RecUsrPhotoDetFaces ,NULL}, /* ActUpdUsrPho */{ 374,-1,TabUsr,ActLstStd ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,Pho_UpdateUsrPhoto1 ,Pho_UpdateUsrPhoto2 ,NULL}, /* ActRemUsrPho */{ 429,-1,TabUsr,ActLstStd ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pho_RemoveUsrPhoto ,NULL}, /* ActCreOthUsrDat */{ 440,-1,TabUsr,ActLstStd ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_CreateNewUsr ,NULL}, - /* ActUpdOthGst */{1422,-1,TabUsr,ActLstInv ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ModifyUsr ,NULL}, + /* ActUpdOthGst */{1422,-1,TabUsr,ActLstGst ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ModifyUsr ,NULL}, /* ActUpdOthStd */{1423,-1,TabUsr,ActLstStd ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ModifyUsr ,NULL}, /* ActUpdOthTch */{1424,-1,TabUsr,ActLstTch ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ModifyUsr ,NULL}, /* ActUpdOthAdm */{1425,-1,TabUsr,ActLstAdm ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ModifyUsr ,NULL}, @@ -2362,8 +2367,8 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActReqRemAllStdCrs*/{ 88,-1,TabUsr,ActLstStd ,0x110,0x100,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_AskRemAllStdsThisCrs ,NULL}, /* ActRemAllStdCrs */{ 87,-1,TabUsr,ActLstStd ,0x110,0x100,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_RemAllStdsThisCrs ,NULL}, - /* ActReqRemOldUsr */{ 590,-1,TabUsr,ActLstStd ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_AskRemoveOldUsrs ,NULL}, - /* ActRemOldUsr */{ 773,-1,TabUsr,ActLstStd ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_RemoveOldUsrs ,NULL}, + /* ActReqRemOldUsr */{ 590,-1,TabUsr,ActLstGst ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_AskRemoveOldUsrs ,NULL}, + /* ActRemOldUsr */{ 773,-1,TabUsr,ActLstGst ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_RemoveOldUsrs ,NULL}, /* ActSeePubPrf */{1402,-1,TabUsr,ActReqPubPrf ,0x1FF,0x1FF,0x1FF,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Prf_GetUsrCodAndShowUserProfile,NULL}, /* ActCal1stClkTim */{1405,-1,TabUsr,ActReqPubPrf ,0x1FF,0x1FF,0x1FF,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Prf_CalculateFirstClickTime ,NULL}, @@ -3080,7 +3085,7 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq ActEditorSylLec, // #372 -1, // #373 (obsolete action) ActUpdUsrPho, // #374 - ActReqUsrPho, // #375 + -1, // #375 (obsolete action) ActEditorBib, // #376 ActPlaTxtEdiBib, // #377 ActSelInfSrcSylLec, // #378 @@ -3891,10 +3896,10 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq ActCtrSch, // #1183 ActDegSch, // #1184 ActCrsSch, // #1185 - ActLstInv, // #1186 + ActLstGst, // #1186 ActSeeRecSevInv, // #1187 ActPrnRecSevInv, // #1188 - ActLstInvAll, // #1189 + ActLstGstAll, // #1189 ActPrnInvPho, // #1190 ActShoMrkCrs, // #1191 ActHidMrkCrs, // #1192 @@ -4140,6 +4145,9 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq ActRcvFrmEnrSevTch, // #1429 ActReqRemMyAcc, // #1430 ActRemMyAcc, // #1431 + ActReqGstPho, // #1432 + ActReqStdPho, // #1433 + ActReqTchPho, // #1434 }; /*****************************************************************************/ diff --git a/swad_action.h b/swad_action.h index f3a43bba3..6880340ad 100644 --- a/swad_action.h +++ b/swad_action.h @@ -69,9 +69,9 @@ typedef enum typedef int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action -#define Act_NUM_ACTIONS (7+52+15+90+73+68+204+182+121+168+28+79) +#define Act_NUM_ACTIONS (7+52+15+90+73+68+204+182+123+168+28+79) -#define Act_MAX_ACTION_COD 1431 +#define Act_MAX_ACTION_COD 1434 #define Act_MAX_OPTIONS_IN_MENU_PER_TAB 20 @@ -866,7 +866,7 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica /*****************************************************************************/ // Actions in menu #define ActReqSelGrp (ActChgNumRowFooGrp+ 1) -#define ActLstInv (ActChgNumRowFooGrp+ 2) +#define ActLstGst (ActChgNumRowFooGrp+ 2) #define ActLstStd (ActChgNumRowFooGrp+ 3) #define ActSeeAtt (ActChgNumRowFooGrp+ 4) #define ActLstTch (ActChgNumRowFooGrp+ 5) @@ -901,7 +901,7 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica #define ActPrnInvPho (ActChgNumRowFooGrp+ 31) #define ActPrnStdPho (ActChgNumRowFooGrp+ 32) #define ActPrnTchPho (ActChgNumRowFooGrp+ 33) -#define ActLstInvAll (ActChgNumRowFooGrp+ 34) +#define ActLstGstAll (ActChgNumRowFooGrp+ 34) #define ActLstStdAll (ActChgNumRowFooGrp+ 35) #define ActLstTchAll (ActChgNumRowFooGrp+ 36) #define ActSeeRecOneStd (ActChgNumRowFooGrp+ 37) @@ -954,55 +954,57 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica #define ActReqMdfTch (ActChgNumRowFooGrp+ 79) #define ActReqMdfAdm (ActChgNumRowFooGrp+ 80) -#define ActReqUsrPho (ActChgNumRowFooGrp+ 81) -#define ActDetUsrPho (ActChgNumRowFooGrp+ 82) -#define ActUpdUsrPho (ActChgNumRowFooGrp+ 83) -#define ActRemUsrPho (ActChgNumRowFooGrp+ 84) -#define ActCreOthUsrDat (ActChgNumRowFooGrp+ 85) -#define ActUpdOthGst (ActChgNumRowFooGrp+ 86) -#define ActUpdOthStd (ActChgNumRowFooGrp+ 87) -#define ActUpdOthTch (ActChgNumRowFooGrp+ 88) -#define ActUpdOthAdm (ActChgNumRowFooGrp+ 89) +#define ActReqGstPho (ActChgNumRowFooGrp+ 81) +#define ActReqStdPho (ActChgNumRowFooGrp+ 82) +#define ActReqTchPho (ActChgNumRowFooGrp+ 83) +#define ActDetUsrPho (ActChgNumRowFooGrp+ 84) +#define ActUpdUsrPho (ActChgNumRowFooGrp+ 85) +#define ActRemUsrPho (ActChgNumRowFooGrp+ 86) +#define ActCreOthUsrDat (ActChgNumRowFooGrp+ 87) +#define ActUpdOthGst (ActChgNumRowFooGrp+ 88) +#define ActUpdOthStd (ActChgNumRowFooGrp+ 89) +#define ActUpdOthTch (ActChgNumRowFooGrp+ 90) +#define ActUpdOthAdm (ActChgNumRowFooGrp+ 91) -#define ActReqAccEnrCrs (ActChgNumRowFooGrp+ 90) -#define ActAccEnrCrs (ActChgNumRowFooGrp+ 91) -#define ActRemMeCrs (ActChgNumRowFooGrp+ 92) +#define ActReqAccEnrCrs (ActChgNumRowFooGrp+ 92) +#define ActAccEnrCrs (ActChgNumRowFooGrp+ 93) +#define ActRemMeCrs (ActChgNumRowFooGrp+ 94) -#define ActNewAdmIns (ActChgNumRowFooGrp+ 93) -#define ActRemAdmIns (ActChgNumRowFooGrp+ 94) -#define ActNewAdmCtr (ActChgNumRowFooGrp+ 95) -#define ActRemAdmCtr (ActChgNumRowFooGrp+ 96) -#define ActNewAdmDeg (ActChgNumRowFooGrp+ 97) -#define ActRemAdmDeg (ActChgNumRowFooGrp+ 98) +#define ActNewAdmIns (ActChgNumRowFooGrp+ 95) +#define ActRemAdmIns (ActChgNumRowFooGrp+ 96) +#define ActNewAdmCtr (ActChgNumRowFooGrp+ 97) +#define ActRemAdmCtr (ActChgNumRowFooGrp+ 98) +#define ActNewAdmDeg (ActChgNumRowFooGrp+ 99) +#define ActRemAdmDeg (ActChgNumRowFooGrp+100) -#define ActRcvFrmEnrSevStd (ActChgNumRowFooGrp+ 99) -#define ActRcvFrmEnrSevTch (ActChgNumRowFooGrp+100) +#define ActRcvFrmEnrSevStd (ActChgNumRowFooGrp+101) +#define ActRcvFrmEnrSevTch (ActChgNumRowFooGrp+102) -#define ActFrmIDsOthUsr (ActChgNumRowFooGrp+101) -#define ActRemIDOth (ActChgNumRowFooGrp+102) -#define ActNewIDOth (ActChgNumRowFooGrp+103) -#define ActFrmPwdOthUsr (ActChgNumRowFooGrp+104) -#define ActChgPwdOthUsr (ActChgNumRowFooGrp+105) -#define ActRemUsrCrs (ActChgNumRowFooGrp+106) -#define ActRemUsrGbl (ActChgNumRowFooGrp+107) +#define ActFrmIDsOthUsr (ActChgNumRowFooGrp+103) +#define ActRemIDOth (ActChgNumRowFooGrp+104) +#define ActNewIDOth (ActChgNumRowFooGrp+105) +#define ActFrmPwdOthUsr (ActChgNumRowFooGrp+106) +#define ActChgPwdOthUsr (ActChgNumRowFooGrp+107) +#define ActRemUsrCrs (ActChgNumRowFooGrp+108) +#define ActRemUsrGbl (ActChgNumRowFooGrp+109) -#define ActReqRemAllStdCrs (ActChgNumRowFooGrp+108) -#define ActRemAllStdCrs (ActChgNumRowFooGrp+109) +#define ActReqRemAllStdCrs (ActChgNumRowFooGrp+110) +#define ActRemAllStdCrs (ActChgNumRowFooGrp+111) -#define ActReqRemOldUsr (ActChgNumRowFooGrp+110) -#define ActRemOldUsr (ActChgNumRowFooGrp+111) +#define ActReqRemOldUsr (ActChgNumRowFooGrp+112) +#define ActRemOldUsr (ActChgNumRowFooGrp+113) -#define ActSeePubPrf (ActChgNumRowFooGrp+112) -#define ActCal1stClkTim (ActChgNumRowFooGrp+113) -#define ActCalNumClk (ActChgNumRowFooGrp+114) -#define ActCalNumFilVie (ActChgNumRowFooGrp+115) -#define ActCalNumForPst (ActChgNumRowFooGrp+116) -#define ActCalNumMsgSnt (ActChgNumRowFooGrp+117) +#define ActSeePubPrf (ActChgNumRowFooGrp+114) +#define ActCal1stClkTim (ActChgNumRowFooGrp+115) +#define ActCalNumClk (ActChgNumRowFooGrp+116) +#define ActCalNumFilVie (ActChgNumRowFooGrp+117) +#define ActCalNumForPst (ActChgNumRowFooGrp+118) +#define ActCalNumMsgSnt (ActChgNumRowFooGrp+119) -#define ActFolUsr (ActChgNumRowFooGrp+118) -#define ActUnfUsr (ActChgNumRowFooGrp+119) -#define ActSeeFlg (ActChgNumRowFooGrp+120) -#define ActSeeFlr (ActChgNumRowFooGrp+121) +#define ActFolUsr (ActChgNumRowFooGrp+120) +#define ActUnfUsr (ActChgNumRowFooGrp+121) +#define ActSeeFlg (ActChgNumRowFooGrp+122) +#define ActSeeFlr (ActChgNumRowFooGrp+123) /*****************************************************************************/ /******************************* Messages tab ********************************/ diff --git a/swad_changelog.h b/swad_changelog.h index b08e8cb55..d7d264779 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -98,11 +98,18 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.131.1 (2015/09/16)" +#define Log_PLATFORM_VERSION "SWAD 14.132 (2015/09/16)" // 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 14.132: Sep 16, 2015 Changes in user enrollment. (184416 lines) + 4 changes necessary in database: +UPDATE actions SET Obsolete='Y' WHERE ActCod='375'; +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1432','es','N','Solicitar cambio foto otro usr.'); +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1433','es','N','Solicitar cambio foto estudiante'); +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1434','es','N','Solicitar cambio foto profesor'); + Version 14.131.1: Sep 16, 2015 Changes in user enrollment. (184403 lines) Version 14.131: Sep 15, 2015 Changes in user enrollment. (184408 lines) 2 changes necessary in database: diff --git a/swad_enrollment.c b/swad_enrollment.c index f6cf6310d..625f8de10 100644 --- a/swad_enrollment.c +++ b/swad_enrollment.c @@ -506,24 +506,16 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role) extern const char *Txt_No_groups_have_been_created_in_the_course_X_Therefore_; extern const char *Txt_Step_4_Confirm_the_enrollment_removing; extern const char *Txt_Confirm; - bool PutFormRemAllStdsThisCrs = (Role == Rol_STUDENT && - Gbl.CurrentCrs.Crs.CrsCod > 0); // Course selected - bool PutFormRemOldUsrs = (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM); bool ExternalUsrsServiceAvailable = (Cfg_EXTERNAL_LOGIN_CLIENT_COMMAND[0] != '\0'); /***** Put contextual links *****/ - if (PutFormRemAllStdsThisCrs || - PutFormRemOldUsrs) + if (Role == Rol_STUDENT && + Gbl.CurrentCrs.Crs.CrsCod > 0) // Course selected { fprintf (Gbl.F.Out,"
"); /* Put link to remove all the students in the current course */ - if (PutFormRemAllStdsThisCrs) - Enr_PutLinkToRemAllStdsThisCrs (); - - /* Put link to remove old users */ - if (PutFormRemOldUsrs) - Enr_PutLinkToRemOldUsrs (); + Enr_PutLinkToRemAllStdsThisCrs (); fprintf (Gbl.F.Out,"
"); } @@ -2839,7 +2831,7 @@ static void Enr_ShowFormToEditOtherUsr (void) ID_PutLinkToChangeUsrIDs (); // Put link (form) to change user's IDs Pwd_PutLinkToChangeOtherUsrPassword (); // Put link (form) to change user's password } - Pho_PutLinkToChangeOtherUsrPhoto (); // Put link (form) to change user's photo + Pho_PutLinkToChangeOtherUsrPhoto (); // Put link (form) to change user's photo fprintf (Gbl.F.Out,""); /***** User's record *****/ diff --git a/swad_photo.c b/swad_photo.c index 62751eeaf..7d733720e 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -123,20 +123,29 @@ static void Pho_ComputePhotoSize (int NumStds,int NumStdsWithPhoto,unsigned *Pho /************** Check if I can change the photo of another user **************/ /*****************************************************************************/ -bool Pho_CheckIfICanChangeOtherUsrPhoto (long UsrCod) +bool Pho_CheckIfICanChangeOtherUsrPhoto (const struct UsrData *UsrDat) { - if (UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me + if (UsrDat->UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me return true; /* Check if I have permission to change user's photo */ switch (Gbl.Usrs.Me.LoggedRole) { case Rol_TEACHER: - return Usr_CheckIfUsrBelongsToCrs (UsrCod,Gbl.CurrentCrs.Crs.CrsCod); + /* If I am a teacher in current course, + I only can change the photo of confirmed students or teachers from current course */ + return UsrDat->Accepted; case Rol_DEG_ADM: /* If I am an administrator of current degree, I only can change the photo of users from current degree */ - return Usr_CheckIfUsrBelongsToDeg (UsrCod,Gbl.CurrentDeg.Deg.DegCod); + return Usr_CheckIfUsrBelongsToDeg (UsrDat->UsrCod,Gbl.CurrentDeg.Deg.DegCod); + // TODO: Only confirmed users? + case Rol_CTR_ADM: + // TODO: Implement + return false; + case Rol_INS_ADM: + // TODO: Implement + return false; case Rol_SYS_ADM: return true; default: @@ -173,11 +182,14 @@ void Pho_PutLinkToChangeOtherUsrPhoto (void) /***** Link for changing / uploading the photo *****/ if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me Pho_PutLinkToChangeMyPhoto (); - else // Not me - if (Pho_CheckIfICanChangeOtherUsrPhoto (Gbl.Usrs.Other.UsrDat.UsrCod)) + else // Not me + if (Pho_CheckIfICanChangeOtherUsrPhoto (&Gbl.Usrs.Other.UsrDat)) { PhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,true); - Act_PutContextualLink (ActReqUsrPho,Usr_PutParamOtherUsrCodEncrypted, + Act_PutContextualLink ( Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? ActReqStdPho : + (Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_TEACHER ? ActReqTchPho : + ActReqGstPho), // Guest, visitor or admin + Usr_PutParamOtherUsrCodEncrypted, "photo",PhotoExists ? Txt_Change_photo : Txt_Upload_photo); } @@ -316,16 +328,10 @@ void Pho_SendPhotoUsr (void) /***** Get user whose photo must be sent or removed *****/ if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ()) { - if (Pho_CheckIfICanChangeOtherUsrPhoto (Gbl.Usrs.Other.UsrDat.UsrCod)) // If I have permission to change user's photo... + if (Pho_CheckIfICanChangeOtherUsrPhoto (&Gbl.Usrs.Other.UsrDat)) // If I have permission to change user's photo... { - /* Check if uploading the other user's photo is allowed */ - if (Gbl.Usrs.Me.LoggedRole > Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB) - { - Gbl.Usrs.Other.UsrDat.Accepted = Usr_GetIfUserHasAcceptedEnrollmentInCurrentCrs (Gbl.Usrs.Other.UsrDat.UsrCod); - Pho_ReqUsrPhoto (&Gbl.Usrs.Other.UsrDat); // Request user's photograph - } - else - Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); + Gbl.Usrs.Other.UsrDat.Accepted = Usr_GetIfUserHasAcceptedEnrollmentInCurrentCrs (Gbl.Usrs.Other.UsrDat.UsrCod); + Pho_ReqUsrPhoto (&Gbl.Usrs.Other.UsrDat); // Request user's photograph } else Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); @@ -427,16 +433,16 @@ void Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *UsrDat) char PathPhotosPubl[PATH_MAX+1]; char PathPhotosTmpPubl[PATH_MAX+1]; char FileNamePhotoSrc[PATH_MAX+1]; - char FileNamePhotoTmp[PATH_MAX+1]; // Full name (including path and .jpg) of the destination temporary file - char FileNamePhotoMap[PATH_MAX+1]; // Full name (including path) of the temporary file with the original image with faces - char FileNameTxtMap[PATH_MAX+1]; // Full name (including path) of the temporary file with the text neccesary to make the image map + char FileNamePhotoTmp[PATH_MAX+1]; // Full name (including path and .jpg) of the destination temporary file + char FileNamePhotoMap[PATH_MAX+1]; // Full name (including path) of the temporary file with the original image with faces + char FileNameTxtMap[PATH_MAX+1]; // Full name (including path) of the temporary file with the text neccesary to make the image map char PathRelPhoto[PATH_MAX+1]; - FILE *FileTxtMap = NULL; // Temporary file with the text neccesary to make the image map. Initialized to avoid warning + FILE *FileTxtMap = NULL; // Temporary file with the text neccesary to make the image map. Initialized to avoid warning char MIMEType[Brw_MAX_BYTES_MIME_TYPE+1]; bool WrongType = false; - char Command[256+PATH_MAX]; // Command to call the program of preprocessing of photos + char Command[256+PATH_MAX]; // Command to call the program of preprocessing of photos int ReturnCode; - int NumLastForm = 0; // Initialized to avoid warning + int NumLastForm = 0; // Initialized to avoid warning char FormId[32]; unsigned NumFacesTotal = 0; unsigned NumFacesGreen = 0; diff --git a/swad_photo.h b/swad_photo.h index 1e472b44e..bfac4a824 100644 --- a/swad_photo.h +++ b/swad_photo.h @@ -80,7 +80,7 @@ typedef enum /***************************** Public prototypes *****************************/ /*****************************************************************************/ -bool Pho_CheckIfICanChangeOtherUsrPhoto (long UsrCod); +bool Pho_CheckIfICanChangeOtherUsrPhoto (const struct UsrData *UsrDat); void Pho_PutLinkToChangeMyPhoto (void); void Pho_PutLinkToChangeOtherUsrPhoto (void); void Pho_ReqMyPhoto (void); diff --git a/swad_text.c b/swad_text.c index 80006891a..5c0ced91c 100644 --- a/swad_text.c +++ b/swad_text.c @@ -17573,7 +17573,7 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] = "Grupos" #endif , - // ActLstInv + // ActLstGst #if L==0 "Convidats" #elif L==1 @@ -19522,7 +19522,7 @@ const char *Txt_MENU_SUBTITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] = "Grupos" #endif , - // ActLstInv + // ActLstGst #if L==0 "Llistat i fitxes dels convidats" #elif L==1 diff --git a/swad_user.c b/swad_user.c index cd12167e6..37cd39148 100644 --- a/swad_user.c +++ b/swad_user.c @@ -4788,7 +4788,7 @@ void Usr_PutExtraParamsUsrList (Act_Action_t NextAction) { switch (Gbl.CurrentAct) { - case ActLstInv: + case ActLstGst: case ActLstStd: case ActLstTch: Sco_PutParamScope (Gbl.Scope.Current); @@ -6305,7 +6305,7 @@ void Usr_SeeGuests (void) /***** Form to select range of guests *****/ fprintf (Gbl.F.Out,"
", The_ClassForm[Gbl.Prefs.Theme]); - Act_FormStart (ActLstInv); + Act_FormStart (ActLstGst); Usr_PutParamUsrListType (Gbl.Usrs.Me.ListType); Usr_PutParamColsClassPhoto (); Usr_PutParamListWithPhotos (); @@ -6319,7 +6319,7 @@ void Usr_SeeGuests (void) } /***** Form to select type of list of users *****/ - Usr_ShowFormsToSelectUsrListType (ActLstInv); + Usr_ShowFormsToSelectUsrListType (ActLstGst); /***** Get and order list of students in current scope *****/ Usr_GetGstsLst (Gbl.Scope.Current); @@ -6341,7 +6341,7 @@ void Usr_SeeGuests (void) break; case Usr_LIST: /****** Link to show all the data ******/ - Act_PutContextualLink (ActLstInvAll,Usr_PutLinkToShowGuestsAllDataParams, + Act_PutContextualLink (ActLstGstAll,Usr_PutLinkToShowGuestsAllDataParams, "table",Txt_Show_all_data); break; } @@ -6395,7 +6395,7 @@ void Usr_SeeGuests (void) static void Usr_PutLinkToShowGuestsAllDataParams (void) { Usr_PutParamListWithPhotos (); - Usr_PutExtraParamsUsrList (ActLstInvAll); + Usr_PutExtraParamsUsrList (ActLstGstAll); } static void Usr_PutLinkToShowStdsAllDataParams (void)