mirror of https://github.com/acanas/swad-core.git
Version18.72
This commit is contained in:
parent
2f3aae2808
commit
abfabdcf13
28
swad_ID.c
28
swad_ID.c
|
@ -480,14 +480,14 @@ static void ID_PutLinkToConfirmID (struct UsrData *UsrDat,unsigned NumID,
|
|||
Act_GetActCod (Gbl.Action.Original)); // Original action, used to know where we came from
|
||||
switch (Gbl.Action.Original)
|
||||
{
|
||||
case ActDoActOnSevGst:
|
||||
Usr_PutHiddenParUsrCodAll (ActCnfID_Oth,Gbl.Usrs.Select[Rol_UNK]);
|
||||
case ActSeeRecSevGst:
|
||||
Usr_PutHiddenParUsrCodAll (ActCnfID_Oth,Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
break;
|
||||
case ActDoActOnSevStd:
|
||||
Usr_PutHiddenParUsrCodAll (ActCnfID_Std,Gbl.Usrs.Select[Rol_UNK]);
|
||||
case ActSeeRecSevStd:
|
||||
Usr_PutHiddenParUsrCodAll (ActCnfID_Std,Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
break;
|
||||
case ActDoActOnSevTch:
|
||||
Usr_PutHiddenParUsrCodAll (ActCnfID_Tch,Gbl.Usrs.Select[Rol_UNK]);
|
||||
case ActSeeRecSevTch:
|
||||
Usr_PutHiddenParUsrCodAll (ActCnfID_Tch,Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1007,8 +1007,18 @@ void ID_ConfirmOtherUsrID (void)
|
|||
{
|
||||
ItsMe = Usr_ItsMe (Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
if (!ItsMe) // Not me
|
||||
{
|
||||
/* If user is a student in current course,
|
||||
check if he/she has accepted */
|
||||
if (Gbl.CurrentCrs.Crs.CrsCod > 0)
|
||||
if (Gbl.Usrs.Other.UsrDat.Roles.InCurrentCrs.Role == Rol_STD)
|
||||
Gbl.Usrs.Other.UsrDat.Accepted = Usr_CheckIfUsrBelongsToCrs (Gbl.Usrs.Other.UsrDat.UsrCod,
|
||||
Gbl.CurrentCrs.Crs.CrsCod,
|
||||
true);
|
||||
|
||||
if (ID_ICanSeeOtherUsrIDs (&Gbl.Usrs.Other.UsrDat))
|
||||
ICanConfirm = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (ICanConfirm)
|
||||
|
@ -1057,15 +1067,15 @@ void ID_ConfirmOtherUsrID (void)
|
|||
/***** Show one or multiple records *****/
|
||||
switch (Gbl.Action.Original)
|
||||
{
|
||||
case ActDoActOnSevGst:
|
||||
case ActSeeRecSevGst:
|
||||
/* Show multiple records of guests again (including the updated one) */
|
||||
Rec_ListRecordsGstsShow ();
|
||||
break;
|
||||
case ActDoActOnSevStd:
|
||||
case ActSeeRecSevStd:
|
||||
/* Show multiple records of students again (including the updated one) */
|
||||
Rec_ListRecordsStdsShow ();
|
||||
break;
|
||||
case ActDoActOnSevTch:
|
||||
case ActSeeRecSevTch:
|
||||
/* Show multiple records of teachers again (including the updated one) */
|
||||
Rec_ListRecordsTchsShow ();
|
||||
break;
|
||||
|
|
|
@ -1140,9 +1140,12 @@ Users:
|
|||
|
||||
957. ActSeeRecOneStd Show record of one selected student
|
||||
958. ActSeeRecOneTch Show record of one selected teacher
|
||||
959. ActDoActOnSevGst Do action on several selected guests
|
||||
960. ActDoActOnSevStd Do action on several selected students
|
||||
961. ActDoActOnSevTch Do action on several selected teachers
|
||||
NEW. ActDoActOnSevGst Do action on several selected guests
|
||||
NEW. ActDoActOnSevStd Do action on several selected students
|
||||
NEW. ActDoActOnSevTch Do action on several selected teachers
|
||||
959. ActPrnRecSevGst Show records of several selected guests
|
||||
960. ActPrnRecSevStd Show records of several selected students
|
||||
961. ActPrnRecSevTch Show records of several selected teachers
|
||||
962. ActPrnRecSevGst Show records of several selected guests ready to be printed
|
||||
963. ActPrnRecSevStd Show records of several selected students ready to be printed
|
||||
964. ActPrnRecSevTch Show records of several selected teachers ready to be printed
|
||||
|
@ -2462,7 +2465,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActChgDatShaGrp */{1002,-1,TabUnk,ActAdmShaCrsGrp ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_ChgFileMetadata ,NULL},
|
||||
/* ActDowShaGrp */{1116,-1,TabUnk,ActAdmShaCrsGrp ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_DOWNLD_FILE,Brw_DownloadFile ,NULL ,NULL},
|
||||
|
||||
/* ActAdmAsgWrkCrs */{ 139,-1,TabUnk,ActReqAsgWrkCrs ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_ShowFileBrowserOrWorks ,NULL},
|
||||
/* ActAdmAsgWrkCrs */{ 139,-1,TabUnk,ActReqAsgWrkCrs ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_GetSelectedUsrsAndShowWorks,NULL},
|
||||
|
||||
/* ActReqRemFilAsgUsr*/{ 834,-1,TabUnk,ActAdmAsgWrkUsr ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_AskRemFileFromTree ,NULL},
|
||||
/* ActRemFilAsgUsr */{ 833,-1,TabUnk,ActAdmAsgWrkUsr ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_RemFileFromTree ,NULL},
|
||||
|
@ -2661,7 +2664,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
|
||||
/* ActLstGst */{ 587,-1,TabUnk,ActLstOth ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Usr_SeeGuests ,NULL},
|
||||
|
||||
/* ActPrnGstPho */{1190,-1,TabUnk,ActLstStd ,0x200,0x200,0x200,0x200,0x200,0x200,0x200,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Usr_SeeGstClassPhotoPrn ,NULL},
|
||||
/* ActPrnGstPho */{1190,-1,TabUnk,ActLstOth ,0x200,0x200,0x200,0x200,0x200,0x200,0x200,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Usr_SeeGstClassPhotoPrn ,NULL},
|
||||
/* ActPrnStdPho */{ 120,-1,TabUnk,ActLstStd ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Usr_SeeStdClassPhotoPrn ,NULL},
|
||||
/* ActPrnTchPho */{ 443,-1,TabUnk,ActLstTch ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Usr_SeeTchClassPhotoPrn ,NULL},
|
||||
/* ActLstGstAll */{1189,-1,TabUnk,ActLstOth ,0x200,0x200,0x200,0x200,0x200,0x200,0x200,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Usr_ListAllDataGsts ,NULL},
|
||||
|
@ -2671,9 +2674,13 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActSeeRecOneStd */{1174,-1,TabUnk,ActLstStd ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rec_GetUsrAndShowRecOneStdCrs ,NULL},
|
||||
/* ActSeeRecOneTch */{1175,-1,TabUnk,ActLstTch ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rec_GetUsrAndShowRecOneTchCrs ,NULL},
|
||||
|
||||
/* ActDoActOnSevGst */{1187,-1,TabUnk,ActLstOth ,0x200,0x200,0x200,0x200,0x200,0x200,0x200,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Usr_DoActionOnSeveralStds ,NULL},
|
||||
/* ActDoActOnSevStd */{ 89,-1,TabUnk,ActLstStd ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Usr_DoActionOnSeveralStds ,NULL},
|
||||
/* ActDoActOnSevTch */{ 22,-1,TabUnk,ActLstTch ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Usr_DoActionOnSeveralStds ,NULL},
|
||||
/* ActDoActOnSevGst */{1753,-1,TabUnk,ActLstOth ,0x200,0x200,0x200,0x200,0x200,0x200,0x200,Act_CONT_NORM,Act_BRW_1ST_TAB,Usr_DoActionOnSeveralUsrs1 ,Usr_DoActionOnSeveralUsrs2 ,NULL},
|
||||
/* ActDoActOnSevStd */{1754,-1,TabUnk,ActLstStd ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Usr_DoActionOnSeveralUsrs1 ,Usr_DoActionOnSeveralUsrs2 ,NULL},
|
||||
/* ActDoActOnSevTch */{1755,-1,TabUnk,ActLstTch ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Usr_DoActionOnSeveralUsrs1 ,Usr_DoActionOnSeveralUsrs2 ,NULL},
|
||||
|
||||
/* ActSeeRecSevGst */{1187,-1,TabUnk,ActLstOth ,0x200,0x200,0x200,0x200,0x200,0x200,0x200,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rec_ListRecordsGstsShow ,NULL},
|
||||
/* ActSeeRecSevStd */{ 89,-1,TabUnk,ActLstStd ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rec_ListRecordsStdsShow ,NULL},
|
||||
/* ActSeeRecSevTch */{ 22,-1,TabUnk,ActLstTch ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rec_ListRecordsTchsShow ,NULL},
|
||||
/* ActPrnRecSevGst */{1188,-1,TabUnk,ActLstOth ,0x200,0x200,0x200,0x200,0x200,0x200,0x200,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Rec_ListRecordsGstsPrint ,NULL},
|
||||
/* ActPrnRecSevStd */{ 111,-1,TabUnk,ActLstStd ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Rec_ListRecordsStdsPrint ,NULL},
|
||||
/* ActPrnRecSevTch */{ 127,-1,TabUnk,ActLstTch ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Rec_ListRecordsTchsPrint ,NULL},
|
||||
|
@ -3218,7 +3225,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
|||
-1, // #86 (obsolete action)
|
||||
ActRemAllStdCrs, // #87
|
||||
ActReqRemAllStdCrs, // #88
|
||||
ActDoActOnSevStd, // #89
|
||||
ActSeeRecSevStd, // #89
|
||||
ActDelSntMsg, // #90
|
||||
ActEdiExaAnn, // #91
|
||||
-1, // #92 (obsolete action)
|
||||
|
@ -4316,7 +4323,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
|||
-1, // #1184 (obsolete action)
|
||||
-1, // #1185 (obsolete action)
|
||||
ActLstOth, // #1186
|
||||
ActDoActOnSevGst, // #1187
|
||||
ActSeeRecSevGst, // #1187
|
||||
ActPrnRecSevGst, // #1188
|
||||
ActLstGstAll, // #1189
|
||||
ActPrnGstPho, // #1190
|
||||
|
@ -4882,6 +4889,9 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
|||
ActChgClaMaxStd, // #1750
|
||||
ActRenClaLoc, // #1751
|
||||
ActChgGrpCla, // #1752
|
||||
ActDoActOnSevGst, // #1753
|
||||
ActDoActOnSevStd, // #1754
|
||||
ActDoActOnSevTch, // #1755
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
263
swad_action.h
263
swad_action.h
|
@ -61,9 +61,9 @@ typedef enum
|
|||
|
||||
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
||||
|
||||
#define Act_NUM_ACTIONS (1 + 8 + 55 + 38 + 12 + 42 + 36 + 19 + 110 + 157 + 437 + 165 + 168 + 15 + 65)
|
||||
#define Act_NUM_ACTIONS (1 + 8 + 55 + 38 + 12 + 42 + 36 + 19 + 110 + 157 + 437 + 168 + 168 + 15 + 65)
|
||||
|
||||
#define Act_MAX_ACTION_COD 1752
|
||||
#define Act_MAX_ACTION_COD 1755
|
||||
|
||||
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
|
||||
|
||||
|
@ -1160,152 +1160,155 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
|
|||
|
||||
#define ActSeeRecOneStd (ActRemOldBrf + 36)
|
||||
#define ActSeeRecOneTch (ActRemOldBrf + 37)
|
||||
#define ActDoActOnSevGst (ActRemOldBrf + 38)
|
||||
#define ActDoActOnSevStd (ActRemOldBrf + 39)
|
||||
#define ActDoActOnSevTch (ActRemOldBrf + 40)
|
||||
#define ActPrnRecSevGst (ActRemOldBrf + 41)
|
||||
#define ActPrnRecSevStd (ActRemOldBrf + 42)
|
||||
#define ActPrnRecSevTch (ActRemOldBrf + 43)
|
||||
#define ActRcvRecOthUsr (ActRemOldBrf + 44)
|
||||
#define ActEdiRecFie (ActRemOldBrf + 45)
|
||||
#define ActNewFie (ActRemOldBrf + 46)
|
||||
#define ActReqRemFie (ActRemOldBrf + 47)
|
||||
#define ActRemFie (ActRemOldBrf + 48)
|
||||
#define ActRenFie (ActRemOldBrf + 49)
|
||||
#define ActChgRowFie (ActRemOldBrf + 50)
|
||||
#define ActChgVisFie (ActRemOldBrf + 51)
|
||||
#define ActRcvRecCrs (ActRemOldBrf + 52)
|
||||
#define ActDoActOnSevGst (ActRemOldBrf + 38)
|
||||
#define ActDoActOnSevStd (ActRemOldBrf + 39)
|
||||
#define ActDoActOnSevTch (ActRemOldBrf + 40)
|
||||
#define ActSeeRecSevGst (ActRemOldBrf + 41)
|
||||
#define ActSeeRecSevStd (ActRemOldBrf + 42)
|
||||
#define ActSeeRecSevTch (ActRemOldBrf + 43)
|
||||
#define ActPrnRecSevGst (ActRemOldBrf + 44)
|
||||
#define ActPrnRecSevStd (ActRemOldBrf + 45)
|
||||
#define ActPrnRecSevTch (ActRemOldBrf + 46)
|
||||
#define ActRcvRecOthUsr (ActRemOldBrf + 47)
|
||||
#define ActEdiRecFie (ActRemOldBrf + 48)
|
||||
#define ActNewFie (ActRemOldBrf + 49)
|
||||
#define ActReqRemFie (ActRemOldBrf + 50)
|
||||
#define ActRemFie (ActRemOldBrf + 51)
|
||||
#define ActRenFie (ActRemOldBrf + 52)
|
||||
#define ActChgRowFie (ActRemOldBrf + 53)
|
||||
#define ActChgVisFie (ActRemOldBrf + 54)
|
||||
#define ActRcvRecCrs (ActRemOldBrf + 55)
|
||||
|
||||
#define ActFrmLogInUsrAgd (ActRemOldBrf + 53)
|
||||
#define ActLogInUsrAgd (ActRemOldBrf + 54)
|
||||
#define ActLogInUsrAgdLan (ActRemOldBrf + 55)
|
||||
#define ActSeeUsrAgd (ActRemOldBrf + 56)
|
||||
#define ActFrmLogInUsrAgd (ActRemOldBrf + 56)
|
||||
#define ActLogInUsrAgd (ActRemOldBrf + 57)
|
||||
#define ActLogInUsrAgdLan (ActRemOldBrf + 58)
|
||||
#define ActSeeUsrAgd (ActRemOldBrf + 59)
|
||||
|
||||
#define ActReqEnrSevStd (ActRemOldBrf + 57)
|
||||
#define ActReqEnrSevNET (ActRemOldBrf + 58)
|
||||
#define ActReqEnrSevTch (ActRemOldBrf + 59)
|
||||
#define ActReqEnrSevStd (ActRemOldBrf + 60)
|
||||
#define ActReqEnrSevNET (ActRemOldBrf + 61)
|
||||
#define ActReqEnrSevTch (ActRemOldBrf + 62)
|
||||
|
||||
#define ActReqLstStdAtt (ActRemOldBrf + 60)
|
||||
#define ActSeeLstMyAtt (ActRemOldBrf + 61)
|
||||
#define ActPrnLstMyAtt (ActRemOldBrf + 62)
|
||||
#define ActSeeLstStdAtt (ActRemOldBrf + 63)
|
||||
#define ActPrnLstStdAtt (ActRemOldBrf + 64)
|
||||
#define ActFrmNewAtt (ActRemOldBrf + 65)
|
||||
#define ActEdiOneAtt (ActRemOldBrf + 66)
|
||||
#define ActNewAtt (ActRemOldBrf + 67)
|
||||
#define ActChgAtt (ActRemOldBrf + 68)
|
||||
#define ActReqRemAtt (ActRemOldBrf + 69)
|
||||
#define ActRemAtt (ActRemOldBrf + 70)
|
||||
#define ActHidAtt (ActRemOldBrf + 71)
|
||||
#define ActShoAtt (ActRemOldBrf + 72)
|
||||
#define ActSeeOneAtt (ActRemOldBrf + 73)
|
||||
#define ActRecAttStd (ActRemOldBrf + 74)
|
||||
#define ActRecAttMe (ActRemOldBrf + 75)
|
||||
#define ActReqLstStdAtt (ActRemOldBrf + 63)
|
||||
#define ActSeeLstMyAtt (ActRemOldBrf + 64)
|
||||
#define ActPrnLstMyAtt (ActRemOldBrf + 65)
|
||||
#define ActSeeLstStdAtt (ActRemOldBrf + 66)
|
||||
#define ActPrnLstStdAtt (ActRemOldBrf + 67)
|
||||
#define ActFrmNewAtt (ActRemOldBrf + 68)
|
||||
#define ActEdiOneAtt (ActRemOldBrf + 69)
|
||||
#define ActNewAtt (ActRemOldBrf + 70)
|
||||
#define ActChgAtt (ActRemOldBrf + 71)
|
||||
#define ActReqRemAtt (ActRemOldBrf + 72)
|
||||
#define ActRemAtt (ActRemOldBrf + 73)
|
||||
#define ActHidAtt (ActRemOldBrf + 74)
|
||||
#define ActShoAtt (ActRemOldBrf + 75)
|
||||
#define ActSeeOneAtt (ActRemOldBrf + 76)
|
||||
#define ActRecAttStd (ActRemOldBrf + 77)
|
||||
#define ActRecAttMe (ActRemOldBrf + 78)
|
||||
|
||||
#define ActSignUp (ActRemOldBrf + 76)
|
||||
#define ActUpdSignUpReq (ActRemOldBrf + 77)
|
||||
#define ActReqRejSignUp (ActRemOldBrf + 78)
|
||||
#define ActRejSignUp (ActRemOldBrf + 79)
|
||||
#define ActSignUp (ActRemOldBrf + 79)
|
||||
#define ActUpdSignUpReq (ActRemOldBrf + 80)
|
||||
#define ActReqRejSignUp (ActRemOldBrf + 81)
|
||||
#define ActRejSignUp (ActRemOldBrf + 82)
|
||||
|
||||
#define ActReqMdfOneOth (ActRemOldBrf + 80)
|
||||
#define ActReqMdfOneStd (ActRemOldBrf + 81)
|
||||
#define ActReqMdfOneTch (ActRemOldBrf + 82)
|
||||
#define ActReqMdfOneOth (ActRemOldBrf + 83)
|
||||
#define ActReqMdfOneStd (ActRemOldBrf + 84)
|
||||
#define ActReqMdfOneTch (ActRemOldBrf + 85)
|
||||
|
||||
#define ActReqMdfOth (ActRemOldBrf + 83)
|
||||
#define ActReqMdfStd (ActRemOldBrf + 84)
|
||||
#define ActReqMdfNET (ActRemOldBrf + 85)
|
||||
#define ActReqMdfTch (ActRemOldBrf + 86)
|
||||
#define ActReqMdfOth (ActRemOldBrf + 86)
|
||||
#define ActReqMdfStd (ActRemOldBrf + 87)
|
||||
#define ActReqMdfNET (ActRemOldBrf + 88)
|
||||
#define ActReqMdfTch (ActRemOldBrf + 89)
|
||||
|
||||
#define ActReqOthPho (ActRemOldBrf + 87)
|
||||
#define ActReqStdPho (ActRemOldBrf + 88)
|
||||
#define ActReqTchPho (ActRemOldBrf + 89)
|
||||
#define ActDetOthPho (ActRemOldBrf + 90)
|
||||
#define ActDetStdPho (ActRemOldBrf + 91)
|
||||
#define ActDetTchPho (ActRemOldBrf + 92)
|
||||
#define ActUpdOthPho (ActRemOldBrf + 93)
|
||||
#define ActUpdStdPho (ActRemOldBrf + 94)
|
||||
#define ActUpdTchPho (ActRemOldBrf + 95)
|
||||
#define ActReqRemOthPho (ActRemOldBrf + 96)
|
||||
#define ActReqRemStdPho (ActRemOldBrf + 97)
|
||||
#define ActReqRemTchPho (ActRemOldBrf + 98)
|
||||
#define ActRemOthPho (ActRemOldBrf + 99)
|
||||
#define ActRemStdPho (ActRemOldBrf + 100)
|
||||
#define ActRemTchPho (ActRemOldBrf + 101)
|
||||
#define ActCreOth (ActRemOldBrf + 102)
|
||||
#define ActCreStd (ActRemOldBrf + 103)
|
||||
#define ActCreNET (ActRemOldBrf + 104)
|
||||
#define ActCreTch (ActRemOldBrf + 105)
|
||||
#define ActUpdOth (ActRemOldBrf + 106)
|
||||
#define ActUpdStd (ActRemOldBrf + 107)
|
||||
#define ActUpdNET (ActRemOldBrf + 108)
|
||||
#define ActUpdTch (ActRemOldBrf + 109)
|
||||
#define ActReqOthPho (ActRemOldBrf + 90)
|
||||
#define ActReqStdPho (ActRemOldBrf + 91)
|
||||
#define ActReqTchPho (ActRemOldBrf + 92)
|
||||
#define ActDetOthPho (ActRemOldBrf + 93)
|
||||
#define ActDetStdPho (ActRemOldBrf + 94)
|
||||
#define ActDetTchPho (ActRemOldBrf + 95)
|
||||
#define ActUpdOthPho (ActRemOldBrf + 96)
|
||||
#define ActUpdStdPho (ActRemOldBrf + 97)
|
||||
#define ActUpdTchPho (ActRemOldBrf + 98)
|
||||
#define ActReqRemOthPho (ActRemOldBrf + 99)
|
||||
#define ActReqRemStdPho (ActRemOldBrf + 100)
|
||||
#define ActReqRemTchPho (ActRemOldBrf + 101)
|
||||
#define ActRemOthPho (ActRemOldBrf + 102)
|
||||
#define ActRemStdPho (ActRemOldBrf + 103)
|
||||
#define ActRemTchPho (ActRemOldBrf + 104)
|
||||
#define ActCreOth (ActRemOldBrf + 105)
|
||||
#define ActCreStd (ActRemOldBrf + 106)
|
||||
#define ActCreNET (ActRemOldBrf + 107)
|
||||
#define ActCreTch (ActRemOldBrf + 108)
|
||||
#define ActUpdOth (ActRemOldBrf + 109)
|
||||
#define ActUpdStd (ActRemOldBrf + 110)
|
||||
#define ActUpdNET (ActRemOldBrf + 111)
|
||||
#define ActUpdTch (ActRemOldBrf + 112)
|
||||
|
||||
#define ActReqAccEnrStd (ActRemOldBrf + 110)
|
||||
#define ActReqAccEnrNET (ActRemOldBrf + 111)
|
||||
#define ActReqAccEnrTch (ActRemOldBrf + 112)
|
||||
#define ActAccEnrStd (ActRemOldBrf + 113)
|
||||
#define ActAccEnrNET (ActRemOldBrf + 114)
|
||||
#define ActAccEnrTch (ActRemOldBrf + 115)
|
||||
#define ActRemMe_Std (ActRemOldBrf + 116)
|
||||
#define ActRemMe_NET (ActRemOldBrf + 117)
|
||||
#define ActRemMe_Tch (ActRemOldBrf + 118)
|
||||
#define ActReqAccEnrStd (ActRemOldBrf + 113)
|
||||
#define ActReqAccEnrNET (ActRemOldBrf + 114)
|
||||
#define ActReqAccEnrTch (ActRemOldBrf + 115)
|
||||
#define ActAccEnrStd (ActRemOldBrf + 116)
|
||||
#define ActAccEnrNET (ActRemOldBrf + 117)
|
||||
#define ActAccEnrTch (ActRemOldBrf + 118)
|
||||
#define ActRemMe_Std (ActRemOldBrf + 119)
|
||||
#define ActRemMe_NET (ActRemOldBrf + 120)
|
||||
#define ActRemMe_Tch (ActRemOldBrf + 121)
|
||||
|
||||
#define ActNewAdmIns (ActRemOldBrf + 119)
|
||||
#define ActRemAdmIns (ActRemOldBrf + 120)
|
||||
#define ActNewAdmCtr (ActRemOldBrf + 121)
|
||||
#define ActRemAdmCtr (ActRemOldBrf + 122)
|
||||
#define ActNewAdmDeg (ActRemOldBrf + 123)
|
||||
#define ActRemAdmDeg (ActRemOldBrf + 124)
|
||||
#define ActNewAdmIns (ActRemOldBrf + 122)
|
||||
#define ActRemAdmIns (ActRemOldBrf + 123)
|
||||
#define ActNewAdmCtr (ActRemOldBrf + 124)
|
||||
#define ActRemAdmCtr (ActRemOldBrf + 125)
|
||||
#define ActNewAdmDeg (ActRemOldBrf + 126)
|
||||
#define ActRemAdmDeg (ActRemOldBrf + 127)
|
||||
|
||||
#define ActRcvFrmEnrSevStd (ActRemOldBrf + 125)
|
||||
#define ActRcvFrmEnrSevNET (ActRemOldBrf + 126)
|
||||
#define ActRcvFrmEnrSevTch (ActRemOldBrf + 127)
|
||||
#define ActRcvFrmEnrSevStd (ActRemOldBrf + 128)
|
||||
#define ActRcvFrmEnrSevNET (ActRemOldBrf + 129)
|
||||
#define ActRcvFrmEnrSevTch (ActRemOldBrf + 130)
|
||||
|
||||
#define ActCnfID_Oth (ActRemOldBrf + 128)
|
||||
#define ActCnfID_Std (ActRemOldBrf + 129)
|
||||
#define ActCnfID_Tch (ActRemOldBrf + 130)
|
||||
#define ActCnfID_Oth (ActRemOldBrf + 131)
|
||||
#define ActCnfID_Std (ActRemOldBrf + 132)
|
||||
#define ActCnfID_Tch (ActRemOldBrf + 133)
|
||||
|
||||
#define ActFrmAccOth (ActRemOldBrf + 131)
|
||||
#define ActFrmAccStd (ActRemOldBrf + 132)
|
||||
#define ActFrmAccTch (ActRemOldBrf + 133)
|
||||
#define ActFrmAccOth (ActRemOldBrf + 134)
|
||||
#define ActFrmAccStd (ActRemOldBrf + 135)
|
||||
#define ActFrmAccTch (ActRemOldBrf + 136)
|
||||
|
||||
#define ActRemOldNicOth (ActRemOldBrf + 134)
|
||||
#define ActRemOldNicStd (ActRemOldBrf + 135)
|
||||
#define ActRemOldNicTch (ActRemOldBrf + 136)
|
||||
#define ActChgNicOth (ActRemOldBrf + 137)
|
||||
#define ActChgNicStd (ActRemOldBrf + 138)
|
||||
#define ActChgNicTch (ActRemOldBrf + 139)
|
||||
#define ActRemOldNicOth (ActRemOldBrf + 137)
|
||||
#define ActRemOldNicStd (ActRemOldBrf + 138)
|
||||
#define ActRemOldNicTch (ActRemOldBrf + 139)
|
||||
#define ActChgNicOth (ActRemOldBrf + 140)
|
||||
#define ActChgNicStd (ActRemOldBrf + 141)
|
||||
#define ActChgNicTch (ActRemOldBrf + 142)
|
||||
|
||||
#define ActRemID_Oth (ActRemOldBrf + 140)
|
||||
#define ActRemID_Std (ActRemOldBrf + 141)
|
||||
#define ActRemID_Tch (ActRemOldBrf + 142)
|
||||
#define ActNewID_Oth (ActRemOldBrf + 143)
|
||||
#define ActNewID_Std (ActRemOldBrf + 144)
|
||||
#define ActNewID_Tch (ActRemOldBrf + 145)
|
||||
#define ActChgPwdOth (ActRemOldBrf + 146)
|
||||
#define ActChgPwdStd (ActRemOldBrf + 147)
|
||||
#define ActChgPwdTch (ActRemOldBrf + 148)
|
||||
#define ActRemMaiOth (ActRemOldBrf + 149)
|
||||
#define ActRemMaiStd (ActRemOldBrf + 150)
|
||||
#define ActRemMaiTch (ActRemOldBrf + 151)
|
||||
#define ActNewMaiOth (ActRemOldBrf + 152)
|
||||
#define ActNewMaiStd (ActRemOldBrf + 153)
|
||||
#define ActNewMaiTch (ActRemOldBrf + 154)
|
||||
#define ActRemID_Oth (ActRemOldBrf + 143)
|
||||
#define ActRemID_Std (ActRemOldBrf + 144)
|
||||
#define ActRemID_Tch (ActRemOldBrf + 145)
|
||||
#define ActNewID_Oth (ActRemOldBrf + 146)
|
||||
#define ActNewID_Std (ActRemOldBrf + 147)
|
||||
#define ActNewID_Tch (ActRemOldBrf + 148)
|
||||
#define ActChgPwdOth (ActRemOldBrf + 149)
|
||||
#define ActChgPwdStd (ActRemOldBrf + 150)
|
||||
#define ActChgPwdTch (ActRemOldBrf + 151)
|
||||
#define ActRemMaiOth (ActRemOldBrf + 152)
|
||||
#define ActRemMaiStd (ActRemOldBrf + 153)
|
||||
#define ActRemMaiTch (ActRemOldBrf + 154)
|
||||
#define ActNewMaiOth (ActRemOldBrf + 155)
|
||||
#define ActNewMaiStd (ActRemOldBrf + 156)
|
||||
#define ActNewMaiTch (ActRemOldBrf + 157)
|
||||
|
||||
#define ActRemStdCrs (ActRemOldBrf + 155)
|
||||
#define ActRemNETCrs (ActRemOldBrf + 156)
|
||||
#define ActRemTchCrs (ActRemOldBrf + 157)
|
||||
#define ActRemUsrGbl (ActRemOldBrf + 158)
|
||||
#define ActRemStdCrs (ActRemOldBrf + 158)
|
||||
#define ActRemNETCrs (ActRemOldBrf + 159)
|
||||
#define ActRemTchCrs (ActRemOldBrf + 160)
|
||||
#define ActRemUsrGbl (ActRemOldBrf + 161)
|
||||
|
||||
#define ActReqRemAllStdCrs (ActRemOldBrf + 159)
|
||||
#define ActRemAllStdCrs (ActRemOldBrf + 160)
|
||||
#define ActReqRemAllStdCrs (ActRemOldBrf + 162)
|
||||
#define ActRemAllStdCrs (ActRemOldBrf + 163)
|
||||
|
||||
#define ActReqRemOldUsr (ActRemOldBrf + 161)
|
||||
#define ActRemOldUsr (ActRemOldBrf + 162)
|
||||
#define ActReqRemOldUsr (ActRemOldBrf + 164)
|
||||
#define ActRemOldUsr (ActRemOldBrf + 165)
|
||||
|
||||
#define ActLstDupUsr (ActRemOldBrf + 163)
|
||||
#define ActLstSimUsr (ActRemOldBrf + 164)
|
||||
#define ActRemDupUsr (ActRemOldBrf + 165)
|
||||
#define ActLstDupUsr (ActRemOldBrf + 166)
|
||||
#define ActLstSimUsr (ActRemOldBrf + 167)
|
||||
#define ActRemDupUsr (ActRemOldBrf + 168)
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************* Messages tab ********************************/
|
||||
|
|
|
@ -2302,8 +2302,8 @@ void Att_RegisterMeAsStdInAttEvent (void)
|
|||
/* Algorithm:
|
||||
1. Get list of students in the groups selected: Gbl.Usrs.LstUsrs[Rol_STD]
|
||||
2. Mark all students in the groups selected setting Remove=true
|
||||
3. Get list of students marked as present by me: Gbl.Usrs.Select[Rol_STD]
|
||||
4. Loop over the list Gbl.Usrs.Select[Rol_STD],
|
||||
3. Get list of students marked as present by me: Gbl.Usrs.Selected.List[Rol_STD]
|
||||
4. Loop over the list Gbl.Usrs.Selected.List[Rol_STD],
|
||||
that holds the list of the students marked as present,
|
||||
marking the students in Gbl.Usrs.LstUsrs[Rol_STD].Lst as Remove=false
|
||||
5. Delete from att_usr all the students marked as Remove=true
|
||||
|
@ -2344,16 +2344,16 @@ void Att_RegisterStudentsInAttEvent (void)
|
|||
NumStd++)
|
||||
Gbl.Usrs.LstUsrs[Rol_STD].Lst[NumStd].Remove = true;
|
||||
|
||||
/***** 3. Get list of students marked as present by me: Gbl.Usrs.Select[Rol_STD] *****/
|
||||
/***** 3. Get list of students marked as present by me: Gbl.Usrs.Selected.List[Rol_STD] *****/
|
||||
Usr_GetListsSelectedUsrsCods ();
|
||||
|
||||
/***** Initialize structure with user's data *****/
|
||||
Usr_UsrDataConstructor (&UsrData);
|
||||
|
||||
/***** 4. Loop over the list Gbl.Usrs.Select[Rol_STD],
|
||||
/***** 4. Loop over the list Gbl.Usrs.Selected.List[Rol_STD],
|
||||
that holds the list of the students marked as present,
|
||||
marking the students in Gbl.Usrs.LstUsrs[Rol_STD].Lst as Remove=false *****/
|
||||
Ptr = Gbl.Usrs.Select[Rol_STD];
|
||||
Ptr = Gbl.Usrs.Selected.List[Rol_STD];
|
||||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParamMult (&Ptr,UsrData.EncryptedUsrCod,
|
||||
|
@ -2950,8 +2950,8 @@ static void Att_GetListSelectedUsrCods (unsigned NumStdsInList,long **LstSelecte
|
|||
/***** Initialize structure with user's data *****/
|
||||
Usr_UsrDataConstructor (&UsrDat);
|
||||
|
||||
/***** Loop over the list Gbl.Usrs.Select[Rol_UNK] getting users' codes *****/
|
||||
for (NumStd = 0, Ptr = Gbl.Usrs.Select[Rol_UNK];
|
||||
/***** Loop over the list Gbl.Usrs.Selected.List[Rol_UNK] getting users' codes *****/
|
||||
for (NumStd = 0, Ptr = Gbl.Usrs.Selected.List[Rol_UNK];
|
||||
NumStd < NumStdsInList && *Ptr;
|
||||
NumStd++)
|
||||
{
|
||||
|
@ -3114,7 +3114,7 @@ static void Att_PutParamsToPrintStdsList (void)
|
|||
if (Gbl.AttEvents.ShowDetails)
|
||||
Par_PutHiddenParamChar ("ShowDetails",'Y');
|
||||
Grp_PutParamsCodGrps ();
|
||||
Usr_PutHiddenParUsrCodAll (ActPrnLstStdAtt,Gbl.Usrs.Select[Rol_UNK]);
|
||||
Usr_PutHiddenParUsrCodAll (ActPrnLstStdAtt,Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
if (Gbl.AttEvents.StrAttCodsSelected)
|
||||
if (Gbl.AttEvents.StrAttCodsSelected[0])
|
||||
Par_PutHiddenParamString ("AttCods",Gbl.AttEvents.StrAttCodsSelected);
|
||||
|
@ -3132,7 +3132,7 @@ static void Att_PutButtonToShowDetails (void)
|
|||
Frm_StartFormAnchor (Gbl.Action.Act,Att_ATTENDANCE_DETAILS_ID);
|
||||
Par_PutHiddenParamChar ("ShowDetails",'Y');
|
||||
Grp_PutParamsCodGrps ();
|
||||
Usr_PutHiddenParUsrCodAll (Gbl.Action.Act,Gbl.Usrs.Select[Rol_UNK]);
|
||||
Usr_PutHiddenParUsrCodAll (Gbl.Action.Act,Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
if (Gbl.AttEvents.StrAttCodsSelected)
|
||||
if (Gbl.AttEvents.StrAttCodsSelected[0])
|
||||
Par_PutHiddenParamString ("AttCods",Gbl.AttEvents.StrAttCodsSelected);
|
||||
|
@ -3171,7 +3171,7 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView)
|
|||
{
|
||||
Frm_StartFormAnchor (Gbl.Action.Act,Att_ATTENDANCE_TABLE_ID);
|
||||
Grp_PutParamsCodGrps ();
|
||||
Usr_PutHiddenParUsrCodAll (Gbl.Action.Act,Gbl.Usrs.Select[Rol_UNK]);
|
||||
Usr_PutHiddenParUsrCodAll (Gbl.Action.Act,Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
}
|
||||
|
||||
/***** Start table *****/
|
||||
|
|
|
@ -451,10 +451,11 @@ En OpenSWAD:
|
|||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.71 (2019-03-11)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.72 (2019-03-11)"
|
||||
#define CSS_FILE "swad18.68.3.css"
|
||||
#define JS_FILE "swad18.64.js"
|
||||
/*
|
||||
Version 18.72: Mar 11, 2019 Show homework from list of students and teachers. (239043 lines)
|
||||
Version 18.71: Mar 11, 2019 Listing of users now allow to do several actions. Not finished. (238920 lines)
|
||||
3 changes necessary in database:
|
||||
UPDATE actions SET Txt='Realizar acción con varios profesores' WHERE ActCod='22' AND Language='es';
|
||||
|
|
|
@ -2042,7 +2042,7 @@ void Brw_GetParAndInitFileBrowser (void)
|
|||
Gbl.Prjs.PrjCod = Prj_GetParamPrjCod ();
|
||||
else if (Brw_GetIfCrsAssigWorksFileBrowser ())
|
||||
{
|
||||
/* Get lists of the selected users */
|
||||
/* Get lists of the selected users if not already got */
|
||||
Usr_GetListsSelectedUsrsCods ();
|
||||
/* Get user whose folder will be used to make any operation */
|
||||
Usr_GetParamOtherUsrCodEncryptedAndGetListIDs ();
|
||||
|
@ -2284,7 +2284,7 @@ void Brw_PutParamsFileBrowser (Act_Action_t NextAction,
|
|||
if (Brw_GetIfCrsAssigWorksFileBrowser ())
|
||||
{
|
||||
/***** Users selected *****/
|
||||
Usr_PutHiddenParUsrCodAll (NextAction,Gbl.Usrs.Select[Rol_UNK]);
|
||||
Usr_PutHiddenParUsrCodAll (NextAction,Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
Usr_PutParamOtherUsrCodEncrypted ();
|
||||
}
|
||||
}
|
||||
|
@ -3223,66 +3223,54 @@ static void Brw_ShowFileBrowsersAsgWrkCrs (void)
|
|||
{
|
||||
extern const char *Hlp_FILES_Homework_for_teachers;
|
||||
extern const char *Txt_Assignments_and_other_works;
|
||||
extern const char *Txt_You_must_select_one_ore_more_users;
|
||||
const char *Ptr;
|
||||
|
||||
/***** Check the number of users whose works will be shown *****/
|
||||
if (Usr_CountNumUsrsInListOfSelectedUsrs ()) // If some users are selected...
|
||||
/***** Create the zip file and put a link to download it *****/
|
||||
if (Gbl.FileBrowser.ZIP.CreateZIP)
|
||||
ZIP_CreateZIPAsgWrk ();
|
||||
|
||||
/***** Write top before showing file browser *****/
|
||||
Brw_WriteTopBeforeShowingFileBrowser ();
|
||||
|
||||
/***** Start box and table *****/
|
||||
Box_StartBoxTable ("100%",Txt_Assignments_and_other_works,
|
||||
Brw_PutIconShowFigure,
|
||||
Hlp_FILES_Homework_for_teachers,Box_NOT_CLOSABLE,0);
|
||||
|
||||
/***** List the assignments and works of the selected users *****/
|
||||
Ptr = Gbl.Usrs.Selected.List[Rol_UNK];
|
||||
while (*Ptr)
|
||||
{
|
||||
/***** Create the zip file and put a link to download it *****/
|
||||
if (Gbl.FileBrowser.ZIP.CreateZIP)
|
||||
ZIP_CreateZIPAsgWrk ();
|
||||
Par_GetNextStrUntilSeparParamMult (&Ptr,Gbl.Usrs.Other.UsrDat.EncryptedUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&Gbl.Usrs.Other.UsrDat);
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat)) // Get of the database the data of the user
|
||||
if (Usr_CheckIfICanViewAsgWrk (&Gbl.Usrs.Other.UsrDat))
|
||||
{
|
||||
/***** Show a row with the data of the owner of the works *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Brw_ShowDataOwnerAsgWrk (&Gbl.Usrs.Other.UsrDat);
|
||||
|
||||
/***** Write top before showing file browser *****/
|
||||
Brw_WriteTopBeforeShowingFileBrowser ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
|
||||
/***** Start box and table *****/
|
||||
Box_StartBoxTable ("100%",Txt_Assignments_and_other_works,
|
||||
Brw_PutIconShowFigure,
|
||||
Hlp_FILES_Homework_for_teachers,Box_NOT_CLOSABLE,0);
|
||||
/***** Show the tree with the assignments *****/
|
||||
Gbl.FileBrowser.Type = Brw_ADMI_ASG_CRS;
|
||||
Brw_InitializeFileBrowser ();
|
||||
Brw_ShowFileBrowser ();
|
||||
|
||||
/***** List the assignments and works of the selected users *****/
|
||||
Ptr = Gbl.Usrs.Select[Rol_UNK];
|
||||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParamMult (&Ptr,Gbl.Usrs.Other.UsrDat.EncryptedUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&Gbl.Usrs.Other.UsrDat);
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat)) // Get of the database the data of the user
|
||||
if (Usr_CheckIfICanViewAsgWrk (&Gbl.Usrs.Other.UsrDat))
|
||||
{
|
||||
/***** Show a row with the data of the owner of the works *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Brw_ShowDataOwnerAsgWrk (&Gbl.Usrs.Other.UsrDat);
|
||||
/***** Show the tree with the works *****/
|
||||
Gbl.FileBrowser.Type = Brw_ADMI_WRK_CRS;
|
||||
Brw_InitializeFileBrowser ();
|
||||
Brw_ShowFileBrowser ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
|
||||
/***** Show the tree with the assignments *****/
|
||||
Gbl.FileBrowser.Type = Brw_ADMI_ASG_CRS;
|
||||
Brw_InitializeFileBrowser ();
|
||||
Brw_ShowFileBrowser ();
|
||||
|
||||
/***** Show the tree with the works *****/
|
||||
Gbl.FileBrowser.Type = Brw_ADMI_WRK_CRS;
|
||||
Brw_InitializeFileBrowser ();
|
||||
Brw_ShowFileBrowser ();
|
||||
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
/***** End table and box *****/
|
||||
Box_EndBoxTable ();
|
||||
}
|
||||
else // If no users are selected...
|
||||
{
|
||||
// ...write warning alert
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_users);
|
||||
// ...and show again the form
|
||||
Brw_AskEditWorksCrs ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
/***** End table and box *****/
|
||||
Box_EndBoxTable ();
|
||||
|
||||
/***** Free memory used by list of selected users' codes *****/
|
||||
Usr_FreeListsSelectedUsrsCods ();
|
||||
}
|
||||
|
@ -3498,7 +3486,33 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************* Show a file browser or students' works *****************/
|
||||
/******* Get and check list of selected users, and show users' works ********/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_GetSelectedUsrsAndShowWorks (void)
|
||||
{
|
||||
extern const char *Txt_You_must_select_one_ore_more_users;
|
||||
|
||||
/***** Get lists of the selected users if not already got *****/
|
||||
Usr_GetListsSelectedUsrsCods ();
|
||||
|
||||
/***** Check the number of users whose works will be shown *****/
|
||||
if (Usr_CountNumUsrsInListOfSelectedUsrs ()) // If some users are selected...
|
||||
Brw_ShowFileBrowserOrWorks ();
|
||||
else // If no users are selected...
|
||||
{
|
||||
// ...write warning alert
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_users);
|
||||
// ...and show again the form
|
||||
Brw_AskEditWorksCrs ();
|
||||
}
|
||||
|
||||
/***** Free memory used by list of selected users' codes *****/
|
||||
Usr_FreeListsSelectedUsrsCods ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************** Show a file browser or users' works *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_ShowFileBrowserOrWorks (void)
|
||||
|
@ -5008,7 +5022,7 @@ static void Brw_PutParamsFullTree (void)
|
|||
Prj_PutParamPrjCod (Gbl.Prjs.PrjCod);
|
||||
else if (Brw_GetIfCrsAssigWorksFileBrowser ())
|
||||
Usr_PutHiddenParUsrCodAll (Brw_ActSeeAdm[Gbl.FileBrowser.Type],
|
||||
Gbl.Usrs.Select[Rol_UNK]);
|
||||
Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -175,6 +175,8 @@ void Brw_InitializeFileBrowser (void);
|
|||
bool Brw_CheckIfExistsFolderAssigmentForAnyUsr (const char *FolderName);
|
||||
bool Brw_UpdateFoldersAssigmentsIfExistForAllUsrs (const char *OldFolderName,const char *NewFolderName);
|
||||
void Brw_RemoveFoldersAssignmentsIfExistForAllUsrs (const char *FolderName);
|
||||
|
||||
void Brw_GetSelectedUsrsAndShowWorks (void);
|
||||
void Brw_ShowFileBrowserOrWorks (void);
|
||||
void Brw_ShowAgainFileBrowserOrWorks (void);
|
||||
|
||||
|
|
|
@ -195,13 +195,15 @@ void Gbl_InitializeGlobals (void)
|
|||
Gbl.Action.IsAJAXAutoRefresh = false;
|
||||
Gbl.Action.Tab = TabUnk;
|
||||
|
||||
Gbl.Usrs.Selected.Filled = false; // Lists of encrypted codes of users selected from form are not filled
|
||||
Gbl.Usrs.Selected.Action = Usr_LIST_USRS_UNKNOWN_ACTION;
|
||||
for (Role = (Rol_Role_t) 0;
|
||||
Role < Rol_NUM_ROLES;
|
||||
Role++)
|
||||
{
|
||||
Gbl.Usrs.LstUsrs[Role].Lst = NULL;
|
||||
Gbl.Usrs.LstUsrs[Role].NumUsrs = 0;
|
||||
Gbl.Usrs.Select[Role] = NULL;
|
||||
Gbl.Usrs.Selected.List[Role] = NULL;
|
||||
}
|
||||
Gbl.Usrs.ListOtherRecipients = NULL;
|
||||
|
||||
|
|
|
@ -393,7 +393,12 @@ struct Globals
|
|||
unsigned NumIDToConfirm; // Used as hidden parameter to confirm a user's ID
|
||||
} Other; // Another user, used for example to register in / remove from a course
|
||||
struct ListUsrs LstUsrs[Rol_NUM_ROLES];
|
||||
char *Select[Rol_NUM_ROLES]; // Lists of ID of users from a form
|
||||
struct
|
||||
{
|
||||
char *List[Rol_NUM_ROLES]; // Lists of encrypted codes of users selected from a form
|
||||
bool Filled; // If lists are already filled/readed
|
||||
Usr_ListUsrsAction_t Action; // What action I want to do with these selected users
|
||||
} Selected;
|
||||
char *ListOtherRecipients; // List of ID or nicks of users written explicitely on a form
|
||||
struct
|
||||
{
|
||||
|
|
|
@ -735,11 +735,11 @@ void Msg_RecMsgFromUsr (void)
|
|||
Media.Quality = Msg_IMAGE_SAVED_QUALITY;
|
||||
Med_GetMediaFromForm (-1,&Media,NULL);
|
||||
|
||||
/***** Loop over the list Gbl.Usrs.Select[Rol_UNK], that holds the list of the
|
||||
/***** Loop over the list Gbl.Usrs.Selected.List[Rol_UNK], that holds the list of the
|
||||
recipients, creating a received message for each recipient *****/
|
||||
Str_ChangeFormat (Str_FROM_FORM,Str_TO_RIGOROUS_HTML,
|
||||
Content,Cns_MAX_BYTES_LONG_TEXT,false);
|
||||
Ptr = Gbl.Usrs.Select[Rol_UNK];
|
||||
Ptr = Gbl.Usrs.Selected.List[Rol_UNK];
|
||||
NumRecipients = 0;
|
||||
while (*Ptr)
|
||||
{
|
||||
|
|
|
@ -953,20 +953,14 @@ void Rec_PutLinkToEditRecordFields (void)
|
|||
|
||||
void Rec_ListRecordsGstsShow (void)
|
||||
{
|
||||
Gbl.Action.Original = ActDoActOnSevGst; // Used to know where to go when confirming ID
|
||||
Gbl.Action.Original = ActSeeRecSevGst; // Used to know where to go when confirming ID
|
||||
Rec_ListRecordsGsts (Rec_SHA_RECORD_LIST);
|
||||
}
|
||||
|
||||
void Rec_ListRecordsGstsPrint (void)
|
||||
{
|
||||
/***** Get list of selected users *****/
|
||||
Usr_GetListsSelectedUsrsCods ();
|
||||
|
||||
/***** List records ready to be printed *****/
|
||||
Rec_ListRecordsGsts (Rec_SHA_RECORD_PRINT);
|
||||
|
||||
/***** Free memory used by list of selected users' codes *****/
|
||||
Usr_FreeListsSelectedUsrsCods ();
|
||||
}
|
||||
|
||||
static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView)
|
||||
|
@ -976,6 +970,9 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView)
|
|||
struct UsrData UsrDat;
|
||||
char RecordSectionId[32];
|
||||
|
||||
/***** Get list of selected users if not already got *****/
|
||||
Usr_GetListsSelectedUsrsCods ();
|
||||
|
||||
/***** Assign users listing type depending on current action *****/
|
||||
Gbl.Usrs.Listing.RecsUsrs = Rec_RECORD_USERS_GUESTS;
|
||||
|
||||
|
@ -989,7 +986,7 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView)
|
|||
|
||||
/* Link to print view */
|
||||
Frm_StartForm (ActPrnRecSevGst);
|
||||
Usr_PutHiddenParUsrCodAll (ActPrnRecSevGst,Gbl.Usrs.Select[Rol_UNK]);
|
||||
Usr_PutHiddenParUsrCodAll (ActPrnRecSevGst,Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
Rec_ShowLinkToPrintPreviewOfRecords ();
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
@ -1002,7 +999,7 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView)
|
|||
// ...inscription in any course
|
||||
|
||||
/***** List the records *****/
|
||||
Ptr = Gbl.Usrs.Select[Rol_UNK];
|
||||
Ptr = Gbl.Usrs.Selected.List[Rol_UNK];
|
||||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod,
|
||||
|
@ -1038,8 +1035,12 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView)
|
|||
NumUsr++;
|
||||
}
|
||||
}
|
||||
|
||||
/***** Free memory used for user's data *****/
|
||||
Usr_UsrDataDestructor (&UsrDat);
|
||||
|
||||
/***** Free memory used by list of selected users' codes *****/
|
||||
Usr_FreeListsSelectedUsrsCods ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1138,7 +1139,7 @@ static void Rec_ShowRecordOneStdCrs (void)
|
|||
|
||||
void Rec_ListRecordsStdsShow (void)
|
||||
{
|
||||
Gbl.Action.Original = ActDoActOnSevStd; // Used to know where to go when confirming ID...
|
||||
Gbl.Action.Original = ActSeeRecSevStd; // Used to know where to go when confirming ID...
|
||||
// ...or changing course record
|
||||
Rec_ListRecordsStds (Rec_SHA_RECORD_LIST,
|
||||
Rec_CRS_LIST_SEVERAL_RECORDS);
|
||||
|
@ -1146,15 +1147,9 @@ void Rec_ListRecordsStdsShow (void)
|
|||
|
||||
void Rec_ListRecordsStdsPrint (void)
|
||||
{
|
||||
/***** Get list of selected users *****/
|
||||
Usr_GetListsSelectedUsrsCods ();
|
||||
|
||||
/***** List records ready to be printed *****/
|
||||
Rec_ListRecordsStds (Rec_SHA_RECORD_PRINT,
|
||||
Rec_CRS_PRINT_SEVERAL_RECORDS);
|
||||
|
||||
/***** Free memory used by list of selected users' codes *****/
|
||||
Usr_FreeListsSelectedUsrsCods ();
|
||||
}
|
||||
|
||||
static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
|
||||
|
@ -1166,6 +1161,9 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
|
|||
bool ItsMe;
|
||||
char RecordSectionId[32];
|
||||
|
||||
/***** Get list of selected users if not already got *****/
|
||||
Usr_GetListsSelectedUsrsCods ();
|
||||
|
||||
/***** Assign users listing type depending on current action *****/
|
||||
Gbl.Usrs.Listing.RecsUsrs = Rec_RECORD_USERS_STUDENTS;
|
||||
|
||||
|
@ -1186,7 +1184,7 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
|
|||
|
||||
/* Link to print view */
|
||||
Frm_StartForm (ActPrnRecSevStd);
|
||||
Usr_PutHiddenParUsrCodAll (ActPrnRecSevStd,Gbl.Usrs.Select[Rol_UNK]);
|
||||
Usr_PutHiddenParUsrCodAll (ActPrnRecSevStd,Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
Rec_ShowLinkToPrintPreviewOfRecords ();
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
@ -1196,7 +1194,7 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
|
|||
Usr_UsrDataConstructor (&UsrDat);
|
||||
|
||||
/***** List the records *****/
|
||||
Ptr = Gbl.Usrs.Select[Rol_UNK];
|
||||
Ptr = Gbl.Usrs.Selected.List[Rol_UNK];
|
||||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod,
|
||||
|
@ -1259,6 +1257,9 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
|
|||
|
||||
/***** Free list of fields of records *****/
|
||||
Rec_FreeListFields ();
|
||||
|
||||
/***** Free memory used by list of selected users' codes *****/
|
||||
Usr_FreeListsSelectedUsrsCods ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1348,20 +1349,14 @@ static void Rec_ShowRecordOneTchCrs (void)
|
|||
|
||||
void Rec_ListRecordsTchsShow (void)
|
||||
{
|
||||
Gbl.Action.Original = ActDoActOnSevTch; // Used to know where to go when confirming ID
|
||||
Gbl.Action.Original = ActSeeRecSevTch; // Used to know where to go when confirming ID
|
||||
Rec_ListRecordsTchs (Rec_SHA_RECORD_LIST);
|
||||
}
|
||||
|
||||
void Rec_ListRecordsTchsPrint (void)
|
||||
{
|
||||
/***** Get list of selected users *****/
|
||||
Usr_GetListsSelectedUsrsCods ();
|
||||
|
||||
/***** List records ready to be printed *****/
|
||||
Rec_ListRecordsTchs (Rec_SHA_RECORD_PRINT);
|
||||
|
||||
/***** Free memory used by list of selected users' codes *****/
|
||||
Usr_FreeListsSelectedUsrsCods ();
|
||||
}
|
||||
|
||||
static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
|
||||
|
@ -1375,6 +1370,9 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
|
|||
bool ShowOfficeHours;
|
||||
char Width[10 + 2 + 1];
|
||||
|
||||
/***** Get list of selected users if not already got *****/
|
||||
Usr_GetListsSelectedUsrsCods ();
|
||||
|
||||
/***** Width for office hours *****/
|
||||
snprintf (Width,sizeof (Width),
|
||||
"%upx",
|
||||
|
@ -1390,7 +1388,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
|
|||
if (Gbl.Action.Act == ActPrnRecSevTch)
|
||||
Rec_GetParamRecordsPerPage ();
|
||||
|
||||
if (Gbl.Action.Act == ActDoActOnSevTch)
|
||||
if (Gbl.Action.Act == ActSeeRecSevTch)
|
||||
{
|
||||
/***** Show contextual menu *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||
|
@ -1400,7 +1398,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
|
|||
|
||||
/* Link to print view */
|
||||
Frm_StartForm (ActPrnRecSevTch);
|
||||
Usr_PutHiddenParUsrCodAll (ActPrnRecSevTch,Gbl.Usrs.Select[Rol_UNK]);
|
||||
Usr_PutHiddenParUsrCodAll (ActPrnRecSevTch,Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
Par_PutHiddenParamChar ("ParamOfficeHours",'Y');
|
||||
Par_PutHiddenParamChar ("ShowOfficeHours",
|
||||
ShowOfficeHours ? 'Y' :
|
||||
|
@ -1415,7 +1413,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
|
|||
Usr_UsrDataConstructor (&UsrDat);
|
||||
|
||||
/***** List the records *****/
|
||||
Ptr = Gbl.Usrs.Select[Rol_UNK];
|
||||
Ptr = Gbl.Usrs.Selected.List[Rol_UNK];
|
||||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod,
|
||||
|
@ -1471,6 +1469,9 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
|
|||
|
||||
/***** Free memory used for user's data *****/
|
||||
Usr_UsrDataDestructor (&UsrDat);
|
||||
|
||||
/***** Free memory used by list of selected users' codes *****/
|
||||
Usr_FreeListsSelectedUsrsCods ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1538,7 +1539,7 @@ static void Rec_WriteFormShowOfficeHoursSeveralTchs (bool ShowOfficeHours)
|
|||
{
|
||||
extern const char *Txt_Show_office_hours;
|
||||
|
||||
Lay_PutContextualCheckbox (ActDoActOnSevTch,Rec_PutParamsShowOfficeHoursSeveralTchs,
|
||||
Lay_PutContextualCheckbox (ActSeeRecSevTch,Rec_PutParamsShowOfficeHoursSeveralTchs,
|
||||
"ShowOfficeHours",
|
||||
ShowOfficeHours,false,
|
||||
Txt_Show_office_hours,
|
||||
|
@ -1553,7 +1554,7 @@ static void Rec_PutParamsShowOfficeHoursOneTch (void)
|
|||
|
||||
static void Rec_PutParamsShowOfficeHoursSeveralTchs (void)
|
||||
{
|
||||
Usr_PutHiddenParUsrCodAll (ActDoActOnSevTch,Gbl.Usrs.Select[Rol_UNK]);
|
||||
Usr_PutHiddenParUsrCodAll (ActSeeRecSevTch,Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
Par_PutHiddenParamChar ("ParamOfficeHours",'Y');
|
||||
}
|
||||
|
||||
|
@ -1629,7 +1630,7 @@ void Rec_UpdateAndShowOtherCrsRecord (void)
|
|||
/***** Show one or multiple records *****/
|
||||
switch (Gbl.Action.Original)
|
||||
{
|
||||
case ActDoActOnSevStd:
|
||||
case ActSeeRecSevStd:
|
||||
/* Show multiple records again (including the updated one) */
|
||||
Rec_ListRecordsStdsShow ();
|
||||
break;
|
||||
|
@ -1724,10 +1725,10 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
|
|||
ICanEdit = true;
|
||||
Frm_StartFormAnchor (ActRcvRecOthUsr,Anchor);
|
||||
Par_PutHiddenParamLong ("OriginalActCod",
|
||||
Act_GetActCod (ActDoActOnSevStd)); // Original action, used to know where we came from
|
||||
Act_GetActCod (ActSeeRecSevStd)); // Original action, used to know where we came from
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||
if (TypeOfView == Rec_CRS_LIST_SEVERAL_RECORDS)
|
||||
Usr_PutHiddenParUsrCodAll (ActRcvRecOthUsr,Gbl.Usrs.Select[Rol_UNK]);
|
||||
Usr_PutHiddenParUsrCodAll (ActRcvRecOthUsr,Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -1247,7 +1247,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
|
||||
LengthQuery = strlen (Query);
|
||||
NumUsr = 0;
|
||||
Ptr = Gbl.Usrs.Select[Rol_UNK];
|
||||
Ptr = Gbl.Usrs.Selected.List[Rol_UNK];
|
||||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod,
|
||||
|
@ -1594,7 +1594,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
|
|||
Par_PutHiddenParamLong ("FirstRow",FirstRow - Gbl.Stat.RowsPerPage);
|
||||
Par_PutHiddenParamLong ("LastRow" ,FirstRow - 1);
|
||||
Par_PutHiddenParamLong ("RowsPage",Gbl.Stat.RowsPerPage);
|
||||
Usr_PutHiddenParUsrCodAll (ActSeeAccCrs,Gbl.Usrs.Select[Rol_UNK]);
|
||||
Usr_PutHiddenParUsrCodAll (ActSeeAccCrs,Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
}
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:20%%;\">");
|
||||
if (FirstRow > 1)
|
||||
|
@ -1630,7 +1630,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
|
|||
Par_PutHiddenParamUnsigned ("FirstRow" ,(unsigned) (LastRow + 1));
|
||||
Par_PutHiddenParamUnsigned ("LastRow" ,(unsigned) (LastRow + Gbl.Stat.RowsPerPage));
|
||||
Par_PutHiddenParamUnsigned ("RowsPage" ,(unsigned) Gbl.Stat.RowsPerPage);
|
||||
Usr_PutHiddenParUsrCodAll (ActSeeAccCrs,Gbl.Usrs.Select[Rol_UNK]);
|
||||
Usr_PutHiddenParUsrCodAll (ActSeeAccCrs,Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
}
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\" style=\"width:20%%;\">");
|
||||
if (LastRow < NumRows)
|
||||
|
@ -2105,7 +2105,7 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES
|
|||
Par_PutHiddenParamUnsigned ("CountType",(unsigned) Gbl.Stat.CountType);
|
||||
Par_PutHiddenParamUnsigned ("StatAct" ,(unsigned) Gbl.Stat.NumAction);
|
||||
if (Gbl.Action.Act == ActSeeAccCrs)
|
||||
Usr_PutHiddenParUsrCodAll (ActSeeAccCrs,Gbl.Usrs.Select[Rol_UNK]);
|
||||
Usr_PutHiddenParUsrCodAll (ActSeeAccCrs,Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
else // Gbl.Action.Act == ActSeeAccGbl
|
||||
{
|
||||
Par_PutHiddenParamUnsigned ("Role",(unsigned) Gbl.Stat.Role);
|
||||
|
|
|
@ -7626,7 +7626,7 @@ void Tst_ShowUsrsTestResults (void)
|
|||
Tst_ShowHeaderTestResults ();
|
||||
|
||||
/***** List the test exams of the selected users *****/
|
||||
Ptr = Gbl.Usrs.Select[Rol_UNK];
|
||||
Ptr = Gbl.Usrs.Selected.List[Rol_UNK];
|
||||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParamMult (&Ptr,Gbl.Usrs.Other.UsrDat.EncryptedUsrCod,
|
||||
|
|
|
@ -496,7 +496,7 @@ void TT_ShowTimeTable (long UsrCod)
|
|||
case ActSeeMyTT: case ActPrnMyTT: case ActChgMyTT1stDay:
|
||||
Gbl.TimeTable.View = TT_CRS_VIEW;
|
||||
break;
|
||||
case ActSeeRecOneTch: case ActDoActOnSevTch:
|
||||
case ActSeeRecOneTch: case ActSeeRecSevTch:
|
||||
Gbl.TimeTable.View = TT_TUT_VIEW;
|
||||
break;
|
||||
case ActEdiCrsTT: case ActChgCrsTT:
|
||||
|
|
310
swad_user.c
310
swad_user.c
|
@ -140,14 +140,6 @@ const char *Usr_UsrDatMainFieldNames[Usr_NUM_MAIN_FIELDS_DATA_USR];
|
|||
|
||||
#define Usr_MAX_BYTES_QUERY_GET_LIST_USRS (16 * 1024 - 1)
|
||||
|
||||
#define Usr_LIST_USRS_NUM_ACTIONS 3
|
||||
typedef enum
|
||||
{
|
||||
Usr_LIST_USRS_UNKNOWN_ACTION = 0,
|
||||
Usr_SHOW_RECORDS = 1,
|
||||
Usr_FOLLOW_USERS = 2,
|
||||
} Usr_ListUsrsAction_t;
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Internal types *******************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -245,12 +237,12 @@ static void Usr_PutLinkToSeeAdmins (void);
|
|||
static void Usr_PutLinkToSeeGuests (void);
|
||||
|
||||
static bool Usr_PutActionsSeveralUsrs (Rol_Role_t Role);
|
||||
static void Usr_PutActionShowRecords (bool *OptionChecked);
|
||||
static void Usr_PutActionFollowUsers (bool *OptionChecked);
|
||||
static void Usr_StartListUsrsAction (Usr_ListUsrsAction_t ListUsrsAction,
|
||||
bool *OptionChecked);
|
||||
static void Usr_PutActionShowRecords (void);
|
||||
static void Usr_PutActionShowHomework (void);
|
||||
static void Usr_PutActionFollowUsers (void);
|
||||
static void Usr_StartListUsrsAction (Usr_ListUsrsAction_t ListUsrsAction);
|
||||
static void Usr_EndListUsrsAction (void);
|
||||
|
||||
static Usr_ListUsrsAction_t Usr_ListUsrsAction (Usr_ListUsrsAction_t DefaultAction);
|
||||
|
||||
static void Usr_PutIconsListGsts (void);
|
||||
static void Usr_PutIconsListStds (void);
|
||||
|
@ -5573,45 +5565,51 @@ void Usr_GetListsSelectedUsrsCods (void)
|
|||
unsigned Length;
|
||||
Rol_Role_t Role;
|
||||
|
||||
/***** Get possible list of all selected users *****/
|
||||
Usr_AllocateListSelectedUsrCod (Rol_UNK);
|
||||
if (Gbl.Session.IsOpen) // If the session is open, get parameter from DB
|
||||
if (!Gbl.Usrs.Selected.Filled) // Get list only if not already got
|
||||
{
|
||||
Ses_GetHiddenParFromDB (Gbl.Action.Act,Usr_ParamUsrCod[Rol_UNK],Gbl.Usrs.Select[Rol_UNK],
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
|
||||
Str_ChangeFormat (Str_FROM_FORM,Str_TO_TEXT,Gbl.Usrs.Select[Rol_UNK],
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS,true);
|
||||
}
|
||||
else
|
||||
Par_GetParMultiToText (Usr_ParamUsrCod[Rol_UNK],Gbl.Usrs.Select[Rol_UNK],
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
|
||||
|
||||
/***** Get list of selected users for each possible role *****/
|
||||
for (Role = Rol_TCH; // From the highest possible role of selected users...
|
||||
Role >= Rol_GST; // ...downto the lowest possible role of selected users
|
||||
Role--)
|
||||
if (Usr_ParamUsrCod[Role])
|
||||
/***** Get possible list of all selected users *****/
|
||||
Usr_AllocateListSelectedUsrCod (Rol_UNK);
|
||||
if (Gbl.Session.IsOpen) // If the session is open, get parameter from DB
|
||||
{
|
||||
/* Get parameter with selected users with this role */
|
||||
Usr_AllocateListSelectedUsrCod (Role);
|
||||
Par_GetParMultiToText (Usr_ParamUsrCod[Role],Gbl.Usrs.Select[Role],
|
||||
Ses_GetHiddenParFromDB (Gbl.Action.Act,Usr_ParamUsrCod[Rol_UNK],Gbl.Usrs.Selected.List[Rol_UNK],
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
|
||||
Str_ChangeFormat (Str_FROM_FORM,Str_TO_TEXT,Gbl.Usrs.Selected.List[Rol_UNK],
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS,true);
|
||||
}
|
||||
else
|
||||
Par_GetParMultiToText (Usr_ParamUsrCod[Rol_UNK],Gbl.Usrs.Selected.List[Rol_UNK],
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
|
||||
|
||||
/* Add selected users with this role
|
||||
to the list with all selected users */
|
||||
if (Gbl.Usrs.Select[Role][0])
|
||||
/***** Get list of selected users for each possible role *****/
|
||||
for (Role = Rol_TCH; // From the highest possible role of selected users...
|
||||
Role >= Rol_GST; // ...downto the lowest possible role of selected users
|
||||
Role--)
|
||||
if (Usr_ParamUsrCod[Role])
|
||||
{
|
||||
if (Gbl.Usrs.Select[Rol_UNK][0])
|
||||
if ((Length = strlen (Gbl.Usrs.Select[Rol_UNK])) <
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS)
|
||||
{
|
||||
Gbl.Usrs.Select[Rol_UNK][Length ] = Par_SEPARATOR_PARAM_MULTIPLE;
|
||||
Gbl.Usrs.Select[Rol_UNK][Length + 1] = '\0';
|
||||
}
|
||||
Str_Concat (Gbl.Usrs.Select[Rol_UNK],Gbl.Usrs.Select[Role],
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
|
||||
/* Get parameter with selected users with this role */
|
||||
Usr_AllocateListSelectedUsrCod (Role);
|
||||
Par_GetParMultiToText (Usr_ParamUsrCod[Role],Gbl.Usrs.Selected.List[Role],
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
|
||||
|
||||
/* Add selected users with this role
|
||||
to the list with all selected users */
|
||||
if (Gbl.Usrs.Selected.List[Role][0])
|
||||
{
|
||||
if (Gbl.Usrs.Selected.List[Rol_UNK][0])
|
||||
if ((Length = strlen (Gbl.Usrs.Selected.List[Rol_UNK])) <
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS)
|
||||
{
|
||||
Gbl.Usrs.Selected.List[Rol_UNK][Length ] = Par_SEPARATOR_PARAM_MULTIPLE;
|
||||
Gbl.Usrs.Selected.List[Rol_UNK][Length + 1] = '\0';
|
||||
}
|
||||
Str_Concat (Gbl.Usrs.Selected.List[Rol_UNK],Gbl.Usrs.Selected.List[Role],
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***** List is filled *****/
|
||||
Gbl.Usrs.Selected.Filled = true;
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -5634,9 +5632,10 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
struct ListUsrCods ListUsrCods;
|
||||
bool Error = false;
|
||||
|
||||
/***** Allocate memory for the lists of users's IDs *****/
|
||||
Usr_AllocateListSelectedUsrCod (Rol_UNK);
|
||||
LengthSelectedUsrsCods = strlen (Gbl.Usrs.Select[Rol_UNK]);
|
||||
/***** Get list of selected encrypted users's codes if not already got.
|
||||
This list is necessary to add encrypted user's codes at the end. *****/
|
||||
Usr_GetListsSelectedUsrsCods ();
|
||||
LengthSelectedUsrsCods = strlen (Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
|
||||
/***** Allocate memory for the lists of recipients written explicetely *****/
|
||||
Usr_AllocateListOtherRecipients ();
|
||||
|
@ -5755,7 +5754,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
if (LengthUsrCod < Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS)
|
||||
{
|
||||
/* Add user */
|
||||
Str_Copy (Gbl.Usrs.Select[Rol_UNK],
|
||||
Str_Copy (Gbl.Usrs.Selected.List[Rol_UNK],
|
||||
UsrDat.EncryptedUsrCod,
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
|
||||
LengthSelectedUsrsCods = LengthUsrCod;
|
||||
|
@ -5767,11 +5766,11 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS)
|
||||
{
|
||||
/* Add separator */
|
||||
Gbl.Usrs.Select[Rol_UNK][LengthSelectedUsrsCods] = Par_SEPARATOR_PARAM_MULTIPLE;
|
||||
Gbl.Usrs.Selected.List[Rol_UNK][LengthSelectedUsrsCods] = Par_SEPARATOR_PARAM_MULTIPLE;
|
||||
LengthSelectedUsrsCods++;
|
||||
|
||||
/* Add user */
|
||||
Str_Copy (Gbl.Usrs.Select[Rol_UNK] + LengthSelectedUsrsCods,
|
||||
Str_Copy (Gbl.Usrs.Selected.List[Rol_UNK] + LengthSelectedUsrsCods,
|
||||
UsrDat.EncryptedUsrCod,
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
|
||||
LengthSelectedUsrsCods += LengthUsrCod;
|
||||
|
@ -5794,16 +5793,16 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
/*****************************************************************************/
|
||||
/************** Find if encrypted user's code is yet in list *****************/
|
||||
/*****************************************************************************/
|
||||
// Returns true if EncryptedUsrCodToFind is in Gbl.Usrs.Select[Rol_UNK]
|
||||
// Returns true if EncryptedUsrCodToFind is in Gbl.Usrs.Selected.List[Rol_UNK]
|
||||
|
||||
bool Usr_FindUsrCodInListOfSelectedUsrs (const char *EncryptedUsrCodToFind)
|
||||
{
|
||||
const char *Ptr;
|
||||
char EncryptedUsrCod[Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1];
|
||||
|
||||
if (Gbl.Usrs.Select[Rol_UNK])
|
||||
if (Gbl.Usrs.Selected.List[Rol_UNK])
|
||||
{
|
||||
Ptr = Gbl.Usrs.Select[Rol_UNK];
|
||||
Ptr = Gbl.Usrs.Selected.List[Rol_UNK];
|
||||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParamMult (&Ptr,EncryptedUsrCod,
|
||||
|
@ -5825,8 +5824,8 @@ unsigned Usr_CountNumUsrsInListOfSelectedUsrs (void)
|
|||
unsigned NumUsrs = 0;
|
||||
struct UsrData UsrDat;
|
||||
|
||||
/***** Loop over the list Gbl.Usrs.Select[Rol_UNK] to count the number of users *****/
|
||||
Ptr = Gbl.Usrs.Select[Rol_UNK];
|
||||
/***** Loop over the list Gbl.Usrs.Selected.List[Rol_UNK] to count the number of users *****/
|
||||
Ptr = Gbl.Usrs.Selected.List[Rol_UNK];
|
||||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod,
|
||||
|
@ -5845,16 +5844,16 @@ unsigned Usr_CountNumUsrsInListOfSelectedUsrs (void)
|
|||
|
||||
static void Usr_AllocateListSelectedUsrCod (Rol_Role_t Role)
|
||||
{
|
||||
if (!Gbl.Usrs.Select[Role])
|
||||
if (!Gbl.Usrs.Selected.List[Role])
|
||||
{
|
||||
if ((Gbl.Usrs.Select[Role] = (char *) malloc (Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS + 1)) == NULL)
|
||||
if ((Gbl.Usrs.Selected.List[Role] = (char *) malloc (Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS + 1)) == NULL)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Gbl.Usrs.Select[Role][0] = '\0';
|
||||
Gbl.Usrs.Selected.List[Role][0] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************ Free memory used by list of selected users' codes **************/
|
||||
/*********** Free memory used by lists of selected users' codes **************/
|
||||
/*****************************************************************************/
|
||||
// Role = Rol_UNK here means all users
|
||||
|
||||
|
@ -5862,14 +5861,23 @@ void Usr_FreeListsSelectedUsrsCods (void)
|
|||
{
|
||||
Rol_Role_t Role;
|
||||
|
||||
for (Role = (Rol_Role_t) 0;
|
||||
Role < Rol_NUM_ROLES;
|
||||
Role++)
|
||||
if (Gbl.Usrs.Select[Role])
|
||||
{
|
||||
free ((void *) Gbl.Usrs.Select[Role]);
|
||||
Gbl.Usrs.Select[Role] = NULL;
|
||||
}
|
||||
if (Gbl.Usrs.Selected.Filled) // Only if lists are filled
|
||||
{
|
||||
/***** Free lists *****/
|
||||
for (Role = (Rol_Role_t) 0;
|
||||
Role < Rol_NUM_ROLES;
|
||||
Role++)
|
||||
if (Gbl.Usrs.Selected.List[Role])
|
||||
{
|
||||
free ((void *) Gbl.Usrs.Selected.List[Role]);
|
||||
Gbl.Usrs.Selected.List[Role] = NULL;
|
||||
}
|
||||
|
||||
/***** Mark lists as empty *****/
|
||||
Gbl.Usrs.Selected.Filled = false;
|
||||
// Lists of encrypted codes of users selected from form
|
||||
// are now marked as not filled
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -5996,7 +6004,7 @@ void Usr_PutExtraParamsUsrList (Act_Action_t NextAction)
|
|||
Att_PutParamAttCod (Gbl.AttEvents.AttCod);
|
||||
break;
|
||||
case ActReqMsgUsr:
|
||||
Usr_PutHiddenParUsrCodAll (NextAction,Gbl.Usrs.Select[Rol_UNK]);
|
||||
Usr_PutHiddenParUsrCodAll (NextAction,Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
Msg_PutHiddenParamOtherRecipients ();
|
||||
Msg_PutHiddenParamsSubjectAndContent ();
|
||||
if (Gbl.Msg.Reply.IsReply)
|
||||
|
@ -8012,28 +8020,42 @@ static bool Usr_PutActionsSeveralUsrs (Rol_Role_t Role)
|
|||
{
|
||||
extern const char *The_ClassFormInBox[The_NUM_THEMES];
|
||||
bool ICanViewRecords;
|
||||
bool ICanViewHomework;
|
||||
bool ICanFollow;
|
||||
bool OptionsShown = false;
|
||||
bool OptionChecked = false;
|
||||
|
||||
/***** Get the action to do *****/
|
||||
Gbl.Usrs.Selected.Action = Usr_ListUsrsAction (Usr_LIST_USRS_DEFAULT_ACTION);
|
||||
|
||||
switch (Role)
|
||||
{
|
||||
case Rol_GST:
|
||||
ICanViewRecords = (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
|
||||
ICanFollow = false;
|
||||
ICanViewRecords = (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
|
||||
ICanViewHomework = false;
|
||||
ICanFollow = false;
|
||||
break;
|
||||
case Rol_STD:
|
||||
ICanViewRecords = ICanFollow =
|
||||
ICanViewRecords =
|
||||
ICanFollow =
|
||||
(Gbl.Scope.Current == Sco_SCOPE_CRS &&
|
||||
(Gbl.Usrs.Me.IBelongToCurrentCrs ||
|
||||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM));
|
||||
ICanViewHomework = (Gbl.Usrs.Me.Role.Logged == Rol_NET ||
|
||||
Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
|
||||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
|
||||
break;
|
||||
case Rol_TCH:
|
||||
ICanViewRecords = ICanFollow =
|
||||
ICanViewRecords =
|
||||
ICanFollow =
|
||||
(Gbl.Scope.Current == Sco_SCOPE_CRS);
|
||||
ICanViewHomework = (Gbl.Usrs.Me.Role.Logged == Rol_NET ||
|
||||
Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
|
||||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
|
||||
break;
|
||||
default:
|
||||
ICanViewRecords = ICanFollow = false;
|
||||
ICanViewRecords =
|
||||
ICanViewHomework =
|
||||
ICanFollow = false;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -8043,15 +8065,22 @@ static bool Usr_PutActionsSeveralUsrs (Rol_Role_t Role)
|
|||
|
||||
/***** View records *****/
|
||||
if (ICanViewRecords)
|
||||
{ // I can view users records
|
||||
Usr_PutActionShowRecords (&OptionChecked);
|
||||
{ // I can view users' records
|
||||
Usr_PutActionShowRecords ();
|
||||
OptionsShown = true;
|
||||
}
|
||||
|
||||
/***** Homework *****/
|
||||
if (ICanViewHomework)
|
||||
{ // I can view users' homework
|
||||
Usr_PutActionShowHomework ();
|
||||
OptionsShown = true;
|
||||
}
|
||||
|
||||
/***** Follow *****/
|
||||
if (ICanFollow)
|
||||
{ // I can follow users
|
||||
Usr_PutActionFollowUsers (&OptionChecked);
|
||||
Usr_PutActionFollowUsers ();
|
||||
OptionsShown = true;
|
||||
}
|
||||
|
||||
|
@ -8065,24 +8094,37 @@ static bool Usr_PutActionsSeveralUsrs (Rol_Role_t Role)
|
|||
/******************** Put action to show users' records **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Usr_PutActionShowRecords (bool *OptionChecked)
|
||||
static void Usr_PutActionShowRecords (void)
|
||||
{
|
||||
extern const char *Txt_Show_records;
|
||||
|
||||
Usr_StartListUsrsAction (Usr_SHOW_RECORDS,OptionChecked);
|
||||
Usr_StartListUsrsAction (Usr_SHOW_RECORDS);
|
||||
fprintf (Gbl.F.Out,"%s",Txt_Show_records);
|
||||
Usr_EndListUsrsAction ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************** Put action to show users' homework *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Usr_PutActionShowHomework (void)
|
||||
{
|
||||
extern const char *Txt_View_homework;
|
||||
|
||||
Usr_StartListUsrsAction (Usr_VIEW_HOMEWORK);
|
||||
fprintf (Gbl.F.Out,"%s",Txt_View_homework);
|
||||
Usr_EndListUsrsAction ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********************** Put action to follow users **************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Usr_PutActionFollowUsers (bool *OptionChecked)
|
||||
static void Usr_PutActionFollowUsers (void)
|
||||
{
|
||||
extern const char *Txt_Follow;
|
||||
|
||||
Usr_StartListUsrsAction (Usr_FOLLOW_USERS,OptionChecked);
|
||||
Usr_StartListUsrsAction (Usr_FOLLOW_USERS);
|
||||
fprintf (Gbl.F.Out,"%s",Txt_Follow);
|
||||
Usr_EndListUsrsAction ();
|
||||
}
|
||||
|
@ -8091,19 +8133,15 @@ static void Usr_PutActionFollowUsers (bool *OptionChecked)
|
|||
/************ Put start/end of action to register/remove one user ************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Usr_StartListUsrsAction (Usr_ListUsrsAction_t ListUsrsAction,
|
||||
bool *OptionChecked)
|
||||
static void Usr_StartListUsrsAction (Usr_ListUsrsAction_t ListUsrsAction)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<li>"
|
||||
"<input type=\"radio\" id=\"ListUsrsAction%u\""
|
||||
" name=\"ListUsrsAction\" value=\"%u\"",
|
||||
(unsigned) ListUsrsAction,
|
||||
(unsigned) ListUsrsAction);
|
||||
if (!*OptionChecked)
|
||||
{
|
||||
if (ListUsrsAction == Gbl.Usrs.Selected.Action)
|
||||
fprintf (Gbl.F.Out," checked=\"checked\"");
|
||||
*OptionChecked = true;
|
||||
}
|
||||
fprintf (Gbl.F.Out," />"
|
||||
"<label for=\"ListUsrsAction%u\">",
|
||||
(unsigned) ListUsrsAction);
|
||||
|
@ -8119,11 +8157,9 @@ static void Usr_EndListUsrsAction (void)
|
|||
/********************** Do action on several students ************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_DoActionOnSeveralStds (void)
|
||||
void Usr_DoActionOnSeveralUsrs1 (void)
|
||||
{
|
||||
extern const char *Txt_You_must_select_one_ore_more_users;
|
||||
Usr_ListUsrsAction_t ListUsrsAction;
|
||||
// Rol_Role_t Role;
|
||||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get list of selected users */
|
||||
|
@ -8132,51 +8168,97 @@ void Usr_DoActionOnSeveralStds (void)
|
|||
/* Check the number of users */
|
||||
if (!Usr_CountNumUsrsInListOfSelectedUsrs ())// If no users selected...
|
||||
{ // ...write warning notice
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_users);
|
||||
Usr_SeeStudents (); // ...show again the form
|
||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
||||
Txt_You_must_select_one_ore_more_users);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Get the action to do */
|
||||
ListUsrsAction = (Usr_ListUsrsAction_t)
|
||||
Par_GetParToUnsignedLong ("ListUsrsAction",
|
||||
0,
|
||||
Usr_LIST_USRS_NUM_ACTIONS - 1,
|
||||
(unsigned long) Usr_LIST_USRS_UNKNOWN_ACTION);
|
||||
/* Get role */
|
||||
/* Role = (Rol_Role_t) Par_GetParToUnsignedLong ("Role",
|
||||
0,
|
||||
Rol_NUM_ROLES - 1,
|
||||
(unsigned long) Rol_UNK); */
|
||||
Gbl.Usrs.Selected.Action = Usr_ListUsrsAction (Usr_LIST_USRS_UNKNOWN_ACTION);
|
||||
|
||||
/***** Do actions *****/
|
||||
switch (ListUsrsAction)
|
||||
switch (Gbl.Usrs.Selected.Action)
|
||||
{
|
||||
case Usr_SHOW_RECORDS:
|
||||
switch (Gbl.Action.Act)
|
||||
{
|
||||
case ActDoActOnSevGst:
|
||||
Rec_ListRecordsGstsShow ();
|
||||
Gbl.Action.Act = ActSeeRecSevGst;
|
||||
Tab_SetCurrentTab ();
|
||||
// Rec_ListRecordsGstsShow ();
|
||||
break;
|
||||
case ActDoActOnSevStd:
|
||||
Rec_ListRecordsStdsShow ();
|
||||
Gbl.Action.Act = ActSeeRecSevStd;
|
||||
Tab_SetCurrentTab ();
|
||||
// Rec_ListRecordsStdsShow ();
|
||||
break;
|
||||
case ActDoActOnSevTch:
|
||||
Rec_ListRecordsTchsShow ();
|
||||
Gbl.Action.Act = ActSeeRecSevTch;
|
||||
Tab_SetCurrentTab ();
|
||||
// Rec_ListRecordsTchsShow ();
|
||||
break;
|
||||
default:
|
||||
Ale_CreateAlert (Ale_ERROR,NULL,
|
||||
"Wrong action.");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case Usr_VIEW_HOMEWORK:
|
||||
switch (Gbl.Action.Act)
|
||||
{
|
||||
case ActDoActOnSevStd:
|
||||
case ActDoActOnSevTch:
|
||||
Gbl.Action.Act = ActAdmAsgWrkCrs;
|
||||
Tab_SetCurrentTab ();
|
||||
// Brw_ShowFileBrowserOrWorks ();
|
||||
break;
|
||||
default:
|
||||
Ale_CreateAlert (Ale_ERROR,NULL,
|
||||
"Wrong action.");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case Usr_FOLLOW_USERS:
|
||||
Ale_ShowAlert (Ale_WARNING,"Not implemented.");
|
||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
||||
"Not implemented.");
|
||||
break;
|
||||
default:
|
||||
Ale_ShowAlert (Ale_ERROR,"Wrong action.");
|
||||
Usr_SeeStudents (); // Show again the form
|
||||
break;
|
||||
Ale_CreateAlert (Ale_ERROR,NULL,
|
||||
"Wrong action.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/***** Free memory used by list of selected users' codes *****/
|
||||
Usr_FreeListsSelectedUsrsCods ();
|
||||
void Usr_DoActionOnSeveralUsrs2 (void)
|
||||
{
|
||||
/***** Show possible alerts *****/
|
||||
Ale_ShowAlerts (NULL);
|
||||
|
||||
/***** If action has not changed, show again the form *****/
|
||||
switch (Gbl.Action.Act)
|
||||
{
|
||||
case ActDoActOnSevGst:
|
||||
Usr_SeeGuests ();
|
||||
break;
|
||||
case ActDoActOnSevStd:
|
||||
Usr_SeeStudents ();
|
||||
break;
|
||||
case ActDoActOnSevTch:
|
||||
Usr_SeeTeachers ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************** Get action to do with list of selected users ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static Usr_ListUsrsAction_t Usr_ListUsrsAction (Usr_ListUsrsAction_t DefaultAction)
|
||||
{
|
||||
return (Usr_ListUsrsAction_t) Par_GetParToUnsignedLong ("ListUsrsAction",
|
||||
0,
|
||||
Usr_LIST_USRS_NUM_ACTIONS - 1,
|
||||
(unsigned long) DefaultAction);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
17
swad_user.h
17
swad_user.h
|
@ -115,6 +115,16 @@ typedef enum
|
|||
} Usr_ShowUsrsType_t;
|
||||
#define Usr_SHOW_USRS_TYPE_DEFAULT Usr_LIST_AS_CLASS_PHOTO
|
||||
|
||||
#define Usr_LIST_USRS_NUM_ACTIONS 4
|
||||
typedef enum
|
||||
{
|
||||
Usr_LIST_USRS_UNKNOWN_ACTION = 0,
|
||||
Usr_SHOW_RECORDS = 1,
|
||||
Usr_VIEW_HOMEWORK = 2,
|
||||
Usr_FOLLOW_USERS = 3,
|
||||
} Usr_ListUsrsAction_t;
|
||||
#define Usr_LIST_USRS_DEFAULT_ACTION Usr_SHOW_RECORDS
|
||||
|
||||
// Related with user's data
|
||||
struct UsrData
|
||||
{
|
||||
|
@ -411,10 +421,11 @@ void Usr_GetMyPrefAboutListWithPhotosFromDB (void);
|
|||
|
||||
void Usr_SeeGuests (void);
|
||||
void Usr_SeeStudents (void);
|
||||
|
||||
void Usr_DoActionOnSeveralStds (void);
|
||||
|
||||
void Usr_SeeTeachers (void);
|
||||
|
||||
void Usr_DoActionOnSeveralUsrs1 (void);
|
||||
void Usr_DoActionOnSeveralUsrs2 (void);
|
||||
|
||||
void Usr_SeeGstClassPhotoPrn (void);
|
||||
void Usr_SeeStdClassPhotoPrn (void);
|
||||
void Usr_SeeTchClassPhotoPrn (void);
|
||||
|
|
|
@ -132,7 +132,7 @@ void ZIP_PutLinkToCreateZIPAsgWrk (void)
|
|||
|
||||
static void ZIP_PutLinkToCreateZIPAsgWrkParams (void)
|
||||
{
|
||||
Usr_PutHiddenParUsrCodAll (ActAdmAsgWrkCrs,Gbl.Usrs.Select[Rol_UNK]);
|
||||
Usr_PutHiddenParUsrCodAll (ActAdmAsgWrkCrs,Gbl.Usrs.Selected.List[Rol_UNK]);
|
||||
if (Gbl.FileBrowser.FullTree)
|
||||
Par_PutHiddenParamChar ("FullTree",'Y');
|
||||
Par_PutHiddenParamChar ("CreateZIP",'Y');
|
||||
|
@ -180,7 +180,7 @@ void ZIP_CreateZIPAsgWrk (void)
|
|||
|
||||
/* Create temporary directory for each selected user
|
||||
inside the directory used for compression */
|
||||
Ptr = Gbl.Usrs.Select[Rol_UNK];
|
||||
Ptr = Gbl.Usrs.Selected.List[Rol_UNK];
|
||||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod,
|
||||
|
|
Loading…
Reference in New Issue