Version 16.180

This commit is contained in:
Antonio Cañas Vargas 2017-04-17 11:57:55 +02:00
parent 0ccd7b37ad
commit 2cbfa71475
15 changed files with 354 additions and 274 deletions

View File

@ -465,7 +465,9 @@ static void Agd_ShowEvents (Agd_AgendaType_t AgendaType)
/***** Write links to pages *****/
if (Pagination.MoreThanOnePage)
Pag_WriteLinksToPagesCentered (WhatPaginate[AgendaType],0,&Pagination);
Pag_WriteLinksToPagesCentered (WhatPaginate[AgendaType],
0,
&Pagination);
if (Gbl.Agenda.Num)
{
@ -489,7 +491,9 @@ static void Agd_ShowEvents (Agd_AgendaType_t AgendaType)
/***** Write again links to pages *****/
if (Pagination.MoreThanOnePage)
Pag_WriteLinksToPagesCentered (WhatPaginate[AgendaType],0,&Pagination);
Pag_WriteLinksToPagesCentered (WhatPaginate[AgendaType],
0,
&Pagination);
/***** Button to create a new event *****/
if (AgendaType == Agd_MY_AGENDA)

View File

@ -136,7 +136,9 @@ static void Asg_ShowAllAssignments (void)
/***** Write links to pages *****/
if (Pagination.MoreThanOnePage)
Pag_WriteLinksToPagesCentered (Pag_ASSIGNMENTS,0,&Pagination);
Pag_WriteLinksToPagesCentered (Pag_ASSIGNMENTS,
0,
&Pagination);
/***** Start frame *****/
Lay_StartRoundFrame ("100%",Txt_Assignments,
@ -205,7 +207,9 @@ static void Asg_ShowAllAssignments (void)
/***** Write again links to pages *****/
if (Pagination.MoreThanOnePage)
Pag_WriteLinksToPagesCentered (Pag_ASSIGNMENTS,0,&Pagination);
Pag_WriteLinksToPagesCentered (Pag_ASSIGNMENTS,
0,
&Pagination);
/***** Free list of assignments *****/
Asg_FreeListAssignments ();

View File

@ -214,7 +214,9 @@ static void Att_ShowAllAttEvents (void)
/***** Write links to pages *****/
if (Pagination.MoreThanOnePage)
Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS,0,&Pagination);
Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS,
0,
&Pagination);
/***** Start frame *****/
Lay_StartRoundFrame ("100%",Txt_Events,
@ -281,7 +283,9 @@ static void Att_ShowAllAttEvents (void)
/***** Write again links to pages *****/
if (Pagination.MoreThanOnePage)
Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS,0,&Pagination);
Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS,
0,
&Pagination);
/***** Free list of attendance events *****/
Att_FreeListAttEvents ();

View File

@ -214,16 +214,17 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.179 (2017-04-16)"
#define Log_PLATFORM_VERSION "SWAD 16.180 (2017-04-17)"
#define CSS_FILE "swad16.177.css"
#define JS_FILE "swad16.144.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 16.179: Apr 16, 2017 Code refactoring in forums (217444 lines)
Version 16.178.1: Apr 16, 2017 Code refactoring in forums (217601 lines)
Version 16.178: Apr 16, 2017 Code refactoring in forums (217595 lines)
Version 16.180: Apr 17, 2017 Code refactoring in forums. (217521 lines)
Version 16.179: Apr 16, 2017 Code refactoring in forums. (217444 lines)
Version 16.178.1: Apr 16, 2017 Code refactoring in forums. (217601 lines)
Version 16.178: Apr 16, 2017 Code refactoring in forums. (217595 lines)
Version 16.177.4: Apr 14, 2017 Changes in layout of forums. (217611 lines)
Version 16.177.3: Apr 14, 2017 Highlight current thread in forums. (217609 lines)
Version 16.177.2: Apr 14, 2017 Code refactoring in forums. (217604 lines)

File diff suppressed because it is too large Load Diff

View File

@ -44,7 +44,7 @@ typedef enum
{
For_ONLY_CURRENT_FORUMS = 0,
For_ALL_MY_FORUMS = 1,
} For_WhichForums_t; // Which forums I want to see: all my forums or only the forums of current institution/degree/course.
} For_ForumSet_t; // Which set of forums I want to see: all my forums or only the forums of current institution/degree/course.
#define For_DEFAULT_WHICH_FORUMS For_ONLY_CURRENT_FORUMS
#define For_NUM_TYPES_FORUM 12
@ -64,6 +64,12 @@ typedef enum
For_FORUM_SWAD_TCHS = 11,
} For_ForumType_t; // Don't change numbers (used in database)
struct Forum
{
For_ForumType_t Type;
long Location; // Code of institution, centre, degree or course
};
struct ForumThread
{
long ThrCod;
@ -96,8 +102,7 @@ typedef enum
void For_EnbPst (void);
void For_DisPst (void);
void For_GetForumTypeAndLocationOfAPost (long PstCod,
For_ForumType_t *ForumType,long *ForumLocation);
void For_GetForumTypeAndLocationOfAPost (long PstCod,struct Forum *WhichForum);
unsigned long For_GetNumPostsUsr (long UsrCod);
void For_RemoveUsrFromReadThrs (long UsrCod);
@ -108,7 +113,7 @@ void For_GetSummaryAndContentForumPst (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1
void For_PutAllHiddenParamsForum (void);
void For_SetForumName (For_ForumType_t ForumType,long ForumLocation,
void For_SetForumName (struct Forum *WhichForum,
char ForumName[For_MAX_BYTES_FORUM_NAME + 1],
Txt_Language_t Language,bool UseHTMLEntities);

View File

@ -406,9 +406,9 @@ void Gbl_InitializeGlobals (void)
Gbl.Social.WhichUsrs = Soc_DEFAULT_WHICH_USRS;
/* Forums */
Gbl.Forum.WhichForums = For_DEFAULT_WHICH_FORUMS;
Gbl.Forum.Type = (For_ForumType_t) 0;
Gbl.Forum.Location = -1L;
Gbl.Forum.ForumSet = For_DEFAULT_WHICH_FORUMS;
Gbl.Forum.WhichForum.Type = (For_ForumType_t) 0;
Gbl.Forum.WhichForum.Location = -1L;
Gbl.Forum.SelectedOrder = For_DEFAULT_ORDER;
Gbl.Forum.ThreadToMove = -1L;
// Gbl.Forum.CurrentPageThrs = 1; // TODO: Remove this line

View File

@ -581,9 +581,8 @@ struct Globals
} Social;
struct
{
For_WhichForums_t WhichForums;
For_ForumType_t Type;
long Location; // Institution, centre, degree or course code of the selected forum
For_ForumSet_t ForumSet;
struct Forum WhichForum; // Forum type and location
int Level;
For_Order_t SelectedOrder;
char PathRelOld[PATH_MAX + 1];

View File

@ -1809,7 +1809,8 @@ static void Msg_ShowSentOrReceivedMessages (void)
/***** Write links to pages *****/
if (Pagination.MoreThanOnePage)
Pag_WriteLinksToPagesCentered (WhatPaginate[Gbl.Msg.TypeOfMessages],
0,&Pagination);
0,
&Pagination);
/***** Show received / sent messages in this page *****/
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_2\""
@ -1833,7 +1834,8 @@ static void Msg_ShowSentOrReceivedMessages (void)
/***** Write again links to pages *****/
if (Pagination.MoreThanOnePage)
Pag_WriteLinksToPagesCentered (WhatPaginate[Gbl.Msg.TypeOfMessages],
0,&Pagination);
0,
&Pagination);
}
/***** End frame *****/

View File

@ -450,9 +450,9 @@ void Ntf_ShowMyNotifications (void)
if (NotifyEvent == Ntf_EVENT_FORUM_POST_COURSE ||
NotifyEvent == Ntf_EVENT_FORUM_REPLY)
{
For_GetForumTypeAndLocationOfAPost (Cod,&Gbl.Forum.Type,&Gbl.Forum.Location);
For_SetForumName (Gbl.Forum.Type,Gbl.Forum.Location,
ForumName,Gbl.Prefs.Language,false); // Set forum name in recipient's language
For_GetForumTypeAndLocationOfAPost (Cod,&Gbl.Forum.WhichForum);
For_SetForumName (&Gbl.Forum.WhichForum,
ForumName,Gbl.Prefs.Language,false); // Set forum name in recipient's language
}
/* Get time of the event (row[7]) */
@ -763,7 +763,7 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
break;
case Ntf_EVENT_FORUM_POST_COURSE:
case Ntf_EVENT_FORUM_REPLY:
Act_FormStart (For_ActionsSeeFor[Gbl.Forum.Type]);
Act_FormStart (For_ActionsSeeFor[Gbl.Forum.WhichForum.Type]);
For_PutAllHiddenParamsForum ();
break;
case Ntf_EVENT_NOTICE:
@ -1170,8 +1170,7 @@ unsigned Ntf_StoreNotifyEventsToAllUsrs (Ntf_NotifyEvent_t NotifyEvent,long Cod)
unsigned long NumRow;
unsigned long NumRows;
struct UsrData UsrDat;
For_ForumType_t ForumType;
long ForumLocation;
struct Forum WhichForum;
unsigned NumUsrsToBeNotifiedByEMail = 0;
unsigned NotifyEventMask = (1 << NotifyEvent);
@ -1302,8 +1301,8 @@ unsigned Ntf_StoreNotifyEventsToAllUsrs (Ntf_NotifyEvent_t NotifyEvent,long Cod)
return 0;
case Ntf_EVENT_FORUM_POST_COURSE:
// Check if forum is for users or for all users in the course
For_GetForumTypeAndLocationOfAPost (Cod,&ForumType,&ForumLocation);
switch (ForumType)
For_GetForumTypeAndLocationOfAPost (Cod,&WhichForum);
switch (WhichForum.Type)
{
case For_FORUM_COURSE_USRS:
sprintf (Query,"SELECT UsrCod FROM crs_usr"
@ -1421,23 +1420,23 @@ void Ntf_StoreNotifyEventToOneUser (Ntf_NotifyEvent_t NotifyEvent,
NotifyEvent == Ntf_EVENT_FORUM_REPLY)
{
InsCod = CtrCod = DegCod = CrsCod = -1L;
switch (Gbl.Forum.Type)
switch (Gbl.Forum.WhichForum.Type)
{
case For_FORUM_INSTIT_USRS:
case For_FORUM_INSTIT_TCHS:
InsCod = Gbl.Forum.Location;
InsCod = Gbl.Forum.WhichForum.Location;
break;
case For_FORUM_CENTRE_USRS:
case For_FORUM_CENTRE_TCHS:
CtrCod = Gbl.Forum.Location;
CtrCod = Gbl.Forum.WhichForum.Location;
break;
case For_FORUM_DEGREE_USRS:
case For_FORUM_DEGREE_TCHS:
DegCod = Gbl.Forum.Location;
DegCod = Gbl.Forum.WhichForum.Location;
break;
case For_FORUM_COURSE_USRS:
case For_FORUM_COURSE_TCHS:
CrsCod = Gbl.Forum.Location;
CrsCod = Gbl.Forum.WhichForum.Location;
break;
default:
break;
@ -1572,8 +1571,7 @@ static void Ntf_SendPendingNotifByEMailToOneUsr (struct UsrData *ToUsrDat,unsign
struct Degree Deg;
struct Course Crs;
long Cod;
For_ForumType_t ForumType = (For_ForumType_t) 0; // Initialized to avoid warning
long ForumLocation = -1L; // Initialized to avoid warning
struct Forum WhichForum;
char ForumName[For_MAX_BYTES_FORUM_NAME + 1];
char Command[2048]; // Command to execute for sending an email
int ReturnCode;
@ -1652,7 +1650,7 @@ static void Ntf_SendPendingNotifByEMailToOneUsr (struct UsrData *ToUsrDat,unsign
/* Get forum type */
if (NotifyEvent == Ntf_EVENT_FORUM_POST_COURSE ||
NotifyEvent == Ntf_EVENT_FORUM_REPLY)
For_GetForumTypeAndLocationOfAPost (Cod,&ForumType,&ForumLocation);
For_GetForumTypeAndLocationOfAPost (Cod,&WhichForum);
/* Information about the type of this event */
fprintf (Gbl.Msg.FileMail,Txt_NOTIFY_EVENTS_SINGULAR_NO_HTML[NotifyEvent][ToUsrLanguage],
@ -1688,7 +1686,7 @@ static void Ntf_SendPendingNotifByEMailToOneUsr (struct UsrData *ToUsrDat,unsign
break;
case Ntf_EVENT_FORUM_POST_COURSE:
case Ntf_EVENT_FORUM_REPLY:
For_SetForumName (ForumType,ForumLocation,
For_SetForumName (&WhichForum,
ForumName,ToUsrLanguage,false); // Set forum name in recipient's language
fprintf (Gbl.Msg.FileMail,"%s: %s\n",
Txt_Forum_NO_HTML[ToUsrLanguage],

View File

@ -114,10 +114,14 @@ void Pag_CalculatePagination (struct Pagination *Pagination)
/************** Show enlaces a distintas páginas of messages *****************/
/*****************************************************************************/
void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate,long ThrCod,struct Pagination *Pagination)
void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate,
long ThrCod,
struct Pagination *Pagination)
{
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">");
Pag_WriteLinksToPages (WhatPaginate,ThrCod,Pagination,true,NULL,"TIT",false);
Pag_WriteLinksToPages (WhatPaginate,
ThrCod,
Pagination,true,NULL,"TIT",false);
fprintf (Gbl.F.Out,"</div>");
}
@ -125,7 +129,9 @@ void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate,long ThrCod,
/********************** Show links to pages of messages **********************/
/*****************************************************************************/
void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,long ThrCod,struct Pagination *Pagination,
void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
long ThrCod,
struct Pagination *Pagination,
bool FirstMsgEnabled,const char *Subject,const char *Font,
bool LinkToPagCurrent)
{
@ -154,13 +160,13 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,long ThrCod,struct P
Grp_PutParamWhichGrps ();
break;
case Pag_THREADS_FORUM:
Act_FormStartAnchor (For_ActionsSeeFor[Gbl.Forum.Type],
Act_FormStartAnchor (For_ActionsSeeFor[Gbl.Forum.WhichForum.Type],
Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
For_PutAllHiddenParamsForum ();
break;
case Pag_POSTS_FORUM:
Act_FormStartAnchor (For_ActionsSeePstFor[Gbl.Forum.Type],
Act_FormStartAnchor (For_ActionsSeePstFor[Gbl.Forum.WhichForum.Type],
Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
For_PutHiddenParamThrCod (ThrCod);
@ -247,13 +253,13 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,long ThrCod,struct P
Grp_PutParamWhichGrps ();
break;
case Pag_THREADS_FORUM:
Act_FormStartAnchor (For_ActionsSeeFor[Gbl.Forum.Type],
Act_FormStartAnchor (For_ActionsSeeFor[Gbl.Forum.WhichForum.Type],
Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
For_PutAllHiddenParamsForum ();
break;
case Pag_POSTS_FORUM:
Act_FormStartAnchor (For_ActionsSeePstFor[Gbl.Forum.Type],
Act_FormStartAnchor (For_ActionsSeePstFor[Gbl.Forum.WhichForum.Type],
Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
For_PutHiddenParamThrCod (ThrCod);
@ -323,13 +329,13 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,long ThrCod,struct P
Grp_PutParamWhichGrps ();
break;
case Pag_THREADS_FORUM:
Act_FormStartAnchor (For_ActionsSeeFor[Gbl.Forum.Type],
Act_FormStartAnchor (For_ActionsSeeFor[Gbl.Forum.WhichForum.Type],
Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
For_PutAllHiddenParamsForum ();
break;
case Pag_POSTS_FORUM:
Act_FormStartAnchor (For_ActionsSeePstFor[Gbl.Forum.Type],
Act_FormStartAnchor (For_ActionsSeePstFor[Gbl.Forum.WhichForum.Type],
Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
For_PutHiddenParamThrCod (ThrCod);
@ -406,13 +412,13 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,long ThrCod,struct P
Grp_PutParamWhichGrps ();
break;
case Pag_THREADS_FORUM:
Act_FormStartAnchor (For_ActionsSeeFor[Gbl.Forum.Type],
Act_FormStartAnchor (For_ActionsSeeFor[Gbl.Forum.WhichForum.Type],
Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
For_PutAllHiddenParamsForum ();
break;
case Pag_POSTS_FORUM:
Act_FormStartAnchor (For_ActionsSeePstFor[Gbl.Forum.Type],
Act_FormStartAnchor (For_ActionsSeePstFor[Gbl.Forum.WhichForum.Type],
Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
For_PutHiddenParamThrCod (ThrCod);
@ -485,13 +491,13 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,long ThrCod,struct P
Grp_PutParamWhichGrps ();
break;
case Pag_THREADS_FORUM:
Act_FormStartAnchor (For_ActionsSeeFor[Gbl.Forum.Type],
Act_FormStartAnchor (For_ActionsSeeFor[Gbl.Forum.WhichForum.Type],
Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
For_PutAllHiddenParamsForum ();
break;
case Pag_POSTS_FORUM:
Act_FormStartAnchor (For_ActionsSeePstFor[Gbl.Forum.Type],
Act_FormStartAnchor (For_ActionsSeePstFor[Gbl.Forum.WhichForum.Type],
Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
For_PutHiddenParamThrCod (ThrCod);
@ -561,13 +567,13 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,long ThrCod,struct P
Grp_PutParamWhichGrps ();
break;
case Pag_THREADS_FORUM:
Act_FormStartAnchor (For_ActionsSeeFor[Gbl.Forum.Type],
Act_FormStartAnchor (For_ActionsSeeFor[Gbl.Forum.WhichForum.Type],
Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
For_PutAllHiddenParamsForum ();
break;
case Pag_POSTS_FORUM:
Act_FormStartAnchor (For_ActionsSeePstFor[Gbl.Forum.Type],
Act_FormStartAnchor (For_ActionsSeePstFor[Gbl.Forum.WhichForum.Type],
Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
For_PutHiddenParamThrCod (ThrCod);

View File

@ -71,9 +71,14 @@ struct Pagination // Used for threads and messages pagination
/*****************************************************************************/
void Pag_CalculatePagination (struct Pagination *Pagination);
void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate,long ThrCod,struct Pagination *Pagination);
void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,long ThrCod,struct Pagination *Pagination,
bool FirstMsgEnabled,const char *Subject,const char *Font,bool LinkToPagCurrent);
void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate,
long ThrCod,
struct Pagination *Pagination);
void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
long ThrCod,
struct Pagination *Pagination,
bool FirstMsgEnabled,const char *Subject,const char *Font,
bool LinkToPagCurrent);
void Pag_PutHiddenParamPagNum (Pag_WhatPaginate_t WhatPaginate,unsigned NumPage);
unsigned Pag_GetParamPagNum (Pag_WhatPaginate_t WhatPaginate);

View File

@ -1375,10 +1375,9 @@ static void Soc_WriteSocialNote (const struct SocialNote *SocNot,
break;
case Soc_NOTE_FORUM_POST:
/* Get forum type of the post */
For_GetForumTypeAndLocationOfAPost (SocNot->Cod,
&Gbl.Forum.Type,&Gbl.Forum.Location);
For_SetForumName (Gbl.Forum.Type,Gbl.Forum.Location,
ForumName,Gbl.Prefs.Language,false); // Set forum name in recipient's language
For_GetForumTypeAndLocationOfAPost (SocNot->Cod,&Gbl.Forum.WhichForum);
For_SetForumName (&Gbl.Forum.WhichForum,
ForumName,Gbl.Prefs.Language,false); // Set forum name in recipient's language
break;
default:
break;
@ -1826,7 +1825,7 @@ static void Soc_PutFormGoToAction (const struct SocialNote *SocNot)
case Soc_NOTE_SOCIAL_POST: // Not applicable
return;
case Soc_NOTE_FORUM_POST:
Act_FormStartUnique (For_ActionsSeeFor[Gbl.Forum.Type]);
Act_FormStartUnique (For_ActionsSeeFor[Gbl.Forum.WhichForum.Type]);
For_PutAllHiddenParamsForum ();
if (SocNot->HieCod != Gbl.CurrentCrs.Crs.CrsCod) // Not the current course
Crs_PutParamCrsCod (SocNot->HieCod); // Go to another course

View File

@ -207,7 +207,9 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst)
/***** Write links to pages *****/
if (Pagination.MoreThanOnePage)
Pag_WriteLinksToPagesCentered (Pag_SURVEYS,0,&Pagination);
Pag_WriteLinksToPagesCentered (Pag_SURVEYS,
0,
&Pagination);
/***** Start frame *****/
Lay_StartRoundFrame ("100%",Txt_Surveys,
@ -275,7 +277,9 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst)
/***** Write again links to pages *****/
if (Pagination.MoreThanOnePage)
Pag_WriteLinksToPagesCentered (Pag_SURVEYS,0,&Pagination);
Pag_WriteLinksToPagesCentered (Pag_SURVEYS,
0,
&Pagination);
/***** Free list of surveys *****/
Svy_FreeListSurveys ();

View File

@ -2813,8 +2813,7 @@ int swad__getNotifications (struct soap *soap,
struct Degree Deg;
struct Course Crs;
long Cod;
For_ForumType_t ForumType;
long ForumLocation;
struct Forum WhichForum;
char ForumName[For_MAX_BYTES_FORUM_NAME + 1];
char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1];
char *ContentStr;
@ -2949,8 +2948,8 @@ int swad__getNotifications (struct soap *soap,
if (NotifyEvent == Ntf_EVENT_FORUM_POST_COURSE ||
NotifyEvent == Ntf_EVENT_FORUM_REPLY)
{
For_GetForumTypeAndLocationOfAPost (Cod,&ForumType,&ForumLocation);
For_SetForumName (ForumType,ForumLocation,
For_GetForumTypeAndLocationOfAPost (Cod,&WhichForum);
For_SetForumName (&WhichForum,
ForumName,Gbl.Prefs.Language,false); // Set forum name in recipient's language
sprintf (getNotificationsOut->notificationsArray.__ptr[NumNotif].location,"%s: %s",
Txt_Forum,ForumName);