Version 14.132.6

This commit is contained in:
Antonio Cañas Vargas 2015-09-17 01:08:05 +02:00
parent 9f7b4f5918
commit 722267bc1a
5 changed files with 88 additions and 37 deletions

View File

@ -367,7 +367,10 @@ void ID_PutLinkToChangeUsrIDs (void)
Act_PutContextualLink (ActFrmUsrAcc,NULL, Act_PutContextualLink (ActFrmUsrAcc,NULL,
"arroba",Txt_Change_IDs); "arroba",Txt_Change_IDs);
else // Not me else // Not me
Act_PutContextualLink (ActFrmIDsOthUsr,Usr_PutParamOtherUsrCodEncrypted, Act_PutContextualLink ( Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? ActFrmIDsOthStd :
(Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_TEACHER ? ActFrmIDsOthTch :
ActFrmIDsOthGst), // Guest, visitor or admin
Usr_PutParamOtherUsrCodEncrypted,
"arroba",Txt_Change_IDs); "arroba",Txt_Change_IDs);
} }
@ -452,7 +455,9 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe)
Act_FormStart (ActRemIDMe); Act_FormStart (ActRemIDMe);
else else
{ {
Act_FormStart (ActRemIDOth); Act_FormStart ( UsrDat->RoleInCurrentCrsDB == Rol_STUDENT ? ActRemIDOthStd :
(UsrDat->RoleInCurrentCrsDB == Rol_TEACHER ? ActRemIDOthTch :
ActRemIDOthGst)); // Guest, visitor or admin
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
} }
fprintf (Gbl.F.Out,"<input type=\"hidden\" name=\"UsrID\" value=\"%s\" />", fprintf (Gbl.F.Out,"<input type=\"hidden\" name=\"UsrID\" value=\"%s\" />",
@ -497,7 +502,9 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe)
Act_FormStart (ActNewIDMe); Act_FormStart (ActNewIDMe);
else else
{ {
Act_FormStart (ActNewIDOth); Act_FormStart ( UsrDat->RoleInCurrentCrsDB == Rol_STUDENT ? ActNewIDOthStd :
(UsrDat->RoleInCurrentCrsDB == Rol_TEACHER ? ActNewIDOthTch :
ActNewIDOthGst)); // Guest, visitor or admin
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
} }
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"NewID\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"NewID\""

View File

@ -958,9 +958,16 @@ Users:
779b. ActRcvFrmEnrSevStd Receive a form with IDs of users to be registeres/removed to/from current course 779b. ActRcvFrmEnrSevStd Receive a form with IDs of users to be registeres/removed to/from current course
779c. ActRcvFrmEnrSevTch Receive a form with IDs of users to be registeres/removed to/from current course 779c. ActRcvFrmEnrSevTch Receive a form with IDs of users to be registeres/removed to/from current course
780. ActFrmIDOthUsr Show form to the change of the IDs of another user 780b. ActFrmIDsOthGst Show form to the change of the IDs of another user
781. ActRemIDOth Remove one of the IDs of another user 780c. ActFrmIDsOthStd Show form to the change of the IDs of another user
782. ActNewIDOth Create a new user's ID for another user 780d. ActFrmIDsOthTch Show form to the change of the IDs of another user
781b. ActRemIDOthGst Remove one of the IDs of another user
781c. ActRemIDOthStd Remove one of the IDs of another user
781d. ActRemIDOthTch Remove one of the IDs of another user
782b. ActNewIDOthGst Create a new user's ID for another user
782c. ActNewIDOthStd Create a new user's ID for another user
782d. ActNewIDOthTch Create a new user's ID for another user
783. ActFrmPwdOthUsr Show form to the change of the password of another user 783. ActFrmPwdOthUsr Show form to the change of the password of another user
784. ActChgPwdOthUsr Change the password of another user 784. ActChgPwdOthUsr Change the password of another user
785. ActRemUsrCrs Remove a user from the current course 785. ActRemUsrCrs Remove a user from the current course
@ -2374,9 +2381,16 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActRcvFrmEnrSevStd*/{1427,-1,TabUsr,ActLstStd ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReceiveFormAdminStds ,NULL}, /* ActRcvFrmEnrSevStd*/{1427,-1,TabUsr,ActLstStd ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReceiveFormAdminStds ,NULL},
/* ActRcvFrmEnrSevTch*/{1428,-1,TabUsr,ActLstTch ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReceiveFormAdminTchs ,NULL}, /* ActRcvFrmEnrSevTch*/{1428,-1,TabUsr,ActLstTch ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReceiveFormAdminTchs ,NULL},
/* ActFrmIDsOthUsr */{1239,-1,TabUsr,ActLstStd ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,ID_ShowFormOthIDs ,NULL}, /* ActFrmIDsOthGst */{1447,-1,TabUsr,ActLstGst ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,ID_ShowFormOthIDs ,NULL},
/* ActRemIDOth */{1240,-1,TabUsr,ActLstStd ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,ID_RemoveOtherUsrID ,NULL}, /* ActFrmIDsOthStd */{1448,-1,TabUsr,ActLstStd ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,ID_ShowFormOthIDs ,NULL},
/* ActNewIDOth */{1241,-1,TabUsr,ActLstStd ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,ID_NewOtherUsrID ,NULL}, /* ActFrmIDsOthTch */{1449,-1,TabUsr,ActLstTch ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,ID_ShowFormOthIDs ,NULL},
/* ActRemIDOthGst */{1450,-1,TabUsr,ActLstGst ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,ID_RemoveOtherUsrID ,NULL},
/* ActRemIDOthStd */{1451,-1,TabUsr,ActLstStd ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,ID_RemoveOtherUsrID ,NULL},
/* ActRemIDOthTch */{1452,-1,TabUsr,ActLstTch ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,ID_RemoveOtherUsrID ,NULL},
/* ActNewIDOthGst */{1453,-1,TabUsr,ActLstGst ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,ID_NewOtherUsrID ,NULL},
/* ActNewIDOthStd */{1454,-1,TabUsr,ActLstStd ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,ID_NewOtherUsrID ,NULL},
/* ActNewIDOthTch */{1455,-1,TabUsr,ActLstTch ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,ID_NewOtherUsrID ,NULL},
/* ActFrmPwdOthUsr */{ 598,-1,TabUsr,ActLstStd ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pwd_ShowFormOthPwd ,NULL}, /* ActFrmPwdOthUsr */{ 598,-1,TabUsr,ActLstStd ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pwd_ShowFormOthPwd ,NULL},
/* ActChgPwdOthUsr */{ 82,-1,TabUsr,ActLstStd ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,Pwd_UpdateOtherPwd1 ,Pwd_UpdateOtherPwd2 ,NULL}, /* ActChgPwdOthUsr */{ 82,-1,TabUsr,ActLstStd ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,Pwd_UpdateOtherPwd1 ,Pwd_UpdateOtherPwd2 ,NULL},
@ -3968,9 +3982,9 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq
ActRemAnn, // #1236 ActRemAnn, // #1236
ActWriAnn, // #1237 ActWriAnn, // #1237
ActRcvAnn, // #1238 ActRcvAnn, // #1238
ActFrmIDsOthUsr, // #1239 -1, // #1239 (obsolete action)
ActRemIDOth, // #1240 -1, // #1240 (obsolete action)
ActNewIDOth, // #1241 -1, // #1241 (obsolete action)
ActSeeSyl, // #1242 ActSeeSyl, // #1242
ActChgMnu, // #1243 ActChgMnu, // #1243
ActReqCtrLog, // #1244 ActReqCtrLog, // #1244
@ -4179,6 +4193,15 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq
ActCreGst, // #1444 ActCreGst, // #1444
ActCreStd, // #1445 ActCreStd, // #1445
ActCreTch, // #1446 ActCreTch, // #1446
ActFrmIDsOthGst, // #1447
ActFrmIDsOthStd, // #1448
ActFrmIDsOthTch, // #1449
ActRemIDOthGst, // #1450
ActRemIDOthStd, // #1451
ActRemIDOthTch, // #1452
ActNewIDOthGst, // #1453
ActNewIDOthStd, // #1454
ActNewIDOthTch, // #1455
}; };
/*****************************************************************************/ /*****************************************************************************/

View File

@ -69,9 +69,9 @@ typedef enum
typedef int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action 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+131+168+28+79) #define Act_NUM_ACTIONS (7+52+15+90+73+68+204+182+137+168+28+79)
#define Act_MAX_ACTION_COD 1446 #define Act_MAX_ACTION_COD 1455
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 20 #define Act_MAX_OPTIONS_IN_MENU_PER_TAB 20
@ -988,31 +988,37 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica
#define ActRcvFrmEnrSevStd (ActChgNumRowFooGrp+109) #define ActRcvFrmEnrSevStd (ActChgNumRowFooGrp+109)
#define ActRcvFrmEnrSevTch (ActChgNumRowFooGrp+110) #define ActRcvFrmEnrSevTch (ActChgNumRowFooGrp+110)
#define ActFrmIDsOthUsr (ActChgNumRowFooGrp+111) #define ActFrmIDsOthGst (ActChgNumRowFooGrp+111)
#define ActRemIDOth (ActChgNumRowFooGrp+112) #define ActFrmIDsOthStd (ActChgNumRowFooGrp+112)
#define ActNewIDOth (ActChgNumRowFooGrp+113) #define ActFrmIDsOthTch (ActChgNumRowFooGrp+113)
#define ActFrmPwdOthUsr (ActChgNumRowFooGrp+114) #define ActRemIDOthGst (ActChgNumRowFooGrp+114)
#define ActChgPwdOthUsr (ActChgNumRowFooGrp+115) #define ActRemIDOthStd (ActChgNumRowFooGrp+115)
#define ActRemUsrCrs (ActChgNumRowFooGrp+116) #define ActRemIDOthTch (ActChgNumRowFooGrp+116)
#define ActRemUsrGbl (ActChgNumRowFooGrp+117) #define ActNewIDOthGst (ActChgNumRowFooGrp+117)
#define ActNewIDOthStd (ActChgNumRowFooGrp+118)
#define ActNewIDOthTch (ActChgNumRowFooGrp+119)
#define ActFrmPwdOthUsr (ActChgNumRowFooGrp+120)
#define ActChgPwdOthUsr (ActChgNumRowFooGrp+121)
#define ActRemUsrCrs (ActChgNumRowFooGrp+122)
#define ActRemUsrGbl (ActChgNumRowFooGrp+123)
#define ActReqRemAllStdCrs (ActChgNumRowFooGrp+118) #define ActReqRemAllStdCrs (ActChgNumRowFooGrp+124)
#define ActRemAllStdCrs (ActChgNumRowFooGrp+119) #define ActRemAllStdCrs (ActChgNumRowFooGrp+125)
#define ActReqRemOldUsr (ActChgNumRowFooGrp+120) #define ActReqRemOldUsr (ActChgNumRowFooGrp+126)
#define ActRemOldUsr (ActChgNumRowFooGrp+121) #define ActRemOldUsr (ActChgNumRowFooGrp+127)
#define ActSeePubPrf (ActChgNumRowFooGrp+122) #define ActSeePubPrf (ActChgNumRowFooGrp+128)
#define ActCal1stClkTim (ActChgNumRowFooGrp+123) #define ActCal1stClkTim (ActChgNumRowFooGrp+129)
#define ActCalNumClk (ActChgNumRowFooGrp+124) #define ActCalNumClk (ActChgNumRowFooGrp+130)
#define ActCalNumFilVie (ActChgNumRowFooGrp+125) #define ActCalNumFilVie (ActChgNumRowFooGrp+131)
#define ActCalNumForPst (ActChgNumRowFooGrp+126) #define ActCalNumForPst (ActChgNumRowFooGrp+132)
#define ActCalNumMsgSnt (ActChgNumRowFooGrp+127) #define ActCalNumMsgSnt (ActChgNumRowFooGrp+133)
#define ActFolUsr (ActChgNumRowFooGrp+128) #define ActFolUsr (ActChgNumRowFooGrp+134)
#define ActUnfUsr (ActChgNumRowFooGrp+129) #define ActUnfUsr (ActChgNumRowFooGrp+135)
#define ActSeeFlg (ActChgNumRowFooGrp+130) #define ActSeeFlg (ActChgNumRowFooGrp+136)
#define ActSeeFlr (ActChgNumRowFooGrp+131) #define ActSeeFlr (ActChgNumRowFooGrp+137)
/*****************************************************************************/ /*****************************************************************************/
/******************************* Messages tab ********************************/ /******************************* Messages tab ********************************/

View File

@ -98,11 +98,26 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.132.5 (2015/09/16)" #define Log_PLATFORM_VERSION "SWAD 14.132.6 (2015/09/17)"
// Number of lines (includes comments but not blank lines) has been got with the following command: // 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 // 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.6: Sep 17, 2015 Changes in users' IDs. (184640 lines)
12 changes necessary in database:
UPDATE actions SET Obsolete='Y' WHERE ActCod='1239';
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1447','es','N','Solicitar edici&oacute;n ID invitado');
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1448','es','N','Solicitar edici&oacute;n ID estudiante');
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1449','es','N','Solicitar edici&oacute;n ID profesor');
UPDATE actions SET Obsolete='Y' WHERE ActCod='1240';
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1450','es','N','Eliminar ID invitado');
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1451','es','N','Eliminar ID estudiante');
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1452','es','N','Eliminar ID profesor');
UPDATE actions SET Obsolete='Y' WHERE ActCod='1241';
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1453','es','N','Crear ID invitado');
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1454','es','N','Crear ID estudiante');
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1455','es','N','Crear ID profesor');
Version 14.132.5: Sep 16, 2015 Changes in user enrollment. (184592 lines) Version 14.132.5: Sep 16, 2015 Changes in user enrollment. (184592 lines)
4 changes necessary in database: 4 changes necessary in database:
UPDATE actions SET Obsolete='Y' WHERE ActCod='440'; UPDATE actions SET Obsolete='Y' WHERE ActCod='440';

View File

@ -1026,7 +1026,7 @@ bool Usr_CheckIfUsrBelongsToIns (long UsrCod,long InsCod,bool CountOnlyAcceptedC
" WHERE crs_usr.UsrCod='%ld'%s" " WHERE crs_usr.UsrCod='%ld'%s"
" AND crs_usr.CrsCod=courses.CrsCod" " AND crs_usr.CrsCod=courses.CrsCod"
" AND courses.DegCod=degrees.DegCod" " AND courses.DegCod=degrees.DegCod"
" AND degrees.CtrCod=institutions.CtrCod" " AND degrees.CtrCod=centres.CtrCod"
" AND centres.InsCod='%ld'", " AND centres.InsCod='%ld'",
UsrCod,SubQuery,InsCod); UsrCod,SubQuery,InsCod);
return (DB_QueryCOUNT (Query,"can not check if a user belongs to an institution") != 0); return (DB_QueryCOUNT (Query,"can not check if a user belongs to an institution") != 0);