mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-01 06:15:31 +02:00
Version 15.72.1
This commit is contained in:
parent
025de82e83
commit
3814579155
|
@ -117,12 +117,13 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 15.72 (2015-12-22)"
|
#define Log_PLATFORM_VERSION "SWAD 15.72.1 (2015-12-22)"
|
||||||
#define CSS_FILE "swad15.65.1.css"
|
#define CSS_FILE "swad15.65.1.css"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 15.72.1: Dec 22, 2015 Write message only to one recipient. Not finished. (187724 lines)
|
||||||
Version 15.72: Dec 22, 2015 Reply message only to sender, suggested by Francisco Ocaña Lara. Not finished. (187705 lines)
|
Version 15.72: Dec 22, 2015 Reply message only to sender, suggested by Francisco Ocaña Lara. Not finished. (187705 lines)
|
||||||
Version 15.71.3: Dec 22, 2015 Changes in birthday range of years. (187669 lines)
|
Version 15.71.3: Dec 22, 2015 Changes in birthday range of years. (187669 lines)
|
||||||
Version 15.71.2: Dec 21, 2015 Fixed bugs in removing old files in briefcase. (187666 lines)
|
Version 15.71.2: Dec 21, 2015 Fixed bugs in removing old files in briefcase. (187666 lines)
|
||||||
|
|
|
@ -584,9 +584,9 @@ struct Globals
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
bool IsReply; // Is the message I am editing a reply?
|
bool IsReply; // Is the message I am editing a reply?
|
||||||
bool ShowOtherRecipients; // Shown other recipients or only the sender of the original message?
|
|
||||||
long OriginalMsgCod; // Original message code when I am editing a reply
|
long OriginalMsgCod; // Original message code when I am editing a reply
|
||||||
} Reply;
|
} Reply;
|
||||||
|
bool ShowOnlyOneRecipient; // Shown only a selected recipient or also other potential recipients?
|
||||||
char FileNameMail[PATH_MAX+1];
|
char FileNameMail[PATH_MAX+1];
|
||||||
FILE *FileMail;
|
FILE *FileMail;
|
||||||
} Msg;
|
} Msg;
|
||||||
|
|
|
@ -272,19 +272,19 @@ static void Msg_PutFormMsgUsrs (const char *Content)
|
||||||
/***** Get parameter that indicates if the message is a reply to another message *****/
|
/***** Get parameter that indicates if the message is a reply to another message *****/
|
||||||
Par_GetParToText ("IsReply",YN,1);
|
Par_GetParToText ("IsReply",YN,1);
|
||||||
if ((Gbl.Msg.Reply.IsReply = (Str_ConvertToUpperLetter (YN[0]) == 'Y')))
|
if ((Gbl.Msg.Reply.IsReply = (Str_ConvertToUpperLetter (YN[0]) == 'Y')))
|
||||||
{
|
|
||||||
/* Get original message code */
|
/* Get original message code */
|
||||||
Gbl.Msg.Reply.OriginalMsgCod = Msg_GetParamMsgCod ();
|
Gbl.Msg.Reply.OriginalMsgCod = Msg_GetParamMsgCod ();
|
||||||
|
|
||||||
/* Get who to show as potential recipients:
|
|
||||||
- the sender of the original message and other users
|
|
||||||
- only the sender of the original message (default) */
|
|
||||||
Par_GetParToText ("ShowOtherRecipients",YN,1);
|
|
||||||
Gbl.Msg.Reply.ShowOtherRecipients = (Str_ConvertToUpperLetter (YN[0]) == 'Y');
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Get user's code of possible preselected recipient *****/
|
/***** Get user's code of possible preselected recipient *****/
|
||||||
Usr_GetParamOtherUsrCodEncrypted ();
|
Usr_GetParamOtherUsrCodEncrypted ();
|
||||||
|
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0) // There is a preselected recipient
|
||||||
|
{
|
||||||
|
/* Get who to show as potential recipients:
|
||||||
|
- only the selected recipient
|
||||||
|
- any user (default) */
|
||||||
|
Par_GetParToText ("ShowOnlyOneRecipient",YN,1);
|
||||||
|
Gbl.Msg.ShowOnlyOneRecipient = (Str_ConvertToUpperLetter (YN[0]) == 'Y');
|
||||||
|
}
|
||||||
|
|
||||||
/***** Get list of users' IDs or nicknames written explicitely *****/
|
/***** Get list of users' IDs or nicknames written explicitely *****/
|
||||||
Usr_GetListMsgRecipientsWrittenExplicitelyBySender (false);
|
Usr_GetListMsgRecipientsWrittenExplicitelyBySender (false);
|
||||||
|
@ -328,29 +328,46 @@ static void Msg_PutFormMsgUsrs (const char *Content)
|
||||||
if (Gbl.Msg.Reply.IsReply)
|
if (Gbl.Msg.Reply.IsReply)
|
||||||
{
|
{
|
||||||
Par_PutHiddenParamChar ("IsReply",'Y');
|
Par_PutHiddenParamChar ("IsReply",'Y');
|
||||||
// Par_PutHiddenParamChar ("ShowOtherRecipients",'N');
|
|
||||||
Msg_PutHiddenParamMsgCod (Gbl.Msg.Reply.OriginalMsgCod);
|
Msg_PutHiddenParamMsgCod (Gbl.Msg.Reply.OriginalMsgCod);
|
||||||
Usr_PutParamOtherUsrCodEncrypted ();
|
Usr_PutParamOtherUsrCodEncrypted ();
|
||||||
|
Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y');
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Draw lists of users with the recipients *****/
|
/***** Start table *****/
|
||||||
fprintf (Gbl.F.Out,"<table style=\"margin:0 auto;\">"
|
fprintf (Gbl.F.Out,"<table style=\"margin:0 auto;\">");
|
||||||
"<tr>"
|
|
||||||
|
/***** To (recipients) *****/
|
||||||
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s RIGHT_TOP\">"
|
"<td class=\"%s RIGHT_TOP\">"
|
||||||
"%s:"
|
"%s:"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"LEFT_MIDDLE\">"
|
"<td class=\"LEFT_MIDDLE\">"
|
||||||
"<table>",
|
"<table style=\"width:100%%;\">",
|
||||||
The_ClassForm[Gbl.Prefs.Theme],Txt_MSG_To);
|
The_ClassForm[Gbl.Prefs.Theme],Txt_MSG_To);
|
||||||
|
if (Gbl.Msg.ShowOnlyOneRecipient)
|
||||||
|
{
|
||||||
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
"<td>");
|
||||||
|
|
||||||
/* Teachers */
|
/***** Show only one user as recipient *****/
|
||||||
Usr_ListUsersToSelect (Rol_TEACHER);
|
sprintf (Gbl.Message,"Gbl.Usrs.Other.UsrDat.UsrCod = %ld",Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||||
|
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||||
|
|
||||||
/* Students */
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
Usr_ListUsersToSelect (Rol_STUDENT);
|
"</tr>");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/***** Show potential recipients *****/
|
||||||
|
/* Teachers */
|
||||||
|
Usr_ListUsersToSelect (Rol_TEACHER);
|
||||||
|
|
||||||
/* Other users (nicknames) */
|
/* Students */
|
||||||
Msg_WriteFormUsrsIDsOrNicksOtherRecipients ();
|
Usr_ListUsersToSelect (Rol_STUDENT);
|
||||||
|
|
||||||
|
/* Other users (nicknames) */
|
||||||
|
Msg_WriteFormUsrsIDsOrNicksOtherRecipients ();
|
||||||
|
}
|
||||||
|
|
||||||
/* End of table */
|
/* End of table */
|
||||||
fprintf (Gbl.F.Out,"</table>"
|
fprintf (Gbl.F.Out,"</table>"
|
||||||
|
@ -365,8 +382,10 @@ static void Msg_PutFormMsgUsrs (const char *Content)
|
||||||
"<td colspan=\"2\">");
|
"<td colspan=\"2\">");
|
||||||
Lay_HelpPlainEditor ();
|
Lay_HelpPlainEditor ();
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"</tr>"
|
"</tr>");
|
||||||
"</table>");
|
|
||||||
|
/***** End table *****/
|
||||||
|
fprintf (Gbl.F.Out,"</table>");
|
||||||
|
|
||||||
/***** Send button *****/
|
/***** Send button *****/
|
||||||
Lay_PutCreateButton (Txt_Send_message);
|
Lay_PutCreateButton (Txt_Send_message);
|
||||||
|
@ -3007,9 +3026,9 @@ static void Msg_WriteFormToReply (long MsgCod,long CrsCod,const char *Subject,
|
||||||
}
|
}
|
||||||
Grp_PutParamAllGroups ();
|
Grp_PutParamAllGroups ();
|
||||||
Par_PutHiddenParamChar ("IsReply",'Y');
|
Par_PutHiddenParamChar ("IsReply",'Y');
|
||||||
// Par_PutHiddenParamChar ("ShowOtherRecipients",'N');
|
|
||||||
Msg_PutHiddenParamMsgCod (MsgCod);
|
Msg_PutHiddenParamMsgCod (MsgCod);
|
||||||
Usr_PutParamUsrCodEncrypted (EncryptedUsrCod);
|
Usr_PutParamUsrCodEncrypted (EncryptedUsrCod);
|
||||||
|
Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y');
|
||||||
fprintf (Gbl.F.Out,"<input type=\"hidden\" name=\"Subject\""
|
fprintf (Gbl.F.Out,"<input type=\"hidden\" name=\"Subject\""
|
||||||
" value=\"Re: %s\" />",
|
" value=\"Re: %s\" />",
|
||||||
Subject);
|
Subject);
|
||||||
|
|
|
@ -2306,6 +2306,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||||
else
|
else
|
||||||
Msg_PutHiddenParamAnotherRecipient (UsrDat);
|
Msg_PutHiddenParamAnotherRecipient (UsrDat);
|
||||||
|
Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y');
|
||||||
Act_LinkFormSubmit (Txt_Write_a_message,"REC_DAT_BOLD");
|
Act_LinkFormSubmit (Txt_Write_a_message,"REC_DAT_BOLD");
|
||||||
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
|
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
|
||||||
" style=\"display:inline;\" >"
|
" style=\"display:inline;\" >"
|
||||||
|
|
|
@ -5025,9 +5025,9 @@ void Usr_PutExtraParamsUsrList (Act_Action_t NextAction)
|
||||||
if (Gbl.Msg.Reply.IsReply)
|
if (Gbl.Msg.Reply.IsReply)
|
||||||
{
|
{
|
||||||
Par_PutHiddenParamChar ("IsReply",'Y');
|
Par_PutHiddenParamChar ("IsReply",'Y');
|
||||||
// Par_PutHiddenParamChar ("ShowOtherRecipients",'N');
|
|
||||||
Msg_PutHiddenParamMsgCod (Gbl.Msg.Reply.OriginalMsgCod);
|
Msg_PutHiddenParamMsgCod (Gbl.Msg.Reply.OriginalMsgCod);
|
||||||
Usr_PutParamOtherUsrCodEncrypted ();
|
Usr_PutParamOtherUsrCodEncrypted ();
|
||||||
|
Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ActSeeUseGbl:
|
case ActSeeUseGbl:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user