diff --git a/swad_changelog.h b/swad_changelog.h index 2f36035b9..99b611839 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -136,13 +136,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.241.4 (2016-07-04)" +#define Log_PLATFORM_VERSION "SWAD 15.241.5 (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.5: Jul 04, 2015 Fix bug in form to compose message. (203628 lines) Version 15.241.4: Jul 04, 2015 Changes in form to compose message. (203624 lines) Version 15.241.3: Jul 04, 2015 Changes in layout of form to compose message. Code optimization in list of selected users. (203628 lines) diff --git a/swad_message.c b/swad_message.c index 0fb8ed508..45e4b306e 100644 --- a/swad_message.c +++ b/swad_message.c @@ -171,7 +171,7 @@ static void Msg_PutFormMsgUsrs (char *Content) char YN[1+1]; unsigned NumUsrsInCrs; bool ShowUsrsInCrs = false; - bool GetListUsrs = !Gbl.Msg.ShowOnlyOneRecipient && // Show list of potential recipients + bool GetUsrsInCrs = !Gbl.Msg.ShowOnlyOneRecipient && // Show list of potential recipients (Gbl.Usrs.Me.IBelongToCurrentCrs || // If there is a course selected and I belong to it Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM); @@ -209,7 +209,7 @@ static void Msg_PutFormMsgUsrs (char *Content) else { /***** Get list of users belonging to the current course *****/ - if (GetListUsrs) + if (GetUsrsInCrs) { /***** Get and update type of list, number of columns in class photo @@ -236,10 +236,10 @@ static void Msg_PutFormMsgUsrs (char *Content) /***** Get lists of selected users *****/ Usr_GetListsSelectedUsrsCods (); } + } - /***** Get list of users' IDs or nicknames written explicitely *****/ - Usr_GetListMsgRecipientsWrittenExplicitelyBySender (false); - } + /***** Get list of users' IDs or nicknames written explicitely *****/ + Usr_GetListMsgRecipientsWrittenExplicitelyBySender (false); } /***** Start form to select recipients and write the message *****/ @@ -310,8 +310,11 @@ static void Msg_PutFormMsgUsrs (char *Content) Usr_FreeListOtherRecipients (); /***** Free memory used for by the lists of users *****/ - Usr_FreeUsrsList (Rol_TEACHER); - Usr_FreeUsrsList (Rol_STUDENT); + if (GetUsrsInCrs) + { + Usr_FreeUsrsList (Rol_TEACHER); + Usr_FreeUsrsList (Rol_STUDENT); + } /***** Free memory used by list of selected users' codes *****/ Usr_FreeListsSelectedUsrsCods ();