From 752222b32bb883e28ef431a3251e0bafaa9e2d49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Mon, 28 Mar 2016 00:44:24 +0200 Subject: [PATCH] Version 15.163.4 --- swad_changelog.h | 5 ++-- swad_user.c | 60 ++++++++++++++++++++++++++---------------------- 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 66336d95c..95b360730 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -136,14 +136,15 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.163.3 (2016-03-27)" +#define Log_PLATFORM_VERSION "SWAD 15.163.4 (2016-03-28)" #define CSS_FILE "swad15.162.1.css" #define JS_FILE "swad15.131.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 15.163.3: Mar 27, 2016 Scope selector inside frame in listing of admins. (196652 lines) + Version 15.163.4: Mar 28, 2016 Scope selector inside frame in listing of teachers. (196656 lines) + Version 15.163.3: Mar 28, 2016 Scope selector inside frame in listing of admins. (196652 lines) Version 15.163.2: Mar 27, 2016 Scope selector inside frame in listing of guests. (196655 lines) Version 15.163.1: Mar 27, 2016 Added HTML directives "label" for scope and other form fields. (196654 lines) Version 15.163: Mar 27, 2016 Requests for enrollment older than one month are automatically removed. (196656 lines) diff --git a/swad_user.c b/swad_user.c index 626b6f24e..407b884eb 100644 --- a/swad_user.c +++ b/swad_user.c @@ -6619,7 +6619,8 @@ void Usr_SeeGuests (void) /***** Start frame *****/ Lay_StartRoundFrame (NULL,Txt_ROLES_PLURAL_Abc[Rol__GUEST_][Usr_SEX_UNKNOWN], - (Gbl.Usrs.Me.ListType == Usr_CLASS_PHOTO) ? Usr_PutIconToPrintGsts : + (Gbl.Usrs.Me.ListType == Usr_CLASS_PHOTO) ? (Gbl.Usrs.LstGsts.NumUsrs ? Usr_PutIconToPrintGsts : + NULL) : Usr_PutIconToShowGstsAllData); /***** Form to select range of guests *****/ @@ -6791,7 +6792,8 @@ void Usr_SeeStudents (void) /***** Start frame *****/ Lay_StartRoundFrame (NULL,Txt_ROLES_PLURAL_Abc[Rol_STUDENT][Usr_SEX_UNKNOWN], - (Gbl.Usrs.Me.ListType == Usr_CLASS_PHOTO) ? Usr_PutIconToPrintStds : + (Gbl.Usrs.Me.ListType == Usr_CLASS_PHOTO) ? (Gbl.Usrs.LstStds.NumUsrs ? Usr_PutIconToPrintStds : + NULL) : ((Gbl.Usrs.Me.LoggedRole >= Rol_TEACHER) ? Usr_PutIconToShowStdsAllData : NULL)); @@ -6879,8 +6881,8 @@ void Usr_SeeStudents (void) void Usr_SeeTeachers (void) { extern const char *The_ClassForm[The_NUM_THEMES]; - extern const char *Txt_Scope; extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; + extern const char *Txt_Scope; extern const char *Txt_Show_records; extern const char *Txt_No_users_found[Rol_NUM_ROLES]; bool ICanViewRecords; @@ -6917,30 +6919,32 @@ void Usr_SeeTeachers (void) Sco_GetScope (); ICanViewRecords = (Gbl.Scope.Current == Sco_SCOPE_CRS); - /***** Form to select scope *****/ - fprintf (Gbl.F.Out,"
"); - Act_FormStart (ActLstTch); - Usr_PutParamUsrListType (Gbl.Usrs.Me.ListType); - Usr_PutParamColsClassPhoto (); - Usr_PutParamListWithPhotos (); - fprintf (Gbl.F.Out,"", - The_ClassForm[Gbl.Prefs.Theme],Txt_Scope); - Sco_PutSelectorScope (true); - Act_FormEnd (); - fprintf (Gbl.F.Out,"
"); - /***** Get and order list of teachers *****/ Usr_GetUsrsLst (Rol_TEACHER,Gbl.Scope.Current,NULL,false); - if (Gbl.Usrs.LstTchs.NumUsrs) + if (Usr_GetIfShowBigList (Gbl.Usrs.LstTchs.NumUsrs)) { - if (Usr_GetIfShowBigList (Gbl.Usrs.LstTchs.NumUsrs)) + /***** Start frame *****/ + Lay_StartRoundFrame (NULL,Txt_ROLES_PLURAL_Abc[Rol_TEACHER][Usr_SEX_UNKNOWN], + (Gbl.Usrs.Me.ListType == Usr_CLASS_PHOTO) ? (Gbl.Usrs.LstTchs.NumUsrs ? Usr_PutIconToPrintTchs : + NULL) : + ((Gbl.Usrs.Me.LoggedRole >= Rol_DEG_ADM) ? Usr_PutIconToShowTchsAllData : + NULL)); + + /***** Form to select scope *****/ + fprintf (Gbl.F.Out,"
"); + Act_FormStart (ActLstTch); + Usr_PutParamUsrListType (Gbl.Usrs.Me.ListType); + Usr_PutParamColsClassPhoto (); + Usr_PutParamListWithPhotos (); + fprintf (Gbl.F.Out,"", + The_ClassForm[Gbl.Prefs.Theme],Txt_Scope); + Sco_PutSelectorScope (true); + Act_FormEnd (); + fprintf (Gbl.F.Out,"
"); + + if (Gbl.Usrs.LstTchs.NumUsrs) { - /***** Start frame *****/ - Lay_StartRoundFrame (NULL,Txt_ROLES_PLURAL_Abc[Rol_TEACHER][Usr_SEX_UNKNOWN], - (Gbl.Usrs.Me.ListType == Usr_CLASS_PHOTO) ? Usr_PutIconToPrintTchs : - ((Gbl.Usrs.Me.LoggedRole >= Rol_DEG_ADM) ? Usr_PutIconToShowTchsAllData : - NULL)); /***** Form to select type of list of users *****/ Usr_ShowFormsToSelectUsrListType (ActLstTch); @@ -6993,13 +6997,13 @@ void Usr_SeeTeachers (void) /* End form */ Act_FormEnd (); } - - /* End frame */ - Lay_EndRoundFrame (); } + else + Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_TEACHER]); + + /***** End frame *****/ + Lay_EndRoundFrame (); } - else - Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_TEACHER]); /***** Free memory for teachers list *****/ Usr_FreeUsrsList (&Gbl.Usrs.LstTchs); @@ -7120,7 +7124,7 @@ void Usr_SeeGstClassPhotoPrn (void) Lay_WriteHeaderClassPhoto (true,true, (Gbl.Scope.Current == Sco_SCOPE_CTR || Gbl.Scope.Current == Sco_SCOPE_INS) ? Gbl.CurrentIns.Ins.InsCod : - -1L, + -1L, -1L,-1L); fprintf (Gbl.F.Out,""); Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,Rol__GUEST_);