From b9f049c97f59d37503d2385905806e67755c3886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Tue, 30 May 2017 19:42:10 +0200 Subject: [PATCH] Version 16.229.1 --- swad_changelog.h | 4 +++- swad_group.c | 40 ++++++++++++++++++++++++++-------------- swad_user.c | 6 ++++++ 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 5a07dcc19..5988f3c32 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -231,13 +231,15 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.229 (2017-05-30)" +#define Log_PLATFORM_VERSION "SWAD 16.229.1 (2017-05-30)" #define CSS_FILE "swad16.226.css" #define JS_FILE "swad16.206.3.js" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1 /* + Version 16.229.1: May 30, 2017 Code refactoring in selection of groups. + Fixed bug when printing list of teachers. (220762 lines) Version 16.229: May 30, 2017 Selection of groups also for listing of teachers. (220748 lines) Version 16.228.2: May 30, 2017 Fixed bug in selection of users. (220726 lines) Version 16.228.1: May 30, 2017 By default, photos are displayed in listing of users. (220722 lines) diff --git a/swad_group.c b/swad_group.c index 4c92c3efe..31a6000a1 100644 --- a/swad_group.c +++ b/swad_group.c @@ -74,6 +74,8 @@ static void Grp_EditGroups (void); static void Grp_PutIconsEditingGroups (void); static void Grp_PutIconToCreateNewGroup (void); +static void Grp_PutCheckboxAllGrps (void); + static void Grp_ConstructorListGrpAlreadySelec (struct ListGrpsAlreadySelec **AlreadyExistsGroupOfType); static void Grp_DestructorListGrpAlreadySelec (struct ListGrpsAlreadySelec **AlreadyExistsGroupOfType); static void Grp_RemoveUsrFromGroup (long UsrCod,long GrpCod); @@ -332,10 +334,8 @@ static void Grp_PutIconToCreateNewGroup (void) void Grp_ShowFormToSelectSeveralGroups (Act_Action_t NextAction) { extern const char *Hlp_USERS_Groups; - extern const char *The_ClassForm[The_NUM_THEMES]; extern const char *The_ClassFormBold[The_NUM_THEMES]; extern const char *Txt_Groups; - extern const char *Txt_All_groups; extern const char *Txt_Update_users_according_to_selected_groups; extern const char *Txt_Update_users; unsigned NumGrpTyp; @@ -362,18 +362,7 @@ void Grp_ShowFormToSelectSeveralGroups (Act_Action_t NextAction) Usr_PutExtraParamsUsrList (NextAction); /***** Select all groups *****/ - fprintf (Gbl.F.Out,"
" - "" - "
", - Txt_All_groups); + Grp_PutCheckboxAllGrps (); /***** Get list of groups types and groups in this course *****/ Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS); @@ -408,6 +397,29 @@ void Grp_ShowFormToSelectSeveralGroups (Act_Action_t NextAction) } } +/*****************************************************************************/ +/******************* Put checkbox to select all groups ***********************/ +/*****************************************************************************/ + +static void Grp_PutCheckboxAllGrps (void) + { + extern const char *The_ClassForm[The_NUM_THEMES]; + extern const char *Txt_All_groups; + + fprintf (Gbl.F.Out,"
" + "" + "
", + Txt_All_groups); + } + /*****************************************************************************/ /************ Put parameters with the groups of students selected ************/ /*****************************************************************************/ diff --git a/swad_user.c b/swad_user.c index 3d592b2ab..e6b7a4355 100644 --- a/swad_user.c +++ b/swad_user.c @@ -7947,6 +7947,9 @@ void Usr_SeeTchClassPhotoPrn (void) Gbl.Scope.Default = Sco_SCOPE_CRS; Sco_GetScope ("ScopeUsr"); + /****** Get groups to show ******/ + Grp_GetParCodsSeveralGrpsToShowUsrs (); + /***** Get list of teachers *****/ Usr_GetListUsrs (Gbl.Scope.Current,Rol_NET); // Non-editing teachers Usr_GetListUsrs (Gbl.Scope.Current,Rol_TCH); // Teachers @@ -7989,6 +7992,9 @@ void Usr_SeeTchClassPhotoPrn (void) /***** Free memory for teachers lists *****/ Usr_FreeUsrsList (Rol_TCH); // Teachers Usr_FreeUsrsList (Rol_NET); // Non-editing teachers + + /***** Free memory for list of selected groups *****/ + Grp_FreeListCodSelectedGrps (); } /*****************************************************************************/