diff --git a/swad_ID.c b/swad_ID.c index bd074097..70a27912 100644 --- a/swad_ID.c +++ b/swad_ID.c @@ -480,13 +480,13 @@ 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 ActSeeRecSevGst: + case ActDoActOnSevGst: Usr_PutHiddenParUsrCodAll (ActCnfID_Oth,Gbl.Usrs.Select[Rol_UNK]); break; - case ActSeeRecSevStd: + case ActDoActOnSevStd: Usr_PutHiddenParUsrCodAll (ActCnfID_Std,Gbl.Usrs.Select[Rol_UNK]); break; - case ActSeeRecSevTch: + case ActDoActOnSevTch: Usr_PutHiddenParUsrCodAll (ActCnfID_Tch,Gbl.Usrs.Select[Rol_UNK]); break; } @@ -1057,15 +1057,15 @@ void ID_ConfirmOtherUsrID (void) /***** Show one or multiple records *****/ switch (Gbl.Action.Original) { - case ActSeeRecSevGst: + case ActDoActOnSevGst: /* Show multiple records of guests again (including the updated one) */ Rec_ListRecordsGstsShow (); break; - case ActSeeRecSevStd: + case ActDoActOnSevStd: /* Show multiple records of students again (including the updated one) */ Rec_ListRecordsStdsShow (); break; - case ActSeeRecSevTch: + case ActDoActOnSevTch: /* Show multiple records of teachers again (including the updated one) */ Rec_ListRecordsTchsShow (); break; diff --git a/swad_action.c b/swad_action.c index 308acfd3..37174ea5 100644 --- a/swad_action.c +++ b/swad_action.c @@ -1140,9 +1140,9 @@ Users: 957. ActSeeRecOneStd Show record of one selected student 958. ActSeeRecOneTch Show record of one selected teacher - 959. ActSeeRecSevGst Show records of several selected guests - 960. ActSeeRecSevStd Show records of several selected students - 961. ActSeeRecSevTch Show records of several selected teachers + 959. ActDoActOnSevGst Do action on several selected guests + 960. ActDoActOnSevStd Do action on several selected students + 961. ActDoActOnSevTch Do action on 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 @@ -2671,9 +2671,9 @@ 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}, - /* 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}, + /* 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}, /* 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}, @@ -3151,7 +3151,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un -1, // #19 (obsolete action) ActSeeSylPra, // #20 -1, // #21 (obsolete action) - ActSeeRecSevTch, // #22 + ActDoActOnSevTch, // #22 ActAdmBrf, // #23 -1, // #24 (obsolete action) ActSeeCrsTT, // #25 @@ -3218,7 +3218,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un -1, // #86 (obsolete action) ActRemAllStdCrs, // #87 ActReqRemAllStdCrs, // #88 - ActSeeRecSevStd, // #89 + ActDoActOnSevStd, // #89 ActDelSntMsg, // #90 ActEdiExaAnn, // #91 -1, // #92 (obsolete action) @@ -4316,7 +4316,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 - ActSeeRecSevGst, // #1187 + ActDoActOnSevGst, // #1187 ActPrnRecSevGst, // #1188 ActLstGstAll, // #1189 ActPrnGstPho, // #1190 diff --git a/swad_action.h b/swad_action.h index be26df57..21a7a37b 100644 --- a/swad_action.h +++ b/swad_action.h @@ -1160,9 +1160,9 @@ 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 ActSeeRecSevGst (ActRemOldBrf + 38) -#define ActSeeRecSevStd (ActRemOldBrf + 39) -#define ActSeeRecSevTch (ActRemOldBrf + 40) +#define ActDoActOnSevGst (ActRemOldBrf + 38) +#define ActDoActOnSevStd (ActRemOldBrf + 39) +#define ActDoActOnSevTch (ActRemOldBrf + 40) #define ActPrnRecSevGst (ActRemOldBrf + 41) #define ActPrnRecSevStd (ActRemOldBrf + 42) #define ActPrnRecSevTch (ActRemOldBrf + 43) diff --git a/swad_attendance.c b/swad_attendance.c index b048f72d..1ffd8f95 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -2853,7 +2853,7 @@ static void Usr_ListOrPrintStdsAttendanceCrs (Att_TypeOfView_t TypeOfView) { extern const char *Hlp_USERS_Attendance_attendance_list; extern const char *Txt_Attendance; - extern const char *Txt_You_must_select_one_ore_more_students; + extern const char *Txt_You_must_select_one_ore_more_users; unsigned NumStdsInList; long *LstSelectedUsrCods; unsigned NumAttEvent; @@ -2922,7 +2922,7 @@ static void Usr_ListOrPrintStdsAttendanceCrs (Att_TypeOfView_t TypeOfView) } else // No students selected { - Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_students); + Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_users); Usr_ReqListStdsAttendanceCrs (); // ...show again the form } diff --git a/swad_changelog.h b/swad_changelog.h index 50a2ea7d..248edf33 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -428,6 +428,8 @@ Lo de mutear anuncios, en principio prefiero hacer una opci // TODO: Los usuarios que no tienes permiso para ver su perfil público, se debería mostrar algo, una mínima ficha sin tinmeline o algo así +// TODO: Al pulsar sobre una convocatoria de examen / aviso --> ir a la sección de esa convocatoria/aviso en lugar de mostrarlo repetido y destacado arriba + // TODO: "Se podría poner un botón para seguir a todos los relacionados contigo en las asignaturas, en lugar de tener que agregarlos uno a uno" Suggested by José María girao Miras. /*****************************************************************************/ @@ -449,10 +451,16 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.70 (2019-03-10)" +#define Log_PLATFORM_VERSION "SWAD 18.71 (2019-03-11)" #define CSS_FILE "swad18.68.3.css" #define JS_FILE "swad18.64.js" /* + 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'; +UPDATE actions SET Txt='Realizar acción con varios estudiantes' WHERE ActCod='89' AND Language='es'; +UPDATE actions SET Txt='Realizar acción con varios invitados' WHERE ActCod='1187' AND Language='es'; + Version 18.70: Mar 10, 2019 Code refactoring in one user administration. (238819 lines) Version 18.69.2: Mar 10, 2019 Changes related to alerts. (238842 lines) Version 18.69.1: Mar 09, 2019 Changes in forms to register/remove users. (238805 lines) diff --git a/swad_enrolment.c b/swad_enrolment.c index 03115c48..de2e85ab 100644 --- a/swad_enrolment.c +++ b/swad_enrolment.c @@ -1665,8 +1665,7 @@ static void Enr_PutActionRepUsrAsDup (bool *OptionChecked) extern const char *Txt_Report_possible_duplicate_user; Enr_StartRegRemOneUsrAction (Enr_REPORT_USR_AS_POSSIBLE_DUPLICATE,OptionChecked); - fprintf (Gbl.F.Out,"%s", - Txt_Report_possible_duplicate_user); + fprintf (Gbl.F.Out,"%s",Txt_Report_possible_duplicate_user); Enr_EndRegRemOneUsrAction (); } diff --git a/swad_record.c b/swad_record.c index 82c08f24..394f9228 100644 --- a/swad_record.c +++ b/swad_record.c @@ -953,18 +953,24 @@ void Rec_PutLinkToEditRecordFields (void) void Rec_ListRecordsGstsShow (void) { - Gbl.Action.Original = ActSeeRecSevGst; // Used to know where to go when confirming ID + Gbl.Action.Original = ActDoActOnSevGst; // 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) { - extern const char *Txt_You_must_select_one_ore_more_users; unsigned NumUsr = 0; const char *Ptr; struct UsrData UsrDat; @@ -977,17 +983,6 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView) if (TypeOfView == Rec_SHA_RECORD_PRINT) Rec_GetParamRecordsPerPage (); - /***** Get list of selected users *****/ - Usr_GetListsSelectedUsrsCods (); - - /* Check the number of students to show */ - if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // If no students selected... - { // ...write warning notice - Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_users); - Usr_SeeGuests (); // ...show again the form - return; - } - if (TypeOfView == Rec_SHA_RECORD_LIST) // Listing several records { fprintf (Gbl.F.Out,"