mirror of https://github.com/acanas/swad-core.git
Version 14.81.1
This commit is contained in:
parent
d3afaf9101
commit
5c0fafb58a
|
@ -103,11 +103,12 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 14.81 (2015/03/09)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 14.81.1 (2015/03/09)"
|
||||
|
||||
// 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 | tail -1
|
||||
/*
|
||||
Version 14.81.1: Mar 09, 2015 Information about number of messages sent in user's public profile. (179545 lines)
|
||||
Version 14.81: Mar 09, 2015 Information about number of forum posts in user's public profile. (179512 lines)
|
||||
Version 14.80.19: Mar 09, 2015 Fixed bug in web service, reported by Juan Miguel Boyero Corral. (179482 lines)
|
||||
Version 14.80.18: Mar 09, 2015 Fixed bug in statistic of degrees and courses. (179481 lines)
|
||||
|
|
|
@ -1793,6 +1793,24 @@ unsigned Msg_GetNumMsgsSentByTchsCrs (long CrsCod)
|
|||
return (unsigned) DB_QueryCOUNT (Query,"can not get the number of messages sent by teachers");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Get the number of unique messages sent by a user *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
unsigned Msg_GetNumMsgsSentByUsr (long UsrCod)
|
||||
{
|
||||
char Query[256];
|
||||
|
||||
/***** Get the number of unique messages sent by any teacher from this course *****/
|
||||
sprintf (Query,"SELECT"
|
||||
" (SELECT COUNT(*) FROM msg_snt WHERE UsrCod='%ld')"
|
||||
" +"
|
||||
" (SELECT COUNT(*) FROM msg_snt_deleted WHERE UsrCod='%ld')",
|
||||
UsrCod,
|
||||
UsrCod);
|
||||
return (unsigned) DB_QueryCOUNT (Query,"can not get the number of messages sent by a user");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******** Get the number of unique messages sent from this location **********/
|
||||
/******** (all the platform, current degree or current course) **********/
|
||||
|
|
|
@ -89,6 +89,7 @@ void Msg_ShowSntMsgs (void);
|
|||
void Msg_ShowRecMsgs (void);
|
||||
|
||||
unsigned Msg_GetNumMsgsSentByTchsCrs (long CrsCod);
|
||||
unsigned Msg_GetNumMsgsSentByUsr (long UsrCod);
|
||||
unsigned Msg_GetNumMsgsSent (Sco_Scope_t Scope,Msg_Status_t MsgStatus);
|
||||
unsigned Msg_GetNumMsgsReceived (Sco_Scope_t Scope,Msg_Status_t MsgStatus);
|
||||
void Msg_WriteNumMsgs (unsigned NumMsgs,unsigned NumUnreadMsgs);
|
||||
|
|
17
swad_user.c
17
swad_user.c
|
@ -7521,6 +7521,7 @@ void Usr_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
|||
extern const char *Txt_Shortcut;
|
||||
extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
|
||||
extern const char *Txt_Forum_posts;
|
||||
extern const char *Txt_Messages_sent;
|
||||
|
||||
/***** Start table *****/
|
||||
Lay_StartRoundFrameTable10 (NULL,2,NULL);
|
||||
|
@ -7559,6 +7560,22 @@ void Usr_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
|||
Txt_Forum_posts,
|
||||
For_GetNumPostsUsr (UsrDat->UsrCod));
|
||||
|
||||
/***** Number of messages sent *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s\""
|
||||
" style=\"text-align:right; vertical-align:middle;\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT\""
|
||||
" style=\"text-align:left; vertical-align:middle;\">"
|
||||
"%u"
|
||||
"</a>"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
The_ClassFormul[Gbl.Prefs.Theme],
|
||||
Txt_Messages_sent,
|
||||
Msg_GetNumMsgsSentByUsr (UsrDat->UsrCod));
|
||||
|
||||
/***** End of table *****/
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue