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