mirror of https://github.com/acanas/swad-core.git
Version 14.81.2
This commit is contained in:
parent
aec8df96e4
commit
aa5e76d859
|
@ -103,12 +103,13 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 14.81.2 (2015/03/09)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 14.81.3 (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.2: Mar 09, 2015 Information about number of courses in user's public profile. (? lines)
|
||||
Version 14.81.3: Mar 09, 2015 Information about number of files in user's public profile. (? 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)
|
||||
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)
|
||||
|
|
|
@ -10144,6 +10144,20 @@ static bool Brw_GetIfFolderHasPublicFiles (const char *Path)
|
|||
return (DB_QueryCOUNT (Query,"can not check if a folder contains public files") != 0);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********************** Get number of files from a user *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
unsigned Brw_GetNumFilesUsr (long UsrCod)
|
||||
{
|
||||
char Query[128];
|
||||
|
||||
/***** Get number of posts from a user from database *****/
|
||||
sprintf (Query,"SELECT COUNT(*) FROM files WHERE PublisherUsrCod='%ld'",
|
||||
UsrCod);
|
||||
return (unsigned) DB_QueryCOUNT (Query,"can not number of files from a user");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Change hiddeness of file in the database ******************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -186,6 +186,7 @@ void Brw_GetFileMetadataByCod (struct FileMetadata *FileMetadata);
|
|||
bool Brw_GetFileTypeSizeAndDate (struct FileMetadata *FileMetadata);
|
||||
void Brw_GetAndUpdateFileViews (struct FileMetadata *FileMetadata);
|
||||
void Brw_UpdateMyFileViews (long FilCod);
|
||||
unsigned Brw_GetNumFilesUsr (long UsrCod);
|
||||
|
||||
long Brw_GetCodForFiles (void);
|
||||
void Brw_GetCrsGrpFromFileMetadata (Brw_FileBrowser_t FileBrowser,long Cod,
|
||||
|
|
17
swad_user.c
17
swad_user.c
|
@ -7558,6 +7558,7 @@ void Usr_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
|||
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_Forum_posts;
|
||||
extern const char *Txt_Messages_sent;
|
||||
unsigned NumCrssUsrIsTeacher = Usr_GetNumCrssOfUsrWithARole (UsrDat->UsrCod,Rol_ROLE_TEACHER);
|
||||
|
@ -7626,6 +7627,22 @@ void Usr_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
|||
Txt_ROLES_PLURAL_abc[Rol_ROLE_TEACHER][Usr_SEX_UNKNOWN]);
|
||||
}
|
||||
|
||||
/***** Number of files published *****/
|
||||
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_Files,
|
||||
Brw_GetNumFilesUsr (UsrDat->UsrCod));
|
||||
|
||||
/***** Number of posts in forums *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s\""
|
||||
|
|
Loading…
Reference in New Issue