mirror of https://github.com/acanas/swad-core.git
Version 22.70: Mar 07, 2023 Code refactoring in parameters. Not finished.
This commit is contained in:
parent
87fcfd1ab8
commit
4c998fc1b0
|
@ -411,8 +411,7 @@ static void ID_PutLinkToConfirmID (struct Usr_Data *UsrDat,unsigned NumID,
|
|||
Frm_BeginFormAnchor (NextAction[UsrDat->Roles.InCurrentCrs],Anchor);
|
||||
if (Gbl.Action.Original != ActUnk)
|
||||
{
|
||||
Par_PutParLong (NULL,"OriginalActCod",
|
||||
Act_GetActCod (Gbl.Action.Original)); // Original action, used to know where we came from
|
||||
Par_PutParCode (Par_OrgActCod,Act_GetActCod (Gbl.Action.Original)); // Original action, used to know where we came from
|
||||
switch (Gbl.Action.Original)
|
||||
{
|
||||
case ActSeeRecSevGst:
|
||||
|
@ -884,7 +883,6 @@ void ID_ConfirmOtherUsrID (void)
|
|||
{
|
||||
extern const char *Txt_ID_X_had_already_been_confirmed;
|
||||
extern const char *Txt_The_ID_X_has_been_confirmed;
|
||||
long OriginalActCod;
|
||||
char UsrID[ID_MAX_BYTES_USR_ID + 1];
|
||||
bool ICanConfirm;
|
||||
bool Found;
|
||||
|
@ -892,8 +890,7 @@ void ID_ConfirmOtherUsrID (void)
|
|||
unsigned NumIDFound = 0; // Initialized to avoid warning
|
||||
|
||||
/***** Get where we came from *****/
|
||||
OriginalActCod = Par_GetParLong ("OriginalActCod");
|
||||
Gbl.Action.Original = Act_GetActionFromActCod (OriginalActCod);
|
||||
Gbl.Action.Original = Act_GetActionFromActCod (Par_GetParCode (Par_OrgActCod));
|
||||
|
||||
/***** Get other user's code from form and get user's data *****/
|
||||
ICanConfirm = false;
|
||||
|
|
|
@ -629,10 +629,11 @@ TODO: Emilce Barrera Mesa: Podr
|
|||
TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen.
|
||||
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.69 (2023-03-07)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.70 (2023-03-07)"
|
||||
#define CSS_FILE "swad22.57.1.css"
|
||||
#define JS_FILE "swad22.49.js"
|
||||
/*
|
||||
Version 22.70: Mar 07, 2023 Code refactoring in parameters. Not finished. (336824 lines)
|
||||
Version 22.69: Mar 07, 2023 Code refactoring in parameters. Not finished. (336866 lines)
|
||||
Version 22.68: Mar 06, 2023 Code refactoring in parameters. Not finished. (336887 lines)
|
||||
Version 22.67.1: Mar 06, 2023 Code refactoring in dates. (337124 lines)
|
||||
|
|
27
swad_link.c
27
swad_link.c
|
@ -433,7 +433,7 @@ static void Lnk_ListLinksForEdition (const struct Lnk_Links *Links)
|
|||
/* Link short name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActRenLnkSho);
|
||||
Lnk_PutParamLnkCod (&Lnk->LnkCod);
|
||||
Par_PutParCode (Par_LnkCod,Lnk->LnkCod);
|
||||
HTM_INPUT_TEXT ("ShortName",Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
|
@ -445,7 +445,7 @@ static void Lnk_ListLinksForEdition (const struct Lnk_Links *Links)
|
|||
/* Link full name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActRenLnkFul);
|
||||
Lnk_PutParamLnkCod (&Lnk->LnkCod);
|
||||
Par_PutParCode (Par_LnkCod,Lnk->LnkCod);
|
||||
HTM_INPUT_TEXT ("FullName",Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
|
@ -457,7 +457,7 @@ static void Lnk_ListLinksForEdition (const struct Lnk_Links *Links)
|
|||
/* Link WWW */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActChgLnkWWW);
|
||||
Lnk_PutParamLnkCod (&Lnk->LnkCod);
|
||||
Par_PutParCode (Par_LnkCod,Lnk->LnkCod);
|
||||
HTM_INPUT_URL ("WWW",Lnk->WWW,HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
|
@ -479,17 +479,7 @@ static void Lnk_ListLinksForEdition (const struct Lnk_Links *Links)
|
|||
static void Lnk_PutParamLnkCod (void *LnkCod)
|
||||
{
|
||||
if (LnkCod)
|
||||
Par_PutParLong (NULL,"LnkCod",*((long *) LnkCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************* Get parameter with code of link ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
long Lnk_GetParamLnkCod (void)
|
||||
{
|
||||
/***** Get code of link *****/
|
||||
return Par_GetParLong ("LnkCod");
|
||||
Par_PutParCode (Par_LnkCod,*((long *) LnkCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -504,8 +494,7 @@ void Lnk_RemoveLink (void)
|
|||
Lnk_EditingLinkConstructor ();
|
||||
|
||||
/***** Get link code *****/
|
||||
if ((Lnk_EditingLnk->LnkCod = Lnk_GetParamLnkCod ()) <= 0)
|
||||
Err_WrongLinkExit ();
|
||||
Lnk_EditingLnk->LnkCod = Par_GetAndCheckParCode (Par_LnkCod);
|
||||
|
||||
/***** Get data of the link from database *****/
|
||||
Lnk_GetDataOfLinkByCod (Lnk_EditingLnk);
|
||||
|
@ -578,8 +567,7 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the code of the link */
|
||||
if ((Lnk_EditingLnk->LnkCod = Lnk_GetParamLnkCod ()) <= 0)
|
||||
Err_WrongLinkExit ();
|
||||
Lnk_EditingLnk->LnkCod = Par_GetAndCheckParCode (Par_LnkCod);
|
||||
|
||||
/* Get the new name for the link */
|
||||
Par_GetParText (ParamName,NewLnkName,MaxBytes);
|
||||
|
@ -635,8 +623,7 @@ void Lnk_ChangeLinkWWW (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the code of the link */
|
||||
if ((Lnk_EditingLnk->LnkCod = Lnk_GetParamLnkCod ()) <= 0)
|
||||
Err_WrongLinkExit ();
|
||||
Lnk_EditingLnk->LnkCod = Par_GetAndCheckParCode (Par_LnkCod);
|
||||
|
||||
/* Get the new WWW for the link */
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
|
|
|
@ -53,7 +53,6 @@ void Lnk_EditLinks (void);
|
|||
void Lnk_PutIconToViewLinks (void);
|
||||
|
||||
void Lnk_GetDataOfLinkByCod (struct Lnk_Link *Lnk);
|
||||
long Lnk_GetParamLnkCod (void);
|
||||
void Lnk_RemoveLink (void);
|
||||
void Lnk_RenameLinkShort (void);
|
||||
void Lnk_RenameLinkFull (void);
|
||||
|
|
22
swad_mail.c
22
swad_mail.c
|
@ -471,7 +471,7 @@ static void Mai_ListMailDomainsForEdition (const struct Mai_Mails *Mails)
|
|||
/* Mail domain */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActRenMaiSho);
|
||||
Mai_PutParamMaiCod (&Mai->MaiCod);
|
||||
Par_PutParCode (Par_MaiCod,Mai->MaiCod);
|
||||
HTM_INPUT_TEXT ("Domain",Cns_MAX_CHARS_EMAIL_ADDRESS,Mai->Domain,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"15\" class=\"INPUT_%s\"",
|
||||
|
@ -482,7 +482,7 @@ static void Mai_ListMailDomainsForEdition (const struct Mai_Mails *Mails)
|
|||
/* Mail domain info */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActRenMaiFul);
|
||||
Mai_PutParamMaiCod (&Mai->MaiCod);
|
||||
Par_PutParCode (Par_MaiCod,Mai->MaiCod);
|
||||
HTM_INPUT_TEXT ("Info",Mai_MAX_CHARS_MAIL_INFO,Mai->Info,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"40\" class=\"INPUT_%s\"",
|
||||
|
@ -509,17 +509,7 @@ static void Mai_ListMailDomainsForEdition (const struct Mai_Mails *Mails)
|
|||
static void Mai_PutParamMaiCod (void *MaiCod)
|
||||
{
|
||||
if (MaiCod)
|
||||
Par_PutParLong (NULL,"MaiCod",*((long *) MaiCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********************** Get parameter with code of mail *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
long Mai_GetParamMaiCod (void)
|
||||
{
|
||||
/***** Get code of mail *****/
|
||||
return Par_GetParLong ("MaiCod");
|
||||
Par_PutParCode (Par_MaiCod,*((long *) MaiCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -534,8 +524,7 @@ void Mai_RemoveMailDomain (void)
|
|||
Mai_EditingMailDomainConstructor ();
|
||||
|
||||
/***** Get mail domain code *****/
|
||||
if ((Mai_EditingMai->MaiCod = Mai_GetParamMaiCod ()) <= 0)
|
||||
Err_WrongMailDomainExit ();
|
||||
Mai_EditingMai->MaiCod = Par_GetAndCheckParCode (Par_MaiCod);
|
||||
|
||||
/***** Get data of the mail domain rom database *****/
|
||||
Mai_GetDataOfMailDomainByCod (Mai_EditingMai);
|
||||
|
@ -608,8 +597,7 @@ static void Mai_RenameMailDomain (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the code of the mail */
|
||||
if ((Mai_EditingMai->MaiCod = Mai_GetParamMaiCod ()) <= 0)
|
||||
Err_WrongMailDomainExit ();
|
||||
Mai_EditingMai->MaiCod = Par_GetAndCheckParCode (Par_MaiCod);
|
||||
|
||||
/* Get the new name for the mail */
|
||||
Par_GetParText (ParamName,NewMaiName,MaxBytes);
|
||||
|
|
|
@ -67,7 +67,6 @@ bool Mai_CheckIfUsrCanReceiveEmailNotif (const struct Usr_Data *UsrDat);
|
|||
void Mai_WriteWarningEmailNotifications (void);
|
||||
|
||||
void Mai_GetDataOfMailDomainByCod (struct Mail *Plc);
|
||||
long Mai_GetParamMaiCod (void);
|
||||
void Mai_RemoveMailDomain (void);
|
||||
void Mai_RenameMailDomainShort (void);
|
||||
void Mai_RenameMailDomainFull (void);
|
||||
|
|
|
@ -115,7 +115,6 @@ static void Msg_ShowFormToShowOnlyUnreadMessages (const struct Msg_Messages *Mes
|
|||
static bool Msg_GetParamOnlyUnreadMsgs (void);
|
||||
static void Msg_ShowASentOrReceivedMessage (struct Msg_Messages *Messages,
|
||||
long MsgNum,long MsgCod);
|
||||
static long Msg_GetParamMsgCod (void);
|
||||
static void Msg_PutLinkToShowMorePotentialRecipients (struct Msg_Messages *Messages);
|
||||
static void Msg_PutParamsShowMorePotentialRecipients (void *Messages);
|
||||
static void Msg_PutParamsWriteMsg (void *Messages);
|
||||
|
@ -235,8 +234,7 @@ static void Msg_PutFormMsgUsrs (struct Msg_Messages *Messages,
|
|||
/***** Get parameter that indicates if the message is a reply to another message *****/
|
||||
if ((Messages->Reply.IsReply = Par_GetParBool ("IsReply")))
|
||||
/* Get original message code */
|
||||
if ((Messages->Reply.OriginalMsgCod = Msg_GetParamMsgCod ()) <= 0)
|
||||
Err_WrongMessageExit ();
|
||||
Messages->Reply.OriginalMsgCod = Par_GetAndCheckParCode (Par_MsgCod);
|
||||
|
||||
/***** Get user's code of possible preselected recipient *****/
|
||||
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ()) // There is a preselected recipient
|
||||
|
@ -321,7 +319,7 @@ static void Msg_PutFormMsgUsrs (struct Msg_Messages *Messages,
|
|||
if (Messages->Reply.IsReply)
|
||||
{
|
||||
Par_PutParChar ("IsReply",'Y');
|
||||
Msg_PutHiddenParamMsgCod (Messages->Reply.OriginalMsgCod);
|
||||
Par_PutParCode (Par_MsgCod,Messages->Reply.OriginalMsgCod);
|
||||
}
|
||||
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
|
||||
{
|
||||
|
@ -428,16 +426,19 @@ static void Msg_PutLinkToShowMorePotentialRecipients (struct Msg_Messages *Messa
|
|||
|
||||
static void Msg_PutParamsShowMorePotentialRecipients (void *Messages)
|
||||
{
|
||||
if (((struct Msg_Messages *) Messages)->Reply.IsReply)
|
||||
if (Messages)
|
||||
{
|
||||
Par_PutParChar ("IsReply",'Y');
|
||||
Msg_PutHiddenParamMsgCod (((struct Msg_Messages *) Messages)->Reply.OriginalMsgCod);
|
||||
}
|
||||
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
if (((struct Msg_Messages *) Messages)->Reply.IsReply)
|
||||
{
|
||||
Par_PutParChar ("IsReply",'Y');
|
||||
Par_PutParCode (Par_MsgCod,((struct Msg_Messages *) Messages)->Reply.OriginalMsgCod);
|
||||
}
|
||||
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
|
||||
/***** Hidden params to send subject and content *****/
|
||||
Msg_PutHiddenParamsSubjectAndContent ();
|
||||
/***** Hidden params to send subject and content *****/
|
||||
Msg_PutHiddenParamsSubjectAndContent ();
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -454,7 +455,7 @@ static void Msg_PutParamsWriteMsg (void *Messages)
|
|||
if (((struct Msg_Messages *) Messages)->Reply.IsReply)
|
||||
{
|
||||
Par_PutParChar ("IsReply",'Y');
|
||||
Msg_PutHiddenParamMsgCod (((struct Msg_Messages *) Messages)->Reply.OriginalMsgCod);
|
||||
Par_PutParCode (Par_MsgCod,((struct Msg_Messages *) Messages)->Reply.OriginalMsgCod);
|
||||
}
|
||||
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
|
||||
{
|
||||
|
@ -586,7 +587,7 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (struct Msg_Messages *Messag
|
|||
bool SubjectAndContentComeFromForm = (Messages->Subject[0] || Content[0]);
|
||||
|
||||
/***** Get possible code (of original message if it's a reply) *****/
|
||||
MsgCod = Msg_GetParamMsgCod ();
|
||||
MsgCod = Par_GetParCode (Par_MsgCod);
|
||||
|
||||
/***** Message subject *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
@ -758,8 +759,7 @@ void Msg_RecMsgFromUsr (void)
|
|||
/* Get parameter that indicates if the message is a reply to a previous message */
|
||||
if ((IsReply = Par_GetParBool ("IsReply")))
|
||||
/* Get original message code */
|
||||
if ((OriginalMsgCod = Msg_GetParamMsgCod ()) <= 0)
|
||||
Err_WrongMessageExit ();
|
||||
OriginalMsgCod = Par_GetAndCheckParCode (Par_MsgCod);
|
||||
|
||||
/* Get user's code of possible preselected recipient */
|
||||
Usr_GetParamOtherUsrCodEncryptedAndGetListIDs ();
|
||||
|
@ -1107,18 +1107,16 @@ static void Msg_GetParamMsgsCrsCod (struct Msg_Messages *Messages)
|
|||
extern const char *Txt_any_course;
|
||||
struct Crs_Course Crs;
|
||||
|
||||
if ((Messages->FilterCrsCod = Par_GetParLong ("FilterCrsCod")) > 0) // If origin course specified
|
||||
if ((Messages->FilterCrsCod = Par_GetParCode (Par_FilterCrsCod)) > 0) // If origin course specified
|
||||
{
|
||||
/* Get data of course */
|
||||
Crs.CrsCod = Messages->FilterCrsCod;
|
||||
Crs_GetDataOfCourseByCod (&Crs);
|
||||
|
||||
Str_Copy (Messages->FilterCrsShrtName,Crs.ShrtName,
|
||||
sizeof (Messages->FilterCrsShrtName) - 1);
|
||||
}
|
||||
else
|
||||
Str_Copy (Messages->FilterCrsShrtName,Txt_any_course,
|
||||
sizeof (Messages->FilterCrsShrtName) - 1);
|
||||
|
||||
Str_Copy (Messages->FilterCrsShrtName,Messages->FilterCrsCod > 0 ? Crs.ShrtName :
|
||||
Txt_any_course,
|
||||
sizeof (Messages->FilterCrsShrtName) - 1);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1153,8 +1151,7 @@ void Msg_DelSntMsg (void)
|
|||
long MsgCod;
|
||||
|
||||
/***** Get the code of the message to delete *****/
|
||||
if ((MsgCod = Msg_GetParamMsgCod ()) <= 0)
|
||||
Err_WrongMessageExit ();
|
||||
MsgCod = Par_GetAndCheckParCode (Par_MsgCod);
|
||||
|
||||
/***** Delete the message *****/
|
||||
/* Delete the sent message */
|
||||
|
@ -1175,8 +1172,7 @@ void Msg_DelRecMsg (void)
|
|||
long MsgCod;
|
||||
|
||||
/***** Get the code of the message to delete *****/
|
||||
if ((MsgCod = Msg_GetParamMsgCod ()) <= 0)
|
||||
Err_WrongMessageExit ();
|
||||
MsgCod = Par_GetAndCheckParCode (Par_MsgCod);
|
||||
|
||||
/***** Delete the message *****/
|
||||
/* Delete the received message */
|
||||
|
@ -1199,8 +1195,7 @@ void Msg_ExpSntMsg (void)
|
|||
Msg_ResetMessages (&Messages);
|
||||
|
||||
/***** Get the code of the message to expand *****/
|
||||
if ((Messages.ExpandedMsgCod = Msg_GetParamMsgCod ()) <= 0)
|
||||
Err_WrongMessageExit ();
|
||||
Messages.ExpandedMsgCod = Par_GetAndCheckParCode (Par_MsgCod);
|
||||
|
||||
/***** Expand the message *****/
|
||||
Msg_DB_ExpandSntMsg (Messages.ExpandedMsgCod);
|
||||
|
@ -1221,8 +1216,7 @@ void Msg_ExpRecMsg (void)
|
|||
Msg_ResetMessages (&Messages);
|
||||
|
||||
/***** Get the code of the message to expand *****/
|
||||
if ((Messages.ExpandedMsgCod = Msg_GetParamMsgCod ()) <= 0)
|
||||
Err_WrongMessageExit ();
|
||||
Messages.ExpandedMsgCod = Par_GetAndCheckParCode (Par_MsgCod);
|
||||
|
||||
/***** Expand the message *****/
|
||||
Msg_DB_ExpandRcvMsg (Messages.ExpandedMsgCod);
|
||||
|
@ -1243,8 +1237,7 @@ void Msg_ConSntMsg (void)
|
|||
long MsgCod;
|
||||
|
||||
/***** Get the code of the message to contract *****/
|
||||
if ((MsgCod = Msg_GetParamMsgCod ()) <= 0)
|
||||
Err_WrongMessageExit ();
|
||||
MsgCod = Par_GetAndCheckParCode (Par_MsgCod);
|
||||
|
||||
/***** Contract the message *****/
|
||||
Msg_DB_ContractSntMsg (MsgCod);
|
||||
|
@ -1262,8 +1255,7 @@ void Msg_ConRecMsg (void)
|
|||
long MsgCod;
|
||||
|
||||
/***** Get the code of the message to contract *****/
|
||||
if ((MsgCod = Msg_GetParamMsgCod ()) <= 0)
|
||||
Err_WrongMessageExit ();
|
||||
MsgCod = Par_GetAndCheckParCode (Par_MsgCod);
|
||||
|
||||
/***** Contract the message *****/
|
||||
Msg_DB_ContractRcvMsg (MsgCod);
|
||||
|
@ -1768,7 +1760,7 @@ static void Msg_PutHiddenParamsOneMsg (void *Messages)
|
|||
{
|
||||
Pag_PutHiddenParamPagNum (Msg_WhatPaginate[((struct Msg_Messages *) Messages)->TypeOfMessages],
|
||||
((struct Msg_Messages *) Messages)->CurrentPage);
|
||||
Msg_PutHiddenParamMsgCod (((struct Msg_Messages *) Messages)->MsgCod);
|
||||
Par_PutParCode (Par_MsgCod,((struct Msg_Messages *) Messages)->MsgCod);
|
||||
Msg_PutHiddenParamsMsgsFilters (Messages);
|
||||
}
|
||||
}
|
||||
|
@ -1782,11 +1774,14 @@ void Msg_PutHiddenParamsMsgsFilters (void *Messages)
|
|||
if (Messages)
|
||||
{
|
||||
if (((struct Msg_Messages *) Messages)->FilterCrsCod >= 0)
|
||||
Par_PutParLong (NULL,"FilterCrsCod",((struct Msg_Messages *) Messages)->FilterCrsCod);
|
||||
Par_PutParCode (Par_FilterCrsCod,((struct Msg_Messages *) Messages)->FilterCrsCod);
|
||||
|
||||
if (((struct Msg_Messages *) Messages)->FilterFromTo[0])
|
||||
Par_PutParString (NULL,"FilterFromTo",((struct Msg_Messages *) Messages)->FilterFromTo);
|
||||
|
||||
if (((struct Msg_Messages *) Messages)->FilterContent[0])
|
||||
Par_PutParString (NULL,"FilterContent",((struct Msg_Messages *) Messages)->FilterContent);
|
||||
|
||||
if (((struct Msg_Messages *) Messages)->ShowOnlyUnreadMsgs)
|
||||
Par_PutParChar ("OnlyUnreadMsgs",'Y');
|
||||
}
|
||||
|
@ -2431,7 +2426,7 @@ static void Msg_WriteFormToReply (long MsgCod,long CrsCod,bool FromThisCrs,
|
|||
}
|
||||
Grp_PutParamAllGroups ();
|
||||
Par_PutParChar ("IsReply",'Y');
|
||||
Msg_PutHiddenParamMsgCod (MsgCod);
|
||||
Par_PutParCode (Par_MsgCod,MsgCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Par_PutParChar ("ShowOnlyOneRecipient",'Y');
|
||||
|
||||
|
@ -2734,25 +2729,6 @@ void Msg_WriteMsgContent (char Content[Cns_MAX_BYTES_LONG_TEXT + 1],
|
|||
HTM_Txt (Content);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************** Get parameter with the code of a message ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Msg_PutHiddenParamMsgCod (long MsgCod)
|
||||
{
|
||||
Par_PutParLong (NULL,"MsgCod",MsgCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************** Get parameter with the code of a message ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static long Msg_GetParamMsgCod (void)
|
||||
{
|
||||
/***** Get code of message *****/
|
||||
return Par_GetParLong ("MsgCod");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Put a form to ban the sender of a message *****************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -118,8 +118,6 @@ void Msg_WriteMsgDate (time_t TimeUTC,const char *ClassTxt,const char *ClassBg);
|
|||
void Msg_WriteMsgContent (char Content[Cns_MAX_BYTES_LONG_TEXT + 1],
|
||||
bool InsertLinks,bool ChangeBRToRet);
|
||||
|
||||
void Msg_PutHiddenParamMsgCod (long MsgCod);
|
||||
|
||||
void Msg_BanSenderWhenShowingMsgs (void);
|
||||
void Msg_UnbanSenderWhenShowingMsgs (void);
|
||||
void Msg_UnbanSenderWhenListingUsrs (void);
|
||||
|
|
|
@ -808,7 +808,7 @@ static Act_Action_t Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
|
|||
case Ntf_EVENT_MESSAGE:
|
||||
Action = ActExpRcvMsg;
|
||||
Frm_BeginForm (Action);
|
||||
Msg_PutHiddenParamMsgCod (Cod);
|
||||
Par_PutParCode (Par_MsgCod,Cod);
|
||||
break;
|
||||
default:
|
||||
Action = Ntf_DefaultActions[NotifyEvent];
|
||||
|
|
|
@ -66,12 +66,17 @@ const char *Par_CodeStr[] =
|
|||
[Par_DptCod ] = "DptCod",
|
||||
[Par_ExaCod ] = "ExaCod",
|
||||
[Par_FilCod ] = "FilCod",
|
||||
[Par_FilterCrsCod] = "FilterCrsCod",
|
||||
[Par_GamCod ] = "GamCod",
|
||||
[Par_GrpCod ] = "GrpCod",
|
||||
[Par_GrpTypCod ] = "GrpTypCod",
|
||||
[Par_HldCod ] = "HldCod",
|
||||
[Par_LnkCod ] = "LnkCod",
|
||||
[Par_MaiCod ] = "MaiCod",
|
||||
[Par_MchCod ] = "MchCod",
|
||||
[Par_MsgCod ] = "MsgCod",
|
||||
[Par_NotCod ] = "NotCod",
|
||||
[Par_OrgActCod ] = "OrgActCod",
|
||||
[Par_OthCtrCod ] = "OthCtrCod",
|
||||
[Par_OthCtyCod ] = "OthCtyCod",
|
||||
[Par_OthDegCod ] = "OthDegCod",
|
||||
|
|
|
@ -74,12 +74,17 @@ typedef enum
|
|||
Par_DptCod,
|
||||
Par_ExaCod,
|
||||
Par_FilCod,
|
||||
Par_FilterCrsCod,
|
||||
Par_GamCod,
|
||||
Par_GrpCod,
|
||||
Par_GrpTypCod,
|
||||
Par_HldCod,
|
||||
Par_LnkCod,
|
||||
Par_MaiCod,
|
||||
Par_MchCod,
|
||||
Par_MsgCod,
|
||||
Par_NotCod,
|
||||
Par_OrgActCod,
|
||||
Par_OthCtrCod,
|
||||
Par_OthCtyCod,
|
||||
Par_OthDegCod,
|
||||
|
|
|
@ -1531,11 +1531,9 @@ void Rec_UpdateAndShowMyCrsRecord (void)
|
|||
void Rec_UpdateAndShowOtherCrsRecord (void)
|
||||
{
|
||||
extern const char *Txt_Student_record_card_in_this_course_has_been_updated;
|
||||
long OriginalActCod;
|
||||
|
||||
/***** Get where we came from *****/
|
||||
OriginalActCod = Par_GetParLong ("OriginalActCod");
|
||||
Gbl.Action.Original = Act_GetActionFromActCod (OriginalActCod);
|
||||
Gbl.Action.Original = Act_GetActionFromActCod (Par_GetParCode (Par_OrgActCod));
|
||||
|
||||
/***** Get the user whose record we want to modify *****/
|
||||
Usr_GetParamOtherUsrCodEncryptedAndGetListIDs ();
|
||||
|
@ -1650,8 +1648,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
|
|||
{
|
||||
ICanEdit = true;
|
||||
Frm_BeginFormAnchor (ActRcvRecOthUsr,Anchor);
|
||||
Par_PutParLong (NULL,"OriginalActCod",
|
||||
Act_GetActCod (ActSeeRecSevStd)); // Original action, used to know where we came from
|
||||
Par_PutParCode (Par_OrgActCod,Act_GetActCod (ActSeeRecSevStd)); // Original action, used to know where we came from
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
if (TypeOfView == Rec_CRS_LIST_SEVERAL_RECORDS)
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
|
|
Loading…
Reference in New Issue