mirror of https://github.com/acanas/swad-core.git
Version 15.241.4
This commit is contained in:
parent
3b2d73711c
commit
6f1b939c47
|
@ -136,13 +136,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.241.3 (2016-07-04)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.241.4 (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.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)
|
||||
Version 15.241.2: Jul 04, 2015 Changes in layout of form to compose message. (203619 lines)
|
||||
|
|
|
@ -169,8 +169,8 @@ static void Msg_PutFormMsgUsrs (char *Content)
|
|||
extern const char *Txt_MSG_To;
|
||||
extern const char *Txt_Send_message;
|
||||
char YN[1+1];
|
||||
unsigned NumTotalUsrs = 0;
|
||||
bool ShowUsers = true;
|
||||
unsigned NumUsrsInCrs;
|
||||
bool ShowUsrsInCrs = false;
|
||||
bool GetListUsrs = !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);
|
||||
|
@ -222,24 +222,24 @@ static void Msg_PutFormMsgUsrs (char *Content)
|
|||
/***** Get and order lists of users from this course *****/
|
||||
Usr_GetListUsrs (Rol_TEACHER,Sco_SCOPE_CRS);
|
||||
Usr_GetListUsrs (Rol_STUDENT,Sco_SCOPE_CRS);
|
||||
NumTotalUsrs = Gbl.Usrs.LstUsrs[Rol_TEACHER].NumUsrs +
|
||||
NumUsrsInCrs = Gbl.Usrs.LstUsrs[Rol_TEACHER].NumUsrs +
|
||||
Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs;
|
||||
if (NumTotalUsrs)
|
||||
if (NumUsrsInCrs)
|
||||
{
|
||||
/***** Form to select type of list used for select several users *****/
|
||||
Usr_ShowFormsToSelectUsrListType (ActReqMsgUsr);
|
||||
|
||||
/***** Check if it's a big list *****/
|
||||
ShowUsers = Usr_GetIfShowBigList (NumTotalUsrs,"CopyMessageToHiddenFields()");
|
||||
ShowUsrsInCrs = Usr_GetIfShowBigList (NumUsrsInCrs,"CopyMessageToHiddenFields()");
|
||||
|
||||
if (ShowUsers)
|
||||
if (ShowUsrsInCrs)
|
||||
/***** Get lists of selected users *****/
|
||||
Usr_GetListsSelectedUsrsCods ();
|
||||
}
|
||||
|
||||
/***** Get list of users' IDs or nicknames written explicitely *****/
|
||||
Usr_GetListMsgRecipientsWrittenExplicitelyBySender (false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***** Start form to select recipients and write the message *****/
|
||||
|
@ -260,40 +260,31 @@ static void Msg_PutFormMsgUsrs (char *Content)
|
|||
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_2\">");
|
||||
|
||||
/***** "To:" section (recipients) *****/
|
||||
if (Gbl.Msg.ShowOnlyOneRecipient || ShowUsers)
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_TOP\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_TOP\">",
|
||||
The_ClassForm[Gbl.Prefs.Theme],Txt_MSG_To);
|
||||
if (Gbl.Msg.ShowOnlyOneRecipient)
|
||||
/***** Show only one user as recipient *****/
|
||||
Msg_ShowOneUniqueRecipient ();
|
||||
else
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_TOP\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_TOP\">",
|
||||
The_ClassForm[Gbl.Prefs.Theme],Txt_MSG_To);
|
||||
if (Gbl.Msg.ShowOnlyOneRecipient)
|
||||
/***** Show only one user as recipient *****/
|
||||
Msg_ShowOneUniqueRecipient ();
|
||||
else
|
||||
/***** Show potential recipients *****/
|
||||
fprintf (Gbl.F.Out,"<table style=\"width:100%%;\">");
|
||||
if (ShowUsrsInCrs)
|
||||
{
|
||||
/***** Show potential recipients *****/
|
||||
/* Start table */
|
||||
fprintf (Gbl.F.Out,"<table style=\"width:100%%;\">");
|
||||
|
||||
/* Teachers */
|
||||
Usr_ListUsersToSelect (Rol_TEACHER);
|
||||
|
||||
/* Students */
|
||||
Usr_ListUsersToSelect (Rol_STUDENT);
|
||||
|
||||
/* Other users (nicknames) */
|
||||
Msg_WriteFormUsrsIDsOrNicksOtherRecipients ();
|
||||
|
||||
/* End table */
|
||||
fprintf (Gbl.F.Out,"</table>");
|
||||
Usr_ListUsersToSelect (Rol_TEACHER); // All teachers in course
|
||||
Usr_ListUsersToSelect (Rol_STUDENT); // All students in selected groups
|
||||
}
|
||||
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
Msg_WriteFormUsrsIDsOrNicksOtherRecipients (); // Other users (nicknames)
|
||||
fprintf (Gbl.F.Out,"</table>");
|
||||
}
|
||||
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
||||
/***** Subject and content sections *****/
|
||||
Msg_WriteFormSubjectAndContentMsgToUsrs (Content);
|
||||
|
||||
|
|
Loading…
Reference in New Issue