mirror of https://github.com/acanas/swad-core.git
Version 15.77
This commit is contained in:
parent
c0ba17bbb0
commit
1ea6c54d86
|
@ -11181,4 +11181,11 @@ UPDATE timetable_crs SET Hour=Hour+2;
|
|||
UPDATE timetable_tut SET Hour=Hour+2;
|
||||
|
||||
|
||||
SELECT COUNT(DISTINCT crs_usr.UsrCod) FROM institutions,centres,degrees,courses,crs_usr WHERE institutions.CtyCod='724' AND institutions.InsCod=centres.InsCod AND centres.CtrCod=degrees.CtrCod AND degrees.DegCod=courses.DegCod AND courses.CrsCod=crs_usr.CrsCod;
|
||||
SELECT COUNT(DISTINCT crs_usr.UsrCod) FROM institutions,centres,degrees,courses,crs_usr WHERE institutions.CtyCod='724' AND institutions.InsCod=centres.InsCod AND centres.CtrCod=degrees.CtrCod AND degrees.DegCod=courses.DegCod AND courses.CrsCod=crs_usr.CrsCod;
|
||||
|
||||
|
||||
|
||||
----- SWAD 15.77 (2015/12/28) -----
|
||||
|
||||
CREATE TABLE IF NOT EXISTS social (SocCod BIGINT NOT NULL AUTO_INCREMENT,SocialEvent TINYINT NOT NULL,UsrCod INT NOT NULL,CtyCod INT NOT NULL DEFAULT -1,InsCod INT NOT NULL DEFAULT -1,CtrCod INT NOT NULL DEFAULT -1,DegCod INT NOT NULL DEFAULT -1,CrsCod INT NOT NULL DEFAULT -1,Cod INT NOT NULL DEFAULT -1,TimeEvent DATETIME NOT NULL,Status TINYINT NOT NULL DEFAULT 0,UNIQUE INDEX(SocCod),INDEX(SocialEvent),INDEX(UsrCod),INDEX(TimeEvent));
|
||||
|
||||
|
|
19
sql/swad.sql
19
sql/swad.sql
|
@ -913,6 +913,25 @@ CREATE TABLE IF NOT EXISTS sessions (
|
|||
UNIQUE INDEX(SessionId),
|
||||
INDEX(UsrCod));
|
||||
--
|
||||
-- Table social: stores social events (timeline)
|
||||
--
|
||||
CREATE TABLE IF NOT EXISTS social (
|
||||
SocCod BIGINT NOT NULL AUTO_INCREMENT,
|
||||
SocialEvent TINYINT NOT NULL,
|
||||
UsrCod INT NOT NULL,
|
||||
CtyCod INT NOT NULL DEFAULT -1,
|
||||
InsCod INT NOT NULL DEFAULT -1,
|
||||
CtrCod INT NOT NULL DEFAULT -1,
|
||||
DegCod INT NOT NULL DEFAULT -1,
|
||||
CrsCod INT NOT NULL DEFAULT -1,
|
||||
Cod INT NOT NULL DEFAULT -1,
|
||||
TimeEvent DATETIME NOT NULL,
|
||||
Status TINYINT NOT NULL DEFAULT 0,
|
||||
UNIQUE INDEX(SocCod),
|
||||
INDEX(SocialEvent),
|
||||
INDEX(UsrCod),
|
||||
INDEX(TimeEvent));
|
||||
--
|
||||
-- Table sta_degrees: stores statistics about degrees
|
||||
--
|
||||
CREATE TABLE IF NOT EXISTS sta_degrees (
|
||||
|
|
|
@ -114,12 +114,17 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.76.1 (2015-12-28)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.77 (2015-12-28)"
|
||||
#define CSS_FILE "swad15.75.css"
|
||||
|
||||
// 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 15.77: Dec 28, 2015 New table in database for social activity. (188287 lines)
|
||||
2 changes necessary in database:
|
||||
CREATE TABLE IF NOT EXISTS social (SocCod BIGINT NOT NULL AUTO_INCREMENT,SocialEvent TINYINT NOT NULL,UsrCod INT NOT NULL,CtyCod INT NOT NULL DEFAULT -1,InsCod INT NOT NULL DEFAULT -1,CtrCod INT NOT NULL DEFAULT -1,DegCod INT NOT NULL DEFAULT -1,CrsCod INT NOT NULL DEFAULT -1,Cod INT NOT NULL DEFAULT -1,TimeEvent DATETIME NOT NULL,Status TINYINT NOT NULL DEFAULT 0,UNIQUE INDEX(SocCod),INDEX(SocialEvent),INDEX(UsrCod),INDEX(TimeEvent));
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1490','es','N','Ver actividad social (timeline)');
|
||||
|
||||
Version 15.76.1: Dec 28, 2015 Refactoring in swad_database. (187926 lines)
|
||||
Version 15.76: Dec 28, 2015 New option for social network activity (timeline).
|
||||
New module swad_social. (187807 lines)
|
||||
|
|
|
@ -1935,6 +1935,43 @@ mysql> DESCRIBE sessions;
|
|||
"UNIQUE INDEX(SessionId),"
|
||||
"INDEX(UsrCod))");
|
||||
|
||||
/***** Table social *****/
|
||||
/*
|
||||
mysql> DESCRIBE social;
|
||||
+-------------+------------+------+-----+---------+----------------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+-------------+------------+------+-----+---------+----------------+
|
||||
| SocCod | bigint(20) | NO | PRI | NULL | auto_increment |
|
||||
| SocialEvent | tinyint(4) | NO | MUL | NULL | |
|
||||
| UsrCod | int(11) | NO | MUL | NULL | |
|
||||
| CtyCod | int(11) | NO | | -1 | |
|
||||
| InsCod | int(11) | NO | | -1 | |
|
||||
| CtrCod | int(11) | NO | | -1 | |
|
||||
| DegCod | int(11) | NO | | -1 | |
|
||||
| CrsCod | int(11) | NO | | -1 | |
|
||||
| Cod | int(11) | NO | | -1 | |
|
||||
| TimeEvent | datetime | NO | MUL | NULL | |
|
||||
| Status | tinyint(4) | NO | | 0 | |
|
||||
+-------------+------------+------+-----+---------+----------------+
|
||||
11 rows in set (0.00 sec)
|
||||
*/
|
||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS social ("
|
||||
"SocCod BIGINT NOT NULL AUTO_INCREMENT,"
|
||||
"SocialEvent TINYINT NOT NULL,"
|
||||
"UsrCod INT NOT NULL,"
|
||||
"CtyCod INT NOT NULL DEFAULT -1,"
|
||||
"InsCod INT NOT NULL DEFAULT -1,"
|
||||
"CtrCod INT NOT NULL DEFAULT -1,"
|
||||
"DegCod INT NOT NULL DEFAULT -1,"
|
||||
"CrsCod INT NOT NULL DEFAULT -1,"
|
||||
"Cod INT NOT NULL DEFAULT -1,"
|
||||
"TimeEvent DATETIME NOT NULL,"
|
||||
"Status TINYINT NOT NULL DEFAULT 0,"
|
||||
"UNIQUE INDEX(SocCod),"
|
||||
"INDEX(SocialEvent),"
|
||||
"INDEX(UsrCod),"
|
||||
"INDEX(TimeEvent))");
|
||||
|
||||
/***** Table sta_degrees *****/
|
||||
/*
|
||||
mysql> DESCRIBE sta_degrees;
|
||||
|
|
|
@ -1273,11 +1273,13 @@ static void For_GetPstData (long PstCod,long *UsrCod,time_t *CreatTimeUTC,
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************* Show brief subject of a forum post ********************/
|
||||
/***************** Get summary and content for a forum post ******************/
|
||||
/*****************************************************************************/
|
||||
// This function may be called inside a web service, so don't report error
|
||||
|
||||
void For_GetNotifForumPst (char *SummaryStr,char **ContentStr,long PstCod,unsigned MaxChars,bool GetContent)
|
||||
void For_GetSummaryAndContentForumPst (char *SummaryStr,char **ContentStr,
|
||||
long PstCod,
|
||||
unsigned MaxChars,bool GetContent)
|
||||
{
|
||||
char Query[512];
|
||||
MYSQL_RES *mysql_res;
|
||||
|
|
|
@ -109,7 +109,9 @@ unsigned long For_GetNumPostsUsr (long UsrCod);
|
|||
void For_DeleteThrFromReadThrs (long ThrCod);
|
||||
void For_RemoveUsrFromReadThrs (long UsrCod);
|
||||
|
||||
void For_GetNotifForumPst (char *SummaryStr,char **ContentStr,long PstCod,unsigned MaxChars,bool GetContent);
|
||||
void For_GetSummaryAndContentForumPst (char *SummaryStr,char **ContentStr,
|
||||
long PstCod,
|
||||
unsigned MaxChars,bool GetContent);
|
||||
|
||||
void For_PutAllHiddenParamsForum (void);
|
||||
void For_SetForumTypeAndRestrictAccess (void);
|
||||
|
|
|
@ -535,7 +535,7 @@ void Ntf_ShowMyNotifications (void)
|
|||
fprintf (Gbl.F.Out,"-");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Write date and time (DateTime holds date and time in YYYYMMDDHHMMSS format) */
|
||||
/* Write date and time */
|
||||
Msg_WriteMsgDate (DateTimeUTC,ClassBackground);
|
||||
|
||||
/* Write status (sent by email / pending to be sent by email) */
|
||||
|
@ -722,7 +722,7 @@ Ntf_StatusTxt_t Ntf_GetStatusTxtFromStatusBits (Ntf_Status_t Status)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************* Mark possible notification as seen ********************/
|
||||
/******************* Get notification summary and content ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Ntf_GetNotifSummaryAndContent (char *SummaryStr,char **ContentStr,Ntf_NotifyEvent_t NotifyEvent,
|
||||
|
@ -759,7 +759,7 @@ void Ntf_GetNotifSummaryAndContent (char *SummaryStr,char **ContentStr,Ntf_Notif
|
|||
break;
|
||||
case Ntf_EVENT_FORUM_POST_COURSE:
|
||||
case Ntf_EVENT_FORUM_REPLY:
|
||||
For_GetNotifForumPst (SummaryStr,ContentStr,Cod,MaxChars,GetContent);
|
||||
For_GetSummaryAndContentForumPst (SummaryStr,ContentStr,Cod,MaxChars,GetContent);
|
||||
break;
|
||||
case Ntf_EVENT_MESSAGE:
|
||||
Msg_GetNotifMessage (SummaryStr,ContentStr,Cod,MaxChars,GetContent);
|
||||
|
@ -774,10 +774,6 @@ void Ntf_GetNotifSummaryAndContent (char *SummaryStr,char **ContentStr,Ntf_Notif
|
|||
Fol_GetNotifFollower (SummaryStr,ContentStr);
|
||||
break;
|
||||
}
|
||||
|
||||
//if (Gbl.WebService.IsWebService)
|
||||
/* Set the notification as seen, because I can see it in an extern application */
|
||||
// Ntf_SetNotifAsSeen (NotifyEvent,Cod,UsrCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
21
swad_text.c
21
swad_text.c
|
@ -27613,6 +27613,27 @@ const char *Txt_posts =
|
|||
"posts";
|
||||
#endif
|
||||
|
||||
const char *Txt_Public_activity =
|
||||
#if L==1
|
||||
"Activitat pública";
|
||||
#elif L==2
|
||||
"Öffentliche Aktivität";
|
||||
#elif L==3
|
||||
"Public activity";
|
||||
#elif L==4
|
||||
"Actividad pública";
|
||||
#elif L==5
|
||||
"Activité public";
|
||||
#elif L==6
|
||||
"Actividad pública"; // Okoteve traducción
|
||||
#elif L==7
|
||||
"Attività pubblica";
|
||||
#elif L==8
|
||||
"Aktywność publiczne";
|
||||
#elif L==9
|
||||
"Atividade pública";
|
||||
#endif
|
||||
|
||||
const char *Txt_public_FILES =
|
||||
#if L==1
|
||||
"públics";
|
||||
|
|
Loading…
Reference in New Issue