diff --git a/swad_changelog.h b/swad_changelog.h index b73af28fa..0941108bf 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -136,14 +136,15 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.241.1 (2016-07-04)" +#define Log_PLATFORM_VERSION "SWAD 15.241.2 (2016-07-04)" #define CSS_FILE "swad15.229.css" #define JS_FILE "swad15.238.1.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.241.1: Jul 04, 2015 Code refactoring related with form submit. (203620 lines) + Version 15.241.2: Jul 04, 2015 Changes in layout of form to compose message. (203619 lines) + Version 15.241.1: Jul 04, 2015 Code refactoring related with forms submit. (203620 lines) Version 15.241: Jul 04, 2015 When composing a new message, subject and content are shown even if list of users is too big, in order to keep messages that had begun to be written. (203618 lines) Version 15.240.5: Jul 04, 2015 Code refactoring related to big lists of users. (203595 lines) Version 15.240.4: Jul 04, 2015 Fixed bugs in web service, reported by Rubén Martín Hidalgo. (203592 lines) diff --git a/swad_message.c b/swad_message.c index 804dcf339..e9176da2c 100644 --- a/swad_message.c +++ b/swad_message.c @@ -219,15 +219,6 @@ static void Msg_PutFormMsgUsrs (char *Content) Usr_GetListUsrs (Rol_STUDENT,Sco_SCOPE_CRS); NumTotalUsrs = Gbl.Usrs.LstUsrs[Rol_TEACHER].NumUsrs + Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs; - - if (NumTotalUsrs) - { - ShowUsers = Usr_GetIfShowBigList (NumTotalUsrs,"CopyMessageToHiddenFields()"); - - if (ShowUsers) - /***** Get lists of selected users *****/ - Usr_GetListsSelectedUsrsCods (); - } } /***** Start frame *****/ @@ -236,13 +227,21 @@ static void Msg_PutFormMsgUsrs (char *Content) Txt_New_message, NULL); - /***** Form to select type of list used for select several users *****/ - if (NumTotalUsrs) + if (Gbl.Msg.ShowOnlyOneRecipient) + /***** Form to show several potential recipients *****/ + Msg_PutLinkToShowMorePotentialRecipients (); + else if (NumTotalUsrs) + { + /***** Form to select type of list used for select several users *****/ Usr_ShowFormsToSelectUsrListType (ActReqMsgUsr); - /***** Form to show several potential recipients *****/ - if (Gbl.Msg.ShowOnlyOneRecipient) - Msg_PutLinkToShowMorePotentialRecipients (); + /***** Check if it's a big list *****/ + ShowUsers = Usr_GetIfShowBigList (NumTotalUsrs,"CopyMessageToHiddenFields()"); + + if (ShowUsers) + /***** Get lists of selected users *****/ + Usr_GetListsSelectedUsrsCods (); + } /***** Start form to select recipients and write the message *****/ Act_FormStart (ActRcvMsgUsr); @@ -262,39 +261,39 @@ static void Msg_PutFormMsgUsrs (char *Content) fprintf (Gbl.F.Out,""); /***** "To:" section (recipients) *****/ - fprintf (Gbl.F.Out,"" - "" - "" - ""); /***** Subject and content sections *****/ Msg_WriteFormSubjectAndContentMsgToUsrs (Content);
" - "%s:" - "" - "", - The_ClassForm[Gbl.Prefs.Theme],Txt_MSG_To); - if (Gbl.Msg.ShowOnlyOneRecipient) + if (Gbl.Msg.ShowOnlyOneRecipient || ShowUsers) { - /***** Show only one user as recipient *****/ fprintf (Gbl.F.Out,"" - "" + "" ""); } - else if (ShowUsers) - { - /***** Show potential recipients *****/ - /* Teachers */ - Usr_ListUsersToSelect (Rol_TEACHER); - - /* Students */ - Usr_ListUsersToSelect (Rol_STUDENT); - - /* Other users (nicknames) */ - Msg_WriteFormUsrsIDsOrNicksOtherRecipients (); - } - - /* End of table */ - fprintf (Gbl.F.Out,"
"); - Msg_ShowOneUniqueRecipient (); + "" + "%s:" + "", + The_ClassForm[Gbl.Prefs.Theme],Txt_MSG_To); + if (Gbl.Msg.ShowOnlyOneRecipient) + /***** Show only one user as recipient *****/ + Msg_ShowOneUniqueRecipient (); + else + { + /***** Show potential recipients *****/ + /* Start table */ + fprintf (Gbl.F.Out,""); + + /* Teachers */ + Usr_ListUsersToSelect (Rol_TEACHER); + + /* Students */ + Usr_ListUsersToSelect (Rol_STUDENT); + + /* Other users (nicknames) */ + Msg_WriteFormUsrsIDsOrNicksOtherRecipients (); + + /* End table */ + fprintf (Gbl.F.Out,"
"); + } + fprintf (Gbl.F.Out,"
" - "