From 1157b55ef48ef641103d398881e24c88e22d684e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sun, 11 Sep 2016 14:55:35 +0200 Subject: [PATCH] Version 15.250.7 --- swad_changelog.h | 3 ++- swad_profile.c | 2 +- swad_report.c | 23 +++++++++++++++++++++++ swad_text.c | 23 ++++++++++++++++++++++- 4 files changed, 48 insertions(+), 3 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 7a6591860..8dada3e21 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -135,13 +135,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.250.7 (2016-09-11)" +#define Log_PLATFORM_VERSION "SWAD 15.250.8 (2016-09-11)" #define CSS_FILE "swad15.229.css" #define JS_FILE "swad15.238.1.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 15.250.8: Sep 11, 2016 Number of messages sent in user's usage report. (204278 lines) Version 15.250.7: Sep 11, 2016 Number of posts in forums in user's usage report. (204235 lines) Version 15.250.6: Sep 11, 2016 Number of downloads in user's usage report. (204207 lines) Version 15.250.5: Sep 11, 2016 Number of clicks in user's usage report. (204189 lines) diff --git a/swad_profile.c b/swad_profile.c index 7d7e6e097..c2b7006d3 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -568,7 +568,7 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat) fprintf (Gbl.F.Out,"/%s)",Txt_day); } } - else // Number of clicks is unknown + else // Number of messages sent is unknown /***** Button to fetch and store number of messages sent *****/ Prf_PutLinkToUpdateAction (ActCalNumMsgSnt,UsrDat->EncryptedUsrCod); fprintf (Gbl.F.Out,""); diff --git a/swad_report.c b/swad_report.c index 11ccf3004..43e016133 100644 --- a/swad_report.c +++ b/swad_report.c @@ -104,6 +104,9 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint) extern const char *Txt_Forum_posts; extern const char *Txt_post; extern const char *Txt_posts; + extern const char *Txt_Messages_sent; + extern const char *Txt_message; + extern const char *Txt_messages; unsigned NumID; char CtyName[Cty_MAX_BYTES_COUNTRY_NAME+1]; struct Institution Ins; @@ -255,6 +258,26 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint) fprintf (Gbl.F.Out,"?"); fprintf (Gbl.F.Out,""); + /***** Number of messages sent *****/ + fprintf (Gbl.F.Out,"
  • %s: ",Txt_Messages_sent); + if (UsrFigures.NumMsgSnt >= 0) + { + fprintf (Gbl.F.Out,"%ld %s", + UsrFigures.NumMsgSnt, + (UsrFigures.NumMsgSnt == 1) ? Txt_message : + Txt_messages); + if (UsrFigures.NumDays > 0) + { + fprintf (Gbl.F.Out," ("); + Str_WriteFloatNum ((float) UsrFigures.NumMsgSnt / + (float) UsrFigures.NumDays); + fprintf (Gbl.F.Out,"/%s)",Txt_day); + } + } + else // Number of messages sent is unknown + fprintf (Gbl.F.Out,"?"); + fprintf (Gbl.F.Out,"
  • "); + fprintf (Gbl.F.Out,""); /***** Show details of user's profile *****/ diff --git a/swad_text.c b/swad_text.c index 2e283184a..3eec9f7e8 100644 --- a/swad_text.c +++ b/swad_text.c @@ -21210,9 +21210,30 @@ const char *Txt_messages_sent = "mensagens enviadas"; #endif +const char *Txt_Messages_sent = +#if L==1 + "Missatges enviats"; +#elif L==2 + "Gesendete Nachrichten"; +#elif L==3 + "Messages sent"; +#elif L==4 + "Mensajes enviados"; +#elif L==5 + "Messages envoyés"; +#elif L==6 + "Mensajes enviados"; // Okoteve traducción +#elif L==7 + "Messaggi inviati"; +#elif L==8 + "Wiadomości wysylane"; +#elif L==9 + "Mensagens enviadas"; +#endif + const char *Txt_Messages_sent_by_teachers = #if L==1 - "Mensajes enviados por profesores"; // Necessita traduccio + "Missatges enviats per professors"; #elif L==2 "Gesendete Nachrichten, die von Lehrkräften"; #elif L==3