mirror of https://github.com/acanas/swad-core.git
Version19.169.4
This commit is contained in:
parent
ca39e3aa52
commit
505fb31312
|
@ -497,7 +497,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.169.3 (2020-04-08)"
|
#define Log_PLATFORM_VERSION "SWAD 19.169.4 (2020-04-08)"
|
||||||
#define CSS_FILE "swad19.146.css"
|
#define CSS_FILE "swad19.146.css"
|
||||||
#define JS_FILE "swad19.153.js"
|
#define JS_FILE "swad19.153.js"
|
||||||
/*
|
/*
|
||||||
|
@ -548,6 +548,7 @@ Funci
|
||||||
// TODO: Oresti Baños: cambiar ojos por candados en descriptores para prohibir/permitir y dejar los ojos para poder elegir descriptores
|
// TODO: Oresti Baños: cambiar ojos por candados en descriptores para prohibir/permitir y dejar los ojos para poder elegir descriptores
|
||||||
// TODO: Integrar pull requests con traducciones del alemán del usuario eruedin en GitHub
|
// TODO: Integrar pull requests con traducciones del alemán del usuario eruedin en GitHub
|
||||||
|
|
||||||
|
Version 19.169.4: Apr 08, 2020 Mark some parameters as unused (functions from I to N). (284903 lines)
|
||||||
Version 19.169.3: Apr 08, 2020 Mark some parameters as unused (functions from D to I). (284929 lines)
|
Version 19.169.3: Apr 08, 2020 Mark some parameters as unused (functions from D to I). (284929 lines)
|
||||||
Version 19.169.2: Apr 08, 2020 Mark some parameters as unused (functions from A to C). (284969 lines)
|
Version 19.169.2: Apr 08, 2020 Mark some parameters as unused (functions from A to C). (284969 lines)
|
||||||
Version 19.169.1: Apr 08, 2020 Mark some parameters as unused. (284999 lines)
|
Version 19.169.1: Apr 08, 2020 Mark some parameters as unused. (284999 lines)
|
||||||
|
|
|
@ -445,7 +445,6 @@ struct Globals
|
||||||
} Records;
|
} Records;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
long NotCod; // Notice to be edited, removed... used as parameter
|
|
||||||
long HighlightNotCod; // Notice code of a notice to be highlighted
|
long HighlightNotCod; // Notice code of a notice to be highlighted
|
||||||
} Notices;
|
} Notices;
|
||||||
} Crs;
|
} Crs;
|
||||||
|
@ -540,35 +539,7 @@ struct Globals
|
||||||
long NotCod; // Used as parameter about social note to be edited, removed...
|
long NotCod; // Used as parameter about social note to be edited, removed...
|
||||||
long PubCod; // Used as parameter about social publishing to be edited, removed...
|
long PubCod; // Used as parameter about social publishing to be edited, removed...
|
||||||
} Timeline;
|
} Timeline;
|
||||||
struct
|
struct Msg_Messages Msg;
|
||||||
{
|
|
||||||
Msg_TypeOfMessages_t TypeOfMessages;
|
|
||||||
unsigned NumMsgs;
|
|
||||||
int MsgId;
|
|
||||||
char Subject[Cns_MAX_BYTES_SUBJECT + 1];
|
|
||||||
unsigned NumCourses;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
long CrsCod;
|
|
||||||
char ShrtName[Hie_MAX_BYTES_SHRT_NAME + 1];
|
|
||||||
} Courses[Crs_MAX_COURSES_PER_USR]; // Distinct courses in my messages sent or received
|
|
||||||
long FilterCrsCod; // Show only messages sent from this course code
|
|
||||||
char FilterCrsShrtName[Hie_MAX_BYTES_SHRT_NAME + 1];
|
|
||||||
char FilterFromTo[Usr_MAX_BYTES_FULL_NAME + 1]; // Show only messages from/to these users
|
|
||||||
char FilterContent[Msg_MAX_BYTES_FILTER_CONTENT + 1]; // Show only messages that match this content
|
|
||||||
bool ShowOnlyUnreadMsgs; // Show only unread messages (this option is applicable only for received messages)
|
|
||||||
long ExpandedMsgCod; // The current expanded message code
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
bool IsReply; // Is the message I am editing a reply?
|
|
||||||
long OriginalMsgCod; // Original message code when I am editing a reply
|
|
||||||
} Reply;
|
|
||||||
bool ShowOnlyOneRecipient; // Shown only a selected recipient or also other potential recipients?
|
|
||||||
char FileNameMail[PATH_MAX + 1];
|
|
||||||
FILE *FileMail;
|
|
||||||
unsigned CurrentPage;
|
|
||||||
long MsgCod; // Used as parameter with message to be removed
|
|
||||||
} Msg;
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
|
|
|
@ -67,7 +67,7 @@ const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES] = // ISO 639-1 language codes
|
||||||
|
|
||||||
static void Lan_PutIconsLanguage (__attribute__((unused)) void *Args);
|
static void Lan_PutIconsLanguage (__attribute__((unused)) void *Args);
|
||||||
|
|
||||||
static void Lan_PutParamLanguage (void *Args);
|
static void Lan_PutParamLanguage (void *Language);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*************** Put link to change language (edit settings) *****************/
|
/*************** Put link to change language (edit settings) *****************/
|
||||||
|
@ -149,7 +149,7 @@ void Lan_AskChangeLanguage (void)
|
||||||
|
|
||||||
/***** Request confirmation *****/
|
/***** Request confirmation *****/
|
||||||
Ale_ShowAlertAndButton (ActChgLan,NULL,NULL,
|
Ale_ShowAlertAndButton (ActChgLan,NULL,NULL,
|
||||||
Lan_PutParamLanguage,&Gbl,
|
Lan_PutParamLanguage,&Gbl.Prefs.Language,
|
||||||
Btn_CONFIRM_BUTTON,
|
Btn_CONFIRM_BUTTON,
|
||||||
Txt_Switch_to_LANGUAGE[Gbl.Prefs.Language],
|
Txt_Switch_to_LANGUAGE[Gbl.Prefs.Language],
|
||||||
Ale_QUESTION,Gbl.Usrs.Me.Logged ? Txt_Do_you_want_to_change_your_language_to_LANGUAGE[Gbl.Prefs.Language] :
|
Ale_QUESTION,Gbl.Usrs.Me.Logged ? Txt_Do_you_want_to_change_your_language_to_LANGUAGE[Gbl.Prefs.Language] :
|
||||||
|
@ -165,10 +165,10 @@ void Lan_AskChangeLanguage (void)
|
||||||
/******************************* Change language *****************************/
|
/******************************* Change language *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Lan_PutParamLanguage (void *Args)
|
static void Lan_PutParamLanguage (void *Language)
|
||||||
{
|
{
|
||||||
if (Args)
|
if (Language)
|
||||||
Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) Gbl.Prefs.Language);
|
Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) *((Lan_Language_t *) Language));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
36
swad_link.c
36
swad_link.c
|
@ -63,12 +63,12 @@ static struct Link *Lnk_EditingLnk = NULL; // Static variable to keep the link b
|
||||||
/***************************** Private prototypes ****************************/
|
/***************************** Private prototypes ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Lnk_PutIconsListingLinks (void *Args);
|
static void Lnk_PutIconsListingLinks (__attribute__((unused)) void *Args);
|
||||||
static void Lnk_PutIconToEditLinks (void);
|
static void Lnk_PutIconToEditLinks (void);
|
||||||
static void Lnk_WriteListOfLinks (void);
|
static void Lnk_WriteListOfLinks (void);
|
||||||
|
|
||||||
static void Lnk_EditLinksInternal (void);
|
static void Lnk_EditLinksInternal (void);
|
||||||
static void Lnk_PutIconsEditingLinks (void *Args);
|
static void Lnk_PutIconsEditingLinks (__attribute__((unused)) void *Args);
|
||||||
|
|
||||||
static void Lnk_ListLinksForEdition (void);
|
static void Lnk_ListLinksForEdition (void);
|
||||||
static void Lnk_PutParamLnkCod (long LnkCod);
|
static void Lnk_PutParamLnkCod (long LnkCod);
|
||||||
|
@ -100,7 +100,7 @@ void Lnk_SeeLinks (void)
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
Box_BoxBegin (NULL,Txt_Links,
|
Box_BoxBegin (NULL,Txt_Links,
|
||||||
Lnk_PutIconsListingLinks,&Gbl,
|
Lnk_PutIconsListingLinks,NULL,
|
||||||
Hlp_SYSTEM_Links,Box_NOT_CLOSABLE);
|
Hlp_SYSTEM_Links,Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** Write all links *****/
|
/***** Write all links *****/
|
||||||
|
@ -128,17 +128,14 @@ void Lnk_SeeLinks (void)
|
||||||
/***************** Put contextual icons in list of links *********************/
|
/***************** Put contextual icons in list of links *********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Lnk_PutIconsListingLinks (void *Args)
|
static void Lnk_PutIconsListingLinks (__attribute__((unused)) void *Args)
|
||||||
{
|
{
|
||||||
if (Args)
|
/***** Put icon to edit links *****/
|
||||||
{
|
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
|
||||||
/***** Put icon to edit links *****/
|
Lnk_PutIconToEditLinks ();
|
||||||
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
|
|
||||||
Lnk_PutIconToEditLinks ();
|
|
||||||
|
|
||||||
/***** Put icon to view banners *****/
|
/***** Put icon to view banners *****/
|
||||||
Ban_PutIconToViewBanners ();
|
Ban_PutIconToViewBanners ();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -237,7 +234,7 @@ static void Lnk_EditLinksInternal (void)
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
Box_BoxBegin (NULL,Txt_Links,
|
Box_BoxBegin (NULL,Txt_Links,
|
||||||
Lnk_PutIconsEditingLinks,&Gbl,
|
Lnk_PutIconsEditingLinks,NULL,
|
||||||
Hlp_SYSTEM_Links_edit,Box_NOT_CLOSABLE);
|
Hlp_SYSTEM_Links_edit,Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** Put a form to create a new link *****/
|
/***** Put a form to create a new link *****/
|
||||||
|
@ -258,16 +255,13 @@ static void Lnk_EditLinksInternal (void)
|
||||||
/******************** Put contextual icons to view links *********************/
|
/******************** Put contextual icons to view links *********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Lnk_PutIconsEditingLinks (void *Args)
|
static void Lnk_PutIconsEditingLinks (__attribute__((unused)) void *Args)
|
||||||
{
|
{
|
||||||
if (Args)
|
/***** Put icon to view links *****/
|
||||||
{
|
Lnk_PutIconToViewLinks ();
|
||||||
/***** Put icon to view links *****/
|
|
||||||
Lnk_PutIconToViewLinks ();
|
|
||||||
|
|
||||||
/***** Put icon to view banners *****/
|
/***** Put icon to view banners *****/
|
||||||
Ban_PutIconToViewBanners ();
|
Ban_PutIconToViewBanners ();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
23
swad_logo.c
23
swad_logo.c
|
@ -64,9 +64,9 @@ extern struct Globals Gbl;
|
||||||
/***************************** Private prototypes ****************************/
|
/***************************** Private prototypes ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Lgo_PutIconToRemoveLogoIns (void *Args);
|
static void Lgo_PutIconToRemoveLogoIns (__attribute__((unused)) void *Args);
|
||||||
static void Lgo_PutIconToRemoveLogoCtr (void *Args);
|
static void Lgo_PutIconToRemoveLogoCtr (__attribute__((unused)) void *Args);
|
||||||
static void Lgo_PutIconToRemoveLogoDeg (void *Args);
|
static void Lgo_PutIconToRemoveLogoDeg (__attribute__((unused)) void *Args);
|
||||||
static void Lgo_PutIconToRemoveLogo (Act_Action_t ActionRem);
|
static void Lgo_PutIconToRemoveLogo (Act_Action_t ActionRem);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -302,7 +302,7 @@ void Lgo_RequestLogo (Hie_Level_t Scope)
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
Box_BoxBegin (NULL,Txt_Logo,
|
Box_BoxBegin (NULL,Txt_Logo,
|
||||||
FunctionToDrawContextualIcons,&Gbl,
|
FunctionToDrawContextualIcons,NULL,
|
||||||
NULL,Box_NOT_CLOSABLE);
|
NULL,Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** Begin form to upload logo *****/
|
/***** Begin form to upload logo *****/
|
||||||
|
@ -329,22 +329,19 @@ void Lgo_RequestLogo (Hie_Level_t Scope)
|
||||||
/************** Put a link to request the removal of the logo ****************/
|
/************** Put a link to request the removal of the logo ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Lgo_PutIconToRemoveLogoIns (void *Args)
|
static void Lgo_PutIconToRemoveLogoIns (__attribute__((unused)) void *Args)
|
||||||
{
|
{
|
||||||
if (Args)
|
Lgo_PutIconToRemoveLogo (ActRemInsLog);
|
||||||
Lgo_PutIconToRemoveLogo (ActRemInsLog);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Lgo_PutIconToRemoveLogoCtr (void *Args)
|
static void Lgo_PutIconToRemoveLogoCtr (__attribute__((unused)) void *Args)
|
||||||
{
|
{
|
||||||
if (Args)
|
Lgo_PutIconToRemoveLogo (ActRemCtrLog);
|
||||||
Lgo_PutIconToRemoveLogo (ActRemCtrLog);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Lgo_PutIconToRemoveLogoDeg (void *Args)
|
static void Lgo_PutIconToRemoveLogoDeg (__attribute__((unused)) void *Args)
|
||||||
{
|
{
|
||||||
if (Args)
|
Lgo_PutIconToRemoveLogo (ActRemDegLog);
|
||||||
Lgo_PutIconToRemoveLogo (ActRemDegLog);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Lgo_PutIconToRemoveLogo (Act_Action_t ActionRem)
|
static void Lgo_PutIconToRemoveLogo (Act_Action_t ActionRem)
|
||||||
|
|
49
swad_mail.c
49
swad_mail.c
|
@ -71,7 +71,7 @@ static struct Mail *Mai_EditingMai = NULL; // Static variable to keep the mail d
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Mai_GetParamMaiOrder (void);
|
static void Mai_GetParamMaiOrder (void);
|
||||||
static void Mai_PutIconToEditMailDomains (void *Args);
|
static void Mai_PutIconToEditMailDomains (__attribute__((unused)) void *Args);
|
||||||
static void Mai_EditMailDomainsInternal (void);
|
static void Mai_EditMailDomainsInternal (void);
|
||||||
static void Mai_GetListMailDomainsAllowedForNotif (void);
|
static void Mai_GetListMailDomainsAllowedForNotif (void);
|
||||||
static void Mai_GetMailDomain (const char *Email,char MailDomain[Cns_MAX_BYTES_EMAIL_ADDRESS + 1]);
|
static void Mai_GetMailDomain (const char *Email,char MailDomain[Cns_MAX_BYTES_EMAIL_ADDRESS + 1]);
|
||||||
|
@ -88,7 +88,8 @@ static void Mai_PutFormToCreateMailDomain (void);
|
||||||
static void Mai_PutHeadMailDomains (void);
|
static void Mai_PutHeadMailDomains (void);
|
||||||
static void Mai_CreateMailDomain (struct Mail *Mai);
|
static void Mai_CreateMailDomain (struct Mail *Mai);
|
||||||
|
|
||||||
static void Mai_ListEmails (void *Args);
|
static void Mai_PutFormToSelectUsrsToListEmails (__attribute__((unused)) void *Args);
|
||||||
|
static void Mai_ListEmails (__attribute__((unused)) void *Args);
|
||||||
|
|
||||||
static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe,
|
static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe,
|
||||||
bool IMustFillInEmail,bool IShouldConfirmEmail);
|
bool IMustFillInEmail,bool IShouldConfirmEmail);
|
||||||
|
@ -124,7 +125,7 @@ void Mai_SeeMailDomains (void)
|
||||||
/***** Begin box and table *****/
|
/***** Begin box and table *****/
|
||||||
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
|
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
|
||||||
Box_BoxTableBegin (NULL,Txt_Email_domains_allowed_for_notifications,
|
Box_BoxTableBegin (NULL,Txt_Email_domains_allowed_for_notifications,
|
||||||
Mai_PutIconToEditMailDomains,&Gbl,
|
Mai_PutIconToEditMailDomains,NULL,
|
||||||
Hlp_START_Domains,Box_NOT_CLOSABLE,2);
|
Hlp_START_Domains,Box_NOT_CLOSABLE,2);
|
||||||
else
|
else
|
||||||
Box_BoxTableBegin (NULL,Txt_Email_domains_allowed_for_notifications,
|
Box_BoxTableBegin (NULL,Txt_Email_domains_allowed_for_notifications,
|
||||||
|
@ -201,11 +202,10 @@ static void Mai_GetParamMaiOrder (void)
|
||||||
/************************ Put icon to edit mail domains **********************/
|
/************************ Put icon to edit mail domains **********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Mai_PutIconToEditMailDomains (void *Args)
|
static void Mai_PutIconToEditMailDomains (__attribute__((unused)) void *Args)
|
||||||
{
|
{
|
||||||
if (Args)
|
Ico_PutContextualIconToEdit (ActEdiMai,NULL,
|
||||||
Ico_PutContextualIconToEdit (ActEdiMai,NULL,
|
NULL,NULL);
|
||||||
NULL,NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -865,24 +865,28 @@ static void Mai_CreateMailDomain (struct Mail *Mai)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************** Request edition of works of users of the course **************/
|
/************************ Request users to list emails ***********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Mai_ReqUsrsToListEmails (void *Args)
|
void Mai_ReqUsrsToListEmails (void)
|
||||||
|
{
|
||||||
|
Mai_PutFormToSelectUsrsToListEmails (NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void Mai_PutFormToSelectUsrsToListEmails (__attribute__((unused)) void *Args)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_MESSAGES_Email;
|
extern const char *Hlp_MESSAGES_Email;
|
||||||
extern const char *Txt_Email;
|
extern const char *Txt_Email;
|
||||||
extern const char *Txt_View_email_addresses;
|
extern const char *Txt_View_email_addresses;
|
||||||
|
|
||||||
if (Args)
|
/***** List users to select some of them *****/
|
||||||
/***** List users to select some of them *****/
|
Usr_PutFormToSelectUsrsToGoToAct (&Gbl.Usrs.Selected,
|
||||||
Usr_PutFormToSelectUsrsToGoToAct (&Gbl.Usrs.Selected,
|
ActMaiUsr,
|
||||||
ActMaiUsr,
|
NULL,NULL,
|
||||||
NULL,NULL,
|
Txt_Email,
|
||||||
Txt_Email,
|
Hlp_MESSAGES_Email,
|
||||||
Hlp_MESSAGES_Email,
|
Txt_View_email_addresses,
|
||||||
Txt_View_email_addresses,
|
false); // Do not put form with date range
|
||||||
false); // Do not put form with date range
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -892,8 +896,8 @@ void Mai_ReqUsrsToListEmails (void *Args)
|
||||||
void Mai_GetSelectedUsrsAndListEmails (void)
|
void Mai_GetSelectedUsrsAndListEmails (void)
|
||||||
{
|
{
|
||||||
Usr_GetSelectedUsrsAndGoToAct (&Gbl.Usrs.Selected,
|
Usr_GetSelectedUsrsAndGoToAct (&Gbl.Usrs.Selected,
|
||||||
Mai_ListEmails,&Gbl, // when user(s) selected
|
Mai_ListEmails,NULL, // when user(s) selected
|
||||||
Mai_ReqUsrsToListEmails,&Gbl); // when no user selected
|
Mai_PutFormToSelectUsrsToListEmails,NULL); // when no user selected
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -902,7 +906,7 @@ void Mai_GetSelectedUsrsAndListEmails (void)
|
||||||
|
|
||||||
#define Mai_MAX_BYTES_STR_ADDR (256 * 1024 - 1)
|
#define Mai_MAX_BYTES_STR_ADDR (256 * 1024 - 1)
|
||||||
|
|
||||||
static void Mai_ListEmails (void *Args)
|
static void Mai_ListEmails (__attribute__((unused)) void *Args)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_MESSAGES_Email;
|
extern const char *Hlp_MESSAGES_Email;
|
||||||
extern const char *The_ClassFormOutBoxBold[The_NUM_THEMES];
|
extern const char *The_ClassFormOutBoxBold[The_NUM_THEMES];
|
||||||
|
@ -917,9 +921,6 @@ static void Mai_ListEmails (void *Args)
|
||||||
struct UsrData UsrDat;
|
struct UsrData UsrDat;
|
||||||
const char *Ptr;
|
const char *Ptr;
|
||||||
|
|
||||||
if (!Args)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/***** Start the box used to list the emails *****/
|
/***** Start the box used to list the emails *****/
|
||||||
Box_BoxBegin (NULL,Txt_Email_addresses,
|
Box_BoxBegin (NULL,Txt_Email_addresses,
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
|
|
|
@ -72,7 +72,7 @@ void Mai_RenameMailDomainFull (void);
|
||||||
void Mai_ContEditAfterChgMai (void);
|
void Mai_ContEditAfterChgMai (void);
|
||||||
void Mai_RecFormNewMailDomain (void);
|
void Mai_RecFormNewMailDomain (void);
|
||||||
|
|
||||||
void Mai_ReqUsrsToListEmails (void *Args);
|
void Mai_ReqUsrsToListEmails (void);
|
||||||
void Mai_GetSelectedUsrsAndListEmails (void);
|
void Mai_GetSelectedUsrsAndListEmails (void);
|
||||||
|
|
||||||
bool Mai_CheckIfEmailIsValid (const char *Email);
|
bool Mai_CheckIfEmailIsValid (const char *Email);
|
||||||
|
|
|
@ -98,8 +98,8 @@ static unsigned long Msg_GetSentOrReceivedMsgs (long UsrCod,
|
||||||
|
|
||||||
static void Msg_SetNumMsgsStr (char **NumMsgsStr,unsigned NumUnreadMsgs);
|
static void Msg_SetNumMsgsStr (char **NumMsgsStr,unsigned NumUnreadMsgs);
|
||||||
|
|
||||||
static void Msg_PutIconsListMsgs (void *Args);
|
static void Msg_PutIconsListMsgs (void *Messages);
|
||||||
static void Msg_PutHiddenParamsOneMsg (void *Args);
|
static void Msg_PutHiddenParamsOneMsg (void *Messages);
|
||||||
|
|
||||||
static void Msg_ShowFormToShowOnlyUnreadMessages (void);
|
static void Msg_ShowFormToShowOnlyUnreadMessages (void);
|
||||||
static void Msg_GetParamOnlyUnreadMsgs (void);
|
static void Msg_GetParamOnlyUnreadMsgs (void);
|
||||||
|
@ -109,7 +109,7 @@ static void Msg_GetStatusOfReceivedMsg (long MsgCod,bool *Open,bool *Replied,boo
|
||||||
static long Msg_GetParamMsgCod (void);
|
static long Msg_GetParamMsgCod (void);
|
||||||
static void Msg_PutLinkToShowMorePotentialRecipients (void);
|
static void Msg_PutLinkToShowMorePotentialRecipients (void);
|
||||||
static void Msg_PutParamsShowMorePotentialRecipients (void);
|
static void Msg_PutParamsShowMorePotentialRecipients (void);
|
||||||
static void Msg_PutParamsWriteMsg (void *Args);
|
static void Msg_PutParamsWriteMsg (void *Messages);
|
||||||
static void Msg_ShowOneUniqueRecipient (void);
|
static void Msg_ShowOneUniqueRecipient (void);
|
||||||
static void Msg_WriteFormUsrsIDsOrNicksOtherRecipients (void);
|
static void Msg_WriteFormUsrsIDsOrNicksOtherRecipients (void);
|
||||||
static void Msg_WriteFormSubjectAndContentMsgToUsrs (char Content[Cns_MAX_BYTES_LONG_TEXT + 1]);
|
static void Msg_WriteFormSubjectAndContentMsgToUsrs (char Content[Cns_MAX_BYTES_LONG_TEXT + 1]);
|
||||||
|
@ -243,7 +243,7 @@ static void Msg_PutFormMsgUsrs (char Content[Cns_MAX_BYTES_LONG_TEXT + 1])
|
||||||
if (GetUsrsInCrs)
|
if (GetUsrsInCrs)
|
||||||
{
|
{
|
||||||
/***** Form to select groups *****/
|
/***** Form to select groups *****/
|
||||||
Grp_ShowFormToSelectSeveralGroups (Msg_PutParamsWriteMsg,&Gbl,
|
Grp_ShowFormToSelectSeveralGroups (Msg_PutParamsWriteMsg,&Gbl.Msg,
|
||||||
Grp_MY_GROUPS);
|
Grp_MY_GROUPS);
|
||||||
|
|
||||||
/***** Start section with user list *****/
|
/***** Start section with user list *****/
|
||||||
|
@ -252,14 +252,14 @@ static void Msg_PutFormMsgUsrs (char Content[Cns_MAX_BYTES_LONG_TEXT + 1])
|
||||||
if (NumUsrsInCrs)
|
if (NumUsrsInCrs)
|
||||||
{
|
{
|
||||||
/***** Form to select type of list used for select several users *****/
|
/***** Form to select type of list used for select several users *****/
|
||||||
Usr_ShowFormsToSelectUsrListType (Msg_PutParamsWriteMsg,&Gbl);
|
Usr_ShowFormsToSelectUsrListType (Msg_PutParamsWriteMsg,&Gbl.Msg);
|
||||||
|
|
||||||
/***** Put link to register students *****/
|
/***** Put link to register students *****/
|
||||||
Enr_CheckStdsAndPutButtonToRegisterStdsInCurrentCrs ();
|
Enr_CheckStdsAndPutButtonToRegisterStdsInCurrentCrs ();
|
||||||
|
|
||||||
/***** Check if it's a big list *****/
|
/***** Check if it's a big list *****/
|
||||||
ShowUsrsInCrs = Usr_GetIfShowBigList (NumUsrsInCrs,
|
ShowUsrsInCrs = Usr_GetIfShowBigList (NumUsrsInCrs,
|
||||||
Msg_PutParamsWriteMsg,&Gbl,
|
Msg_PutParamsWriteMsg,&Gbl.Msg,
|
||||||
"CopyMessageToHiddenFields();");
|
"CopyMessageToHiddenFields();");
|
||||||
|
|
||||||
if (ShowUsrsInCrs)
|
if (ShowUsrsInCrs)
|
||||||
|
@ -399,22 +399,22 @@ static void Msg_PutParamsShowMorePotentialRecipients (void)
|
||||||
/***************** Put parameters when writing a message *********************/
|
/***************** Put parameters when writing a message *********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Msg_PutParamsWriteMsg (void *Args)
|
static void Msg_PutParamsWriteMsg (void *Messages)
|
||||||
{
|
{
|
||||||
if (Args)
|
if (Messages)
|
||||||
{
|
{
|
||||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||||
Msg_PutHiddenParamOtherRecipients ();
|
Msg_PutHiddenParamOtherRecipients ();
|
||||||
Msg_PutHiddenParamsSubjectAndContent ();
|
Msg_PutHiddenParamsSubjectAndContent ();
|
||||||
if (Gbl.Msg.Reply.IsReply)
|
if (((struct Msg_Messages *) Messages)->Reply.IsReply)
|
||||||
{
|
{
|
||||||
Par_PutHiddenParamChar ("IsReply",'Y');
|
Par_PutHiddenParamChar ("IsReply",'Y');
|
||||||
Msg_PutHiddenParamMsgCod (Gbl.Msg.Reply.OriginalMsgCod);
|
Msg_PutHiddenParamMsgCod (((struct Msg_Messages *) Messages)->Reply.OriginalMsgCod);
|
||||||
}
|
}
|
||||||
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
|
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
|
||||||
{
|
{
|
||||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EncryptedUsrCod);
|
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EncryptedUsrCod);
|
||||||
if (Gbl.Msg.ShowOnlyOneRecipient)
|
if (((struct Msg_Messages *) Messages)->ShowOnlyOneRecipient)
|
||||||
Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y');
|
Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -926,7 +926,7 @@ void Msg_ReqDelAllRecMsgs (void)
|
||||||
|
|
||||||
/* End alert */
|
/* End alert */
|
||||||
Ale_ShowAlertAndButton2 (ActDelAllRcvMsg,NULL,NULL,
|
Ale_ShowAlertAndButton2 (ActDelAllRcvMsg,NULL,NULL,
|
||||||
Msg_PutHiddenParamsMsgsFilters,&Gbl,
|
Msg_PutHiddenParamsMsgsFilters,&Gbl.Msg,
|
||||||
Btn_REMOVE_BUTTON,Txt_Delete_messages_received);
|
Btn_REMOVE_BUTTON,Txt_Delete_messages_received);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -965,7 +965,7 @@ void Msg_ReqDelAllSntMsgs (void)
|
||||||
|
|
||||||
/* End alert */
|
/* End alert */
|
||||||
Ale_ShowAlertAndButton2 (ActDelAllSntMsg,NULL,NULL,
|
Ale_ShowAlertAndButton2 (ActDelAllSntMsg,NULL,NULL,
|
||||||
Msg_PutHiddenParamsMsgsFilters,&Gbl,
|
Msg_PutHiddenParamsMsgsFilters,&Gbl.Msg,
|
||||||
Btn_REMOVE_BUTTON,Txt_Delete_messages_sent);
|
Btn_REMOVE_BUTTON,Txt_Delete_messages_sent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1769,7 +1769,7 @@ static void Msg_ShowSentOrReceivedMessages (void)
|
||||||
/***** Begin box with messages *****/
|
/***** Begin box with messages *****/
|
||||||
Msg_SetNumMsgsStr (&NumMsgsStr,NumUnreadMsgs);
|
Msg_SetNumMsgsStr (&NumMsgsStr,NumUnreadMsgs);
|
||||||
Box_BoxBegin ("97%",NumMsgsStr,
|
Box_BoxBegin ("97%",NumMsgsStr,
|
||||||
Msg_PutIconsListMsgs,&Gbl,
|
Msg_PutIconsListMsgs,&Gbl.Msg,
|
||||||
Help[Gbl.Msg.TypeOfMessages],Box_NOT_CLOSABLE);
|
Help[Gbl.Msg.TypeOfMessages],Box_NOT_CLOSABLE);
|
||||||
free (NumMsgsStr);
|
free (NumMsgsStr);
|
||||||
|
|
||||||
|
@ -2518,7 +2518,7 @@ static void Msg_SetNumMsgsStr (char **NumMsgsStr,unsigned NumUnreadMsgs)
|
||||||
/***************** Put contextual icons in list of messages ******************/
|
/***************** Put contextual icons in list of messages ******************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Msg_PutIconsListMsgs (void *Args)
|
static void Msg_PutIconsListMsgs (void *Messages)
|
||||||
{
|
{
|
||||||
static const Act_Action_t ActionReqDelAllMsg[Msg_NUM_TYPES_OF_MSGS] =
|
static const Act_Action_t ActionReqDelAllMsg[Msg_NUM_TYPES_OF_MSGS] =
|
||||||
{
|
{
|
||||||
|
@ -2526,11 +2526,11 @@ static void Msg_PutIconsListMsgs (void *Args)
|
||||||
[Msg_MESSAGES_SENT ] = ActReqDelAllSntMsg,
|
[Msg_MESSAGES_SENT ] = ActReqDelAllSntMsg,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Args)
|
if (Messages)
|
||||||
{
|
{
|
||||||
/***** Put icon to remove messages *****/
|
/***** Put icon to remove messages *****/
|
||||||
Ico_PutContextualIconToRemove (ActionReqDelAllMsg[Gbl.Msg.TypeOfMessages],
|
Ico_PutContextualIconToRemove (ActionReqDelAllMsg[((struct Msg_Messages *) Messages)->TypeOfMessages],
|
||||||
Msg_PutHiddenParamsMsgsFilters,&Gbl);
|
Msg_PutHiddenParamsMsgsFilters,Messages);
|
||||||
|
|
||||||
/***** Put icon to show a figure *****/
|
/***** Put icon to show a figure *****/
|
||||||
Fig_PutIconToShowFigure (Fig_MESSAGES);
|
Fig_PutIconToShowFigure (Fig_MESSAGES);
|
||||||
|
@ -2541,14 +2541,14 @@ static void Msg_PutIconsListMsgs (void *Args)
|
||||||
/******* Put hidden parameters to expand, contract or delete a message *******/
|
/******* Put hidden parameters to expand, contract or delete a message *******/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Msg_PutHiddenParamsOneMsg (void *Args)
|
static void Msg_PutHiddenParamsOneMsg (void *Messages)
|
||||||
{
|
{
|
||||||
if (Args)
|
if (Messages)
|
||||||
{
|
{
|
||||||
Pag_PutHiddenParamPagNum (Msg_WhatPaginate[Gbl.Msg.TypeOfMessages],
|
Pag_PutHiddenParamPagNum (Msg_WhatPaginate[((struct Msg_Messages *) Messages)->TypeOfMessages],
|
||||||
Gbl.Msg.CurrentPage);
|
((struct Msg_Messages *) Messages)->CurrentPage);
|
||||||
Msg_PutHiddenParamMsgCod (Gbl.Msg.MsgCod);
|
Msg_PutHiddenParamMsgCod (((struct Msg_Messages *) Messages)->MsgCod);
|
||||||
Msg_PutHiddenParamsMsgsFilters (&Gbl);
|
Msg_PutHiddenParamsMsgsFilters (Messages);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2556,17 +2556,17 @@ static void Msg_PutHiddenParamsOneMsg (void *Args)
|
||||||
/****************** Put hidden parameters with filters ***********************/
|
/****************** Put hidden parameters with filters ***********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Msg_PutHiddenParamsMsgsFilters (void *Args)
|
void Msg_PutHiddenParamsMsgsFilters (void *Messages)
|
||||||
{
|
{
|
||||||
if (Args)
|
if (Messages)
|
||||||
{
|
{
|
||||||
if (Gbl.Msg.FilterCrsCod >= 0)
|
if (((struct Msg_Messages *) Messages)->FilterCrsCod >= 0)
|
||||||
Par_PutHiddenParamLong (NULL,"FilterCrsCod",Gbl.Msg.FilterCrsCod);
|
Par_PutHiddenParamLong (NULL,"FilterCrsCod",((struct Msg_Messages *) Messages)->FilterCrsCod);
|
||||||
if (Gbl.Msg.FilterFromTo[0])
|
if (((struct Msg_Messages *) Messages)->FilterFromTo[0])
|
||||||
Par_PutHiddenParamString (NULL,"FilterFromTo",Gbl.Msg.FilterFromTo);
|
Par_PutHiddenParamString (NULL,"FilterFromTo",((struct Msg_Messages *) Messages)->FilterFromTo);
|
||||||
if (Gbl.Msg.FilterContent[0])
|
if (((struct Msg_Messages *) Messages)->FilterContent[0])
|
||||||
Par_PutHiddenParamString (NULL,"FilterContent",Gbl.Msg.FilterContent);
|
Par_PutHiddenParamString (NULL,"FilterContent",((struct Msg_Messages *) Messages)->FilterContent);
|
||||||
if (Gbl.Msg.ShowOnlyUnreadMsgs)
|
if (((struct Msg_Messages *) Messages)->ShowOnlyUnreadMsgs)
|
||||||
Par_PutHiddenParamChar ("OnlyUnreadMsgs",'Y');
|
Par_PutHiddenParamChar ("OnlyUnreadMsgs",'Y');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3008,7 +3008,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
|
||||||
HTM_BR ();
|
HTM_BR ();
|
||||||
Gbl.Msg.MsgCod = MsgCod; // Message to be deleted
|
Gbl.Msg.MsgCod = MsgCod; // Message to be deleted
|
||||||
Ico_PutContextualIconToRemove (ActionDelMsg[Gbl.Msg.TypeOfMessages],
|
Ico_PutContextualIconToRemove (ActionDelMsg[Gbl.Msg.TypeOfMessages],
|
||||||
Msg_PutHiddenParamsOneMsg,&Gbl);
|
Msg_PutHiddenParamsOneMsg,&Gbl.Msg);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Write message number *****/
|
/***** Write message number *****/
|
||||||
|
@ -3195,7 +3195,7 @@ static void Msg_WriteSentOrReceivedMsgSubject (long MsgCod,const char *Subject,b
|
||||||
(Expanded ? ActConSntMsg :
|
(Expanded ? ActConSntMsg :
|
||||||
ActExpSntMsg));
|
ActExpSntMsg));
|
||||||
Gbl.Msg.MsgCod = MsgCod; // Message to be contracted/expanded
|
Gbl.Msg.MsgCod = MsgCod; // Message to be contracted/expanded
|
||||||
Msg_PutHiddenParamsOneMsg (&Gbl);
|
Msg_PutHiddenParamsOneMsg (&Gbl.Msg);
|
||||||
HTM_BUTTON_SUBMIT_Begin (Expanded ? Txt_Hide_message :
|
HTM_BUTTON_SUBMIT_Begin (Expanded ? Txt_Hide_message :
|
||||||
Txt_See_message,
|
Txt_See_message,
|
||||||
Open ? "BT_LINK LT MSG_TIT" :
|
Open ? "BT_LINK LT MSG_TIT" :
|
||||||
|
@ -3603,7 +3603,7 @@ static void Msg_WriteMsgTo (long MsgCod)
|
||||||
HTM_TD_Begin ("colspan=\"3\" class=\"AUTHOR_TXT LM\"");
|
HTM_TD_Begin ("colspan=\"3\" class=\"AUTHOR_TXT LM\"");
|
||||||
Frm_StartForm (ActionSee[Gbl.Msg.TypeOfMessages]);
|
Frm_StartForm (ActionSee[Gbl.Msg.TypeOfMessages]);
|
||||||
Gbl.Msg.MsgCod = MsgCod; // Message to be expanded with all recipients visible
|
Gbl.Msg.MsgCod = MsgCod; // Message to be expanded with all recipients visible
|
||||||
Msg_PutHiddenParamsOneMsg (&Gbl);
|
Msg_PutHiddenParamsOneMsg (&Gbl.Msg);
|
||||||
Par_PutHiddenParamChar ("SeeAllRcpts",'Y');
|
Par_PutHiddenParamChar ("SeeAllRcpts",'Y');
|
||||||
HTM_BUTTON_SUBMIT_Begin (Txt_View_all_recipients,"BT_LINK AUTHOR_TXT",NULL);
|
HTM_BUTTON_SUBMIT_Begin (Txt_View_all_recipients,"BT_LINK AUTHOR_TXT",NULL);
|
||||||
HTM_TxtF (Txt_and_X_other_recipients,
|
HTM_TxtF (Txt_and_X_other_recipients,
|
||||||
|
@ -3703,7 +3703,7 @@ static void Msg_PutFormToBanSender (struct UsrData *UsrDat)
|
||||||
Pag_PutHiddenParamPagNum (Msg_WhatPaginate[Gbl.Msg.TypeOfMessages],
|
Pag_PutHiddenParamPagNum (Msg_WhatPaginate[Gbl.Msg.TypeOfMessages],
|
||||||
Gbl.Msg.CurrentPage);
|
Gbl.Msg.CurrentPage);
|
||||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||||
Msg_PutHiddenParamsMsgsFilters (&Gbl);
|
Msg_PutHiddenParamsMsgsFilters (&Gbl.Msg);
|
||||||
Ico_PutIconLink ("unlock.svg",Txt_Sender_permitted_click_to_ban_him);
|
Ico_PutIconLink ("unlock.svg",Txt_Sender_permitted_click_to_ban_him);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
|
@ -3720,7 +3720,7 @@ static void Msg_PutFormToUnbanSender (struct UsrData *UsrDat)
|
||||||
Pag_PutHiddenParamPagNum (Msg_WhatPaginate[Gbl.Msg.TypeOfMessages],
|
Pag_PutHiddenParamPagNum (Msg_WhatPaginate[Gbl.Msg.TypeOfMessages],
|
||||||
Gbl.Msg.CurrentPage);
|
Gbl.Msg.CurrentPage);
|
||||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||||
Msg_PutHiddenParamsMsgsFilters (&Gbl);
|
Msg_PutHiddenParamsMsgsFilters (&Gbl.Msg);
|
||||||
Ico_PutIconLink ("lock.svg",Txt_Sender_banned_click_to_unban_him);
|
Ico_PutIconLink ("lock.svg",Txt_Sender_banned_click_to_unban_him);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,35 @@ typedef enum
|
||||||
Msg_STATUS_NOTIFIED,
|
Msg_STATUS_NOTIFIED,
|
||||||
} Msg_Status_t;
|
} Msg_Status_t;
|
||||||
|
|
||||||
|
struct Msg_Messages
|
||||||
|
{
|
||||||
|
Msg_TypeOfMessages_t TypeOfMessages;
|
||||||
|
unsigned NumMsgs;
|
||||||
|
int MsgId;
|
||||||
|
char Subject[Cns_MAX_BYTES_SUBJECT + 1];
|
||||||
|
unsigned NumCourses;
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
long CrsCod;
|
||||||
|
char ShrtName[Hie_MAX_BYTES_SHRT_NAME + 1];
|
||||||
|
} Courses[Crs_MAX_COURSES_PER_USR]; // Distinct courses in my messages sent or received
|
||||||
|
long FilterCrsCod; // Show only messages sent from this course code
|
||||||
|
char FilterCrsShrtName[Hie_MAX_BYTES_SHRT_NAME + 1];
|
||||||
|
char FilterFromTo[Usr_MAX_BYTES_FULL_NAME + 1]; // Show only messages from/to these users
|
||||||
|
char FilterContent[Msg_MAX_BYTES_FILTER_CONTENT + 1]; // Show only messages that match this content
|
||||||
|
bool ShowOnlyUnreadMsgs; // Show only unread messages (this option is applicable only for received messages)
|
||||||
|
long ExpandedMsgCod; // The current expanded message code
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
bool IsReply; // Is the message I am editing a reply?
|
||||||
|
long OriginalMsgCod; // Original message code when I am editing a reply
|
||||||
|
} Reply;
|
||||||
|
bool ShowOnlyOneRecipient; // Shown only a selected recipient or also other potential recipients?
|
||||||
|
char FileNameMail[PATH_MAX + 1];
|
||||||
|
FILE *FileMail;
|
||||||
|
unsigned CurrentPage;
|
||||||
|
long MsgCod; // Used as parameter with message to be removed
|
||||||
|
};
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************************** Public prototypes ****************************/
|
/****************************** Public prototypes ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -90,7 +119,7 @@ unsigned long Msg_GetNumMsgsSentByUsr (long UsrCod);
|
||||||
unsigned Msg_GetNumMsgsSent (Hie_Level_t Scope,Msg_Status_t MsgStatus);
|
unsigned Msg_GetNumMsgsSent (Hie_Level_t Scope,Msg_Status_t MsgStatus);
|
||||||
unsigned Msg_GetNumMsgsReceived (Hie_Level_t Scope,Msg_Status_t MsgStatus);
|
unsigned Msg_GetNumMsgsReceived (Hie_Level_t Scope,Msg_Status_t MsgStatus);
|
||||||
|
|
||||||
void Msg_PutHiddenParamsMsgsFilters (void *Args);
|
void Msg_PutHiddenParamsMsgsFilters (void *Messages);
|
||||||
void Msg_GetDistinctCoursesInMyMessages (void);
|
void Msg_GetDistinctCoursesInMyMessages (void);
|
||||||
void Msg_ShowFormSelectCourseSentOrRecMsgs (void);
|
void Msg_ShowFormSelectCourseSentOrRecMsgs (void);
|
||||||
void Msg_ShowFormToFilterMsgs (void);
|
void Msg_ShowFormToFilterMsgs (void);
|
||||||
|
|
|
@ -72,7 +72,7 @@ static const unsigned Not_MaxCharsURLOnScreen[Not_NUM_TYPES_LISTING] =
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static bool Not_CheckIfICanEditNotices (void);
|
static bool Not_CheckIfICanEditNotices (void);
|
||||||
static void Not_PutIconsListNotices (void *Args);
|
static void Not_PutIconsListNotices (__attribute__((unused)) void *Args);
|
||||||
static void Not_PutIconToAddNewNotice (void);
|
static void Not_PutIconToAddNewNotice (void);
|
||||||
static void Not_PutButtonToAddNewNotice (void);
|
static void Not_PutButtonToAddNewNotice (void);
|
||||||
static void Not_GetDataAndShowNotice (long NotCod);
|
static void Not_GetDataAndShowNotice (long NotCod);
|
||||||
|
@ -84,12 +84,9 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
Not_Status_t Status);
|
Not_Status_t Status);
|
||||||
static long Not_InsertNoticeInDB (const char *Content);
|
static long Not_InsertNoticeInDB (const char *Content);
|
||||||
static void Not_UpdateNumUsrsNotifiedByEMailAboutNotice (long NotCod,unsigned NumUsrsToBeNotifiedByEMail);
|
static void Not_UpdateNumUsrsNotifiedByEMailAboutNotice (long NotCod,unsigned NumUsrsToBeNotifiedByEMail);
|
||||||
static void Not_PutParams (void *Args);
|
static void Not_PutParams (void *NotCod);
|
||||||
static long Not_GetParamNotCod (void);
|
static long Not_GetParamNotCod (void);
|
||||||
|
|
||||||
static void Not_SetNotCodToEdit (long NotCod);
|
|
||||||
static long Not_GetNotCodToEdit (void);
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************************** Write a new notice ****************************/
|
/***************************** Write a new notice ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -303,9 +300,8 @@ void Not_RequestRemNotice (void)
|
||||||
Not_GetDataAndShowNotice (NotCod);
|
Not_GetDataAndShowNotice (NotCod);
|
||||||
|
|
||||||
/* End alert */
|
/* End alert */
|
||||||
Not_SetNotCodToEdit (NotCod); // To be used as parameter
|
|
||||||
Ale_ShowAlertAndButton2 (ActRemNot,NULL,NULL,
|
Ale_ShowAlertAndButton2 (ActRemNot,NULL,NULL,
|
||||||
Not_PutParams,&Gbl,
|
Not_PutParams,&NotCod,
|
||||||
Btn_REMOVE_BUTTON,Txt_Remove);
|
Btn_REMOVE_BUTTON,Txt_Remove);
|
||||||
|
|
||||||
/***** Show all notices *****/
|
/***** Show all notices *****/
|
||||||
|
@ -414,7 +410,7 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing,long HighlightNotCod)
|
||||||
"%upx",
|
"%upx",
|
||||||
Not_ContainerWidth[Not_LIST_FULL_NOTICES] + 50);
|
Not_ContainerWidth[Not_LIST_FULL_NOTICES] + 50);
|
||||||
Box_BoxBegin (StrWidth,Txt_Notices,
|
Box_BoxBegin (StrWidth,Txt_Notices,
|
||||||
Not_PutIconsListNotices,&Gbl,
|
Not_PutIconsListNotices,NULL,
|
||||||
Hlp_MESSAGES_Notices,Box_NOT_CLOSABLE);
|
Hlp_MESSAGES_Notices,Box_NOT_CLOSABLE);
|
||||||
if (!NumNotices)
|
if (!NumNotices)
|
||||||
Ale_ShowAlert (Ale_INFO,Txt_No_notices);
|
Ale_ShowAlert (Ale_INFO,Txt_No_notices);
|
||||||
|
@ -511,17 +507,14 @@ static bool Not_CheckIfICanEditNotices (void)
|
||||||
/****************** Put contextual icons in list of notices ******************/
|
/****************** Put contextual icons in list of notices ******************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Not_PutIconsListNotices (void *Args)
|
static void Not_PutIconsListNotices (__attribute__((unused)) void *Args)
|
||||||
{
|
{
|
||||||
if (Args)
|
/***** Put icon to add a new notice *****/
|
||||||
{
|
if (Not_CheckIfICanEditNotices ())
|
||||||
/***** Put icon to add a new notice *****/
|
Not_PutIconToAddNewNotice ();
|
||||||
if (Not_CheckIfICanEditNotices ())
|
|
||||||
Not_PutIconToAddNewNotice ();
|
|
||||||
|
|
||||||
/***** Put icon to show a figure *****/
|
/***** Put icon to show a figure *****/
|
||||||
Fig_PutIconToShowFigure (Fig_NOTICES);
|
Fig_PutIconToShowFigure (Fig_NOTICES);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -667,22 +660,20 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
if (TypeNoticesListing == Not_LIST_FULL_NOTICES)
|
if (TypeNoticesListing == Not_LIST_FULL_NOTICES)
|
||||||
if (Not_CheckIfICanEditNotices ())
|
if (Not_CheckIfICanEditNotices ())
|
||||||
{
|
{
|
||||||
Not_SetNotCodToEdit (NotCod); // To be used as parameter
|
|
||||||
|
|
||||||
/***** Put form to remove announcement *****/
|
/***** Put form to remove announcement *****/
|
||||||
Ico_PutContextualIconToRemove (ActReqRemNot,
|
Ico_PutContextualIconToRemove (ActReqRemNot,
|
||||||
Not_PutParams,&Gbl);
|
Not_PutParams,&NotCod);
|
||||||
|
|
||||||
/***** Put form to change the status of the notice *****/
|
/***** Put form to change the status of the notice *****/
|
||||||
switch (Status)
|
switch (Status)
|
||||||
{
|
{
|
||||||
case Not_ACTIVE_NOTICE:
|
case Not_ACTIVE_NOTICE:
|
||||||
Ico_PutContextualIconToHide (ActHidNot,NULL,
|
Ico_PutContextualIconToHide (ActHidNot,NULL,
|
||||||
Not_PutParams,&Gbl);
|
Not_PutParams,&NotCod);
|
||||||
break;
|
break;
|
||||||
case Not_OBSOLETE_NOTICE:
|
case Not_OBSOLETE_NOTICE:
|
||||||
Ico_PutContextualIconToUnhide (ActRevNot,NULL,
|
Ico_PutContextualIconToUnhide (ActRevNot,NULL,
|
||||||
Not_PutParams,&Gbl);
|
Not_PutParams,&NotCod);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -722,9 +713,8 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
|
|
||||||
/* Put form to view full notice */
|
/* Put form to view full notice */
|
||||||
HTM_DIV_Begin ("class=\"CM\"");
|
HTM_DIV_Begin ("class=\"CM\"");
|
||||||
Not_SetNotCodToEdit (NotCod); // To be used as parameter
|
|
||||||
Lay_PutContextualLinkOnlyIcon (ActSeeOneNot,Anchor,
|
Lay_PutContextualLinkOnlyIcon (ActSeeOneNot,Anchor,
|
||||||
Not_PutParams,&Gbl,
|
Not_PutParams,&NotCod,
|
||||||
"ellipsis-h.svg",
|
"ellipsis-h.svg",
|
||||||
Txt_See_full_notice);
|
Txt_See_full_notice);
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
@ -1006,10 +996,10 @@ unsigned Not_GetNumNoticesDeleted (Hie_Level_t Scope,unsigned *NumNotif)
|
||||||
/*************** Put parameter with the code of a notice *********************/
|
/*************** Put parameter with the code of a notice *********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Not_PutParams (void *Args)
|
static void Not_PutParams (void *NotCod)
|
||||||
{
|
{
|
||||||
if (Args)
|
if (NotCod)
|
||||||
Not_PutHiddenParamNotCod (Not_GetNotCodToEdit ());
|
Not_PutHiddenParamNotCod (*((long *) NotCod));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1030,17 +1020,3 @@ static long Not_GetParamNotCod (void)
|
||||||
/***** Get notice code *****/
|
/***** Get notice code *****/
|
||||||
return Par_GetParToLong ("NotCod");
|
return Par_GetParToLong ("NotCod");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/********** Set/get code of a notice to be removed/enable/disable ************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
static void Not_SetNotCodToEdit (long NotCod)
|
|
||||||
{
|
|
||||||
Gbl.Crs.Notices.NotCod = NotCod;
|
|
||||||
}
|
|
||||||
|
|
||||||
static long Not_GetNotCodToEdit (void)
|
|
||||||
{
|
|
||||||
return Gbl.Crs.Notices.NotCod;
|
|
||||||
}
|
|
||||||
|
|
|
@ -230,12 +230,12 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
case Pag_MESSAGES_RECEIVED:
|
case Pag_MESSAGES_RECEIVED:
|
||||||
Frm_StartFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
|
Frm_StartFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
|
||||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||||
Msg_PutHiddenParamsMsgsFilters (&Gbl);
|
Msg_PutHiddenParamsMsgsFilters (&Gbl.Msg);
|
||||||
break;
|
break;
|
||||||
case Pag_MESSAGES_SENT:
|
case Pag_MESSAGES_SENT:
|
||||||
Frm_StartFormAnchor (ActSeeSntMsg,Pagination->Anchor);
|
Frm_StartFormAnchor (ActSeeSntMsg,Pagination->Anchor);
|
||||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||||
Msg_PutHiddenParamsMsgsFilters (&Gbl);
|
Msg_PutHiddenParamsMsgsFilters (&Gbl.Msg);
|
||||||
break;
|
break;
|
||||||
case Pag_MY_AGENDA:
|
case Pag_MY_AGENDA:
|
||||||
Frm_StartFormAnchor (ActSeeMyAgd,Pagination->Anchor);
|
Frm_StartFormAnchor (ActSeeMyAgd,Pagination->Anchor);
|
||||||
|
@ -348,12 +348,12 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
case Pag_MESSAGES_RECEIVED:
|
case Pag_MESSAGES_RECEIVED:
|
||||||
Frm_StartFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
|
Frm_StartFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
|
||||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||||
Msg_PutHiddenParamsMsgsFilters (&Gbl);
|
Msg_PutHiddenParamsMsgsFilters (&Gbl.Msg);
|
||||||
break;
|
break;
|
||||||
case Pag_MESSAGES_SENT:
|
case Pag_MESSAGES_SENT:
|
||||||
Frm_StartFormAnchor (ActSeeSntMsg,Pagination->Anchor);
|
Frm_StartFormAnchor (ActSeeSntMsg,Pagination->Anchor);
|
||||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||||
Msg_PutHiddenParamsMsgsFilters (&Gbl);
|
Msg_PutHiddenParamsMsgsFilters (&Gbl.Msg);
|
||||||
break;
|
break;
|
||||||
case Pag_MY_AGENDA:
|
case Pag_MY_AGENDA:
|
||||||
Frm_StartFormAnchor (ActSeeMyAgd,Pagination->Anchor);
|
Frm_StartFormAnchor (ActSeeMyAgd,Pagination->Anchor);
|
||||||
|
@ -452,12 +452,12 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
case Pag_MESSAGES_RECEIVED:
|
case Pag_MESSAGES_RECEIVED:
|
||||||
Frm_StartFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
|
Frm_StartFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
|
||||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||||
Msg_PutHiddenParamsMsgsFilters (&Gbl);
|
Msg_PutHiddenParamsMsgsFilters (&Gbl.Msg);
|
||||||
break;
|
break;
|
||||||
case Pag_MESSAGES_SENT:
|
case Pag_MESSAGES_SENT:
|
||||||
Frm_StartFormAnchor (ActSeeSntMsg,Pagination->Anchor);
|
Frm_StartFormAnchor (ActSeeSntMsg,Pagination->Anchor);
|
||||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||||
Msg_PutHiddenParamsMsgsFilters (&Gbl);
|
Msg_PutHiddenParamsMsgsFilters (&Gbl.Msg);
|
||||||
break;
|
break;
|
||||||
case Pag_MY_AGENDA:
|
case Pag_MY_AGENDA:
|
||||||
Frm_StartFormAnchor (ActSeeMyAgd,Pagination->Anchor);
|
Frm_StartFormAnchor (ActSeeMyAgd,Pagination->Anchor);
|
||||||
|
@ -568,12 +568,12 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
case Pag_MESSAGES_RECEIVED:
|
case Pag_MESSAGES_RECEIVED:
|
||||||
Frm_StartFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
|
Frm_StartFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
|
||||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||||
Msg_PutHiddenParamsMsgsFilters (&Gbl);
|
Msg_PutHiddenParamsMsgsFilters (&Gbl.Msg);
|
||||||
break;
|
break;
|
||||||
case Pag_MESSAGES_SENT:
|
case Pag_MESSAGES_SENT:
|
||||||
Frm_StartFormAnchor (ActSeeSntMsg,Pagination->Anchor);
|
Frm_StartFormAnchor (ActSeeSntMsg,Pagination->Anchor);
|
||||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||||
Msg_PutHiddenParamsMsgsFilters (&Gbl);
|
Msg_PutHiddenParamsMsgsFilters (&Gbl.Msg);
|
||||||
break;
|
break;
|
||||||
case Pag_MY_AGENDA:
|
case Pag_MY_AGENDA:
|
||||||
Frm_StartFormAnchor (ActSeeMyAgd,Pagination->Anchor);
|
Frm_StartFormAnchor (ActSeeMyAgd,Pagination->Anchor);
|
||||||
|
@ -671,12 +671,12 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
case Pag_MESSAGES_RECEIVED:
|
case Pag_MESSAGES_RECEIVED:
|
||||||
Frm_StartFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
|
Frm_StartFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
|
||||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||||
Msg_PutHiddenParamsMsgsFilters (&Gbl);
|
Msg_PutHiddenParamsMsgsFilters (&Gbl.Msg);
|
||||||
break;
|
break;
|
||||||
case Pag_MESSAGES_SENT:
|
case Pag_MESSAGES_SENT:
|
||||||
Frm_StartFormAnchor (ActSeeSntMsg,Pagination->Anchor);
|
Frm_StartFormAnchor (ActSeeSntMsg,Pagination->Anchor);
|
||||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||||
Msg_PutHiddenParamsMsgsFilters (&Gbl);
|
Msg_PutHiddenParamsMsgsFilters (&Gbl.Msg);
|
||||||
break;
|
break;
|
||||||
case Pag_MY_AGENDA:
|
case Pag_MY_AGENDA:
|
||||||
Frm_StartFormAnchor (ActSeeMyAgd,Pagination->Anchor);
|
Frm_StartFormAnchor (ActSeeMyAgd,Pagination->Anchor);
|
||||||
|
@ -775,12 +775,12 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
case Pag_MESSAGES_RECEIVED:
|
case Pag_MESSAGES_RECEIVED:
|
||||||
Frm_StartFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
|
Frm_StartFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
|
||||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||||
Msg_PutHiddenParamsMsgsFilters (&Gbl);
|
Msg_PutHiddenParamsMsgsFilters (&Gbl.Msg);
|
||||||
break;
|
break;
|
||||||
case Pag_MESSAGES_SENT:
|
case Pag_MESSAGES_SENT:
|
||||||
Frm_StartFormAnchor (ActSeeSntMsg,Pagination->Anchor);
|
Frm_StartFormAnchor (ActSeeSntMsg,Pagination->Anchor);
|
||||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||||
Msg_PutHiddenParamsMsgsFilters (&Gbl);
|
Msg_PutHiddenParamsMsgsFilters (&Gbl.Msg);
|
||||||
break;
|
break;
|
||||||
case Pag_MY_AGENDA:
|
case Pag_MY_AGENDA:
|
||||||
Frm_StartFormAnchor (ActSeeMyAgd,Pagination->Anchor);
|
Frm_StartFormAnchor (ActSeeMyAgd,Pagination->Anchor);
|
||||||
|
|
Loading…
Reference in New Issue