Version18.74

This commit is contained in:
Antonio Cañas Vargas 2019-03-12 21:25:55 +01:00
parent da510f608d
commit 98782055b1
27 changed files with 2083 additions and 2063 deletions

View File

@ -50,10 +50,10 @@ OBJS = swad_account.o swad_action.o swad_agenda.o swad_alert.o \
swad_profile.o swad_project.o \
swad_QR.o \
swad_record.o swad_report.o swad_role.o swad_RSS.o \
swad_scope.o swad_search.o swad_session.o swad_setup.o swad_social.o \
swad_scope.o swad_search.o swad_session.o swad_setup.o \
swad_statistic.o swad_string.o swad_survey.o swad_syllabus.o \
swad_tab.o swad_table.o swad_test.o swad_test_import.o swad_theme.o \
swad_timetable.o \
swad_timeline.o swad_timetable.o \
swad_user.o \
swad_web_service.o \
swad_xml.o \

View File

@ -8729,7 +8729,7 @@ INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1511','es','N','Carg
</dd>
<dt>Version 15.110.17:Jan 13, 2016</dt>
<dd>
Reviewed code related to Soc_MAX_RECENT_PUBS_TO_GET. (192568 lines)
Reviewed code related to TL_MAX_RECENT_PUBS_TO_GET. (192568 lines)
</dd>
<dt>Version 15.110.16:Jan 13, 2016</dt>
<dd>
@ -9428,7 +9428,7 @@ INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1490','es','N','Ver
<dt>Version 15.76: Dec 28, 2015</dt>
<dd>
New option for social network activity (timeline).<br />
New module swad_social. (187807 lines)
New module swad_timeline. (187807 lines)
</dd>
<dt>Version 15.75: Dec 28, 2015</dt>
<dd>

View File

@ -690,7 +690,7 @@ function readOldTimelineData () {
timeline.appendChild(oldTimeline.firstChild);
}
if (countOldTimeline < RefreshParamMaxOldPubsToGetAndShow) // Set to Soc_MAX_OLD_PUBS_TO_GET_AND_SHOW
if (countOldTimeline < RefreshParamMaxOldPubsToGetAndShow) // Set to TL_MAX_OLD_PUBS_TO_GET_AND_SHOW
// No more old publishings
document.getElementById("view_old_posts_container").style.display = 'none';
else {

View File

@ -44,7 +44,7 @@
#include "swad_parameter.h"
#include "swad_profile.h"
#include "swad_report.h"
#include "swad_social.h"
#include "swad_timeline.h"
/*****************************************************************************/
/****************************** Public constants *****************************/
@ -1084,7 +1084,7 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
UsrDat->UsrCod);
/***** Remove social content associated to the user *****/
Soc_RemoveUsrSocialContent (UsrDat->UsrCod);
TL_RemoveUsrContent (UsrDat->UsrCod);
/***** Remove user's figures *****/
Prf_RemoveUsrFigures (UsrDat->UsrCod);

View File

@ -72,9 +72,9 @@
#include "swad_role.h"
#include "swad_search.h"
#include "swad_setup.h"
#include "swad_social.h"
#include "swad_tab.h"
#include "swad_test_import.h"
#include "swad_timeline.h"
#include "swad_zip.h"
/*****************************************************************************/
@ -1596,15 +1596,15 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActMnu */{ 2,-1,TabUnk,ActMnu ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,NULL ,NULL},
/* ActRefCon */{ 845,-1,TabUnk,ActRefCon ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Lay_RefreshNotifsAndConnected ,NULL},
/* ActRefLstClk */{ 994,-1,TabUnk,ActRefLstClk ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Lay_RefreshLastClicks ,NULL},
/* ActRefNewSocPubGbl*/{1509,-1,TabUnk,ActRefNewSocPubGbl ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_RefreshNewTimelineGbl ,NULL},
/* ActRefOldSocPubGbl*/{1510,-1,TabUnk,ActRefOldSocPubGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_RefreshOldTimelineGbl ,NULL},
/* ActRefOldSocPubUsr*/{1511,-1,TabUnk,ActRefOldSocPubUsr ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_RefreshOldTimelineUsr ,NULL},
/* ActRefNewSocPubGbl*/{1509,-1,TabUnk,ActRefNewSocPubGbl ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_RefreshNewTimelineGbl ,NULL},
/* ActRefOldSocPubGbl*/{1510,-1,TabUnk,ActRefOldSocPubGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_RefreshOldTimelineGbl ,NULL},
/* ActRefOldSocPubUsr*/{1511,-1,TabUnk,ActRefOldSocPubUsr ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_RefreshOldTimelineUsr ,NULL},
/* ActWebSvc */{ 892,-1,TabUnk,ActWebSvc ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Plg_WebService ,NULL},
// TabSta ******************************************************************
/* ActFrmLogIn */{1521, 0,TabSta,ActFrmLogIn , 0,0x001,0x001,0x001,0x001,0x001,0x001,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Usr_WriteLandingPage ,"power-off" },
/* ActReqSch */{ 627, 1,TabSta,ActReqSch ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Sch_ReqSysSearch ,"search" },
/* ActSeeSocTmlGbl */{1490, 2,TabSta,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,Soc_ShowTimelineGbl1 ,Soc_ShowTimelineGbl2 ,"comment-dots" },
/* ActSeeSocTmlGbl */{1490, 2,TabSta,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,TL_ShowTimelineGbl1 ,TL_ShowTimelineGbl2 ,"comment-dots" },
/* ActSeeSocPrf */{1520, 3,TabSta,ActSeeSocPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_SeeSocialProfiles ,"user-check" },
/* ActSeeCal */{1622, 4,TabSta,ActSeeCal ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Cal_ShowCalendar ,"calendar" },
/* ActSeeNtf */{ 990, 5,TabSta,ActSeeNtf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ntf_ShowMyNotifications ,"bell" },
@ -1619,33 +1619,33 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActSch */{ 628,-1,TabUnk,ActReqSch ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Sch_GetParamsSearch ,Sch_SysSearch ,NULL},
/* ActRcvSocPstGbl */{1492,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,Soc_ShowTimelineGbl1 ,Soc_ReceiveSocialPostGbl ,NULL},
/* ActRcvSocComGbl */{1503,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,Soc_ShowTimelineGbl1 ,Soc_ReceiveCommentGbl ,NULL},
/* ActShaSocNotGbl */{1495,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_ShareSocialNoteGbl ,NULL},
/* ActUnsSocNotGbl */{1496,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_UnshareSocialNoteGbl ,NULL},
/* ActFavSocNotGbl */{1512,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_FavSocialNoteGbl ,NULL},
/* ActUnfSocNotGbl */{1513,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_UnfavSocialNoteGbl ,NULL},
/* ActFavSocComGbl */{1516,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_FavSocialCommentGbl ,NULL},
/* ActUnfSocComGbl */{1517,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_UnfavSocialCommentGbl ,NULL},
/* ActReqRemSocPubGbl*/{1494,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,Soc_ShowTimelineGbl1 ,Soc_RequestRemSocialNoteGbl ,NULL},
/* ActRemSocPubGbl */{1493,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,Soc_ShowTimelineGbl1 ,Soc_RemoveSocialNoteGbl ,NULL},
/* ActReqRemSocComGbl*/{1505,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,Soc_ShowTimelineGbl1 ,Soc_RequestRemSocialComGbl ,NULL},
/* ActRemSocComGbl */{1507,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,Soc_ShowTimelineGbl1 ,Soc_RemoveSocialComGbl ,NULL},
/* ActRcvSocPstGbl */{1492,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,TL_ShowTimelineGbl1 ,TL_ReceivePostGbl ,NULL},
/* ActRcvSocComGbl */{1503,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,TL_ShowTimelineGbl1 ,TL_ReceiveCommentGbl ,NULL},
/* ActShaSocNotGbl */{1495,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_ShareNoteGbl ,NULL},
/* ActUnsSocNotGbl */{1496,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_UnshareNoteGbl ,NULL},
/* ActFavSocNotGbl */{1512,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_FavNoteGbl ,NULL},
/* ActUnfSocNotGbl */{1513,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_UnfavNoteGbl ,NULL},
/* ActFavSocComGbl */{1516,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_FavCommentGbl ,NULL},
/* ActUnfSocComGbl */{1517,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_UnfavCommentGbl ,NULL},
/* ActReqRemSocPubGbl*/{1494,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,TL_ShowTimelineGbl1 ,TL_RequestRemNoteGbl ,NULL},
/* ActRemSocPubGbl */{1493,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,TL_ShowTimelineGbl1 ,TL_RemoveNoteGbl ,NULL},
/* ActReqRemSocComGbl*/{1505,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,TL_ShowTimelineGbl1 ,TL_RequestRemComGbl ,NULL},
/* ActRemSocComGbl */{1507,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,TL_ShowTimelineGbl1 ,TL_RemoveComGbl ,NULL},
/* ActReqOthPubPrf */{1401,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_RequestUserProfile ,NULL},
/* ActRcvSocPstUsr */{1498,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,NULL ,Soc_ReceiveSocialPostUsr ,NULL},
/* ActRcvSocComUsr */{1504,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,NULL ,Soc_ReceiveCommentUsr ,NULL},
/* ActShaSocNotUsr */{1499,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_ShareSocialNoteUsr ,NULL},
/* ActUnsSocNotUsr */{1500,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_UnshareSocialNoteUsr ,NULL},
/* ActFavSocNotUsr */{1514,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_FavSocialNoteUsr ,NULL},
/* ActUnfSocNotUsr */{1515,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_UnfavSocialNoteUsr ,NULL},
/* ActFavSocComUsr */{1518,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_FavSocialCommentUsr ,NULL},
/* ActUnfSocComUsr */{1519,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_UnfavSocialCommentUsr ,NULL},
/* ActReqRemSocPubUsr*/{1501,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_RequestRemSocialNoteUsr ,NULL},
/* ActRemSocPubUsr */{1502,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_RemoveSocialNoteUsr ,NULL},
/* ActReqRemSocComGbl*/{1506,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_RequestRemSocialComUsr ,NULL},
/* ActRemSocComGbl */{1508,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Soc_RemoveSocialComUsr ,NULL},
/* ActRcvSocPstUsr */{1498,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,NULL ,TL_ReceivePostUsr ,NULL},
/* ActRcvSocComUsr */{1504,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,NULL ,TL_ReceiveCommentUsr ,NULL},
/* ActShaSocNotUsr */{1499,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_ShareNoteUsr ,NULL},
/* ActUnsSocNotUsr */{1500,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_UnshareNoteUsr ,NULL},
/* ActFavSocNotUsr */{1514,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_FavNoteUsr ,NULL},
/* ActUnfSocNotUsr */{1515,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_UnfavNoteUsr ,NULL},
/* ActFavSocComUsr */{1518,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_FavCommentUsr ,NULL},
/* ActUnfSocComUsr */{1519,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_UnfavCommentUsr ,NULL},
/* ActReqRemSocPubUsr*/{1501,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_RequestRemNoteUsr ,NULL},
/* ActRemSocPubUsr */{1502,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_RemoveNoteUsr ,NULL},
/* ActReqRemSocComGbl*/{1506,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_RequestRemComUsr ,NULL},
/* ActRemSocComGbl */{1508,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_RemoveComUsr ,NULL},
/* ActSeeOthPubPrf */{1402,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_GetUsrDatAndShowUserProfile,NULL},
/* ActCalFig */{1405,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_CalculateFigures ,NULL},

View File

@ -429,7 +429,7 @@ Lo de mutear anuncios, en principio prefiero hacer una opci
// TODO: Change in usability of Announcements of exams, suggested by Javier Fernández Baldomero.
// TODO: Al pulsar sobre una convocatoria de examen / aviso --> ir a la sección de esa convocatoria/aviso en lugar de mostrarlo repetido y destacado arriba
// TODO: Intentar aumentar la velocidad de carga del timeline (comprobar ralentización al mostrar la titulación de cada usuario)
// TODO: Fix important bug: Cuando se baja varias veces el timeline pulsando en "Ver más", se para aleatoriamente tras varias actualizaciones hacia abajo, no siempre llega hasta la primera publicación
// TODO: Los usuarios que no tienes permiso para ver su perfil público, se debería mostrar algo, una mínima ficha sin tinmeline o algo así
@ -452,11 +452,12 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 18.73.7 (2019-03-12)"
#define Log_PLATFORM_VERSION "SWAD 18.74 (2019-03-12)"
#define CSS_FILE "swad18.68.3.css"
#define JS_FILE "swad18.64.js"
/*
Version 18.73.7: Mar 12, 2019 Code refactoring irelated to list of users and options. (239614 lines)
Version 18.74: Mar 12, 2019 Module swad_social is renamed swad_timeline. (239633 lines)
Version 18.73.7: Mar 12, 2019 Code refactoring related to list of users and options. (239614 lines)
Version 18.73.6: Mar 12, 2019 Create new email message from list of users. This option will be active when email action allows selecting individual users. (239580 lines)
Copy the following icon to icon public directory:
sudo cp icon/marker.svg /var/www/html/swad/icon/
@ -4570,7 +4571,7 @@ INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1511','es','N','Carg
Version 15.111: Jan 14, 2016 Fixed bug in user's timeline.
Code refactoring related with social timeline. (192622 lines)
Version 15.110.18:Jan 13, 2016 Optimization in query to get initial recent timeline. (192564 lines)
Version 15.110.17:Jan 13, 2016 Reviewed code related to Soc_MAX_RECENT_PUBS_TO_GET. (192568 lines)
Version 15.110.17:Jan 13, 2016 Reviewed code related to TL_MAX_RECENT_PUBS_TO_GET. (192568 lines)
Version 15.110.16:Jan 13, 2016 Form to go to public profile of author of comment in timeline. (192563 lines)
Version 15.110.15:Jan 13, 2016 Form to go to public profile of author of note in timeline.
Extensions '.exe' and '.com' not allowed (Google reported malware). (192543 lines)

View File

@ -455,7 +455,7 @@
#define Cfg_TIME_TO_REFRESH_LAST_CLICKS ((time_t)( 1UL * 1000UL)) // Refresh period of last clicks in miliseconds
#define Cfg_TIME_TO_REFRESH_SOCIAL_TIMELINE ((time_t)( 10UL * 1000UL)) // Refresh period of social timeline in miliseconds
#define Cfg_TIME_TO_REFRESH_TIMELINE ((time_t)( 10UL * 1000UL)) // Refresh period of social timeline in miliseconds
#define Cfg_TIME_TO_CHANGE_BANNER ((time_t)( 2UL * 60UL)) // After these seconds, change banner
#define Cfg_NUMBER_OF_BANNERS 1 // Number of banners to show simultaneously

View File

@ -47,8 +47,8 @@
#include "swad_parameter.h"
#include "swad_QR.h"
#include "swad_RSS.h"
#include "swad_social.h"
#include "swad_string.h"
#include "swad_timeline.h"
/*****************************************************************************/
/************** External global variables from others modules ****************/
@ -292,7 +292,7 @@ void Exa_ReceiveExamAnnouncement2 (void)
extern const char *Txt_Created_new_announcement_of_exam;
extern const char *Txt_The_announcement_of_exam_has_been_successfully_updated;
unsigned NumUsrsToBeNotifiedByEMail;
struct SocialPublication SocPub;
struct TL_Publication SocPub;
/***** Show message *****/
Ale_ShowAlert (Ale_SUCCESS,
@ -304,7 +304,7 @@ void Exa_ReceiveExamAnnouncement2 (void)
Exa_UpdateNumUsrsNotifiedByEMailAboutExamAnnouncement (Gbl.ExamAnns.ExaDat.ExaCod,NumUsrsToBeNotifiedByEMail);
/***** Create a new social note about the new exam announcement *****/
Soc_StoreAndPublishSocialNote (Soc_NOTE_EXAM_ANNOUNCEMENT,Gbl.ExamAnns.ExaDat.ExaCod,&SocPub);
TL_StoreAndPublishNote (TL_NOTE_EXAM_ANNOUNCEMENT,Gbl.ExamAnns.ExaDat.ExaCod,&SocPub);
/***** Update RSS of current course *****/
RSS_UpdateRSSFileForACrs (&Gbl.CurrentCrs.Crs);
@ -403,7 +403,7 @@ void Exa_RemoveExamAnnouncement1 (void)
Ntf_MarkNotifAsRemoved (Ntf_EVENT_EXAM_ANNOUNCEMENT,ExaCod);
/***** Mark possible social note as unavailable *****/
Soc_MarkSocialNoteAsUnavailableUsingNoteTypeAndCod (Soc_NOTE_EXAM_ANNOUNCEMENT,ExaCod);
TL_MarkNoteAsUnavailableUsingNoteTypeAndCod (TL_NOTE_EXAM_ANNOUNCEMENT,ExaCod);
/***** Update RSS of current course *****/
RSS_UpdateRSSFileForACrs (&Gbl.CurrentCrs.Crs);

View File

@ -3343,18 +3343,18 @@ static void Fig_GetAndShowSocialActivityStats (void)
extern const char *Txt_No_of_users;
extern const char *Txt_PERCENT_of_users;
extern const char *Txt_No_of_posts_BR_per_user;
extern const char *Txt_SOCIAL_NOTE[Soc_NUM_NOTE_TYPES];
extern const char *Txt_TIMELINE_NOTE[TL_NUM_NOTE_TYPES];
extern const char *Txt_Total;
MYSQL_RES *mysql_res;
MYSQL_ROW row;
Soc_NoteType_t NoteType;
TL_NoteType_t NoteType;
unsigned long NumSocialNotes;
unsigned long NumRows;
unsigned NumUsrs;
unsigned NumUsrsTotal;
/***** Start box and table *****/
Box_StartBoxTable (NULL,Txt_FIGURE_TYPES[Fig_SOCIAL_ACTIVITY],NULL,
Box_StartBoxTable (NULL,Txt_FIGURE_TYPES[Fig_TIMELINE],NULL,
Hlp_ANALYTICS_Figures_timeline,Box_NOT_CLOSABLE,2);
/***** Heading row *****/
@ -3389,8 +3389,8 @@ static void Fig_GetAndShowSocialActivityStats (void)
1 << Rol_TCH);
/***** Get total number of following/followers from database *****/
for (NoteType = (Soc_NoteType_t) 0;
NoteType < Soc_NUM_NOTE_TYPES;
for (NoteType = (TL_NoteType_t) 0;
NoteType < TL_NUM_NOTE_TYPES;
NoteType++)
{
switch (Gbl.Scope.Current)
@ -3512,7 +3512,7 @@ static void Fig_GetAndShowSocialActivityStats (void)
"%.2f"
"</td>"
"</tr>",
Txt_SOCIAL_NOTE[NoteType],
Txt_TIMELINE_NOTE[NoteType],
NumSocialNotes,
NumUsrs,
NumUsrsTotal ? (float) NumUsrs * 100.0 / (float) NumUsrsTotal :

View File

@ -46,7 +46,7 @@ typedef enum
Fig_TESTS, // Number of test questions
Fig_GAMES, // Number of games
Fig_SURVEYS, // Number of surveys
Fig_SOCIAL_ACTIVITY, // Number of social notes
Fig_TIMELINE, // Number of timeline notes
Fig_FOLLOW, // Number of following and followers
Fig_FORUMS, // Number of forums, threads and posts
Fig_NOTIFY_EVENTS, // Number of users per notify event

View File

@ -53,9 +53,9 @@
#include "swad_parameter.h"
#include "swad_photo.h"
#include "swad_profile.h"
#include "swad_social.h"
#include "swad_string.h"
#include "swad_table.h"
#include "swad_timeline.h"
#include "swad_zip.h"
/*****************************************************************************/
@ -10405,7 +10405,7 @@ void Brw_ChgFileMetadata (void)
bool PublicFileBeforeEdition;
bool PublicFileAfterEdition;
Brw_License_t License;
struct SocialPublication SocPub;
struct TL_Publication SocPub;
/***** Get parameters related to file browser *****/
Brw_GetParAndInitFileBrowser ();
@ -10476,28 +10476,28 @@ void Brw_ChgFileMetadata (void)
switch (Gbl.FileBrowser.Type)
{
case Brw_ADMI_DOC_INS:
Soc_StoreAndPublishSocialNote (Soc_NOTE_INS_DOC_PUB_FILE,FileMetadata.FilCod,&SocPub);
TL_StoreAndPublishNote (TL_NOTE_INS_DOC_PUB_FILE,FileMetadata.FilCod,&SocPub);
break;
case Brw_ADMI_SHR_INS:
Soc_StoreAndPublishSocialNote (Soc_NOTE_INS_SHA_PUB_FILE,FileMetadata.FilCod,&SocPub);
TL_StoreAndPublishNote (TL_NOTE_INS_SHA_PUB_FILE,FileMetadata.FilCod,&SocPub);
break;
case Brw_ADMI_DOC_CTR:
Soc_StoreAndPublishSocialNote (Soc_NOTE_CTR_DOC_PUB_FILE,FileMetadata.FilCod,&SocPub);
TL_StoreAndPublishNote (TL_NOTE_CTR_DOC_PUB_FILE,FileMetadata.FilCod,&SocPub);
break;
case Brw_ADMI_SHR_CTR:
Soc_StoreAndPublishSocialNote (Soc_NOTE_CTR_SHA_PUB_FILE,FileMetadata.FilCod,&SocPub);
TL_StoreAndPublishNote (TL_NOTE_CTR_SHA_PUB_FILE,FileMetadata.FilCod,&SocPub);
break;
case Brw_ADMI_DOC_DEG:
Soc_StoreAndPublishSocialNote (Soc_NOTE_DEG_DOC_PUB_FILE,FileMetadata.FilCod,&SocPub);
TL_StoreAndPublishNote (TL_NOTE_DEG_DOC_PUB_FILE,FileMetadata.FilCod,&SocPub);
break;
case Brw_ADMI_SHR_DEG:
Soc_StoreAndPublishSocialNote (Soc_NOTE_DEG_SHA_PUB_FILE,FileMetadata.FilCod,&SocPub);
TL_StoreAndPublishNote (TL_NOTE_DEG_SHA_PUB_FILE,FileMetadata.FilCod,&SocPub);
break;
case Brw_ADMI_DOC_CRS:
Soc_StoreAndPublishSocialNote (Soc_NOTE_CRS_DOC_PUB_FILE,FileMetadata.FilCod,&SocPub);
TL_StoreAndPublishNote (TL_NOTE_CRS_DOC_PUB_FILE,FileMetadata.FilCod,&SocPub);
break;
case Brw_ADMI_SHR_CRS:
Soc_StoreAndPublishSocialNote (Soc_NOTE_CRS_SHA_PUB_FILE,FileMetadata.FilCod,&SocPub);
TL_StoreAndPublishNote (TL_NOTE_CRS_SHA_PUB_FILE,FileMetadata.FilCod,&SocPub);
break;
default:
break;
@ -11394,7 +11394,7 @@ static void Brw_RemoveOneFileOrFolderFromDB (const char Path[PATH_MAX + 1])
Set possible social note as unavailable.
Important: do this before removing from files *****/
Ntf_MarkNotifOneFileAsRemoved (Path);
Soc_MarkSocialNoteOneFileAsUnavailable (Path);
TL_MarkNoteOneFileAsUnavailable (Path);
/***** Remove from database the entries that store the marks properties *****/
if (FileBrowser == Brw_ADMI_MRK_CRS ||
@ -11438,7 +11438,7 @@ static void Brw_RemoveChildrenOfFolderFromDB (const char Path[PATH_MAX + 1])
Set possible social notes as unavailable.
Important: do this before removing from files *****/
Ntf_MarkNotifChildrenOfFolderAsRemoved (Path);
Soc_MarkSocialNotesChildrenOfFolderAsUnavailable (Path);
TL_MarkNotesChildrenOfFolderAsUnavailable (Path);
/***** Remove from database the entries that store the marks properties *****/
if (FileBrowser == Brw_ADMI_MRK_CRS ||

View File

@ -122,7 +122,7 @@ void Fol_PutLinkWhoToFollow (void)
void Fol_SuggestUsrsToFollowMainZone (void)
{
extern const char *Hlp_SOCIAL_Profiles_who_to_follow;
extern const char *Hlp_START_Profiles_who_to_follow;
extern const char *Txt_Who_to_follow;
extern const char *Txt_No_user_to_whom_you_can_follow_Try_again_later;
MYSQL_RES *mysql_res;
@ -144,7 +144,7 @@ void Fol_SuggestUsrsToFollowMainZone (void)
{
/***** Start box and table *****/
Box_StartBoxTable ("560px",Txt_Who_to_follow,Fol_PutIconsWhoToFollow,
Hlp_SOCIAL_Profiles_who_to_follow,Box_NOT_CLOSABLE,2);
Hlp_START_Profiles_who_to_follow,Box_NOT_CLOSABLE,2);
/***** Initialize structure with user's data *****/
Usr_UsrDataConstructor (&UsrDat);

View File

@ -46,8 +46,8 @@
#include "swad_parameter.h"
#include "swad_profile.h"
#include "swad_role.h"
#include "swad_social.h"
#include "swad_table.h"
#include "swad_timeline.h"
/*****************************************************************************/
/************** External global variables from others modules ****************/
@ -942,7 +942,7 @@ void For_RemoveUsrFromReadThrs (long UsrCod)
static void For_ShowPostsOfAThread (Ale_AlertType_t AlertType,const char *Message)
{
extern const char *Hlp_SOCIAL_Forums_posts;
extern const char *Hlp_MESSAGES_Forums_posts;
extern const char *Txt_Thread;
struct ForumThread Thr;
char LastSubject[Cns_MAX_BYTES_SUBJECT + 1];
@ -982,7 +982,7 @@ static void For_ShowPostsOfAThread (Ale_AlertType_t AlertType,const char *Messag
"%s: %s",
Txt_Thread,Thr.Subject);
Box_StartBox (NULL,FrameTitle,For_PutIconNewPost,
Hlp_SOCIAL_Forums_posts,Box_NOT_CLOSABLE);
Hlp_MESSAGES_Forums_posts,Box_NOT_CLOSABLE);
/***** Get posts of a thread from database *****/
NumRows = DB_QuerySELECT (&mysql_res,"can not get posts of a thread",
@ -1557,7 +1557,7 @@ static void For_PutHiddenParamPstCod (long PstCod)
static void For_ShowForumList (void)
{
extern const char *Hlp_SOCIAL_Forums;
extern const char *Hlp_MESSAGES_Forums;
extern const char *Txt_Forums;
bool IsLastItemInLevel[1 + For_FORUM_MAX_LEVELS];
MYSQL_RES *mysql_resCtr;
@ -1588,7 +1588,7 @@ static void For_ShowForumList (void)
/***** Start box *****/
Box_StartBox (NULL,Txt_Forums,For_PutIconsForums,
Hlp_SOCIAL_Forums,Box_NOT_CLOSABLE);
Hlp_MESSAGES_Forums,Box_NOT_CLOSABLE);
/***** Put a form to select which forums *****/
For_PutFormWhichForums ();
@ -2468,7 +2468,7 @@ void For_ShowForumTheads (void)
static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted,
Ale_AlertType_t AlertType,const char *Message)
{
extern const char *Hlp_SOCIAL_Forums_threads;
extern const char *Hlp_MESSAGES_Forums_threads;
extern const char *Txt_Forum;
extern const char *Txt_MSG_Subject;
extern const char *Txt_FORUM_THREAD_HELP_ORDER[2];
@ -2557,7 +2557,7 @@ static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted,
"%s: %s",
Txt_Forum,ForumName);
Box_StartBox (NULL,FrameTitle,For_PutIconNewThread,
Hlp_SOCIAL_Forums_threads,Box_NOT_CLOSABLE);
Hlp_MESSAGES_Forums_threads,Box_NOT_CLOSABLE);
/***** List the threads *****/
if (NumThrs)
@ -3936,8 +3936,8 @@ static void For_RestrictAccess (void)
static void For_WriteFormForumPst (bool IsReply,const char *Subject)
{
extern const char *Hlp_SOCIAL_Forums_new_post;
extern const char *Hlp_SOCIAL_Forums_new_thread;
extern const char *Hlp_MESSAGES_Forums_new_post;
extern const char *Hlp_MESSAGES_Forums_new_thread;
extern const char *The_ClassFormInBox[The_NUM_THEMES];
extern const char *Txt_New_post;
extern const char *Txt_New_thread;
@ -3948,10 +3948,10 @@ static void For_WriteFormForumPst (bool IsReply,const char *Subject)
/***** Start box *****/
if (IsReply)
Box_StartBox (NULL,Txt_New_post,NULL,
Hlp_SOCIAL_Forums_new_post,Box_NOT_CLOSABLE);
Hlp_MESSAGES_Forums_new_post,Box_NOT_CLOSABLE);
else
Box_StartBox (NULL,Txt_New_thread,NULL,
Hlp_SOCIAL_Forums_new_thread,Box_NOT_CLOSABLE);
Hlp_MESSAGES_Forums_new_thread,Box_NOT_CLOSABLE);
/***** Start form *****/
if (IsReply) // Form to write a reply to a post of an existing thread
@ -4030,7 +4030,7 @@ void For_ReceiveForumPost (void)
bool IsReply = false;
long PstCod = 0;
unsigned NumUsrsToBeNotifiedByEMail;
struct SocialPublication SocPub;
struct TL_Publication SocPub;
char Content[Cns_MAX_BYTES_LONG_TEXT + 1];
struct Media Media;
@ -4115,7 +4115,7 @@ void For_ReceiveForumPost (void)
{
case For_FORUM_GLOBAL_USRS:
case For_FORUM__SWAD__USRS:
Soc_StoreAndPublishSocialNote (Soc_NOTE_FORUM_POST,PstCod,&SocPub);
TL_StoreAndPublishNote (TL_NOTE_FORUM_POST,PstCod,&SocPub);
break;
default:
break;
@ -4200,7 +4200,7 @@ void For_RemovePost (void)
{
case For_FORUM_GLOBAL_USRS:
case For_FORUM__SWAD__USRS:
Soc_MarkSocialNoteAsUnavailableUsingNoteTypeAndCod (Soc_NOTE_FORUM_POST,Gbl.Forum.ForumSelected.PstCod);
TL_MarkNoteAsUnavailableUsingNoteTypeAndCod (TL_NOTE_FORUM_POST,Gbl.Forum.ForumSelected.PstCod);
break;
default:
break;

View File

@ -434,7 +434,7 @@ void Gbl_InitializeGlobals (void)
Gbl.Games.ListQuestions = NULL;
/* Public activity */
Gbl.Social.WhichUsrs = Soc_DEFAULT_WHICH_USRS;
Gbl.Timeline.WhichUsrs = TL_DEFAULT_WHICH_USRS;
/* Forums */
Gbl.Forum.ForumSet = For_DEFAULT_FORUM_SET;

View File

@ -73,10 +73,10 @@
#include "swad_record.h"
#include "swad_search.h"
#include "swad_session.h"
#include "swad_social.h"
#include "swad_survey.h"
#include "swad_syllabus.h"
#include "swad_test.h"
#include "swad_timeline.h"
#include "swad_timetable.h"
#include "swad_web_service.h"
@ -613,10 +613,10 @@ struct Globals
} AttEvents;
struct
{
Soc_WhichUsrs_t WhichUsrs;
TL_WhichUsrs_t WhichUsrs;
long NotCod; // Used as parameter about social note to be edited, removed...
long PubCod; // Used as parameter about social publishing to be edited, removed...
} Social;
} Timeline;
struct
{
For_ForumSet_t ForumSet;

View File

@ -2024,7 +2024,7 @@ const char *Hlp_USERS_Connected_last_clicks =
/***** SOCIAL tab *****/
const char *Hlp_SOCIAL_Timeline =
const char *Hlp_START_Timeline =
#if L==1
"SOCIAL.Timeline.es";
#elif L==2
@ -2045,7 +2045,7 @@ const char *Hlp_SOCIAL_Timeline =
"SOCIAL.Timeline.en";
#endif
const char *Hlp_SOCIAL_Profiles_view_public_profile =
const char *Hlp_START_Profiles_view_public_profile =
#if L==1
"SOCIAL.Profiles.es#ver-perfil-p%C3%BAblico";
#elif L==2
@ -2066,7 +2066,7 @@ const char *Hlp_SOCIAL_Profiles_view_public_profile =
"SOCIAL.Profiles.en#view-public-profile";
#endif
const char *Hlp_SOCIAL_Profiles_who_to_follow =
const char *Hlp_START_Profiles_who_to_follow =
#if L==1
"SOCIAL.Profiles.es#a-qui%C3%A9n-seguir";
#elif L==2
@ -2087,7 +2087,7 @@ const char *Hlp_SOCIAL_Profiles_who_to_follow =
"SOCIAL.Profiles.en#who-to-follow";
#endif
const char *Hlp_SOCIAL_Forums =
const char *Hlp_MESSAGES_Forums =
#if L==1
"SOCIAL.Forums.es";
#elif L==2
@ -2108,7 +2108,7 @@ const char *Hlp_SOCIAL_Forums =
"SOCIAL.Forums.en";
#endif
const char *Hlp_SOCIAL_Forums_threads =
const char *Hlp_MESSAGES_Forums_threads =
#if L==1
"SOCIAL.Forums.es#discusiones";
#elif L==2
@ -2129,7 +2129,7 @@ const char *Hlp_SOCIAL_Forums_threads =
"SOCIAL.Forums.en#threads";
#endif
const char *Hlp_SOCIAL_Forums_new_thread =
const char *Hlp_MESSAGES_Forums_new_thread =
#if L==1
"SOCIAL.Forums.es#nueva-discusi%C3%B3n";
#elif L==2
@ -2150,7 +2150,7 @@ const char *Hlp_SOCIAL_Forums_new_thread =
"SOCIAL.Forums.en#new-thread";
#endif
const char *Hlp_SOCIAL_Forums_posts =
const char *Hlp_MESSAGES_Forums_posts =
#if L==1
"SOCIAL.Forums.es#comentarios";
#elif L==2
@ -2171,7 +2171,7 @@ const char *Hlp_SOCIAL_Forums_posts =
"SOCIAL.Forums.en#posts";
#endif
const char *Hlp_SOCIAL_Forums_new_post =
const char *Hlp_MESSAGES_Forums_new_post =
#if L==1
"SOCIAL.Forums.es#nuevo-comentario";
#elif L==2
@ -2194,7 +2194,7 @@ const char *Hlp_SOCIAL_Forums_new_post =
/***** MESSAGES tab *****/
const char *Hlp_MESSAGES_Notifications =
const char *Hlp_START_Notifications =
#if L==1
"MESSAGES.Notifications.es";
#elif L==2
@ -2215,7 +2215,7 @@ const char *Hlp_MESSAGES_Notifications =
"MESSAGES.Notifications.en";
#endif
const char *Hlp_MESSAGES_Domains =
const char *Hlp_START_Domains =
#if L==1
"MESSAGES.Domains.es";
#elif L==2
@ -2236,7 +2236,7 @@ const char *Hlp_MESSAGES_Domains =
"MESSAGES.Domains.en";
#endif
const char *Hlp_MESSAGES_Domains_edit =
const char *Hlp_START_Domains_edit =
#if L==1
"MESSAGES.Domains.es#editar";
#elif L==2

View File

@ -50,9 +50,9 @@
#include "swad_notification.h"
#include "swad_parameter.h"
#include "swad_preference.h"
#include "swad_social.h"
#include "swad_tab.h"
#include "swad_theme.h"
#include "swad_timeline.h"
#include "swad_web_service.h"
/*****************************************************************************/
@ -685,7 +685,7 @@ static void Lay_WriteScriptInit (void)
case ActRemSocComGbl:
// Refresh timeline via AJAX
fprintf (Gbl.F.Out," setTimeout(\"refreshNewTimeline()\",%lu);\n",
Cfg_TIME_TO_REFRESH_SOCIAL_TIMELINE);
Cfg_TIME_TO_REFRESH_TIMELINE);
break;
default:
break;
@ -738,8 +738,8 @@ static void Lay_WriteScriptParamsAJAX (void)
"var RefreshParamWhichUsrs = \"WhichUsrs=%u\";\n",
Act_GetActCod (ActRefNewSocPubGbl),
Act_GetActCod (ActRefOldSocPubGbl),
Soc_MAX_OLD_PUBS_TO_GET_AND_SHOW,
(unsigned) Gbl.Social.WhichUsrs);
TL_MAX_OLD_PUBS_TO_GET_AND_SHOW,
(unsigned) Gbl.Timeline.WhichUsrs);
break;
case ActSeeOthPubPrf:
case ActRcvSocPstUsr:
@ -759,7 +759,7 @@ static void Lay_WriteScriptParamsAJAX (void)
"var RefreshParamMaxOldPubsToGetAndShow = \"%u\";\n"
"var RefreshParamUsr = \"OtherUsrCod=%s\";\n",
Act_GetActCod (ActRefOldSocPubUsr),
Soc_MAX_OLD_PUBS_TO_GET_AND_SHOW,
TL_MAX_OLD_PUBS_TO_GET_AND_SHOW,
Gbl.Usrs.Other.UsrDat.EncryptedUsrCod);
break;
default:

View File

@ -101,7 +101,7 @@ static void Mai_InsertMailKey (const char Email[Cns_MAX_BYTES_EMAIL_ADDRESS + 1]
void Mai_SeeMailDomains (void)
{
extern const char *Hlp_MESSAGES_Domains;
extern const char *Hlp_START_Domains;
extern const char *Txt_Email_domains_allowed_for_notifications;
extern const char *Txt_EMAIL_DOMAIN_HELP_ORDER[3];
extern const char *Txt_EMAIL_DOMAIN_ORDER[3];
@ -118,7 +118,7 @@ void Mai_SeeMailDomains (void)
Box_StartBoxTable (NULL,Txt_Email_domains_allowed_for_notifications,
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM ? Mai_PutIconToEditMailDomains :
NULL,
Hlp_MESSAGES_Domains,Box_NOT_CLOSABLE,2);
Hlp_START_Domains,Box_NOT_CLOSABLE,2);
/***** Write heading *****/
fprintf (Gbl.F.Out,"<tr>");
@ -444,14 +444,14 @@ void Mai_FreeListMailDomains (void)
static void Mai_ListMailDomainsForEdition (void)
{
extern const char *Hlp_MESSAGES_Domains_edit;
extern const char *Hlp_START_Domains_edit;
extern const char *Txt_Email_domains_allowed_for_notifications;
unsigned NumMai;
struct Mail *Mai;
/***** Start box and table *****/
Box_StartBoxTable (NULL,Txt_Email_domains_allowed_for_notifications,NULL,
Hlp_MESSAGES_Domains_edit,Box_NOT_CLOSABLE,2);
Hlp_START_Domains_edit,Box_NOT_CLOSABLE,2);
/***** Write heading *****/
Mai_PutHeadMailDomains ();
@ -696,7 +696,7 @@ static void Mai_UpdateMailDomainNameDB (long MaiCod,const char *FieldName,const
static void Mai_PutFormToCreateMailDomain (void)
{
extern const char *Hlp_MESSAGES_Domains_edit;
extern const char *Hlp_START_Domains_edit;
extern const char *Txt_New_email_domain;
extern const char *Txt_EMAIL_DOMAIN_ORDER[3];
extern const char *Txt_Create_email_domain;
@ -709,7 +709,7 @@ static void Mai_PutFormToCreateMailDomain (void)
/***** Start box and table *****/
Box_StartBoxTable (NULL,Txt_New_email_domain,NULL,
Hlp_MESSAGES_Domains_edit,Box_NOT_CLOSABLE,2);
Hlp_START_Domains_edit,Box_NOT_CLOSABLE,2);
/***** Write heading *****/
fprintf (Gbl.F.Out,"<tr>"

View File

@ -38,7 +38,7 @@
#include "swad_notification.h"
#include "swad_parameter.h"
#include "swad_RSS.h"
#include "swad_social.h"
#include "swad_timeline.h"
/*****************************************************************************/
/************** External global variables from others modules ****************/
@ -130,7 +130,7 @@ void Not_ReceiveNotice (void)
extern const char *Txt_Notice_created;
long NotCod;
unsigned NumUsrsToBeNotifiedByEMail;
struct SocialPublication SocPub;
struct TL_Publication SocPub;
char Content[Cns_MAX_BYTES_TEXT + 1];
/***** Get the text of the notice *****/
@ -151,7 +151,7 @@ void Not_ReceiveNotice (void)
Not_UpdateNumUsrsNotifiedByEMailAboutNotice (NotCod,NumUsrsToBeNotifiedByEMail);
/***** Create a new social note about the new notice *****/
Soc_StoreAndPublishSocialNote (Soc_NOTE_NOTICE,NotCod,&SocPub);
TL_StoreAndPublishNote (TL_NOTE_NOTICE,NotCod,&SocPub);
}
/*****************************************************************************/
@ -316,7 +316,7 @@ void Not_RemoveNotice (void)
Ntf_MarkNotifAsRemoved (Ntf_EVENT_NOTICE,NotCod);
/***** Mark possible social note as unavailable *****/
Soc_MarkSocialNoteAsUnavailableUsingNoteTypeAndCod (Soc_NOTE_NOTICE,NotCod);
TL_MarkNoteAsUnavailableUsingNoteTypeAndCod (TL_NOTE_NOTICE,NotCod);
/***** Update RSS of current course *****/
RSS_UpdateRSSFileForACrs (&Gbl.CurrentCrs.Crs);

View File

@ -45,8 +45,8 @@
#include "swad_notice.h"
#include "swad_notification.h"
#include "swad_parameter.h"
#include "swad_social.h"
#include "swad_table.h"
#include "swad_timeline.h"
/*****************************************************************************/
/************** External global variables from others modules ****************/
@ -299,7 +299,7 @@ static unsigned Ntf_GetNumberOfMyNewUnseenNtfs (void);
void Ntf_ShowMyNotifications (void)
{
extern const char *Hlp_MESSAGES_Notifications;
extern const char *Hlp_START_Notifications;
extern const char *Txt_Settings;
extern const char *Txt_Domains;
extern const char *Txt_Mark_all_NOTIFICATIONS_as_read;
@ -384,7 +384,7 @@ void Ntf_ShowMyNotifications (void)
/***** Start box *****/
Box_StartBox (NULL,Txt_Notifications,Ntf_PutIconsNotif,
Hlp_MESSAGES_Notifications,Box_NOT_CLOSABLE);
Hlp_START_Notifications,Box_NOT_CLOSABLE);
/***** List my notifications *****/
if (NumNotifications) // Notifications found
@ -744,7 +744,7 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
case Ntf_EVENT_TIMELINE_MENTION:
// Cod is the code of the social publishing
Frm_StartForm (ActSeeSocTmlGbl);
Soc_PutHiddenParamPubCod (Cod);
TL_PutHiddenParamPubCod (Cod);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Ntf_PutHiddenParamNotifyEvent (NotifyEvent);
break;
@ -896,7 +896,7 @@ void Ntf_GetNotifSummaryAndContent (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
case Ntf_EVENT_TIMELINE_SHARE:
case Ntf_EVENT_TIMELINE_MENTION:
// Cod is the code of the social publishing
Soc_GetNotifSocialPublication (SummaryStr,ContentStr,Cod,GetContent);
TL_GetNotifPublication (SummaryStr,ContentStr,Cod,GetContent);
break;
case Ntf_EVENT_FOLLOWER:
Fol_GetNotifFollower (SummaryStr,ContentStr);

View File

@ -44,8 +44,8 @@
#include "swad_profile.h"
#include "swad_role.h"
#include "swad_role_type.h"
#include "swad_social.h"
#include "swad_theme.h"
#include "swad_timeline.h"
#include "swad_user.h"
/*****************************************************************************/
@ -178,7 +178,7 @@ void Prf_PutLinkRequestAnotherUserProfile (void)
void Prf_RequestUserProfile (void)
{
extern const char *Hlp_SOCIAL_Profiles_view_public_profile;
extern const char *Hlp_START_Profiles_view_public_profile;
extern const char *Txt_Another_user_s_profile;
extern const char *The_ClassFormInBox[The_NUM_THEMES];
extern const char *Txt_Nickname;
@ -198,7 +198,7 @@ void Prf_RequestUserProfile (void)
/***** Start box *****/
Box_StartBox (NULL,Txt_Another_user_s_profile,NULL,
Hlp_SOCIAL_Profiles_view_public_profile,Box_NOT_CLOSABLE);
Hlp_START_Profiles_view_public_profile,Box_NOT_CLOSABLE);
/***** Form to request user's @nickname *****/
/* By default, the nickname is filled with my nickname
@ -244,8 +244,8 @@ void Prf_GetUsrDatAndShowUserProfile (void)
if (Gbl.Usrs.Me.Logged) // Timeline visible only by logged users
{
/* Show timeline */
Lay_StartSection (Soc_TIMELINE_SECTION_ID);
Soc_ShowTimelineUsr ();
Lay_StartSection (TL_TIMELINE_SECTION_ID);
TL_ShowTimelineUsr ();
Lay_EndSection ();
}
}
@ -645,8 +645,8 @@ static void Prf_ShowNumSocialPublications (const struct UsrData *UsrDat,
const struct UsrFigures *UsrFigures)
{
extern const char *Txt_Timeline;
extern const char *Txt_SOCIAL_post;
extern const char *Txt_SOCIAL_posts;
extern const char *Txt_TIMELINE_post;
extern const char *Txt_TIMELINE_posts;
extern const char *Txt_day;
/***** Number of social publications *****/
@ -656,8 +656,8 @@ static void Prf_ShowNumSocialPublications (const struct UsrData *UsrDat,
{
fprintf (Gbl.F.Out,"%ld&nbsp;%s&nbsp;",
UsrFigures->NumSocPub,
(UsrFigures->NumSocPub == 1) ? Txt_SOCIAL_post :
Txt_SOCIAL_posts);
(UsrFigures->NumSocPub == 1) ? Txt_TIMELINE_post :
Txt_TIMELINE_posts);
Prf_ShowRanking (Prf_GetRankingFigure (UsrDat->UsrCod,"NumSocPub"),
Prf_GetNumUsrsWithFigure ("NumSocPub"));
if (UsrFigures->NumDays > 0)
@ -1105,7 +1105,7 @@ static void Prf_GetNumSocialPubsAndStoreAsUsrFigure (long UsrCod)
Prf_ResetUsrFigures (&UsrFigures);
/***** Get number of forum posts from database *****/
UsrFigures.NumSocPub = Soc_GetNumPubsUsr (UsrCod);
UsrFigures.NumSocPub = TL_GetNumPubsUsr (UsrCod);
/***** Update number of forum posts in user's figures *****/
if (Prf_CheckIfUsrFiguresExists (UsrCod))

View File

@ -2128,7 +2128,7 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView,
{
extern const char *Hlp_USERS_SignUp;
extern const char *Hlp_PROFILE_Record;
extern const char *Hlp_SOCIAL_Profiles_view_public_profile;
extern const char *Hlp_START_Profiles_view_public_profile;
extern const char *Hlp_USERS_Guests;
extern const char *Hlp_USERS_Students_shared_record_card;
extern const char *Hlp_USERS_Teachers_shared_record_card;
@ -2149,7 +2149,7 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView,
NULL, // Rec_SHA_RECORD_LIST
NULL, // Rec_SHA_RECORD_PRINT
Hlp_SOCIAL_Profiles_view_public_profile, // Rec_SHA_RECORD_PUBLIC
Hlp_START_Profiles_view_public_profile, // Rec_SHA_RECORD_PUBLIC
};
const char *Rec_RecordListHelp[Rol_NUM_ROLES] =
{

View File

@ -35,7 +35,7 @@
#include "swad_database.h"
#include "swad_global.h"
#include "swad_parameter.h"
#include "swad_social.h"
#include "swad_timeline.h"
/*****************************************************************************/
/**************************** Internal constants *****************************/
@ -223,7 +223,7 @@ static void Ses_RemoveSessionFromDB (void)
/***** Clear old unused social timelines in database *****/
// This is necessary to prevent the table growing and growing
Soc_ClearOldTimelinesDB ();
TL_ClearOldTimelinesDB ();
}
/*****************************************************************************/

View File

@ -1,192 +0,0 @@
// swad_social.c: social networking (timeline)
#ifndef _SWAD_SOC
#define _SWAD_SOC
/*
SWAD (Shared Workspace At a Distance in Spanish),
is a web platform developed at the University of Granada (Spain),
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2019 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*****************************************************************************/
/********************************** Headers **********************************/
/*****************************************************************************/
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Soc_TIMELINE_SECTION_ID "timeline"
// Number of recent publishings got and shown the first time, before refreshing
#define Soc_MAX_NEW_PUBS_TO_GET_AND_SHOW 10000 // Unlimited
#define Soc_MAX_REC_PUBS_TO_GET_AND_SHOW 20 // Recent publishings to show (first time)
#define Soc_MAX_OLD_PUBS_TO_GET_AND_SHOW 20 // Old publishings are retrieved in packs of this size
// This constant is also used in JavaScript function readOldTimelineData
/*****************************************************************************/
/******************************** Public types *******************************/
/*****************************************************************************/
#define Soc_NUM_WHICH_USRS 3
typedef enum
{
Soc_USRS_UNKNOWN = 0,
Soc_USRS_FOLLOWED = 1,
Soc_USRS_ALL = 2,
} Soc_WhichUsrs_t; // Which users I want to see: only users I follow or all users
#define Soc_DEFAULT_WHICH_USRS Soc_USRS_FOLLOWED
#define Soc_NUM_PUB_TYPES 4
// If the numbers assigned to each event type change,
// it is necessary to change old numbers to new ones in database table social_notes
typedef enum
{
Soc_PUB_UNKNOWN = 0,
Soc_PUB_ORIGINAL_NOTE = 1,
Soc_PUB_SHARED_NOTE = 2,
Soc_PUB_COMMENT_TO_NOTE = 3,
} Soc_PubType_t;
#define Soc_NUM_NOTE_TYPES 13
// If the numbers assigned to each event type change,
// it is necessary to change old numbers to new ones in database table social_notes
typedef enum
{
Soc_NOTE_UNKNOWN = 0,
/* Institution tab */
Soc_NOTE_INS_DOC_PUB_FILE = 1,
Soc_NOTE_INS_SHA_PUB_FILE = 2,
/* Centre tab */
Soc_NOTE_CTR_DOC_PUB_FILE = 3,
Soc_NOTE_CTR_SHA_PUB_FILE = 4,
/* Degree tab */
Soc_NOTE_DEG_DOC_PUB_FILE = 5,
Soc_NOTE_DEG_SHA_PUB_FILE = 6,
/* Course tab */
Soc_NOTE_CRS_DOC_PUB_FILE = 7,
Soc_NOTE_CRS_SHA_PUB_FILE = 8,
/* Assessment tab */
Soc_NOTE_EXAM_ANNOUNCEMENT = 9,
/* Users tab */
/* Social tab */
Soc_NOTE_SOCIAL_POST = 10,
Soc_NOTE_FORUM_POST = 11,
/* Messages tab */
Soc_NOTE_NOTICE = 12,
/* Statistics tab */
/* Profile tab */
} Soc_NoteType_t;
#define Soc_NUM_TOP_MESSAGES (1 + 6)
typedef enum
{
Soc_TOP_MESSAGE_NONE = 0,
Soc_TOP_MESSAGE_COMMENTED = 1,
Soc_TOP_MESSAGE_FAVED = 2,
Soc_TOP_MESSAGE_UNFAVED = 3,
Soc_TOP_MESSAGE_SHARED = 4,
Soc_TOP_MESSAGE_UNSHARED = 5,
Soc_TOP_MESSAGE_MENTIONED = 6,
} Soc_TopMessage_t;
struct SocialPublication
{
long PubCod;
long NotCod;
long PublisherCod; // Sharer or writer of a comment
Soc_PubType_t PubType;
time_t DateTimeUTC;
Soc_TopMessage_t TopMessage; // Used to show feedback on the action made
};
/*****************************************************************************/
/****************************** Public prototypes ****************************/
/*****************************************************************************/
void Soc_ShowTimelineGbl1 (void);
void Soc_ShowTimelineGbl2 (void);
void Soc_ShowTimelineUsr (void);
void Soc_RefreshNewTimelineGbl (void);
void Soc_RefreshOldTimelineGbl (void);
void Soc_RefreshOldTimelineUsr (void);
void Soc_MarkMyNotifAsSeen (void);
void Soc_StoreAndPublishSocialNote (Soc_NoteType_t NoteType,long Cod,struct SocialPublication *SocPub);
void Soc_MarkSocialNoteAsUnavailableUsingNotCod (long NotCod);
void Soc_MarkSocialNoteAsUnavailableUsingNoteTypeAndCod (Soc_NoteType_t NoteType,long Cod);
void Soc_MarkSocialNoteOneFileAsUnavailable (const char *Path);
void Soc_MarkSocialNotesChildrenOfFolderAsUnavailable (const char *Path);
void Soc_ReceiveSocialPostGbl (void);
void Soc_ReceiveSocialPostUsr (void);
void Soc_PutHiddenParamPubCod (long PubCod);
void Soc_ReceiveCommentGbl (void);
void Soc_ReceiveCommentUsr (void);
void Soc_ShareSocialNoteGbl (void);
void Soc_ShareSocialNoteUsr (void);
void Soc_FavSocialNoteGbl (void);
void Soc_FavSocialNoteUsr (void);
void Soc_FavSocialCommentGbl (void);
void Soc_FavSocialCommentUsr (void);
void Soc_UnshareSocialNoteGbl (void);
void Soc_UnshareSocialNoteUsr (void);
void Soc_UnfavSocialNoteGbl (void);
void Soc_UnfavSocialNoteUsr (void);
void Soc_UnfavSocialCommentGbl (void);
void Soc_UnfavSocialCommentUsr (void);
void Soc_RequestRemSocialNoteGbl (void);
void Soc_RequestRemSocialNoteUsr (void);
void Soc_RemoveSocialNoteGbl (void);
void Soc_RemoveSocialNoteUsr (void);
void Soc_RequestRemSocialComGbl (void);
void Soc_RequestRemSocialComUsr (void);
void Soc_RemoveSocialComGbl (void);
void Soc_RemoveSocialComUsr (void);
void Soc_RemoveUsrSocialContent (long UsrCod);
void Soc_ClearOldTimelinesDB (void);
void Soc_GetNotifSocialPublication (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
char **ContentStr,
long PubCod,bool GetContent);
unsigned long Soc_GetNumPubsUsr (long UsrCod);
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

192
swad_timeline.h Normal file
View File

@ -0,0 +1,192 @@
// swad_timeline.c: social timeline
#ifndef _SWAD_TL
#define _SWAD_TL
/*
SWAD (Shared Workspace At a Distance in Spanish),
is a web platform developed at the University of Granada (Spain),
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2019 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*****************************************************************************/
/********************************** Headers **********************************/
/*****************************************************************************/
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
#define TL_TIMELINE_SECTION_ID "timeline"
// Number of recent publishings got and shown the first time, before refreshing
#define TL_MAX_NEW_PUBS_TO_GET_AND_SHOW 10000 // Unlimited
#define TL_MAX_REC_PUBS_TO_GET_AND_SHOW 10 // Recent publishings to show (first time)
#define TL_MAX_OLD_PUBS_TO_GET_AND_SHOW 10 // Old publishings are retrieved in packs of this size
// This constant is also used in JavaScript function readOldTimelineData
/*****************************************************************************/
/******************************** Public types *******************************/
/*****************************************************************************/
#define TL_NUM_WHICH_USRS 3
typedef enum
{
TL_USRS_UNKNOWN = 0,
TL_USRS_FOLLOWED = 1,
TL_USRS_ALL = 2,
} TL_WhichUsrs_t; // Which users I want to see: only users I follow or all users
#define TL_DEFAULT_WHICH_USRS TL_USRS_FOLLOWED
#define TL_NUM_PUB_TYPES 4
// If the numbers assigned to each event type change,
// it is necessary to change old numbers to new ones in database table social_notes
typedef enum
{
TL_PUB_UNKNOWN = 0,
TL_PUB_ORIGINAL_NOTE = 1,
TL_PUB_SHARED_NOTE = 2,
TL_PUB_COMMENT_TO_NOTE = 3,
} TL_PubType_t;
#define TL_NUM_NOTE_TYPES 13
// If the numbers assigned to each event type change,
// it is necessary to change old numbers to new ones in database table social_notes
typedef enum
{
TL_NOTE_UNKNOWN = 0,
/* Institution tab */
TL_NOTE_INS_DOC_PUB_FILE = 1,
TL_NOTE_INS_SHA_PUB_FILE = 2,
/* Centre tab */
TL_NOTE_CTR_DOC_PUB_FILE = 3,
TL_NOTE_CTR_SHA_PUB_FILE = 4,
/* Degree tab */
TL_NOTE_DEG_DOC_PUB_FILE = 5,
TL_NOTE_DEG_SHA_PUB_FILE = 6,
/* Course tab */
TL_NOTE_CRS_DOC_PUB_FILE = 7,
TL_NOTE_CRS_SHA_PUB_FILE = 8,
/* Assessment tab */
TL_NOTE_EXAM_ANNOUNCEMENT = 9,
/* Users tab */
/* Start tab */ // TODO: Move to the top
TL_NOTE_POST = 10,
TL_NOTE_FORUM_POST = 11,
/* Messages tab */
TL_NOTE_NOTICE = 12,
/* Statistics tab */
/* Profile tab */
} TL_NoteType_t;
#define TL_NUM_TOP_MESSAGES (1 + 6)
typedef enum
{
TL_TOP_MESSAGE_NONE = 0,
TL_TOP_MESSAGE_COMMENTED = 1,
TL_TOP_MESSAGE_FAVED = 2,
TL_TOP_MESSAGE_UNFAVED = 3,
TL_TOP_MESSAGE_SHARED = 4,
TL_TOP_MESSAGE_UNSHARED = 5,
TL_TOP_MESSAGE_MENTIONED = 6,
} TL_TopMessage_t;
struct TL_Publication
{
long PubCod;
long NotCod;
long PublisherCod; // Sharer or writer of a comment
TL_PubType_t PubType;
time_t DateTimeUTC;
TL_TopMessage_t TopMessage; // Used to show feedback on the action made
};
/*****************************************************************************/
/****************************** Public prototypes ****************************/
/*****************************************************************************/
void TL_ShowTimelineGbl1 (void);
void TL_ShowTimelineGbl2 (void);
void TL_ShowTimelineUsr (void);
void TL_RefreshNewTimelineGbl (void);
void TL_RefreshOldTimelineGbl (void);
void TL_RefreshOldTimelineUsr (void);
void TL_MarkMyNotifAsSeen (void);
void TL_StoreAndPublishNote (TL_NoteType_t NoteType,long Cod,struct TL_Publication *SocPub);
void TL_MarkNoteAsUnavailableUsingNotCod (long NotCod);
void TL_MarkNoteAsUnavailableUsingNoteTypeAndCod (TL_NoteType_t NoteType,long Cod);
void TL_MarkNoteOneFileAsUnavailable (const char *Path);
void TL_MarkNotesChildrenOfFolderAsUnavailable (const char *Path);
void TL_ReceivePostGbl (void);
void TL_ReceivePostUsr (void);
void TL_PutHiddenParamPubCod (long PubCod);
void TL_ReceiveCommentGbl (void);
void TL_ReceiveCommentUsr (void);
void TL_ShareNoteGbl (void);
void TL_ShareNoteUsr (void);
void TL_FavNoteGbl (void);
void TL_FavNoteUsr (void);
void TL_FavCommentGbl (void);
void TL_FavCommentUsr (void);
void TL_UnshareNoteGbl (void);
void TL_UnshareNoteUsr (void);
void TL_UnfavNoteGbl (void);
void TL_UnfavNoteUsr (void);
void TL_UnfavCommentGbl (void);
void TL_UnfavCommentUsr (void);
void TL_RequestRemNoteGbl (void);
void TL_RequestRemNoteUsr (void);
void TL_RemoveNoteGbl (void);
void TL_RemoveNoteUsr (void);
void TL_RequestRemComGbl (void);
void TL_RequestRemComUsr (void);
void TL_RemoveComGbl (void);
void TL_RemoveComUsr (void);
void TL_RemoveUsrContent (long UsrCod);
void TL_ClearOldTimelinesDB (void);
void TL_GetNotifPublication (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
char **ContentStr,
long PubCod,bool GetContent);
unsigned long TL_GetNumPubsUsr (long UsrCod);
#endif