mirror of https://github.com/acanas/swad-core.git
Version 14.77
This commit is contained in:
parent
602def7b7e
commit
49dacdeb2b
|
@ -849,6 +849,7 @@ Users:
|
|||
640. ActSeeSignUpReq Show pending requests for inscription in the current course
|
||||
641. ActReqMdfSevUsr Request the enrollment/removing of several students to / from current course
|
||||
642. ActLstCon List connected users
|
||||
---. ActSeeUsr Show another user's profile
|
||||
|
||||
643. ActChgGrp Change my groups
|
||||
644. ActReqEdiGrp Request the edition of groups
|
||||
|
@ -877,8 +878,8 @@ Users:
|
|||
666. ActLstInvAll List in another window the full data of guests
|
||||
667. ActLstStdAll List in another window the full data of students
|
||||
668. ActLstTchAll List in another window the full data of teachers
|
||||
669. ActSeeRecOneStd Show records of one selected student
|
||||
670. ActSeeRecOneTch Show records of one selected teacher
|
||||
669. ActSeeRecOneStd Show record of one selected student
|
||||
670. ActSeeRecOneTch Show record of one selected teacher
|
||||
671. ActSeeRecSevInv Show records of several selected guests
|
||||
672. ActSeeRecSevStd Show records of several selected students
|
||||
673. ActSeeRecSevTch Show records of several selected teachers
|
||||
|
@ -1335,7 +1336,8 @@ const struct Act_Menu Act_Menu[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
|||
{ActSeeSignUpReq ,false},
|
||||
{ActReqMdfSevUsr ,true },
|
||||
|
||||
{ActLstCon ,true },
|
||||
{ActLstCon ,false},
|
||||
{ActSeeUsr ,true },
|
||||
},
|
||||
// TabMsg **********
|
||||
{
|
||||
|
@ -2205,6 +2207,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActSeeSignUpReq */{1057, 7,TabUsr,ActSeeSignUpReq ,0x1F0,0x1F0,0x1F0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ShowEnrollmentRequests ,"enrollmentrequest" },
|
||||
/* ActReqMdfSevUsr */{ 797, 8,TabUsr,ActReqMdfSevUsr ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_ReqAdminUsrs ,"configs" },
|
||||
/* ActLstCon */{ 995, 9,TabUsr,ActLstCon ,0x1FF,0x1FF,0x1FF,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Con_ShowConnectedUsrs ,"userplugged" },
|
||||
/* ActSeeUsr */{1401,10,TabUsr,ActSeeUsr ,0x1FF,0x1FF,0x1FF,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Usr_ShowUser ,"prf" },
|
||||
|
||||
// Actions not in menu:
|
||||
/* ActChgGrp */{ 118,-1,TabUsr,ActReqSelGrp ,0x118,0x100,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Grp_ChangeMyGrpsAndShowChanges ,NULL},
|
||||
|
@ -2238,8 +2241,8 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* 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_ListRecordOneStdCrs ,NULL},
|
||||
/* ActSeeRecOneTch */{1175,-1,TabUsr,ActLstTch ,0x1FE,0x1FE,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Rec_ListRecordOneTchCrs ,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},
|
||||
/* 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},
|
||||
|
@ -4042,6 +4045,7 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq
|
|||
ActReqDatComIns, // #1398
|
||||
ActChgDatComIns, // #1399
|
||||
ActDowComIns, // #1400
|
||||
ActSeeUsr, // #1401
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
181
swad_action.h
181
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+184+98+168+28+75)
|
||||
#define Act_NUM_ACTIONS (7+52+15+90+73+68+204+184+99+168+28+75)
|
||||
|
||||
#define Act_MAX_ACTION_COD 1400
|
||||
#define Act_MAX_ACTION_COD 1401
|
||||
|
||||
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 20
|
||||
|
||||
|
@ -877,106 +877,107 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica
|
|||
#define ActSeeSignUpReq (ActChgNumRowFooGrp+ 8)
|
||||
#define ActReqMdfSevUsr (ActChgNumRowFooGrp+ 9)
|
||||
#define ActLstCon (ActChgNumRowFooGrp+10)
|
||||
#define ActSeeUsr (ActChgNumRowFooGrp+11)
|
||||
|
||||
// Secondary actions
|
||||
#define ActChgGrp (ActChgNumRowFooGrp+11)
|
||||
#define ActReqEdiGrp (ActChgNumRowFooGrp+12)
|
||||
#define ActNewGrpTyp (ActChgNumRowFooGrp+13)
|
||||
#define ActReqRemGrpTyp (ActChgNumRowFooGrp+14)
|
||||
#define ActRemGrpTyp (ActChgNumRowFooGrp+15)
|
||||
#define ActRenGrpTyp (ActChgNumRowFooGrp+16)
|
||||
#define ActChgMdtGrpTyp (ActChgNumRowFooGrp+17)
|
||||
#define ActChgMulGrpTyp (ActChgNumRowFooGrp+18)
|
||||
#define ActChgTimGrpTyp (ActChgNumRowFooGrp+19)
|
||||
#define ActNewGrp (ActChgNumRowFooGrp+20)
|
||||
#define ActReqRemGrp (ActChgNumRowFooGrp+21)
|
||||
#define ActRemGrp (ActChgNumRowFooGrp+22)
|
||||
#define ActOpeGrp (ActChgNumRowFooGrp+23)
|
||||
#define ActCloGrp (ActChgNumRowFooGrp+24)
|
||||
#define ActEnaFilZonGrp (ActChgNumRowFooGrp+25)
|
||||
#define ActDisFilZonGrp (ActChgNumRowFooGrp+26)
|
||||
#define ActChgGrpTyp (ActChgNumRowFooGrp+27)
|
||||
#define ActRenGrp (ActChgNumRowFooGrp+28)
|
||||
#define ActChgMaxStdGrp (ActChgNumRowFooGrp+29)
|
||||
#define ActChgGrp (ActChgNumRowFooGrp+12)
|
||||
#define ActReqEdiGrp (ActChgNumRowFooGrp+13)
|
||||
#define ActNewGrpTyp (ActChgNumRowFooGrp+14)
|
||||
#define ActReqRemGrpTyp (ActChgNumRowFooGrp+15)
|
||||
#define ActRemGrpTyp (ActChgNumRowFooGrp+16)
|
||||
#define ActRenGrpTyp (ActChgNumRowFooGrp+17)
|
||||
#define ActChgMdtGrpTyp (ActChgNumRowFooGrp+18)
|
||||
#define ActChgMulGrpTyp (ActChgNumRowFooGrp+19)
|
||||
#define ActChgTimGrpTyp (ActChgNumRowFooGrp+20)
|
||||
#define ActNewGrp (ActChgNumRowFooGrp+21)
|
||||
#define ActReqRemGrp (ActChgNumRowFooGrp+22)
|
||||
#define ActRemGrp (ActChgNumRowFooGrp+23)
|
||||
#define ActOpeGrp (ActChgNumRowFooGrp+24)
|
||||
#define ActCloGrp (ActChgNumRowFooGrp+25)
|
||||
#define ActEnaFilZonGrp (ActChgNumRowFooGrp+26)
|
||||
#define ActDisFilZonGrp (ActChgNumRowFooGrp+27)
|
||||
#define ActChgGrpTyp (ActChgNumRowFooGrp+28)
|
||||
#define ActRenGrp (ActChgNumRowFooGrp+29)
|
||||
#define ActChgMaxStdGrp (ActChgNumRowFooGrp+30)
|
||||
|
||||
#define ActGetExtLstStd (ActChgNumRowFooGrp+30)
|
||||
#define ActPrnInvPho (ActChgNumRowFooGrp+31)
|
||||
#define ActPrnStdPho (ActChgNumRowFooGrp+32)
|
||||
#define ActPrnTchPho (ActChgNumRowFooGrp+33)
|
||||
#define ActLstInvAll (ActChgNumRowFooGrp+34)
|
||||
#define ActLstStdAll (ActChgNumRowFooGrp+35)
|
||||
#define ActLstTchAll (ActChgNumRowFooGrp+36)
|
||||
#define ActSeeRecOneStd (ActChgNumRowFooGrp+37)
|
||||
#define ActSeeRecOneTch (ActChgNumRowFooGrp+38)
|
||||
#define ActSeeRecSevInv (ActChgNumRowFooGrp+39)
|
||||
#define ActSeeRecSevStd (ActChgNumRowFooGrp+40)
|
||||
#define ActSeeRecSevTch (ActChgNumRowFooGrp+41)
|
||||
#define ActPrnRecSevInv (ActChgNumRowFooGrp+42)
|
||||
#define ActPrnRecSevStd (ActChgNumRowFooGrp+43)
|
||||
#define ActPrnRecSevTch (ActChgNumRowFooGrp+44)
|
||||
#define ActRcvRecOthUsr (ActChgNumRowFooGrp+45)
|
||||
#define ActEdiRecFie (ActChgNumRowFooGrp+46)
|
||||
#define ActNewFie (ActChgNumRowFooGrp+47)
|
||||
#define ActReqRemFie (ActChgNumRowFooGrp+48)
|
||||
#define ActRemFie (ActChgNumRowFooGrp+49)
|
||||
#define ActRenFie (ActChgNumRowFooGrp+50)
|
||||
#define ActChgRowFie (ActChgNumRowFooGrp+51)
|
||||
#define ActChgVisFie (ActChgNumRowFooGrp+52)
|
||||
#define ActGetExtLstStd (ActChgNumRowFooGrp+31)
|
||||
#define ActPrnInvPho (ActChgNumRowFooGrp+32)
|
||||
#define ActPrnStdPho (ActChgNumRowFooGrp+33)
|
||||
#define ActPrnTchPho (ActChgNumRowFooGrp+34)
|
||||
#define ActLstInvAll (ActChgNumRowFooGrp+35)
|
||||
#define ActLstStdAll (ActChgNumRowFooGrp+36)
|
||||
#define ActLstTchAll (ActChgNumRowFooGrp+37)
|
||||
#define ActSeeRecOneStd (ActChgNumRowFooGrp+38)
|
||||
#define ActSeeRecOneTch (ActChgNumRowFooGrp+39)
|
||||
#define ActSeeRecSevInv (ActChgNumRowFooGrp+40)
|
||||
#define ActSeeRecSevStd (ActChgNumRowFooGrp+41)
|
||||
#define ActSeeRecSevTch (ActChgNumRowFooGrp+42)
|
||||
#define ActPrnRecSevInv (ActChgNumRowFooGrp+43)
|
||||
#define ActPrnRecSevStd (ActChgNumRowFooGrp+44)
|
||||
#define ActPrnRecSevTch (ActChgNumRowFooGrp+45)
|
||||
#define ActRcvRecOthUsr (ActChgNumRowFooGrp+46)
|
||||
#define ActEdiRecFie (ActChgNumRowFooGrp+47)
|
||||
#define ActNewFie (ActChgNumRowFooGrp+48)
|
||||
#define ActReqRemFie (ActChgNumRowFooGrp+49)
|
||||
#define ActRemFie (ActChgNumRowFooGrp+50)
|
||||
#define ActRenFie (ActChgNumRowFooGrp+51)
|
||||
#define ActChgRowFie (ActChgNumRowFooGrp+52)
|
||||
#define ActChgVisFie (ActChgNumRowFooGrp+53)
|
||||
|
||||
#define ActReqLstAttStd (ActChgNumRowFooGrp+53)
|
||||
#define ActSeeLstAttStd (ActChgNumRowFooGrp+54)
|
||||
#define ActPrnLstAttStd (ActChgNumRowFooGrp+55)
|
||||
#define ActFrmNewAtt (ActChgNumRowFooGrp+56)
|
||||
#define ActEdiOneAtt (ActChgNumRowFooGrp+57)
|
||||
#define ActNewAtt (ActChgNumRowFooGrp+58)
|
||||
#define ActChgAtt (ActChgNumRowFooGrp+59)
|
||||
#define ActReqRemAtt (ActChgNumRowFooGrp+60)
|
||||
#define ActRemAtt (ActChgNumRowFooGrp+61)
|
||||
#define ActHidAtt (ActChgNumRowFooGrp+62)
|
||||
#define ActShoAtt (ActChgNumRowFooGrp+63)
|
||||
#define ActSeeOneAtt (ActChgNumRowFooGrp+64)
|
||||
#define ActRecAttStd (ActChgNumRowFooGrp+65)
|
||||
#define ActRecAttMe (ActChgNumRowFooGrp+66)
|
||||
#define ActReqLstAttStd (ActChgNumRowFooGrp+54)
|
||||
#define ActSeeLstAttStd (ActChgNumRowFooGrp+55)
|
||||
#define ActPrnLstAttStd (ActChgNumRowFooGrp+56)
|
||||
#define ActFrmNewAtt (ActChgNumRowFooGrp+57)
|
||||
#define ActEdiOneAtt (ActChgNumRowFooGrp+58)
|
||||
#define ActNewAtt (ActChgNumRowFooGrp+59)
|
||||
#define ActChgAtt (ActChgNumRowFooGrp+60)
|
||||
#define ActReqRemAtt (ActChgNumRowFooGrp+61)
|
||||
#define ActRemAtt (ActChgNumRowFooGrp+62)
|
||||
#define ActHidAtt (ActChgNumRowFooGrp+63)
|
||||
#define ActShoAtt (ActChgNumRowFooGrp+64)
|
||||
#define ActSeeOneAtt (ActChgNumRowFooGrp+65)
|
||||
#define ActRecAttStd (ActChgNumRowFooGrp+66)
|
||||
#define ActRecAttMe (ActChgNumRowFooGrp+67)
|
||||
|
||||
#define ActSignUp (ActChgNumRowFooGrp+67)
|
||||
#define ActReqRejSignUp (ActChgNumRowFooGrp+68)
|
||||
#define ActRejSignUp (ActChgNumRowFooGrp+69)
|
||||
#define ActSignUp (ActChgNumRowFooGrp+68)
|
||||
#define ActReqRejSignUp (ActChgNumRowFooGrp+69)
|
||||
#define ActRejSignUp (ActChgNumRowFooGrp+70)
|
||||
|
||||
#define ActReqMdfOneUsr (ActChgNumRowFooGrp+70)
|
||||
#define ActReqMdfUsr (ActChgNumRowFooGrp+71)
|
||||
#define ActReqMdfOneUsr (ActChgNumRowFooGrp+71)
|
||||
#define ActReqMdfUsr (ActChgNumRowFooGrp+72)
|
||||
|
||||
#define ActReqUsrPho (ActChgNumRowFooGrp+72)
|
||||
#define ActDetUsrPho (ActChgNumRowFooGrp+73)
|
||||
#define ActUpdUsrPho (ActChgNumRowFooGrp+74)
|
||||
#define ActRemUsrPho (ActChgNumRowFooGrp+75)
|
||||
#define ActCreOthUsrDat (ActChgNumRowFooGrp+76)
|
||||
#define ActUpdOthUsrDat (ActChgNumRowFooGrp+77)
|
||||
#define ActReqUsrPho (ActChgNumRowFooGrp+73)
|
||||
#define ActDetUsrPho (ActChgNumRowFooGrp+74)
|
||||
#define ActUpdUsrPho (ActChgNumRowFooGrp+75)
|
||||
#define ActRemUsrPho (ActChgNumRowFooGrp+76)
|
||||
#define ActCreOthUsrDat (ActChgNumRowFooGrp+77)
|
||||
#define ActUpdOthUsrDat (ActChgNumRowFooGrp+78)
|
||||
|
||||
#define ActReqAccEnrCrs (ActChgNumRowFooGrp+78)
|
||||
#define ActAccEnrCrs (ActChgNumRowFooGrp+79)
|
||||
#define ActRemMeCrs (ActChgNumRowFooGrp+80)
|
||||
#define ActReqAccEnrCrs (ActChgNumRowFooGrp+79)
|
||||
#define ActAccEnrCrs (ActChgNumRowFooGrp+80)
|
||||
#define ActRemMeCrs (ActChgNumRowFooGrp+81)
|
||||
|
||||
#define ActNewAdmIns (ActChgNumRowFooGrp+81)
|
||||
#define ActRemAdmIns (ActChgNumRowFooGrp+82)
|
||||
#define ActNewAdmCtr (ActChgNumRowFooGrp+83)
|
||||
#define ActRemAdmCtr (ActChgNumRowFooGrp+84)
|
||||
#define ActNewAdmDeg (ActChgNumRowFooGrp+85)
|
||||
#define ActRemAdmDeg (ActChgNumRowFooGrp+86)
|
||||
#define ActNewAdmIns (ActChgNumRowFooGrp+82)
|
||||
#define ActRemAdmIns (ActChgNumRowFooGrp+83)
|
||||
#define ActNewAdmCtr (ActChgNumRowFooGrp+84)
|
||||
#define ActRemAdmCtr (ActChgNumRowFooGrp+85)
|
||||
#define ActNewAdmDeg (ActChgNumRowFooGrp+86)
|
||||
#define ActRemAdmDeg (ActChgNumRowFooGrp+87)
|
||||
|
||||
#define ActRcvFrmMdfUsrCrs (ActChgNumRowFooGrp+87)
|
||||
#define ActFrmIDsOthUsr (ActChgNumRowFooGrp+88)
|
||||
#define ActRemIDOth (ActChgNumRowFooGrp+89)
|
||||
#define ActNewIDOth (ActChgNumRowFooGrp+90)
|
||||
#define ActFrmPwdOthUsr (ActChgNumRowFooGrp+91)
|
||||
#define ActChgPwdOthUsr (ActChgNumRowFooGrp+92)
|
||||
#define ActRemUsrCrs (ActChgNumRowFooGrp+93)
|
||||
#define ActRemUsrGbl (ActChgNumRowFooGrp+94)
|
||||
#define ActRcvFrmMdfUsrCrs (ActChgNumRowFooGrp+88)
|
||||
#define ActFrmIDsOthUsr (ActChgNumRowFooGrp+89)
|
||||
#define ActRemIDOth (ActChgNumRowFooGrp+90)
|
||||
#define ActNewIDOth (ActChgNumRowFooGrp+91)
|
||||
#define ActFrmPwdOthUsr (ActChgNumRowFooGrp+92)
|
||||
#define ActChgPwdOthUsr (ActChgNumRowFooGrp+93)
|
||||
#define ActRemUsrCrs (ActChgNumRowFooGrp+94)
|
||||
#define ActRemUsrGbl (ActChgNumRowFooGrp+95)
|
||||
|
||||
#define ActReqRemAllStdCrs (ActChgNumRowFooGrp+95)
|
||||
#define ActRemAllStdCrs (ActChgNumRowFooGrp+96)
|
||||
#define ActReqRemAllStdCrs (ActChgNumRowFooGrp+96)
|
||||
#define ActRemAllStdCrs (ActChgNumRowFooGrp+97)
|
||||
|
||||
#define ActReqRemOldUsr (ActChgNumRowFooGrp+97)
|
||||
#define ActRemOldUsr (ActChgNumRowFooGrp+98)
|
||||
#define ActReqRemOldUsr (ActChgNumRowFooGrp+98)
|
||||
#define ActRemOldUsr (ActChgNumRowFooGrp+99)
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************* Messages tab ********************************/
|
||||
|
|
|
@ -103,11 +103,12 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 14.76.5 (2015/03/03)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 14.77 (2015/03/04)"
|
||||
|
||||
// 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 | tail -1
|
||||
/*
|
||||
Version 14.77 : Mar 04, 2015 New parameter "UsrNick" to go to a user. (178406 lines)
|
||||
Version 14.76.5: Mar 03, 2015 Added new social networks, suggested by Marta Gómez Macías. (178293 lines)
|
||||
1 change necessary in database:
|
||||
ALTER TABLE usr_webs CHANGE Web Web ENUM('www','500px','delicious','deviantart','edmodo','facebook','flickr','foursquare','github','googleplus','googlescholar','instagram','linkedin','paperli','pinterest','researchgate','scoopit','slideshare','storify','tumblr','twitter','wikipedia','youtube') NOT NULL;
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
/** Uncomment one of the following installations of SWAD or create your own **/
|
||||
/*****************************************************************************/
|
||||
|
||||
//#define LOCALHOST_UBUNTU // Comment this line if not applicable
|
||||
#define LOCALHOST_UBUNTU // Comment this line if not applicable
|
||||
//#define OPENSWAD_ORG // Comment this line if not applicable
|
||||
#define SWAD_UGR_ES // Comment this line if not applicable
|
||||
//#define SWAD_UGR_ES // Comment this line if not applicable
|
||||
//#define WWW_CEVUNA_UNA_PY // Comment this line if not applicable
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -135,6 +135,7 @@ bool Nck_GetNicknameFromUsrCod (long UsrCod,char *Nickname)
|
|||
/*****************************************************************************/
|
||||
/************** Get user's code of a user from his/her nickname **************/
|
||||
/*****************************************************************************/
|
||||
// Nickname may have leading '@'
|
||||
// Returns true if nickname found in database
|
||||
|
||||
long Nck_GetUsrCodFromNickname (const char *Nickname)
|
||||
|
|
|
@ -132,11 +132,14 @@ void Par_GetMainParameters (void)
|
|||
extern const char *Ico_IconSetId[Ico_NUM_ICON_SETS];
|
||||
char UnsignedStr[10+1];
|
||||
unsigned UnsignedNum;
|
||||
char Nickname[Nck_MAX_BYTES_NICKNAME_WITH_ARROBA + 1];
|
||||
long OtherUsrCod;
|
||||
char LongStr[1+10+1];
|
||||
char YearStr[2+1];
|
||||
Lay_Layout_t LayoutFromForm;
|
||||
|
||||
/***** Reset codes of institution, degree and course *****/
|
||||
/***** Reset codes of country, institution, centre, degree and course *****/
|
||||
Gbl.CurrentCty.Cty.CtyCod =
|
||||
Gbl.CurrentIns.Ins.InsCod =
|
||||
Gbl.CurrentCtr.Ctr.CtrCod =
|
||||
Gbl.CurrentDeg.Deg.DegCod =
|
||||
|
@ -260,7 +263,6 @@ void Par_GetMainParameters (void)
|
|||
{
|
||||
Gbl.CurrentCtr.Ctr.CtrCod = Str_ConvertStrCodToLongCod (LongStr);
|
||||
Gbl.YearOK = false;
|
||||
Gbl.CurrentIns.Ins.InsCod =
|
||||
Gbl.CurrentDeg.Deg.DegCod =
|
||||
Gbl.CurrentCrs.Crs.CrsCod = -1L;
|
||||
}
|
||||
|
@ -283,6 +285,7 @@ void Par_GetMainParameters (void)
|
|||
Gbl.CurrentCrs.Crs.CrsCod = -1L; // Reset possible course from session
|
||||
}
|
||||
else
|
||||
Gbl.CurrentCty.Cty.CtyCod =
|
||||
Gbl.CurrentIns.Ins.InsCod =
|
||||
Gbl.CurrentCtr.Ctr.CtrCod =
|
||||
Gbl.CurrentDeg.Deg.DegCod =
|
||||
|
@ -294,6 +297,20 @@ void Par_GetMainParameters (void)
|
|||
if (LongStr[0]) // Parameter CrsCod available
|
||||
Gbl.CurrentCrs.Crs.CrsCod = Str_ConvertStrCodToLongCod (LongStr); // Overwrite CrsCod from session
|
||||
|
||||
/***** Get user's nickname, if exists
|
||||
(this nickname is used to go to a user's profile, not to get the logged user) *****/
|
||||
Par_GetParToText ("UsrNick",Nickname,Nck_MAX_BYTES_NICKNAME_WITH_ARROBA);
|
||||
if ((OtherUsrCod = Nck_GetUsrCodFromNickname (Nickname)) > 0)
|
||||
{
|
||||
Gbl.Usrs.Other.UsrDat.UsrCod = OtherUsrCod;
|
||||
Gbl.CurrentAct = ActSeeUsr;
|
||||
Gbl.CurrentCty.Cty.CtyCod =
|
||||
Gbl.CurrentIns.Ins.InsCod =
|
||||
Gbl.CurrentCtr.Ctr.CtrCod =
|
||||
Gbl.CurrentDeg.Deg.DegCod =
|
||||
Gbl.CurrentCrs.Crs.CrsCod = -1L;
|
||||
}
|
||||
|
||||
/***** Get tab to activate *****/
|
||||
Gbl.CurrentTab = TabUnk;
|
||||
if (Gbl.CurrentAct == ActMnu)
|
||||
|
@ -400,6 +417,7 @@ static unsigned Par_GetParameter (tParamType ParamType,const char *ParamName,
|
|||
strcmp (ParamName,"CtrCod" ) && // To enter directly to a centre
|
||||
strcmp (ParamName,"DegCod" ) && // To enter directly to a degree
|
||||
strcmp (ParamName,"CrsCod" ) && // To enter directly to a course
|
||||
strcmp (ParamName,"UsrNick") && // To enter directly to a user
|
||||
strcmp (ParamName,"ActCod" ) && // To execute directly an action (allowed only for fully public actions)
|
||||
strcmp (ParamName,"Layout" ) && // To change the layout of the page (wide or narrow)
|
||||
strcmp (ParamName,"IdSes" ) && // To use an open session when redirecting from one language to another
|
||||
|
|
106
swad_record.c
106
swad_record.c
|
@ -971,18 +971,34 @@ void Rec_ListRecordsInvs (void)
|
|||
Usr_FreeListsEncryptedUsrCods ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********** Get user's data and draw record of one unique student ************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Rec_GetUsrAndShowRecordOneStdCrs (void)
|
||||
{
|
||||
/***** Get the selected student *****/
|
||||
Usr_GetParamOtherUsrCodEncrypted ();
|
||||
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat)) // Get from the database the data of the student
|
||||
if ((Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB =
|
||||
Rol_GetRoleInCrs (Gbl.CurrentCrs.Crs.CrsCod,
|
||||
Gbl.Usrs.Other.UsrDat.UsrCod)) == Rol_ROLE_STUDENT)
|
||||
Rec_ShowRecordOneStdCrs ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************** Draw record of one unique student **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Rec_ListRecordOneStdCrs (void)
|
||||
void Rec_ShowRecordOneStdCrs (void)
|
||||
{
|
||||
/***** Get if student has accepted enrollment in current course *****/
|
||||
Gbl.Usrs.Other.UsrDat.Accepted = Usr_GetIfUserHasAcceptedEnrollmentInCurrentCrs (Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
|
||||
/***** Asign users listing type depending on current action *****/
|
||||
Gbl.Usrs.Listing.RecsUsrs = Rec_RECORD_USERS_STUDENTS;
|
||||
|
||||
/***** Get the selected student *****/
|
||||
Usr_GetParamOtherUsrCodEncrypted ();
|
||||
|
||||
/***** Get list of fields of records in current course *****/
|
||||
Rec_GetListRecordFieldsInCurrentCrs ();
|
||||
|
||||
|
@ -1000,24 +1016,18 @@ void Rec_ListRecordOneStdCrs (void)
|
|||
"</div>");
|
||||
|
||||
/***** Show the record *****/
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat)) // Get from the database the data of the student
|
||||
if (Usr_CheckIfUsrBelongsToCrs (Gbl.Usrs.Other.UsrDat.UsrCod,Gbl.CurrentCrs.Crs.CrsCod))
|
||||
{
|
||||
Gbl.Usrs.Other.UsrDat.Accepted = Usr_GetIfUserHasAcceptedEnrollmentInCurrentCrs (Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
fprintf (Gbl.F.Out,"<div style=\"text-align:center;"
|
||||
" margin-bottom:10px;\">");
|
||||
|
||||
fprintf (Gbl.F.Out,"<div style=\"text-align:center;"
|
||||
" margin-bottom:10px;\">");
|
||||
/* Common record */
|
||||
Rec_ShowCommonRecord (Rec_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
|
||||
|
||||
/* Common record */
|
||||
Rec_ShowCommonRecord (Rec_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
|
||||
/* Record of the student in the course */
|
||||
if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_TEACHER &&
|
||||
Gbl.CurrentCrs.Records.LstFields.Num) // There are fields in the record
|
||||
Rec_ShowCrsRecord (Rec_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
|
||||
|
||||
/* Record of the student in the course */
|
||||
if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_TEACHER &&
|
||||
Gbl.CurrentCrs.Records.LstFields.Num) // There are fields in the record
|
||||
Rec_ShowCrsRecord (Rec_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
|
||||
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1116,20 +1126,37 @@ void Rec_ListRecordsStdsCrs (void)
|
|||
Usr_FreeListsEncryptedUsrCods ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********** Get user's data and draw record of one unique teacher ************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Rec_GetUsrAndShowRecordOneTchCrs (void)
|
||||
{
|
||||
/***** Get the selected teacher *****/
|
||||
Usr_GetParamOtherUsrCodEncrypted ();
|
||||
|
||||
/***** Show the record *****/
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat)) // Get from the database the data of the teacher
|
||||
if ((Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB =
|
||||
Rol_GetRoleInCrs (Gbl.CurrentCrs.Crs.CrsCod,
|
||||
Gbl.Usrs.Other.UsrDat.UsrCod)) == Rol_ROLE_TEACHER)
|
||||
Rec_ShowRecordOneTchCrs ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************** Draw record of one unique teacher **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Rec_ListRecordOneTchCrs (void)
|
||||
void Rec_ShowRecordOneTchCrs (void)
|
||||
{
|
||||
extern const char *Txt_TIMETABLE_TYPES[TT_NUM_TIMETABLE_TYPES];
|
||||
|
||||
/***** Get if teacher has accepted enrollment in current course *****/
|
||||
Gbl.Usrs.Other.UsrDat.Accepted = Usr_GetIfUserHasAcceptedEnrollmentInCurrentCrs (Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
|
||||
/***** Asign users listing type depending on current action *****/
|
||||
Gbl.Usrs.Listing.RecsUsrs = Rec_RECORD_USERS_TEACHERS;
|
||||
|
||||
/***** Get the selected teacher *****/
|
||||
Usr_GetParamOtherUsrCodEncrypted ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<div style=\"text-align:center;\">");
|
||||
|
||||
/***** Show office hours? *****/
|
||||
|
@ -1144,29 +1171,22 @@ void Rec_ListRecordOneTchCrs (void)
|
|||
fprintf (Gbl.F.Out,"</form>"
|
||||
"</div>");
|
||||
|
||||
/***** Show the record *****/
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat)) // Get from the database the data of the teacher
|
||||
if (Usr_CheckIfUsrBelongsToCrs (Gbl.Usrs.Other.UsrDat.UsrCod,Gbl.CurrentCrs.Crs.CrsCod))
|
||||
{
|
||||
Gbl.Usrs.Other.UsrDat.Accepted = Usr_GetIfUserHasAcceptedEnrollmentInCurrentCrs (Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
fprintf (Gbl.F.Out,"<div style=\"text-align:center;"
|
||||
" margin-bottom:10px;\">");
|
||||
|
||||
fprintf (Gbl.F.Out,"<div style=\"text-align:center;"
|
||||
" margin-bottom:10px;\">");
|
||||
/* Common record */
|
||||
Rec_ShowCommonRecord (Rec_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
|
||||
|
||||
/* Common record */
|
||||
Rec_ShowCommonRecord (Rec_RECORD_LIST,&Gbl.Usrs.Other.UsrDat);
|
||||
/* Office hours */
|
||||
Lay_StartRoundFrameTable10 (NULL,0,Txt_TIMETABLE_TYPES[TT_TUTOR_TIMETABLE]);
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td style=\"text-align:center;\">");
|
||||
TT_ShowTimeTable (TT_TUTOR_TIMETABLE,Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
|
||||
/* Office hours */
|
||||
Lay_StartRoundFrameTable10 (NULL,0,Txt_TIMETABLE_TYPES[TT_TUTOR_TIMETABLE]);
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td style=\"text-align:center;\">");
|
||||
TT_ShowTimeTable (TT_TUTOR_TIMETABLE,Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -120,9 +120,11 @@ void Rec_FreeListFields (void);
|
|||
|
||||
void Rec_PutLinkToEditRecordFields (void);
|
||||
void Rec_ListRecordsInvs (void);
|
||||
void Rec_ListRecordOneStdCrs (void);
|
||||
void Rec_GetUsrAndShowRecordOneStdCrs (void);
|
||||
void Rec_ShowRecordOneStdCrs (void);
|
||||
void Rec_ListRecordsStdsCrs (void);
|
||||
void Rec_ListRecordOneTchCrs (void);
|
||||
void Rec_GetUsrAndShowRecordOneTchCrs (void);
|
||||
void Rec_ShowRecordOneTchCrs (void);
|
||||
void Rec_ListRecordsTchsCrs (void);
|
||||
void Rec_ShowLinkToPrintPreviewOfRecords (void);
|
||||
void Rec_ShowFormMyCrsRecord (void);
|
||||
|
|
44
swad_text.c
44
swad_text.c
|
@ -17339,7 +17339,27 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
|||
"Conectados"
|
||||
#endif
|
||||
,
|
||||
NULL,
|
||||
// ActSeeUsr
|
||||
#if L==0
|
||||
"Perfil"
|
||||
#elif L==1
|
||||
"Profil"
|
||||
#elif L==2
|
||||
"Profile"
|
||||
#elif L==3
|
||||
"Perfil"
|
||||
#elif L==4
|
||||
"Profil"
|
||||
#elif L==5
|
||||
"Che"
|
||||
#elif L==6
|
||||
"Profilo"
|
||||
#elif L==7
|
||||
"Profil"
|
||||
#elif L==8
|
||||
"Perfil"
|
||||
#endif
|
||||
,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -19315,7 +19335,27 @@ const char *Txt_MENU_SUBTITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
|||
"Conectados"
|
||||
#endif
|
||||
,
|
||||
NULL,
|
||||
// ActSeeUsr
|
||||
#if L==0
|
||||
"Perfil"
|
||||
#elif L==1
|
||||
"Profil"
|
||||
#elif L==2
|
||||
"A user's profile"
|
||||
#elif L==3
|
||||
"Perfil de un usuario"
|
||||
#elif L==4
|
||||
"Profil"
|
||||
#elif L==5
|
||||
"Che"
|
||||
#elif L==6
|
||||
"Profilo"
|
||||
#elif L==7
|
||||
"Profil"
|
||||
#elif L==8
|
||||
"Perfil"
|
||||
#endif
|
||||
,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
|
35
swad_user.c
35
swad_user.c
|
@ -7356,3 +7356,38 @@ static float Usr_GetNumUsrsPerCrs (Rol_Role_t Role)
|
|||
|
||||
return NumUsrsPerCrs;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Show user's profile ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_ShowUser (void)
|
||||
{
|
||||
/***** Get user *****/
|
||||
if (Gbl.Usrs.Other.UsrDat.UsrCod < 0) // Check is user's code is valid
|
||||
Usr_GetParamOtherUsrCodEncrypted ();
|
||||
|
||||
sprintf (Gbl.Message,"Gbl.Usrs.Other.UsrDat.UsrCod = %ld",Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||
|
||||
/***** Check if user exists and get his data *****/
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat)) // Existing user
|
||||
{
|
||||
if (Gbl.CurrentCrs.Crs.CrsCod > 0) // Course selected
|
||||
{
|
||||
Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB = Rol_GetRoleInCrs (Gbl.CurrentCrs.Crs.CrsCod,Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
|
||||
switch (Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB)
|
||||
{
|
||||
case Rol_ROLE_STUDENT:
|
||||
Rec_ShowRecordOneStdCrs ();
|
||||
break;
|
||||
case Rol_ROLE_TEACHER:
|
||||
Rec_ShowRecordOneTchCrs ();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -321,4 +321,6 @@ void Usr_ShowWarningNoUsersFound (Rol_Role_t Role);
|
|||
|
||||
void Usr_GetAndShowNumUsrsInPlatform (Rol_Role_t Role);
|
||||
|
||||
void Usr_ShowUser (void);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue