Version 15.225

This commit is contained in:
Antonio Cañas Vargas 2016-06-14 19:26:13 +02:00
parent 00df4de197
commit 5d584f8fad
6 changed files with 325 additions and 147 deletions

View File

@ -984,9 +984,12 @@ Users:
821. ActUpdOthPho Update other user's photo
822. ActUpdStdPho Update other user's photo
823. ActUpdTchPho Update other user's photo
NEW. ActRemOthPho Request the removal of other user's photo
NEW. ActRemStdPho Request the removal of student's photo
NEW. ActRemTchPho Request the removal of teacher's photo
824. ActRemOthPho Remove other user's photo
825. ActRemStdPho Remove other user's photo
826. ActRemTchPho Remove other user's photo
825. ActRemStdPho Remove student's photo
826. ActRemTchPho Remove teacher's photo
827. ActCreOth Create a new user
828. ActCreStd Create a new user
829. ActCreTch Create a new user
@ -1338,6 +1341,7 @@ Profile:
1150. ActReqMyPho Show form to send my photo
1151. ActDetMyPho Receive my photo and detect faces on it
1152. ActUpdMyPho Update my photo
NEW. ActReqRemMyPho Request the removal of my photo
1153. ActRemMyPho Remove my photo
1154. ActEdiPri Edit my privacy
@ -2366,6 +2370,9 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActUpdStdPho */{1439,-1,TabUsr,ActLstStd ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,Pho_UpdateUsrPhoto1 ,Pho_UpdateUsrPhoto2 ,NULL},
/* ActUpdTchPho */{1440,-1,TabUsr,ActLstTch ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,Pho_UpdateUsrPhoto1 ,Pho_UpdateUsrPhoto2 ,NULL},
/* ActRemOthPho */{1574,-1,TabUsr,ActLstOth ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pho_ReqRemoveUsrPhoto ,NULL},
/* ActRemStdPho */{1575,-1,TabUsr,ActLstStd ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pho_ReqRemoveUsrPhoto ,NULL},
/* ActRemTchPho */{1576,-1,TabUsr,ActLstTch ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pho_ReqRemoveUsrPhoto ,NULL},
/* ActRemOthPho */{1441,-1,TabUsr,ActLstOth ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pho_RemoveUsrPhoto ,NULL},
/* ActRemStdPho */{1442,-1,TabUsr,ActLstStd ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pho_RemoveUsrPhoto ,NULL},
/* ActRemTchPho */{1443,-1,TabUsr,ActLstTch ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pho_RemoveUsrPhoto ,NULL},
@ -2759,9 +2766,10 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActChgMyData */{ 298,-1,TabPrf,ActReqEdiRecCom ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Rec_UpdateMyRecord ,Rec_ShowMyCommonRecordUpd ,NULL},
/* ActReqMyPho */{ 30,-1,TabPrf,ActReqEdiRecCom ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pho_ReqMyPhotoWithContextualLinks ,NULL},
/* ActReqMyPho */{ 30,-1,TabPrf,ActReqEdiRecCom ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pho_ReqMyPhotoWithContextLinks ,NULL},
/* ActDetMyPho */{ 693,-1,TabPrf,ActReqEdiRecCom ,0x1FE,0x1FE,0x1FE,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,Pho_RecMyPhotoDetFaces ,NULL},
/* ActUpdMyPho */{ 694,-1,TabPrf,ActReqEdiRecCom ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Pho_UpdateMyPhoto1 ,Pho_UpdateMyPhoto2 ,NULL},
/* ActReqRemMyPho */{1577,-1,TabPrf,ActReqEdiRecCom ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pho_ReqRemoveMyPhoto ,NULL},
/* ActRemMyPho */{ 428,-1,TabPrf,ActReqEdiRecCom ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Pho_RemoveMyPhoto1 ,Pho_RemoveMyPhoto2 ,NULL},
/* ActEdiPri */{1403,-1,TabPrf,ActEdiPrf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pri_EditMyPrivacy ,NULL},
@ -4400,6 +4408,10 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq
ActSeeDatExaAnn, // #1571
ActSeeOneExaAnn, // #1572
ActChgCrsYeaCfg, // #1573
ActReqRemOthPho, // #1574
ActReqRemStdPho, // #1575
ActReqRemTchPho, // #1576
ActReqRemMyPho, // #1577
};
/*****************************************************************************/

View File

@ -72,9 +72,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 (1+9+51+15+90+70+67+246+186+150+172+36+28+83)
#define Act_NUM_ACTIONS (1+9+51+15+90+70+67+246+186+153+172+36+28+84)
#define Act_MAX_ACTION_COD 1573
#define Act_MAX_ACTION_COD 1577
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 20
@ -1022,76 +1022,79 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica
#define ActUpdOthPho (ActChgNumRowFooGrp+ 87)
#define ActUpdStdPho (ActChgNumRowFooGrp+ 88)
#define ActUpdTchPho (ActChgNumRowFooGrp+ 89)
#define ActRemOthPho (ActChgNumRowFooGrp+ 90)
#define ActRemStdPho (ActChgNumRowFooGrp+ 91)
#define ActRemTchPho (ActChgNumRowFooGrp+ 92)
#define ActCreOth (ActChgNumRowFooGrp+ 93)
#define ActCreStd (ActChgNumRowFooGrp+ 94)
#define ActCreTch (ActChgNumRowFooGrp+ 95)
#define ActUpdOth (ActChgNumRowFooGrp+ 96)
#define ActUpdStd (ActChgNumRowFooGrp+ 97)
#define ActUpdTch (ActChgNumRowFooGrp+ 98)
#define ActReqRemOthPho (ActChgNumRowFooGrp+ 90)
#define ActReqRemStdPho (ActChgNumRowFooGrp+ 91)
#define ActReqRemTchPho (ActChgNumRowFooGrp+ 92)
#define ActRemOthPho (ActChgNumRowFooGrp+ 93)
#define ActRemStdPho (ActChgNumRowFooGrp+ 94)
#define ActRemTchPho (ActChgNumRowFooGrp+ 95)
#define ActCreOth (ActChgNumRowFooGrp+ 96)
#define ActCreStd (ActChgNumRowFooGrp+ 97)
#define ActCreTch (ActChgNumRowFooGrp+ 98)
#define ActUpdOth (ActChgNumRowFooGrp+ 99)
#define ActUpdStd (ActChgNumRowFooGrp+100)
#define ActUpdTch (ActChgNumRowFooGrp+101)
#define ActReqAccEnrStd (ActChgNumRowFooGrp+ 99)
#define ActReqAccEnrTch (ActChgNumRowFooGrp+100)
#define ActAccEnrStd (ActChgNumRowFooGrp+101)
#define ActAccEnrTch (ActChgNumRowFooGrp+102)
#define ActRemMe_Std (ActChgNumRowFooGrp+103)
#define ActRemMe_Tch (ActChgNumRowFooGrp+104)
#define ActReqAccEnrStd (ActChgNumRowFooGrp+102)
#define ActReqAccEnrTch (ActChgNumRowFooGrp+103)
#define ActAccEnrStd (ActChgNumRowFooGrp+104)
#define ActAccEnrTch (ActChgNumRowFooGrp+105)
#define ActRemMe_Std (ActChgNumRowFooGrp+106)
#define ActRemMe_Tch (ActChgNumRowFooGrp+107)
#define ActNewAdmIns (ActChgNumRowFooGrp+105)
#define ActRemAdmIns (ActChgNumRowFooGrp+106)
#define ActNewAdmCtr (ActChgNumRowFooGrp+107)
#define ActRemAdmCtr (ActChgNumRowFooGrp+108)
#define ActNewAdmDeg (ActChgNumRowFooGrp+109)
#define ActRemAdmDeg (ActChgNumRowFooGrp+110)
#define ActNewAdmIns (ActChgNumRowFooGrp+108)
#define ActRemAdmIns (ActChgNumRowFooGrp+109)
#define ActNewAdmCtr (ActChgNumRowFooGrp+110)
#define ActRemAdmCtr (ActChgNumRowFooGrp+111)
#define ActNewAdmDeg (ActChgNumRowFooGrp+112)
#define ActRemAdmDeg (ActChgNumRowFooGrp+113)
#define ActRcvFrmEnrSevStd (ActChgNumRowFooGrp+111)
#define ActRcvFrmEnrSevTch (ActChgNumRowFooGrp+112)
#define ActRcvFrmEnrSevStd (ActChgNumRowFooGrp+114)
#define ActRcvFrmEnrSevTch (ActChgNumRowFooGrp+115)
#define ActReqCnfID_Oth (ActChgNumRowFooGrp+113)
#define ActReqCnfID_Std (ActChgNumRowFooGrp+114)
#define ActReqCnfID_Tch (ActChgNumRowFooGrp+115)
#define ActCnfID_Oth (ActChgNumRowFooGrp+116)
#define ActCnfID_Std (ActChgNumRowFooGrp+117)
#define ActCnfID_Tch (ActChgNumRowFooGrp+118)
#define ActReqCnfID_Oth (ActChgNumRowFooGrp+116)
#define ActReqCnfID_Std (ActChgNumRowFooGrp+117)
#define ActReqCnfID_Tch (ActChgNumRowFooGrp+118)
#define ActCnfID_Oth (ActChgNumRowFooGrp+119)
#define ActCnfID_Std (ActChgNumRowFooGrp+120)
#define ActCnfID_Tch (ActChgNumRowFooGrp+121)
#define ActFrmIDsOth (ActChgNumRowFooGrp+119)
#define ActFrmIDsStd (ActChgNumRowFooGrp+120)
#define ActFrmIDsTch (ActChgNumRowFooGrp+121)
#define ActRemID_Oth (ActChgNumRowFooGrp+122)
#define ActRemID_Std (ActChgNumRowFooGrp+123)
#define ActRemID_Tch (ActChgNumRowFooGrp+124)
#define ActNewID_Oth (ActChgNumRowFooGrp+125)
#define ActNewID_Std (ActChgNumRowFooGrp+126)
#define ActNewID_Tch (ActChgNumRowFooGrp+127)
#define ActFrmPwdOth (ActChgNumRowFooGrp+128)
#define ActFrmPwdStd (ActChgNumRowFooGrp+129)
#define ActFrmPwdTch (ActChgNumRowFooGrp+130)
#define ActChgPwdOth (ActChgNumRowFooGrp+131)
#define ActChgPwdStd (ActChgNumRowFooGrp+132)
#define ActChgPwdTch (ActChgNumRowFooGrp+133)
#define ActFrmMaiOth (ActChgNumRowFooGrp+134)
#define ActFrmMaiStd (ActChgNumRowFooGrp+135)
#define ActFrmMaiTch (ActChgNumRowFooGrp+136)
#define ActRemMaiOth (ActChgNumRowFooGrp+137)
#define ActRemMaiStd (ActChgNumRowFooGrp+138)
#define ActRemMaiTch (ActChgNumRowFooGrp+139)
#define ActNewMaiOth (ActChgNumRowFooGrp+140)
#define ActNewMaiStd (ActChgNumRowFooGrp+141)
#define ActNewMaiTch (ActChgNumRowFooGrp+142)
#define ActFrmIDsOth (ActChgNumRowFooGrp+122)
#define ActFrmIDsStd (ActChgNumRowFooGrp+123)
#define ActFrmIDsTch (ActChgNumRowFooGrp+124)
#define ActRemID_Oth (ActChgNumRowFooGrp+125)
#define ActRemID_Std (ActChgNumRowFooGrp+126)
#define ActRemID_Tch (ActChgNumRowFooGrp+127)
#define ActNewID_Oth (ActChgNumRowFooGrp+128)
#define ActNewID_Std (ActChgNumRowFooGrp+129)
#define ActNewID_Tch (ActChgNumRowFooGrp+130)
#define ActFrmPwdOth (ActChgNumRowFooGrp+131)
#define ActFrmPwdStd (ActChgNumRowFooGrp+132)
#define ActFrmPwdTch (ActChgNumRowFooGrp+133)
#define ActChgPwdOth (ActChgNumRowFooGrp+134)
#define ActChgPwdStd (ActChgNumRowFooGrp+135)
#define ActChgPwdTch (ActChgNumRowFooGrp+136)
#define ActFrmMaiOth (ActChgNumRowFooGrp+137)
#define ActFrmMaiStd (ActChgNumRowFooGrp+138)
#define ActFrmMaiTch (ActChgNumRowFooGrp+139)
#define ActRemMaiOth (ActChgNumRowFooGrp+140)
#define ActRemMaiStd (ActChgNumRowFooGrp+141)
#define ActRemMaiTch (ActChgNumRowFooGrp+142)
#define ActNewMaiOth (ActChgNumRowFooGrp+143)
#define ActNewMaiStd (ActChgNumRowFooGrp+144)
#define ActNewMaiTch (ActChgNumRowFooGrp+145)
#define ActRemStdCrs (ActChgNumRowFooGrp+143)
#define ActRemTchCrs (ActChgNumRowFooGrp+144)
#define ActRemUsrGbl (ActChgNumRowFooGrp+145)
#define ActRemStdCrs (ActChgNumRowFooGrp+146)
#define ActRemTchCrs (ActChgNumRowFooGrp+147)
#define ActRemUsrGbl (ActChgNumRowFooGrp+148)
#define ActReqRemAllStdCrs (ActChgNumRowFooGrp+146)
#define ActRemAllStdCrs (ActChgNumRowFooGrp+147)
#define ActReqRemAllStdCrs (ActChgNumRowFooGrp+149)
#define ActRemAllStdCrs (ActChgNumRowFooGrp+150)
#define ActReqRemOldUsr (ActChgNumRowFooGrp+148)
#define ActRemOldUsr (ActChgNumRowFooGrp+149)
#define ActReqRemOldUsr (ActChgNumRowFooGrp+151)
#define ActRemOldUsr (ActChgNumRowFooGrp+152)
#define ActLstClk (ActChgNumRowFooGrp+150)
#define ActLstClk (ActChgNumRowFooGrp+153)
/*****************************************************************************/
/******************************** Social tab *********************************/
@ -1394,64 +1397,65 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica
#define ActReqMyPho (ActSeeAllStaCrs+31)
#define ActDetMyPho (ActSeeAllStaCrs+32)
#define ActUpdMyPho (ActSeeAllStaCrs+33)
#define ActRemMyPho (ActSeeAllStaCrs+34)
#define ActReqRemMyPho (ActSeeAllStaCrs+34)
#define ActRemMyPho (ActSeeAllStaCrs+35)
#define ActEdiPri (ActSeeAllStaCrs+35)
#define ActChgPriPho (ActSeeAllStaCrs+36)
#define ActChgPriPrf (ActSeeAllStaCrs+37)
#define ActEdiPri (ActSeeAllStaCrs+36)
#define ActChgPriPho (ActSeeAllStaCrs+37)
#define ActChgPriPrf (ActSeeAllStaCrs+38)
#define ActReqEdiMyIns (ActSeeAllStaCrs+38)
#define ActChgCtyMyIns (ActSeeAllStaCrs+39)
#define ActChgMyIns (ActSeeAllStaCrs+40)
#define ActChgMyCtr (ActSeeAllStaCrs+41)
#define ActChgMyDpt (ActSeeAllStaCrs+42)
#define ActChgMyOff (ActSeeAllStaCrs+43)
#define ActChgMyOffPho (ActSeeAllStaCrs+44)
#define ActReqEdiMyIns (ActSeeAllStaCrs+39)
#define ActChgCtyMyIns (ActSeeAllStaCrs+40)
#define ActChgMyIns (ActSeeAllStaCrs+41)
#define ActChgMyCtr (ActSeeAllStaCrs+42)
#define ActChgMyDpt (ActSeeAllStaCrs+43)
#define ActChgMyOff (ActSeeAllStaCrs+44)
#define ActChgMyOffPho (ActSeeAllStaCrs+45)
#define ActReqEdiMyNet (ActSeeAllStaCrs+45)
#define ActChgMyNet (ActSeeAllStaCrs+46)
#define ActReqEdiMyNet (ActSeeAllStaCrs+46)
#define ActChgMyNet (ActSeeAllStaCrs+47)
#define ActChgThe (ActSeeAllStaCrs+47)
#define ActReqChgLan (ActSeeAllStaCrs+48)
#define ActChgLan (ActSeeAllStaCrs+49)
#define ActChg1stDay (ActSeeAllStaCrs+50)
#define ActChgCol (ActSeeAllStaCrs+51)
#define ActHidLftCol (ActSeeAllStaCrs+52)
#define ActHidRgtCol (ActSeeAllStaCrs+53)
#define ActShoLftCol (ActSeeAllStaCrs+54)
#define ActShoRgtCol (ActSeeAllStaCrs+55)
#define ActChgIco (ActSeeAllStaCrs+56)
#define ActChgMnu (ActSeeAllStaCrs+57)
#define ActChgNtfPrf (ActSeeAllStaCrs+58)
#define ActChgThe (ActSeeAllStaCrs+48)
#define ActReqChgLan (ActSeeAllStaCrs+49)
#define ActChgLan (ActSeeAllStaCrs+50)
#define ActChg1stDay (ActSeeAllStaCrs+51)
#define ActChgCol (ActSeeAllStaCrs+52)
#define ActHidLftCol (ActSeeAllStaCrs+53)
#define ActHidRgtCol (ActSeeAllStaCrs+54)
#define ActShoLftCol (ActSeeAllStaCrs+55)
#define ActShoRgtCol (ActSeeAllStaCrs+56)
#define ActChgIco (ActSeeAllStaCrs+57)
#define ActChgMnu (ActSeeAllStaCrs+58)
#define ActChgNtfPrf (ActSeeAllStaCrs+59)
#define ActPrnUsrQR (ActSeeAllStaCrs+59)
#define ActPrnUsrQR (ActSeeAllStaCrs+60)
#define ActPrnMyTT (ActSeeAllStaCrs+60)
#define ActEdiTut (ActSeeAllStaCrs+61)
#define ActChgTut (ActSeeAllStaCrs+62)
#define ActChgMyTT1stDay (ActSeeAllStaCrs+63)
#define ActPrnMyTT (ActSeeAllStaCrs+61)
#define ActEdiTut (ActSeeAllStaCrs+62)
#define ActChgTut (ActSeeAllStaCrs+63)
#define ActChgMyTT1stDay (ActSeeAllStaCrs+64)
#define ActReqRemFilBrf (ActSeeAllStaCrs+64)
#define ActRemFilBrf (ActSeeAllStaCrs+65)
#define ActRemFolBrf (ActSeeAllStaCrs+66)
#define ActCopBrf (ActSeeAllStaCrs+67)
#define ActPasBrf (ActSeeAllStaCrs+68)
#define ActRemTreBrf (ActSeeAllStaCrs+69)
#define ActFrmCreBrf (ActSeeAllStaCrs+70)
#define ActCreFolBrf (ActSeeAllStaCrs+71)
#define ActCreLnkBrf (ActSeeAllStaCrs+72)
#define ActRenFolBrf (ActSeeAllStaCrs+73)
#define ActRcvFilBrfDZ (ActSeeAllStaCrs+74)
#define ActRcvFilBrfCla (ActSeeAllStaCrs+75)
#define ActExpBrf (ActSeeAllStaCrs+76)
#define ActConBrf (ActSeeAllStaCrs+77)
#define ActZIPBrf (ActSeeAllStaCrs+78)
#define ActReqDatBrf (ActSeeAllStaCrs+79)
#define ActChgDatBrf (ActSeeAllStaCrs+80)
#define ActDowBrf (ActSeeAllStaCrs+81)
#define ActReqRemFilBrf (ActSeeAllStaCrs+65)
#define ActRemFilBrf (ActSeeAllStaCrs+66)
#define ActRemFolBrf (ActSeeAllStaCrs+67)
#define ActCopBrf (ActSeeAllStaCrs+68)
#define ActPasBrf (ActSeeAllStaCrs+69)
#define ActRemTreBrf (ActSeeAllStaCrs+70)
#define ActFrmCreBrf (ActSeeAllStaCrs+71)
#define ActCreFolBrf (ActSeeAllStaCrs+72)
#define ActCreLnkBrf (ActSeeAllStaCrs+73)
#define ActRenFolBrf (ActSeeAllStaCrs+74)
#define ActRcvFilBrfDZ (ActSeeAllStaCrs+75)
#define ActRcvFilBrfCla (ActSeeAllStaCrs+76)
#define ActExpBrf (ActSeeAllStaCrs+77)
#define ActConBrf (ActSeeAllStaCrs+78)
#define ActZIPBrf (ActSeeAllStaCrs+79)
#define ActReqDatBrf (ActSeeAllStaCrs+80)
#define ActChgDatBrf (ActSeeAllStaCrs+81)
#define ActDowBrf (ActSeeAllStaCrs+82)
#define ActReqRemOldBrf (ActSeeAllStaCrs+82)
#define ActRemOldBrf (ActSeeAllStaCrs+83)
#define ActReqRemOldBrf (ActSeeAllStaCrs+83)
#define ActRemOldBrf (ActSeeAllStaCrs+84)
/*****************************************************************************/
/******************************** Public types *******************************/

View File

@ -119,8 +119,8 @@
// TODO: Change PhotoAttribution in table centres from TEXT to VARCHAR(255) (check maximum length first)
// TODO: In social refreshing via AJAX, an error occurs when session expirates
// TODO: Messages in msg_content_deleted older than a certain time should be deleted to ensure the protection of personal data
// TODO: Request confirmation to remove user's photo
// TODO: FIX BUG: A teacher uploads a document in course documents zone, then he/she unregister from course, then he/she search for his/her documents, a document is shown in results but he/she can not view it
// TODO: Teachers should have a button to report a student as probably duplicated. System admin should view a list of users reported and, for each of them, a small list with the possible duplicated (people with the same ID, the same name, etc.)
// TODO: Modify WS function getUsers changing: userRole to indicate all users, and a new parameter filter (search string (name, @nickname, mail)) to restring number of users
// TODO: Add a new WS function to count the nunmber of users to return in call to function getUsers
@ -129,18 +129,26 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.224.3 (2016-06-13)"
#define Log_PLATFORM_VERSION "SWAD 15.225 (2016-06-15)"
#define CSS_FILE "swad15.224.3.css"
#define JS_FILE "swad15.216.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 15.225: Jun 14, 2016 Removing a user's photo now requires confirmation. (202425 lines)
5 changes necessary in database:
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1574','es','N','Preguntar si eliminar foto otro usr.');
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1575','es','N','Preguntar si eliminar foto estudiante');
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1576','es','N','Preguntar si eliminar foto profesor');
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1577','es','N','Preguntar si eliminar mi foto');
UPDATE actions SET Txt='Eliminar mi foto' WHERE ActCod='428' AND Language='es';
Version 15.224.3: Jun 13, 2016 Fix bug while finding cell content in file of marks. (202266 lines)
Version 15.224.2: Jun 12, 2016 Info about number of files is moved to bottom of file browsers. (202266 lines)
Version 15.224.1: Jun 12, 2016 Change in layout of file browsers. (202266 lines)
Version 15.224: Jun 12, 2016 Now a user can unfollow users followed by him/her whose profile is not visible.
Code refactoring in list of follweing/followers. (202304 lines)
Code refactoring in list of follwing/followers. (202304 lines)
Version 15.223.3: Jun 12, 2016 Fixed layout of list of forums. (202282 lines)
Version 15.223.2: Jun 12, 2016 Fixed bug in results of search of students. (202277 lines)
Version 15.223.1: Jun 12, 2016 Show only users to follow with first name and surname 1. (202276 lines)

View File

@ -84,8 +84,8 @@ const char *Pho_StrAvgPhotoPrograms[Pho_NUM_AVERAGE_PHOTO_TYPES] =
/***************************** Private prototypes ****************************/
/*****************************************************************************/
static void Pho_PutIconToRemoveMyPhoto (void);
static void Pho_PutIconToRemoveOtherUsrPhoto (void);
static void Pho_PutIconToRequestRemoveMyPhoto (void);
static void Pho_PutIconToRequestRemoveOtherUsrPhoto (void);
static void Pho_ReqMyPhoto (void);
static void Pho_ReqOtherUsrPhoto (void);
@ -219,35 +219,35 @@ void Pho_PutLinkToChangeOtherUsrPhoto (void)
}
/*****************************************************************************/
/********************* Put a link to remove user's photo *********************/
/************** Put a link to request the removal of my photo ****************/
/*****************************************************************************/
static void Pho_PutIconToRemoveMyPhoto (void)
static void Pho_PutIconToRequestRemoveMyPhoto (void)
{
extern const char *Txt_Remove_photo;
/***** Link to remove my photo *****/
/***** Link to request the removal of my photo *****/
if (Gbl.Usrs.Me.MyPhotoExists)
Lay_PutContextualLink (ActRemMyPho,NULL,"remove-on64x64.png",
Lay_PutContextualLink (ActReqRemMyPho,NULL,"remove-on64x64.png",
Txt_Remove_photo,NULL);
}
/*****************************************************************************/
/********************* Put a link to remove user's photo *********************/
/********** Put a link to request the removal of a user's photo **************/
/*****************************************************************************/
static void Pho_PutIconToRemoveOtherUsrPhoto (void)
static void Pho_PutIconToRequestRemoveOtherUsrPhoto (void)
{
extern const char *Txt_Remove_photo;
char PhotoURL[PATH_MAX+1];
bool PhotoExists;
/***** Link for removing the photo *****/
/***** Link to request the removal of another user's photo *****/
PhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,true);
if (PhotoExists)
Lay_PutContextualLink ( Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? ActRemStdPho :
(Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_TEACHER ? ActRemTchPho :
ActRemOthPho), // Guest, visitor or admin
Lay_PutContextualLink ( Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? ActReqRemStdPho :
(Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_TEACHER ? ActReqRemTchPho :
ActReqRemOthPho), // Guest, visitor or admin
Usr_PutParamOtherUsrCodEncrypted,
"remove-on64x64.png",
Txt_Remove_photo,NULL);
@ -257,7 +257,7 @@ static void Pho_PutIconToRemoveOtherUsrPhoto (void)
/************************ Form for sending my photo **************************/
/*****************************************************************************/
void Pho_ReqMyPhotoWithContextualLinks (void)
void Pho_ReqMyPhotoWithContextLinks (void)
{
/***** Contextual links to remove photo and change privacy *****/
if (Gbl.Usrs.Me.MyPhotoExists) // I have photo
@ -307,8 +307,8 @@ static void Pho_ReqPhoto (const struct UsrData *UsrDat,const char *PhotoURL)
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_Photo,
ItsMe ? Pho_PutIconToRemoveMyPhoto :
Pho_PutIconToRemoveOtherUsrPhoto);
ItsMe ? Pho_PutIconToRequestRemoveMyPhoto :
Pho_PutIconToRequestRemoveOtherUsrPhoto);
/***** Start form *****/
if (ItsMe)
@ -362,7 +362,7 @@ void Pho_SendPhotoUsr (void)
true);
if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me
/***** Form to send my photo *****/
Pho_ReqMyPhotoWithContextualLinks ();
Pho_ReqMyPhotoWithContextLinks ();
else
/***** Form to send another user's photo *****/
Pho_ReqOtherUsrPhoto ();
@ -407,6 +407,40 @@ void Pho_RecOtherUsrPhotoDetFaces (void)
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
}
/*****************************************************************************/
/********************** Request the removal of my photo **********************/
/*****************************************************************************/
void Pho_ReqRemoveMyPhoto (void)
{
extern const char *Txt_Photo;
extern const char *Txt_Do_you_really_want_to_remove_your_photo;
extern const char *Txt_Remove_photo;
extern const char *Txt_The_photo_no_longer_exists;
/***** Show current photo and help message *****/
if (Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,Gbl.Usrs.Me.PhotoURL,true))
{
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_Photo,Pho_PutIconToRequestRemoveMyPhoto);
/***** Show current photo and help message *****/
Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,Gbl.Usrs.Me.PhotoURL,
"PHOTO186x248",Pho_NO_ZOOM,false);
Lay_ShowAlert (Lay_INFO,Txt_Do_you_really_want_to_remove_your_photo);
/***** Button to remove my photo *****/
Act_FormStart (ActRemMyPho);
Lay_PutRemoveButton (Txt_Remove_photo);
Act_FormEnd ();
/***** End frame *****/
Lay_EndRoundFrame ();
}
else
Lay_ShowAlert (Lay_INFO,Txt_The_photo_no_longer_exists);
}
/*****************************************************************************/
/****************************** Remove my photo ******************************/
/*****************************************************************************/
@ -428,6 +462,59 @@ void Pho_RemoveMyPhoto2 (void)
Lay_ShowAlert (Lay_SUCCESS,Txt_Photo_removed);
}
/*****************************************************************************/
/**************** Request the removal of another user's photo ****************/
/*****************************************************************************/
void Pho_ReqRemoveUsrPhoto (void)
{
extern const char *Txt_Photo;
extern const char *Txt_Do_you_really_want_to_remove_the_photo_of_X;
extern const char *Txt_Remove_photo;
extern const char *Txt_The_photo_no_longer_exists;
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
char PhotoURL[PATH_MAX+1];
/***** Get user's code from form *****/
Usr_GetParamOtherUsrCodEncryptedAndGetListIDs ();
/***** Get password, user type and user's data from database *****/
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat))
{
if (Pho_CheckIfICanChangeOtherUsrPhoto (&Gbl.Usrs.Other.UsrDat))
{
/***** Show current photo and help message *****/
if (Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,true))
{
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_Photo,Pho_PutIconToRequestRemoveOtherUsrPhoto);
Pho_ShowUsrPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,
"PHOTO186x248",Pho_NO_ZOOM,false);
sprintf (Gbl.Message,Txt_Do_you_really_want_to_remove_the_photo_of_X,Gbl.Usrs.Other.UsrDat.FullName);
Lay_ShowAlert (Lay_INFO,Gbl.Message);
/***** Button to remove user's photo *****/
Act_FormStart ( Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? ActRemStdPho :
(Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_TEACHER ? ActRemTchPho :
ActRemOthPho)); // Guest, visitor or admin
Usr_PutParamOtherUsrCodEncrypted ();
Lay_PutRemoveButton (Txt_Remove_photo);
Act_FormEnd ();
/***** End frame *****/
Lay_EndRoundFrame ();
}
else
Lay_ShowAlert (Lay_INFO,Txt_The_photo_no_longer_exists);
}
else
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
}
else
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
}
/*****************************************************************************/
/************************ Remove another user's photo ************************/
/*****************************************************************************/

View File

@ -83,14 +83,18 @@ typedef enum
bool Pho_CheckIfICanChangeOtherUsrPhoto (const struct UsrData *UsrDat);
void Pho_PutLinkToChangeMyPhoto (void);
void Pho_PutLinkToChangeOtherUsrPhoto (void);
void Pho_ReqMyPhotoWithContextualLinks (void);
void Pho_ReqMyPhotoWithContextLinks (void);
void Pho_ReqUsrPhotoWithContextualLinks (struct UsrData *UsrDat);
void Pho_SendPhotoUsr (void);
void Pho_RecMyPhotoDetFaces (void);
void Pho_RecOtherUsrPhotoDetFaces (void);
void Pho_ReqRemoveMyPhoto (void);
void Pho_RemoveMyPhoto1 (void);
void Pho_RemoveMyPhoto2 (void);
void Pho_ReqRemoveUsrPhoto (void);
void Pho_RemoveUsrPhoto (void);
void Pho_UpdateMyPhoto1 (void);
void Pho_UpdateMyPhoto2 (void);
void Pho_UpdateUsrPhoto1 (void);

View File

@ -8974,7 +8974,7 @@ const char *Txt_Do_you_really_want_to_remove_the_group_X = // Warning: it is ver
#elif L==8
"Czy na pewno chcesz usunac grupe <strong>%s</strong>?";
#elif L==9
"Do you really want to remove the group <strong>%s</strong>?"; // Necessita de tradução
"Do you really want to remove the group <strong>%s</strong>?"; // Necessita de tradução
#endif
const char *Txt_Do_you_really_want_to_remove_the_group_X_1_student_ = // Warning: it is very important to include %s in the following sentences
@ -9037,6 +9037,27 @@ const char *Txt_Do_you_really_want_to_remove_the_group_X_Y_students_ = // Warnin
"Doing so will remove %u students from that group."; // Necessita de tradução
#endif
const char *Txt_Do_you_really_want_to_remove_the_photo_of_X = // Warning: it is very important to include %s in the following sentences
#if L==1
"De veres voleu eliminar la foto de <strong>%s</strong>?";
#elif L==2
"Wollen Sie die wirklich das Foto von <strong>%s</strong> zu entfernen?";
#elif L==3
"Do you really want to remove the photo of <strong>%s</strong>?";
#elif L==4
"&iquest;Realmente desea eliminar la foto de <strong>%s</strong>?";
#elif L==5
"Voulez-vous vraiment supprimer la photo de <strong>%s</strong>?";
#elif L==6
"&iquest;Realmente desea eliminar la foto de <strong>%s</strong>?"; // Okoteve traducción
#elif L==7
"Vuoi realmente rimuovere la foto di <strong>%s</strong>?";
#elif L==8
"Czy na pewno chcesz usun&aogon;&cacute; zdj&eogon;cie <strong>%s</strong>?";
#elif L==9
"Voc&ecirc; realmente deseja remover la foto de <strong>%s</strong>?";
#endif
const char *Txt_Do_you_really_want_to_remove_the_question_X = // Warning: it is very important to include %lu in the following sentences
#if L==1
"&iquest;Realmente desea eliminar la pregunta <strong>%lu</strong>?"; // Necessita traduccio
@ -9139,6 +9160,27 @@ const char *Txt_Do_you_really_want_to_remove_the_type_of_group_X_Y_groups_ = //
"Doing so will also remove %u groups of that type."; // Necessita de tradução
#endif
const char *Txt_Do_you_really_want_to_remove_your_photo =
#if L==1
"De veres voleu eliminar la seva foto?";
#elif L==2
"Wollen Sie die Ihr Foto zu entfernen?";
#elif L==3
"Do you really want to remove your photo?";
#elif L==4
"&iquest;Realmente desea eliminar su foto?";
#elif L==5
"Voulez-vous vraiment supprimer votre photo?";
#elif L==6
"&iquest;Realmente desea eliminar su foto?"; // Okoteve traducción
#elif L==7
"Vuoi realmente rimuovere la tua foto?";
#elif L==8
"Czy na pewno chcesz usun&aogon;&cacute; swoje zdj&eogon;cie?";
#elif L==9
"Voc&ecirc; realmente deseja remover a sua foto?";
#endif
const char *Txt_Do_you_really_want_to_reset_the_survey_X = // Warning: it is very important to include %s in the following sentences
#if L==1
"&iquest;Realmente desea poner a cero la encuesta <strong>%s</strong>?"; // Necessita traduccio
@ -41199,6 +41241,27 @@ const char *Txt_The_centre_X_has_been_renamed_as_Y = // Warning: it is very impo
"The centre <strong>%s</strong> has been renamed as <strong>%s</strong>."; // Necessita de tradução
#endif
const char *Txt_The_comment_no_longer_exists =
#if L==1
"El comentari ja no existeix.";
#elif L==2
"Der Kommentar nicht mehr existiert.";
#elif L==3
"The comment no longer exists.";
#elif L==4
"El comentario ya no existe.";
#elif L==5
"Le commentaire a disparu.";
#elif L==6
"El comentario ya no existe."; // Okoteve traducción
#elif L==7
"Il commento non esiste pi&ugrave;.";
#elif L==8
"Komentarz ju&zdot; nie istnieje.";
#elif L==9
"O coment&aacute;rio n&atilde;o existe mais.";
#endif
const char *Txt_The_contents_of_the_folder_are_too_big =
#if L==1
"El contingut de la carpeta &eacute;s massa gran.";
@ -43941,25 +44004,25 @@ const char *Txt_The_numerical_code_X_already_exists = // Warning: it is very imp
"The ISO 3166-1 numerical code %03ld already exists."; // Necessita de tradução
#endif
const char *Txt_The_comment_no_longer_exists =
const char *Txt_The_photo_no_longer_exists =
#if L==1
"El comentari ja no existeix.";
"La foto ja no existeix.";
#elif L==2
"Der Kommentar nicht mehr existiert.";
"Das Foto nicht mehr existiert.";
#elif L==3
"The comment no longer exists.";
"The photo no longer exists.";
#elif L==4
"El comentario ya no existe.";
"La foto ya no existe.";
#elif L==5
"Le commentaire a disparu.";
"La photo a disparu.";
#elif L==6
"El comentario ya no existe."; // Okoteve traducción
"La foto ya no existe."; // Okoteve traducción
#elif L==7
"Il commento non esiste pi&ugrave;.";
"La foto non esiste pi&ugrave;.";
#elif L==8
"Komentarz ju&zdot; nie istnieje.";
"Zdj&eogon;cie ju&zdot; nie istnieje.";
#elif L==9
"O coment&aacute;rio n&atilde;o existe mais.";
"La foto n&atilde;o existe mais.";
#endif
const char *Txt_The_original_post_no_longer_exists =