From e9a0b1d2dbad98bc6cf3dc8341574eb3690d1af5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sat, 19 Mar 2016 19:34:22 +0100 Subject: [PATCH] Version 15.153.1 --- swad_assignment.c | 32 +++++++++++++------------------- swad_changelog.h | 3 ++- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/swad_assignment.c b/swad_assignment.c index db83260a..5b965be5 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -99,9 +99,6 @@ void Asg_SeeAssignments (void) Grp_GetParamWhichGrps (); Pag_GetParamPagNum (Pag_ASSIGNMENTS); - /***** Get list of assignments *****/ - Asg_GetListAssignments (); - /***** Show all the assignments *****/ Asg_ShowAllAssignments (); } @@ -123,6 +120,9 @@ static void Asg_ShowAllAssignments (void) struct Pagination Pagination; unsigned NumAsg; + /***** Get list of assignments *****/ + Asg_GetListAssignments (); + /***** Compute variables related to pagination *****/ Pagination.NumItems = Gbl.Asgs.Num; Pagination.CurrentPage = (int) Gbl.Pag.CurrentPage; @@ -227,12 +227,10 @@ static void Asg_PutIconToCreateNewAsg (void) static void Asg_PutButtonToCreateNewAsg (void) { extern const char *Txt_New_assignment; - extern const char *Txt_Create_assignment; Act_FormStart (ActFrmNewAsg); Asg_PutParamsToCreateNewAsg (); - Lay_PutConfirmButton (Gbl.Asgs.Num ? Txt_New_assignment : - Txt_Create_assignment); + Lay_PutConfirmButton (Txt_New_assignment); Act_FormEnd (); } @@ -1141,12 +1139,8 @@ void Asg_RequestCreatOrEditAsg (void) Lay_EndRoundFrameTableWithButton (Lay_CONFIRM_BUTTON,Txt_Save); Act_FormEnd (); - /***** Get list of assignments *****/ - Asg_GetListAssignments (); - /***** Show current assignments, if any *****/ - if (Gbl.Asgs.Num) - Asg_ShowAllAssignments (); + Asg_ShowAllAssignments (); } /*****************************************************************************/ @@ -1332,18 +1326,18 @@ void Asg_RecFormAssignment (void) /* Free memory for list of selected groups */ Grp_FreeListCodSelectedGrps (); + + /***** Notify by e-mail about the new assignment *****/ + if ((NumUsrsToBeNotifiedByEMail = Ntf_StoreNotifyEventsToAllUsrs (Ntf_EVENT_ASSIGNMENT,NewAsg.AsgCod))) + Asg_UpdateNumUsrsNotifiedByEMailAboutAssignment (NewAsg.AsgCod,NumUsrsToBeNotifiedByEMail); + Ntf_ShowAlertNumUsrsToBeNotifiedByEMail (NumUsrsToBeNotifiedByEMail); + + /***** Show assignments again *****/ + Asg_SeeAssignments (); } else // TODO: The form should be filled with partial data, now is always empty Asg_RequestCreatOrEditAsg (); - - /***** Notify by e-mail about the new assignment *****/ - if ((NumUsrsToBeNotifiedByEMail = Ntf_StoreNotifyEventsToAllUsrs (Ntf_EVENT_ASSIGNMENT,NewAsg.AsgCod))) - Asg_UpdateNumUsrsNotifiedByEMailAboutAssignment (NewAsg.AsgCod,NumUsrsToBeNotifiedByEMail); - Ntf_ShowAlertNumUsrsToBeNotifiedByEMail (NumUsrsToBeNotifiedByEMail); - - /***** Show assignments again *****/ - Asg_SeeAssignments (); } /*****************************************************************************/ diff --git a/swad_changelog.h b/swad_changelog.h index ecd7314d..784fb205 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -132,13 +132,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.153 (2016-03-19)" +#define Log_PLATFORM_VERSION "SWAD 15.153.1 (2016-03-19)" #define CSS_FILE "swad15.152.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.153.1: Mar 19, 2016 Fixed layout in edition of assignments. (195980 lines) Version 15.153: Mar 19, 2016 Icon to add new assignment integrated in frame. Changes in layout of assignments. (195984 lines) Version 15.152: Mar 19, 2016 Changes in layout of head. Not finished. (195949 lines)