Version 21.54.6: Nov 09, 2021 Code refactoring in notifications.

This commit is contained in:
acanas 2021-11-09 10:26:27 +01:00
parent 387244eed4
commit bf6028913d
14 changed files with 112 additions and 127 deletions

View File

@ -522,9 +522,7 @@ static void Asg_ShowOneAssignment (struct Asg_Assignments *Assignments,
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
/***** Mark possible notification as seen *****/ /***** Mark possible notification as seen *****/
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_ASSIGNMENT, Ntf_DB_MarkNotifAsSeenByMe (Ntf_EVENT_ASSIGNMENT,AsgCod);
AsgCod,Gbl.Hierarchy.Crs.CrsCod,
Gbl.Usrs.Me.UsrDat.UsrCod);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -8163,29 +8163,25 @@ void Brw_ShowFileMetadata (void)
case Brw_SHOW_DOC_GRP: case Brw_SHOW_DOC_GRP:
case Brw_ADMI_DOC_CRS: case Brw_ADMI_DOC_CRS:
case Brw_ADMI_DOC_GRP: case Brw_ADMI_DOC_GRP:
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_DOCUMENT_FILE, Ntf_DB_MarkNotifAsSeenByMe (Ntf_EVENT_DOCUMENT_FILE,
FileMetadata.FilCod,Gbl.Hierarchy.Crs.CrsCod, FileMetadata.FilCod);
Gbl.Usrs.Me.UsrDat.UsrCod);
break; break;
case Brw_ADMI_TCH_CRS: case Brw_ADMI_TCH_CRS:
case Brw_ADMI_TCH_GRP: case Brw_ADMI_TCH_GRP:
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_TEACHERS_FILE, Ntf_DB_MarkNotifAsSeenByMe (Ntf_EVENT_TEACHERS_FILE,
FileMetadata.FilCod,Gbl.Hierarchy.Crs.CrsCod, FileMetadata.FilCod);
Gbl.Usrs.Me.UsrDat.UsrCod);
break; break;
case Brw_ADMI_SHR_CRS: case Brw_ADMI_SHR_CRS:
case Brw_ADMI_SHR_GRP: case Brw_ADMI_SHR_GRP:
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_SHARED_FILE, Ntf_DB_MarkNotifAsSeenByMe (Ntf_EVENT_SHARED_FILE,
FileMetadata.FilCod,Gbl.Hierarchy.Crs.CrsCod, FileMetadata.FilCod);
Gbl.Usrs.Me.UsrDat.UsrCod);
break; break;
case Brw_SHOW_MRK_CRS: case Brw_SHOW_MRK_CRS:
case Brw_SHOW_MRK_GRP: case Brw_SHOW_MRK_GRP:
case Brw_ADMI_MRK_CRS: case Brw_ADMI_MRK_CRS:
case Brw_ADMI_MRK_GRP: case Brw_ADMI_MRK_GRP:
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_MARKS_FILE, Ntf_DB_MarkNotifAsSeenByMe (Ntf_EVENT_MARKS_FILE,
FileMetadata.FilCod,Gbl.Hierarchy.Crs.CrsCod, FileMetadata.FilCod);
Gbl.Usrs.Me.UsrDat.UsrCod);
break; break;
default: default:
break; break;
@ -8313,29 +8309,25 @@ void Brw_DownloadFile (void)
case Brw_SHOW_DOC_GRP: case Brw_SHOW_DOC_GRP:
case Brw_ADMI_DOC_CRS: case Brw_ADMI_DOC_CRS:
case Brw_ADMI_DOC_GRP: case Brw_ADMI_DOC_GRP:
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_DOCUMENT_FILE, Ntf_DB_MarkNotifAsSeenByMe (Ntf_EVENT_DOCUMENT_FILE,
FileMetadata.FilCod,Gbl.Hierarchy.Crs.CrsCod, FileMetadata.FilCod);
Gbl.Usrs.Me.UsrDat.UsrCod);
break; break;
case Brw_ADMI_TCH_CRS: case Brw_ADMI_TCH_CRS:
case Brw_ADMI_TCH_GRP: case Brw_ADMI_TCH_GRP:
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_TEACHERS_FILE, Ntf_DB_MarkNotifAsSeenByMe (Ntf_EVENT_TEACHERS_FILE,
FileMetadata.FilCod,Gbl.Hierarchy.Crs.CrsCod, FileMetadata.FilCod);
Gbl.Usrs.Me.UsrDat.UsrCod);
break; break;
case Brw_ADMI_SHR_CRS: case Brw_ADMI_SHR_CRS:
case Brw_ADMI_SHR_GRP: case Brw_ADMI_SHR_GRP:
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_SHARED_FILE, Ntf_DB_MarkNotifAsSeenByMe (Ntf_EVENT_SHARED_FILE,
FileMetadata.FilCod,Gbl.Hierarchy.Crs.CrsCod, FileMetadata.FilCod);
Gbl.Usrs.Me.UsrDat.UsrCod);
break; break;
case Brw_SHOW_MRK_CRS: case Brw_SHOW_MRK_CRS:
case Brw_SHOW_MRK_GRP: case Brw_SHOW_MRK_GRP:
case Brw_ADMI_MRK_CRS: case Brw_ADMI_MRK_CRS:
case Brw_ADMI_MRK_GRP: case Brw_ADMI_MRK_GRP:
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_MARKS_FILE, Ntf_DB_MarkNotifAsSeenByMe (Ntf_EVENT_MARKS_FILE,
FileMetadata.FilCod,Gbl.Hierarchy.Crs.CrsCod, FileMetadata.FilCod);
Gbl.Usrs.Me.UsrDat.UsrCod);
break; break;
default: default:
break; break;

View File

@ -551,9 +551,7 @@ void Cfe_ListCallsForExamsSee (void)
Cfe_ListCallsForExams (&CallsForExams,Cfe_NORMAL_VIEW); Cfe_ListCallsForExams (&CallsForExams,Cfe_NORMAL_VIEW);
/***** Mark possible notifications as seen *****/ /***** Mark possible notifications as seen *****/
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_CALL_FOR_EXAM, Ntf_DB_MarkNotifsInCrsAsSeenByMe (Ntf_EVENT_CALL_FOR_EXAM);
-1L,Gbl.Hierarchy.Crs.CrsCod,
Gbl.Usrs.Me.UsrDat.UsrCod);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -602,13 +602,14 @@ TODO: FIX BUG, URGENT! En las fechas como par
TODO: En las encuestas, que los estudiantes no puedan ver los resultados hasta que no finalice el plazo. TODO: En las encuestas, que los estudiantes no puedan ver los resultados hasta que no finalice el plazo.
*/ */
#define Log_PLATFORM_VERSION "SWAD 21.54.5 (2021-11-09)" #define Log_PLATFORM_VERSION "SWAD 21.54.6 (2021-11-09)"
#define CSS_FILE "swad20.45.css" #define CSS_FILE "swad20.45.css"
#define JS_FILE "swad20.69.1.js" #define JS_FILE "swad20.69.1.js"
/* /*
TODO: Rename CENTRE to CENTER in help wiki. TODO: Rename CENTRE to CENTER in help wiki.
TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams
Version 21.54.6: Nov 09, 2021 Code refactoring in notifications. (322164 lines)
Version 21.54.5: Nov 09, 2021 Queries moved from API module to database modules. (322185 lines) Version 21.54.5: Nov 09, 2021 Queries moved from API module to database modules. (322185 lines)
Version 21.54.4: Nov 09, 2021 Queries moved from API module to database modules. (322222 lines) Version 21.54.4: Nov 09, 2021 Queries moved from API module to database modules. (322222 lines)
Version 21.54.3: Nov 08, 2021 Queries moved from API module to database modules. (322095 lines) Version 21.54.3: Nov 08, 2021 Queries moved from API module to database modules. (322095 lines)

View File

@ -457,8 +457,7 @@ void Enr_ReqAcceptRegisterInCrs (void)
Err_WrongRoleExit (); Err_WrongRoleExit ();
break; break;
} }
Ntf_DB_MarkNotifAsSeen (NotifyEvent,-1L,Gbl.Hierarchy.Crs.CrsCod, Ntf_DB_MarkNotifsInCrsAsSeenByMe (NotifyEvent);
Gbl.Usrs.Me.UsrDat.UsrCod);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2342,9 +2341,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
HTM_TR_End (); HTM_TR_End ();
/***** Mark possible notification as seen *****/ /***** Mark possible notification as seen *****/
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_ENROLMENT_REQUEST, Ntf_DB_MarkNotifAsSeenByMe (Ntf_EVENT_ENROLMENT_REQUEST,ReqCod);
ReqCod,Gbl.Hierarchy.Crs.CrsCod,
Gbl.Usrs.Me.UsrDat.UsrCod);
} }
else // User does not exists or user already belongs to course ==> remove pair from crs_requests table else // User does not exists or user already belongs to course ==> remove pair from crs_requests table
Enr_RemUsrEnrolmentRequestInCrs (UsrDat.UsrCod,Crs.CrsCod); Enr_RemUsrEnrolmentRequestInCrs (UsrDat.UsrCod,Crs.CrsCod);

View File

@ -564,15 +564,12 @@ static void Fol_ListFollowersUsr (struct UsrData *UsrDat)
unsigned NumUsrs; unsigned NumUsrs;
unsigned NumUsr; unsigned NumUsr;
struct UsrData FollowerUsrDat; struct UsrData FollowerUsrDat;
bool ItsMe;
/***** Show user's profile *****/ /***** Show user's profile *****/
if (Prf_ShowUserProfile (UsrDat)) if (Prf_ShowUserProfile (UsrDat))
{ {
/***** Get list of followers *****/ /***** Get list of followers *****/
NumUsrs = Fol_DB_GetListFollowers (UsrDat->UsrCod,&mysql_res); if ((NumUsrs = Fol_DB_GetListFollowers (UsrDat->UsrCod,&mysql_res)))
if (NumUsrs)
{ {
/***** Initialize structure with user's data *****/ /***** Initialize structure with user's data *****/
Usr_UsrDataConstructor (&FollowerUsrDat); Usr_UsrDataConstructor (&FollowerUsrDat);
@ -582,24 +579,26 @@ static void Fol_ListFollowersUsr (struct UsrData *UsrDat)
NULL,NULL, NULL,NULL,
NULL,Box_NOT_CLOSABLE,2); NULL,Box_NOT_CLOSABLE,2);
for (NumUsr = 0; for (NumUsr = 0;
NumUsr < NumUsrs; NumUsr < NumUsrs;
NumUsr++) NumUsr++)
{ {
/***** Get user's code *****/ /***** Get user's code *****/
FollowerUsrDat.UsrCod = DB_GetNextCode (mysql_res); FollowerUsrDat.UsrCod = DB_GetNextCode (mysql_res);
/***** Show user *****/ /***** Show user *****/
if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == 0) if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == 0)
HTM_TR_Begin (NULL); HTM_TR_Begin (NULL);
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&FollowerUsrDat,
Usr_DONT_GET_PREFS, if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&FollowerUsrDat,
Usr_DONT_GET_ROLE_IN_CURRENT_CRS)) Usr_DONT_GET_PREFS,
Fol_ShowFollowedOrFollower (&FollowerUsrDat); Usr_DONT_GET_ROLE_IN_CURRENT_CRS))
if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == (Fol_NUM_COLUMNS_FOLLOW-1) || Fol_ShowFollowedOrFollower (&FollowerUsrDat);
NumUsr == NumUsrs - 1)
HTM_TR_End (); if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == (Fol_NUM_COLUMNS_FOLLOW-1) ||
} NumUsr == NumUsrs - 1)
HTM_TR_End ();
}
/***** End table and box *****/ /***** End table and box *****/
Box_BoxTableEnd (); Box_BoxTableEnd ();
@ -612,11 +611,8 @@ static void Fol_ListFollowersUsr (struct UsrData *UsrDat)
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
/***** If it's me, mark possible notification as seen *****/ /***** If it's me, mark possible notification as seen *****/
ItsMe = Usr_ItsMe (UsrDat->UsrCod); if (Usr_ItsMe (UsrDat->UsrCod))
if (ItsMe) Ntf_DB_MarkNotifsAsSeen (Ntf_EVENT_FOLLOWER);
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_FOLLOWER,
-1L,-1L,
Gbl.Usrs.Me.UsrDat.UsrCod);
} }
else else
Ale_ShowAlertUserNotFoundOrYouDoNotHavePermission (); Ale_ShowAlertUserNotFoundOrYouDoNotHavePermission ();

View File

@ -781,17 +781,15 @@ static void For_ShowPostsOfAThread (struct For_Forums *Forums,
{ {
case For_FORUM_COURSE_TCHS: case For_FORUM_COURSE_TCHS:
case For_FORUM_COURSE_USRS: case For_FORUM_COURSE_USRS:
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_FORUM_POST_COURSE, Ntf_DB_MarkNotifAsSeenByMe (Ntf_EVENT_FORUM_POST_COURSE,
Forums->PstCod,Gbl.Hierarchy.Crs.CrsCod, Forums->PstCod);
Gbl.Usrs.Me.UsrDat.UsrCod);
break; break;
default: default:
break; break;
} }
if (Thread.NumMyPosts) if (Thread.NumMyPosts)
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_FORUM_REPLY, Ntf_DB_MarkNotifAsSeenByMe (Ntf_EVENT_FORUM_REPLY,
Forums->PstCod,-1L, Forums->PstCod);
Gbl.Usrs.Me.UsrDat.UsrCod);
} }
/***** End table *****/ /***** End table *****/

View File

@ -1211,9 +1211,7 @@ void Msg_ExpRecMsg (void)
Msg_DB_ExpandRcvMsg (Messages.ExpandedMsgCod); Msg_DB_ExpandRcvMsg (Messages.ExpandedMsgCod);
/***** Mark possible notification as seen *****/ /***** Mark possible notification as seen *****/
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_MESSAGE, Ntf_DB_MarkNotifAsSeenByMe (Ntf_EVENT_MESSAGE,Messages.ExpandedMsgCod);
Messages.ExpandedMsgCod,-1L,
Gbl.Usrs.Me.UsrDat.UsrCod);
/***** Show again the messages *****/ /***** Show again the messages *****/
Msg_ShowRecMsgs (); Msg_ShowRecMsgs ();

View File

@ -431,9 +431,7 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing,long HighlightNotCod)
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
/***** Mark possible notification as seen *****/ /***** Mark possible notification as seen *****/
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_NOTICE, Ntf_DB_MarkNotifsInCrsAsSeenByMe (Ntf_EVENT_NOTICE);
-1L,Gbl.Hierarchy.Crs.CrsCod,
Gbl.Usrs.Me.UsrDat.UsrCod);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -122,49 +122,60 @@ void Ntf_DB_MarkPendingNtfsAsSent (long ToUsrCod)
} }
/*****************************************************************************/ /*****************************************************************************/
/********************** Set possible notification as seen ********************/ /**************** Set one possible notification as seen by me ****************/
/*****************************************************************************/ /*****************************************************************************/
void Ntf_DB_MarkNotifAsSeen (Ntf_NotifyEvent_t NotifyEvent,long Cod,long CrsCod,long ToUsrCod) void Ntf_DB_MarkNotifAsSeenByMe (Ntf_NotifyEvent_t NotifyEvent,long Cod)
{ {
/***** Trivial check: if no code specified, nothing to do *****/
if (Cod <= 0) // If the user code is specified
return;
/***** Set notification as seen by me *****/ /***** Set notification as seen by me *****/
if (ToUsrCod > 0) // If the user code is specified DB_QueryUPDATE ("can not set notification(s) as seen",
{ "UPDATE ntf_notifications"
if (Cod > 0) // Set only one notification " SET Status=(Status | %u)"
// for the user as seen " WHERE ToUsrCod=%ld"
DB_QueryUPDATE ("can not set notification(s) as seen", " AND NotifyEvent=%u"
"UPDATE ntf_notifications" " AND Cod=%ld",
" SET Status=(Status | %u)" (unsigned) Ntf_STATUS_BIT_READ,
" WHERE ToUsrCod=%ld" Gbl.Usrs.Me.UsrDat.UsrCod,
" AND NotifyEvent=%u" (unsigned) NotifyEvent,
" AND Cod=%ld", Cod);
(unsigned) Ntf_STATUS_BIT_READ, }
ToUsrCod,
(unsigned) NotifyEvent, /*****************************************************************************/
Cod); /** Set all notifications of this type in the current course as seen by me ***/
else if (CrsCod > 0) // Set all notifications of this type /*****************************************************************************/
// in the current course for the user as seen
DB_QueryUPDATE ("can not set notification(s) as seen", void Ntf_DB_MarkNotifsInCrsAsSeenByMe (Ntf_NotifyEvent_t NotifyEvent)
"UPDATE ntf_notifications" {
" SET Status=(Status | %u)" DB_QueryUPDATE ("can not set notification(s) as seen",
" WHERE ToUsrCod=%ld" "UPDATE ntf_notifications"
" AND NotifyEvent=%u" " SET Status=(Status | %u)"
" AND CrsCod=%ld", " WHERE ToUsrCod=%ld"
(unsigned) Ntf_STATUS_BIT_READ, " AND NotifyEvent=%u"
ToUsrCod, " AND CrsCod=%ld",
(unsigned) NotifyEvent, (unsigned) Ntf_STATUS_BIT_READ,
Gbl.Hierarchy.Crs.CrsCod); Gbl.Usrs.Me.UsrDat.UsrCod,
else // Set all notifications of this type (unsigned) NotifyEvent,
// for the user as seen Gbl.Hierarchy.Crs.CrsCod);
DB_QueryUPDATE ("can not set notification(s) as seen", }
"UPDATE ntf_notifications"
" SET Status=(Status | %u)" /*****************************************************************************/
" WHERE ToUsrCod=%ld" /************* Set all notifications of this type as seen by me **************/
" AND NotifyEvent=%u", /*****************************************************************************/
(unsigned) Ntf_STATUS_BIT_READ,
ToUsrCod, void Ntf_DB_MarkNotifsAsSeen (Ntf_NotifyEvent_t NotifyEvent)
(unsigned) NotifyEvent); {
} DB_QueryUPDATE ("can not set notification(s) as seen",
"UPDATE ntf_notifications"
" SET Status=(Status | %u)"
" WHERE ToUsrCod=%ld"
" AND NotifyEvent=%u",
(unsigned) Ntf_STATUS_BIT_READ,
Gbl.Usrs.Me.UsrDat.UsrCod,
(unsigned) NotifyEvent);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -48,7 +48,9 @@ void Ntf_DB_StoreNotifyEventToUsr (Ntf_NotifyEvent_t NotifyEvent,
void Ntf_DB_UpdateMyLastAccessToNotifications (void); void Ntf_DB_UpdateMyLastAccessToNotifications (void);
void Ntf_DB_MarkAllMyNotifAsSeen (void); void Ntf_DB_MarkAllMyNotifAsSeen (void);
void Ntf_DB_MarkPendingNtfsAsSent (long ToUsrCod); void Ntf_DB_MarkPendingNtfsAsSent (long ToUsrCod);
void Ntf_DB_MarkNotifAsSeen (Ntf_NotifyEvent_t NotifyEvent,long Cod,long CrsCod,long ToUsrCod); void Ntf_DB_MarkNotifAsSeenByMe (Ntf_NotifyEvent_t NotifyEvent,long Cod);
void Ntf_DB_MarkNotifsInCrsAsSeenByMe (Ntf_NotifyEvent_t NotifyEvent);
void Ntf_DB_MarkNotifsAsSeen (Ntf_NotifyEvent_t NotifyEvent);
void Ntf_DB_MarkNotifToOneUsrAsRemoved (Ntf_NotifyEvent_t NotifyEvent,long Cod,long ToUsrCod); void Ntf_DB_MarkNotifToOneUsrAsRemoved (Ntf_NotifyEvent_t NotifyEvent,long Cod,long ToUsrCod);
void Ntf_DB_MarkNotifInCrsAsRemoved (long ToUsrCod,long CrsCod); void Ntf_DB_MarkNotifInCrsAsRemoved (long ToUsrCod,long CrsCod);
void Ntf_DB_MarkNotifAsRemoved (Ntf_NotifyEvent_t NotifyEvent,long Cod); void Ntf_DB_MarkNotifAsRemoved (Ntf_NotifyEvent_t NotifyEvent,long Cod);

View File

@ -280,9 +280,7 @@ void Prf_GetUsrDatAndShowUserProfile (void)
/***** If it's not me, mark possible notification as seen *****/ /***** If it's not me, mark possible notification as seen *****/
if (!Usr_ItsMe (Gbl.Usrs.Other.UsrDat.UsrCod)) // Not me if (!Usr_ItsMe (Gbl.Usrs.Other.UsrDat.UsrCod)) // Not me
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_FOLLOWER, Ntf_DB_MarkNotifAsSeenByMe (Ntf_EVENT_FOLLOWER,Gbl.Usrs.Other.UsrDat.UsrCod);
Gbl.Usrs.Other.UsrDat.UsrCod,-1L,
Gbl.Usrs.Me.UsrDat.UsrCod);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -682,7 +682,7 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys,
Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
HTM_DIV_Begin ("class=\"PAR %s\"",Svy.Status.Visible ? "DAT" : HTM_DIV_Begin ("class=\"PAR %s\"",Svy.Status.Visible ? "DAT" :
"DAT_LIGHT"); "DAT_LIGHT");
HTM_Txt (Txt); HTM_Txt (Txt);
HTM_DIV_End (); HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
@ -702,14 +702,12 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys,
/***** Mark possible notification as seen *****/ /***** Mark possible notification as seen *****/
if (Svy.Scope == HieLvl_CRS) // Only course surveys are notified if (Svy.Scope == HieLvl_CRS) // Only course surveys are notified
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_SURVEY, Ntf_DB_MarkNotifAsSeenByMe (Ntf_EVENT_SURVEY,Svy.Cod);
SvyCod,Svy.Cod,
Gbl.Usrs.Me.UsrDat.UsrCod);
if (ShowOnlyThisSvyComplete) if (ShowOnlyThisSvyComplete)
{ {
/***** End table *****/ /***** End table *****/
HTM_TABLE_End (); HTM_TABLE_End ();
/***** End box *****/ /***** End box *****/
Box_BoxEnd (); Box_BoxEnd ();

View File

@ -217,8 +217,8 @@ void Tml_Ntf_GetNotifPublication (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
void Tml_Ntf_MarkMyNotifAsSeen (void) void Tml_Ntf_MarkMyNotifAsSeen (void)
{ {
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_TL_COMMENT,-1L,-1L,Gbl.Usrs.Me.UsrDat.UsrCod); Ntf_DB_MarkNotifsAsSeen (Ntf_EVENT_TL_COMMENT);
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_TL_FAV ,-1L,-1L,Gbl.Usrs.Me.UsrDat.UsrCod); Ntf_DB_MarkNotifsAsSeen (Ntf_EVENT_TL_FAV );
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_TL_SHARE ,-1L,-1L,Gbl.Usrs.Me.UsrDat.UsrCod); Ntf_DB_MarkNotifsAsSeen (Ntf_EVENT_TL_SHARE );
Ntf_DB_MarkNotifAsSeen (Ntf_EVENT_TL_MENTION,-1L,-1L,Gbl.Usrs.Me.UsrDat.UsrCod); Ntf_DB_MarkNotifsAsSeen (Ntf_EVENT_TL_MENTION);
} }