diff --git a/sql/swad.sql b/sql/swad.sql index 7602830da..10fcc9810 100644 --- a/sql/swad.sql +++ b/sql/swad.sql @@ -1230,12 +1230,13 @@ CREATE TABLE IF NOT EXISTS usr_webs ( 'delicious','deviantart','diaspora', 'edmodo', 'facebook','flickr','foursquare', - 'github','googleplus','googlescholar', - 'instagram', + 'github','gnusocial','googleplus','googlescholar', + 'identica','instagram', 'linkedin', + 'orcid', 'paperli','pinterest', - 'quitter', - 'researchgate', + 'quitter', + 'researchgate','researcherid', 'scoopit','slideshare','storify', 'tumblr','twitter', 'wikipedia', diff --git a/swad_account.c b/swad_account.c index 863f6f558..15749e4b8 100644 --- a/swad_account.c +++ b/swad_account.c @@ -240,7 +240,8 @@ static void Acc_PutLinkToRemoveMyAccount (void) { extern const char *Txt_Remove_account; - Act_PutContextualLink (ActUpdOthUsrDat,Acc_PutLinkToRemoveMyAccountParams, + // TODO: Put this option in Profile > Account + Act_PutContextualLink (ActUpdOthGst,Acc_PutLinkToRemoveMyAccountParams, "delon",Txt_Remove_account); } diff --git a/swad_action.c b/swad_action.c index 65226b63d..479744146 100644 --- a/swad_action.c +++ b/swad_action.c @@ -916,14 +916,23 @@ Users: 760. ActReqRejSignUp Ask if reject the enrollment of a user in a course 761. ActRejSignUp Reject the enrollment of a user in a course - 762. ActReqMdfOneUsr Request the enrollment/removing of a user - 763. ActReqMdfUsr Register a user in this course + 762b. ActReqMdfOneGst Request a user's ID for enrollment/removing + 762c. ActReqMdfOneStd Request a user's ID for enrollment/removing + 762d. ActReqMdfOneTch Request a user's ID for enrollment/removing + 762e. ActReqMdfOneAdm Request a user's ID for enrollment/removing + 763b. ActReqMdfGst Request enrollment/removing of a user + 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 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 768. ActCreOthUsrDat Insertar a new user in this course - 769. ActUpdOthUsrDat Actualizar the card of otro user + 769b. ActUpdOthGst Update another user's data and groups + 769c. ActUpdOthStd Update another user's data and groups + 769d. ActUpdOthTch Update another user's data and groups + 769e. ActUpdOthAdm Update another user's data and groups 770. ActReqAccEnrCrs Confirm acceptation / refusion of enrollment in current course 771. ActAccEnrCrs Accept enrollment in current course 772. ActRemMeCrs Refuse enrollment in current course @@ -2294,16 +2303,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}, - /* ActReqMdfOneUsr */{ 177,-1,TabUsr,ActReqMdfSevUsr ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReqRegRemUsr ,NULL}, - /* ActReqMdfUsr */{ 161,-1,TabUsr,ActReqMdfSevUsr ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_AskIfRegRemAnotherUsr ,NULL}, + /* ActReqMdfOneGst */{1414,-1,TabUsr,ActLstInv ,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 */{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,ActReqMdfSevUsr ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pho_SendPhotoUsr ,NULL}, /* ActDetUsrPho */{ 695,-1,TabUsr,ActReqMdfSevUsr ,0x1F0,0x1E0,0x1E0,Act_CONTENT_DATA,Act_MAIN_WINDOW,NULL ,Pho_RecUsrPhotoDetFaces ,NULL}, /* ActUpdUsrPho */{ 374,-1,TabUsr,ActReqMdfSevUsr ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,Pho_UpdateUsrPhoto1 ,Pho_UpdateUsrPhoto2 ,NULL}, /* ActRemUsrPho */{ 429,-1,TabUsr,ActReqMdfSevUsr ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pho_RemoveUsrPhoto ,NULL}, - /* ActCreOthUsrDat */{ 440,-1,TabUsr,ActReqMdfSevUsr ,0x1F0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_CreatAndShowNewUsrRecordAndRegInCrs,NULL}, - /* ActUpdOthUsrDat */{ 439,-1,TabUsr,ActReqMdfSevUsr ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ModifAndShowUsrCardAndRegInCrsAndGrps,NULL}, + /* ActCreOthUsrDat */{ 440,-1,TabUsr,ActReqMdfSevUsr ,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}, + /* 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}, /* ActReqAccEnrCrs */{ 592,-1,TabUsr,ActReqMdfSevUsr ,0x1F8,0x000,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReqAcceptRegisterInCrs ,NULL}, /* ActAccEnrCrs */{ 558,-1,TabUsr,ActReqMdfSevUsr ,0x1F8,0x000,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_AcceptRegisterMeInCrs ,NULL}, @@ -2833,7 +2852,7 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq -1, // #158 (obsolete action) -1, // #159 (obsolete action) -1, // #160 (obsolete action) - ActReqMdfUsr, // #161 + -1, // #161 (obsolete action) -1, // #162 (obsolete action) -1, // #163 (obsolete action) ActRcvPagCrsLnk, // #164 @@ -2849,7 +2868,7 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq ActNewGrpTyp, // #174 ActRemGrp, // #175 -1, // #176 (obsolete action) - ActReqMdfOneUsr, // #177 + -1, // #177 (obsolete action) -1, // #178 (obsolete action) ActPrnExaAnn, // #179 -1, // #180 (obsolete action) @@ -3111,7 +3130,7 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq ActDelAllRcvMsg, // #436 -1, // #437 (obsolete action) -1, // #438 (obsolete action) - ActUpdOthUsrDat, // #439 + -1, // #439 (obsolete action) ActCreOthUsrDat, // #440 -1, // #441 (obsolete action) -1, // #442 (obsolete action) @@ -4089,6 +4108,18 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq ActUnfUsr, // #1411 ActSeeFlg, // #1412 ActSeeFlr, // #1413 + ActReqMdfOneGst, // #1414 + ActReqMdfOneStd, // #1415 + ActReqMdfOneTch, // #1416 + ActReqMdfOneAdm, // #1417 + ActReqMdfGst, // #1418 + ActReqMdfStd, // #1419 + ActReqMdfTch, // #1420 + ActReqMdfAdm, // #1421 + ActUpdOthGst, // #1422 + ActUpdOthStd, // #1423 + ActUpdOthTch, // #1424 + ActUpdOthAdm, // #1425 }; /*****************************************************************************/ @@ -4484,7 +4515,7 @@ void Act_AdjustCurrentAction (void) case ActReqEdiRecCom: case ActReqEdiMyIns: case ActReqSelGrp: - case ActReqMdfOneUsr: // A student use this action to remove him/herself from current course + case ActReqMdfOneStd: // A student use this action to remove him/herself from current course case ActSeeCrsTimTbl: case ActPrnCrsTimTbl: case ActSeeMyTimTbl: diff --git a/swad_action.h b/swad_action.h index e9d5548df..f34c2160d 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+110+168+28+77) +#define Act_NUM_ACTIONS (7+52+15+90+73+68+204+182+119+168+28+77) -#define Act_MAX_ACTION_COD 1413 +#define Act_MAX_ACTION_COD 1425 #define Act_MAX_OPTIONS_IN_MENU_PER_TAB 20 @@ -942,53 +942,63 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica #define ActReqRejSignUp (ActChgNumRowFooGrp+ 70) #define ActRejSignUp (ActChgNumRowFooGrp+ 71) -#define ActReqMdfOneUsr (ActChgNumRowFooGrp+ 72) -#define ActReqMdfUsr (ActChgNumRowFooGrp+ 73) +#define ActReqMdfOneGst (ActChgNumRowFooGrp+ 72) +#define ActReqMdfOneStd (ActChgNumRowFooGrp+ 73) +#define ActReqMdfOneTch (ActChgNumRowFooGrp+ 74) +#define ActReqMdfOneAdm (ActChgNumRowFooGrp+ 75) -#define ActReqUsrPho (ActChgNumRowFooGrp+ 74) -#define ActDetUsrPho (ActChgNumRowFooGrp+ 75) -#define ActUpdUsrPho (ActChgNumRowFooGrp+ 76) -#define ActRemUsrPho (ActChgNumRowFooGrp+ 77) -#define ActCreOthUsrDat (ActChgNumRowFooGrp+ 78) -#define ActUpdOthUsrDat (ActChgNumRowFooGrp+ 79) +#define ActReqMdfGst (ActChgNumRowFooGrp+ 76) +#define ActReqMdfStd (ActChgNumRowFooGrp+ 77) +#define ActReqMdfTch (ActChgNumRowFooGrp+ 78) +#define ActReqMdfAdm (ActChgNumRowFooGrp+ 79) -#define ActReqAccEnrCrs (ActChgNumRowFooGrp+ 80) -#define ActAccEnrCrs (ActChgNumRowFooGrp+ 81) -#define ActRemMeCrs (ActChgNumRowFooGrp+ 82) +#define ActReqUsrPho (ActChgNumRowFooGrp+ 80) +#define ActDetUsrPho (ActChgNumRowFooGrp+ 81) +#define ActUpdUsrPho (ActChgNumRowFooGrp+ 82) +#define ActRemUsrPho (ActChgNumRowFooGrp+ 83) +#define ActCreOthUsrDat (ActChgNumRowFooGrp+ 84) +#define ActUpdOthGst (ActChgNumRowFooGrp+ 85) +#define ActUpdOthStd (ActChgNumRowFooGrp+ 86) +#define ActUpdOthTch (ActChgNumRowFooGrp+ 87) +#define ActUpdOthAdm (ActChgNumRowFooGrp+ 88) -#define ActNewAdmIns (ActChgNumRowFooGrp+ 83) -#define ActRemAdmIns (ActChgNumRowFooGrp+ 84) -#define ActNewAdmCtr (ActChgNumRowFooGrp+ 85) -#define ActRemAdmCtr (ActChgNumRowFooGrp+ 86) -#define ActNewAdmDeg (ActChgNumRowFooGrp+ 87) -#define ActRemAdmDeg (ActChgNumRowFooGrp+ 88) +#define ActReqAccEnrCrs (ActChgNumRowFooGrp+ 89) +#define ActAccEnrCrs (ActChgNumRowFooGrp+ 90) +#define ActRemMeCrs (ActChgNumRowFooGrp+ 91) -#define ActRcvFrmMdfUsrCrs (ActChgNumRowFooGrp+ 89) -#define ActFrmIDsOthUsr (ActChgNumRowFooGrp+ 90) -#define ActRemIDOth (ActChgNumRowFooGrp+ 91) -#define ActNewIDOth (ActChgNumRowFooGrp+ 92) -#define ActFrmPwdOthUsr (ActChgNumRowFooGrp+ 93) -#define ActChgPwdOthUsr (ActChgNumRowFooGrp+ 94) -#define ActRemUsrCrs (ActChgNumRowFooGrp+ 95) -#define ActRemUsrGbl (ActChgNumRowFooGrp+ 96) +#define ActNewAdmIns (ActChgNumRowFooGrp+ 92) +#define ActRemAdmIns (ActChgNumRowFooGrp+ 93) +#define ActNewAdmCtr (ActChgNumRowFooGrp+ 94) +#define ActRemAdmCtr (ActChgNumRowFooGrp+ 95) +#define ActNewAdmDeg (ActChgNumRowFooGrp+ 96) +#define ActRemAdmDeg (ActChgNumRowFooGrp+ 97) -#define ActReqRemAllStdCrs (ActChgNumRowFooGrp+ 97) -#define ActRemAllStdCrs (ActChgNumRowFooGrp+ 98) +#define ActRcvFrmMdfUsrCrs (ActChgNumRowFooGrp+ 98) +#define ActFrmIDsOthUsr (ActChgNumRowFooGrp+ 99) +#define ActRemIDOth (ActChgNumRowFooGrp+100) +#define ActNewIDOth (ActChgNumRowFooGrp+101) +#define ActFrmPwdOthUsr (ActChgNumRowFooGrp+102) +#define ActChgPwdOthUsr (ActChgNumRowFooGrp+103) +#define ActRemUsrCrs (ActChgNumRowFooGrp+104) +#define ActRemUsrGbl (ActChgNumRowFooGrp+105) -#define ActReqRemOldUsr (ActChgNumRowFooGrp+ 99) -#define ActRemOldUsr (ActChgNumRowFooGrp+100) +#define ActReqRemAllStdCrs (ActChgNumRowFooGrp+106) +#define ActRemAllStdCrs (ActChgNumRowFooGrp+107) -#define ActSeePubPrf (ActChgNumRowFooGrp+101) -#define ActCal1stClkTim (ActChgNumRowFooGrp+102) -#define ActCalNumClk (ActChgNumRowFooGrp+103) -#define ActCalNumFilVie (ActChgNumRowFooGrp+104) -#define ActCalNumForPst (ActChgNumRowFooGrp+105) -#define ActCalNumMsgSnt (ActChgNumRowFooGrp+106) +#define ActReqRemOldUsr (ActChgNumRowFooGrp+108) +#define ActRemOldUsr (ActChgNumRowFooGrp+109) -#define ActFolUsr (ActChgNumRowFooGrp+107) -#define ActUnfUsr (ActChgNumRowFooGrp+108) -#define ActSeeFlg (ActChgNumRowFooGrp+109) -#define ActSeeFlr (ActChgNumRowFooGrp+110) +#define ActSeePubPrf (ActChgNumRowFooGrp+110) +#define ActCal1stClkTim (ActChgNumRowFooGrp+111) +#define ActCalNumClk (ActChgNumRowFooGrp+112) +#define ActCalNumFilVie (ActChgNumRowFooGrp+113) +#define ActCalNumForPst (ActChgNumRowFooGrp+114) +#define ActCalNumMsgSnt (ActChgNumRowFooGrp+115) + +#define ActFolUsr (ActChgNumRowFooGrp+116) +#define ActUnfUsr (ActChgNumRowFooGrp+117) +#define ActSeeFlg (ActChgNumRowFooGrp+118) +#define ActSeeFlr (ActChgNumRowFooGrp+119) /*****************************************************************************/ /******************************* Messages tab ********************************/ diff --git a/swad_changelog.h b/swad_changelog.h index f4aa9b1a2..1a6525429 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,12 +103,31 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.128.1 (2015/09/10)" +#define Log_PLATFORM_VERSION "SWAD 14.129 (2015/09/11)" // 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.128.1: Sep 10, 2015 Two new social networks. (184278 lines) + Version 14.129: Sep 11, 2015 New links to admin a user in list of students. + Changes in user enrollment. + Fixed bug in user enrollment. (184411 lines) +UPDATE actions SET Obsolete='Y' WHERE ActCod='177'; +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1414','es','N','Solicitar ID modif. invitado'); +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1415','es','N','Solicitar ID modif. estudiante'); +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1416','es','N','Solicitar ID modif. profesor'); +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1417','es','N','Solicitar ID modif. administrador'); +UPDATE actions SET Obsolete='Y' WHERE ActCod='161'; +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1418','es','N','Confirmar modif. invitado'); +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1419','es','N','Confirmar modif. estudiante'); +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1420','es','N','Confirmar modif. profesor'); +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1421','es','N','Confirmar modif. administrador'); +UPDATE actions SET Obsolete='Y' WHERE ActCod='439'; +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1422','es','N','Modificar datos invitado'); +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1423','es','N','Modificar datos estudiante'); +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1424','es','N','Modificar datos profesor'); +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1425','es','N','Modificar datos administrador'); + + Version 14.128.1: Sep 11, 2015 Two new social networks. (184278 lines) 1 change necessary in database: ALTER TABLE usr_webs CHANGE Web Web ENUM('www','500px','delicious','deviantart','diaspora','edmodo','facebook','flickr','foursquare','github','gnusocial','googleplus','googlescholar','identica','instagram','linkedin','orcid','paperli','pinterest','quitter','researchgate','researcherid','scoopit','slideshare','storify','tumblr','twitter','wikipedia','youtube') NOT NULL; diff --git a/swad_enrollment.c b/swad_enrollment.c index 29bd2f660..a088e6bd2 100644 --- a/swad_enrollment.c +++ b/swad_enrollment.c @@ -88,7 +88,6 @@ extern struct Globals Gbl; static void Enr_ShowFormRegRemSeveralUsrs (void); -static void Enr_PutLinkToRemOldUsrs (void); static void Enr_PutAreaToEnterUsrsIDs (void); static void Enr_PutActionsRegRemSeveralUsrs (void); @@ -96,14 +95,13 @@ static void Enr_RegisterUsr (struct UsrData *UsrDat,Rol_Role_t RegRemRole, struct ListCodGrps *LstGrps,unsigned *NumUsrsRegistered); static void Enr_MarkOfficialStdsAsRemovable (long ImpGrpCod,bool RemoveSpecifiedUsrs); -static void Enr_PutLinkToRemAllStdsThisCrs (void); static void Enr_RemoveEnrollmentRequest (long CrsCod,long UsrCod); -static void Enr_PutLinkToAdminOneUsr (void); -static void Enr_PutLinkToAdminSeveralUsrs (void); -static void Enr_ReqAnotherUsrIDToRegisterRemove (void); -static void Enr_AskIfRegRemMe (void); -static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods); +static void Enr_ReqRegRemUsr (Rol_Role_t Role); +static void Enr_ReqAnotherUsrIDToRegisterRemove (Rol_Role_t Role); +static void Enr_AskIfRegRemMe (Rol_Role_t Role); +static void Enr_AskIfRegRemAnotherUsr (Rol_Role_t Role); +static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role); static void Enr_ShowFormToEditOtherUsr (void); @@ -447,39 +445,28 @@ void Enr_ReqAdminUsrs (void) switch (Gbl.Usrs.Me.LoggedRole) { case Rol__GUEST_: - case Rol_VISITOR: + Enr_AskIfRegRemMe (Rol__GUEST_); + break; case Rol_STUDENT: - Enr_AskIfRegRemMe (); + Enr_AskIfRegRemMe (Rol_STUDENT); break; case Rol_TEACHER: if (Gbl.CurrentCrs.Crs.CrsCod > 0) Enr_ShowFormRegRemSeveralUsrs (); else - Enr_AskIfRegRemMe (); + Enr_AskIfRegRemMe (Rol_TEACHER); break; case Rol_DEG_ADM: - if (Gbl.CurrentDeg.Deg.DegCod > 0) - Enr_ReqAnotherUsrIDToRegisterRemove (); - else - Enr_AskIfRegRemMe (); - break; case Rol_CTR_ADM: - if (Gbl.CurrentCtr.Ctr.CtrCod > 0) - Enr_ReqAnotherUsrIDToRegisterRemove (); - else - Enr_AskIfRegRemMe (); - break; case Rol_INS_ADM: - if (Gbl.CurrentIns.Ins.InsCod > 0) - Enr_ReqAnotherUsrIDToRegisterRemove (); - else - Enr_AskIfRegRemMe (); + Enr_ReqRegRemUsr (Rol_DEG_ADM); break; case Rol_SYS_ADM: if (Gbl.CurrentCrs.Crs.CrsCod > 0) Enr_ShowFormRegRemSeveralUsrs (); else - Enr_ReqAnotherUsrIDToRegisterRemove (); + Enr_ReqAnotherUsrIDToRegisterRemove (Rol_TEACHER); // TODO: Change this line to the following + // Enr_ReqAnotherUsrIDToRegisterRemove (Role); break; default: Lay_ShowAlert (Lay_ERROR,Txt_You_dont_have_permission_to_perform_this_action); @@ -512,9 +499,6 @@ static void Enr_ShowFormRegRemSeveralUsrs (void) /***** Put contextual links *****/ fprintf (Gbl.F.Out,"