diff --git a/swad_changelog.h b/swad_changelog.h
index 368b2ce70..794ff77ed 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -103,11 +103,12 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 14.81.3 (2015/03/09)"
+#define Log_PLATFORM_VERSION "SWAD 14.81.4 (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.4: Mar 09, 2015 Information about number of public files in user's public profile. (179733 lines)
Version 14.81.3: Mar 09, 2015 Information about number of files in user's public profile. (179670 lines)
Version 14.81.2: Mar 09, 2015 Information about number of courses in user's public profile. (179641 lines)
Version 14.81.1: Mar 09, 2015 Information about number of messages sent in user's public profile. (179545 lines)
diff --git a/swad_file_browser.c b/swad_file_browser.c
index 0cb667ed5..f11fca367 100644
--- a/swad_file_browser.c
+++ b/swad_file_browser.c
@@ -10158,6 +10158,21 @@ unsigned Brw_GetNumFilesUsr (long UsrCod)
return (unsigned) DB_QueryCOUNT (Query,"can not number of files from a user");
}
+/*****************************************************************************/
+/******************* Get number of public files from a user ******************/
+/*****************************************************************************/
+
+unsigned Brw_GetNumPublicFilesUsr (long UsrCod)
+ {
+ char Query[128];
+
+ /***** Get number of posts from a user from database *****/
+ sprintf (Query,"SELECT COUNT(*) FROM files"
+ " WHERE PublisherUsrCod='%ld' AND Public='Y'",
+ UsrCod);
+ return (unsigned) DB_QueryCOUNT (Query,"can not number of public files from a user");
+ }
+
/*****************************************************************************/
/***************** Change hiddeness of file in the database ******************/
/*****************************************************************************/
diff --git a/swad_file_browser.h b/swad_file_browser.h
index f638303ae..27d03cd7b 100644
--- a/swad_file_browser.h
+++ b/swad_file_browser.h
@@ -187,6 +187,7 @@ bool Brw_GetFileTypeSizeAndDate (struct FileMetadata *FileMetadata);
void Brw_GetAndUpdateFileViews (struct FileMetadata *FileMetadata);
void Brw_UpdateMyFileViews (long FilCod);
unsigned Brw_GetNumFilesUsr (long UsrCod);
+unsigned Brw_GetNumPublicFilesUsr (long UsrCod);
long Brw_GetCodForFiles (void);
void Brw_GetCrsGrpFromFileMetadata (Brw_FileBrowser_t FileBrowser,long Cod,
diff --git a/swad_text.c b/swad_text.c
index e76f65b57..70fcdb398 100644
--- a/swad_text.c
+++ b/swad_text.c
@@ -10830,6 +10830,27 @@ const char *Txt_Field_BR_name =
"Nome
do campo";
#endif
+const char *Txt_Figures =
+#if L==0
+ "Xifres";
+#elif L==1
+ "Zahlen";
+#elif L==2
+ "Figures";
+#elif L==3
+ "Cifras";
+#elif L==4
+ "Chiffres";
+#elif L==5
+ "Cifras"; // Okoteve traducción
+#elif L==6
+ "Cifre";
+#elif L==7
+ "Cyfry";
+#elif L==8
+ "Números";
+#endif
+
const char *Txt_File =
#if L==0
"Fitxer";
@@ -23326,7 +23347,7 @@ const char *Txt_No_of_messages_BR_per_thread =
const char *Txt_No_of_private_files =
#if L==0
- "Nº de archivos privados"; // Necessita traduccio
+ "Nombre d'arxius privats";
#elif L==1
"Anzahl der private Dateien";
#elif L==2
@@ -23347,7 +23368,7 @@ const char *Txt_No_of_private_files =
const char *Txt_No_of_public_files =
#if L==0
- "Nº de archivos públicos"; // Necessita traduccio
+ "Nombre d'arxius públics";
#elif L==1
"Anzahl der öffentliche Dateien";
#elif L==2
@@ -27049,6 +27070,27 @@ const char *Txt_posts =
"posts";
#endif
+const char *Txt_public_files =
+#if L==0
+ "arxius públics";
+#elif L==1
+ "öffentliche Dateien";
+#elif L==2
+ "public files";
+#elif L==3
+ "archivos públicos";
+#elif L==4
+ "fichiers publics";
+#elif L==5
+ "archivos públicos"; // Okoteve traducción
+#elif L==6
+ "file pubblici";
+#elif L==7
+ "publicznych pliki";
+#elif L==8
+ "arquivos públicos";
+#endif
+
const char *Txt_Public_open_educational_resource_OER_for_everyone =
#if L==0
"Públic, recurs educatiu obert (OER) per a tothom";
diff --git a/swad_user.c b/swad_user.c
index 290235494..ac587010c 100644
--- a/swad_user.c
+++ b/swad_user.c
@@ -7553,19 +7553,23 @@ void Usr_ChangeProfileVisibility (void)
void Usr_ShowDetailsUserProfile (const struct UsrData *UsrDat)
{
extern const char *The_ClassFormul[The_NUM_THEMES];
+ extern const char *Txt_Figures;
// extern const char *Txt_Shortcut;
// extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
extern const char *Txt_Courses_as_a_ROLE;
extern const char *Txt_ROLES_SINGULAR_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
extern const char *Txt_ROLES_PLURAL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
extern const char *Txt_Files;
+ extern const char *Txt_public_files;
extern const char *Txt_Forum_posts;
extern const char *Txt_Messages_sent;
- unsigned NumCrssUsrIsTeacher = Usr_GetNumCrssOfUsrWithARole (UsrDat->UsrCod,Rol_ROLE_TEACHER);
- unsigned NumCrssUsrIsStudent = Usr_GetNumCrssOfUsrWithARole (UsrDat->UsrCod,Rol_ROLE_STUDENT);
+ unsigned NumCrssUsrIsTeacher;
+ unsigned NumCrssUsrIsStudent;
+ unsigned NumFiles;
+ unsigned NumPublicFiles;
/***** Start table *****/
- Lay_StartRoundFrameTable10 (NULL,2,NULL);
+ Lay_StartRoundFrameTable10 (NULL,2,Txt_Figures);
/***** Shortcut to the user's profile *****/
/*
@@ -7587,7 +7591,7 @@ void Usr_ShowDetailsUserProfile (const struct UsrData *UsrDat)
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],UsrDat->Nickname);
*/
/***** Number of courses in which the user is teacher or student *****/
- if (NumCrssUsrIsTeacher)
+ if ((NumCrssUsrIsTeacher = Usr_GetNumCrssOfUsrWithARole (UsrDat->UsrCod,Rol_ROLE_TEACHER)))
{
fprintf (Gbl.F.Out,"