mirror of https://github.com/acanas/swad-core.git
Version 14.81.4
This commit is contained in:
parent
3019e99951
commit
cd31719a48
|
@ -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)
|
||||
|
|
|
@ -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 ******************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -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,
|
||||
|
|
46
swad_text.c
46
swad_text.c
|
@ -10830,6 +10830,27 @@ const char *Txt_Field_BR_name =
|
|||
"Nome<br />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";
|
||||
|
|
23
swad_user.c
23
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,"<tr>"
|
||||
"<td class=\"%s\""
|
||||
|
@ -7606,7 +7610,7 @@ void Usr_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
|||
Usr_GetNumUsrsOtherRoleInCrssOfAUsr (UsrDat->UsrCod,Rol_ROLE_TEACHER,Rol_ROLE_STUDENT),
|
||||
Txt_ROLES_PLURAL_abc[Rol_ROLE_STUDENT][Usr_SEX_UNKNOWN]);
|
||||
}
|
||||
if (NumCrssUsrIsStudent)
|
||||
if ((NumCrssUsrIsStudent = Usr_GetNumCrssOfUsrWithARole (UsrDat->UsrCod,Rol_ROLE_STUDENT)))
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s\""
|
||||
|
@ -7628,6 +7632,10 @@ void Usr_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
|||
}
|
||||
|
||||
/***** Number of files published *****/
|
||||
if ((NumFiles = Brw_GetNumFilesUsr (UsrDat->UsrCod)))
|
||||
NumPublicFiles = Brw_GetNumPublicFilesUsr (UsrDat->UsrCod);
|
||||
else
|
||||
NumPublicFiles = 0;
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s\""
|
||||
" style=\"text-align:right; vertical-align:middle;\">"
|
||||
|
@ -7635,13 +7643,14 @@ void Usr_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
|||
"</td>"
|
||||
"<td class=\"DAT\""
|
||||
" style=\"text-align:left; vertical-align:middle;\">"
|
||||
"%u"
|
||||
"%u (%u %s)"
|
||||
"</a>"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
The_ClassFormul[Gbl.Prefs.Theme],
|
||||
Txt_Files,
|
||||
Brw_GetNumFilesUsr (UsrDat->UsrCod));
|
||||
NumFiles,NumPublicFiles,
|
||||
Txt_public_files);
|
||||
|
||||
/***** Number of posts in forums *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
|
|
Loading…
Reference in New Issue