mirror of https://github.com/acanas/swad-core.git
Version 15.250.4
This commit is contained in:
parent
2b6082cc2f
commit
95764c5db3
|
@ -135,13 +135,15 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.250.2 (2016-09-11)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.250.4 (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.4: Sep 11, 2016 Time of first click in user's usage report. (204171 lines)
|
||||
Version 15.250.3: Sep 11, 2016 Number of puslished files in user's usage report. (? lines)
|
||||
Version 15.250.2: Sep 11, 2016 Record card replaced by raw user's data in user's usage report. (204100 lines)
|
||||
Version 15.250.1: Sep 09, 2016 Changes in layout of user's usage report. (204056 lines)
|
||||
Version 15.250: Sep 09, 2016 New option to print user's usage report. (204053 lines)
|
||||
|
|
|
@ -55,16 +55,6 @@
|
|||
/****************************** Internal types *******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
struct UsrFigures
|
||||
{
|
||||
time_t FirstClickTimeUTC; // 0 ==> unknown first click time of user never logged
|
||||
int NumDays; // -1 ==> not applicable
|
||||
long NumClicks; // -1L ==> unknown number of clicks
|
||||
long NumFileViews; // -1L ==> unknown number of file views
|
||||
long NumForPst; // -1L ==> unknown number of forum posts
|
||||
long NumMsgSnt; // -1L ==> unknown number of messages sent
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** External global variables from others modules ****************/
|
||||
/*****************************************************************************/
|
||||
|
@ -83,8 +73,6 @@ static void Prf_RequestUserProfileWithDefaultNickname (const char *DefaultNickna
|
|||
|
||||
static void Prf_PutLinkToUpdateAction (Act_Action_t Action,const char *EncryptedUsrCod);
|
||||
|
||||
static void Prf_GetUsrFigures (long UsrCod,struct UsrFigures *UsrFigures);
|
||||
|
||||
static unsigned long Prf_GetRankingFigure (long UsrCod,const char *FieldName);
|
||||
static unsigned long Prf_GetNumUsrsWithFigure (const char *FieldName);
|
||||
static unsigned long Prf_GetRankingNumClicksPerDay (long UsrCod);
|
||||
|
@ -356,7 +344,7 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
|||
extern const char *Txt_teachers_ABBREVIATION;
|
||||
extern const char *Txt_students_ABBREVIATION;
|
||||
extern const char *Txt_courses_ABBREVIATION;
|
||||
extern const char *Txt_Files;
|
||||
extern const char *Txt_Files_uploaded;
|
||||
extern const char *Txt_file;
|
||||
extern const char *Txt_files;
|
||||
extern const char *Txt_public_FILES;
|
||||
|
@ -430,7 +418,7 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
|||
" style=\"background-image:url('%s/file64x64.gif');\" />"
|
||||
"%u %s (%u %s)"
|
||||
"</li>",
|
||||
Txt_Files,
|
||||
Txt_Files_uploaded,
|
||||
Gbl.Prefs.IconsURL,
|
||||
NumFiles,
|
||||
(NumFiles == 1) ? Txt_file :
|
||||
|
@ -440,7 +428,7 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
|||
/***** Get figures *****/
|
||||
Prf_GetUsrFigures (UsrDat->UsrCod,&UsrFigures);
|
||||
|
||||
/* First click time */
|
||||
/* Time since first click */
|
||||
fprintf (Gbl.F.Out,"<li title=\"%s\" class=\"PRF_FIG_LI\""
|
||||
" style=\"background-image:url('%s/clock64x64.gif');\" />",
|
||||
Txt_From_TIME,
|
||||
|
@ -612,7 +600,7 @@ static void Prf_PutLinkToUpdateAction (Act_Action_t Action,const char *Encrypted
|
|||
/********************** Select values on user's figures **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prf_GetUsrFigures (long UsrCod,struct UsrFigures *UsrFigures)
|
||||
void Prf_GetUsrFigures (long UsrCod,struct UsrFigures *UsrFigures)
|
||||
{
|
||||
char Query[512];
|
||||
MYSQL_RES *mysql_res;
|
||||
|
|
|
@ -35,6 +35,16 @@
|
|||
/******************************** Public types *******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
struct UsrFigures
|
||||
{
|
||||
time_t FirstClickTimeUTC; // 0 ==> unknown first click time of user never logged
|
||||
int NumDays; // -1 ==> not applicable
|
||||
long NumClicks; // -1L ==> unknown number of clicks
|
||||
long NumFileViews; // -1L ==> unknown number of file views
|
||||
long NumForPst; // -1L ==> unknown number of forum posts
|
||||
long NumMsgSnt; // -1L ==> unknown number of messages sent
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Public prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -50,6 +60,7 @@ bool Prf_ShowUserProfile (struct UsrData *UsrDat);
|
|||
void Prf_ChangeProfileVisibility (void);
|
||||
|
||||
void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat);
|
||||
void Prf_GetUsrFigures (long UsrCod,struct UsrFigures *UsrFigures);
|
||||
void Prf_CalculateFirstClickTime (void);
|
||||
void Prf_CalculateNumClicks (void);
|
||||
void Prf_CalculateNumFileViews (void);
|
||||
|
|
|
@ -90,9 +90,20 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
|||
extern const char *Txt_Email;
|
||||
extern const char *Txt_Country;
|
||||
extern const char *Txt_Institution;
|
||||
extern const char *Txt_From_TIME;
|
||||
extern const char *Txt_day;
|
||||
extern const char *Txt_days;
|
||||
extern const char *Txt_Files_uploaded;
|
||||
extern const char *Txt_file;
|
||||
extern const char *Txt_files;
|
||||
extern const char *Txt_public_FILES;
|
||||
unsigned NumID;
|
||||
char CtyName[Cty_MAX_BYTES_COUNTRY_NAME+1];
|
||||
struct Institution Ins;
|
||||
struct UsrFigures UsrFigures;
|
||||
struct tm FirstClickTime;
|
||||
unsigned NumFiles;
|
||||
unsigned NumPublicFiles;
|
||||
|
||||
/***** Start frame and table *****/
|
||||
Lay_StartRoundFrame ("100%",Txt_Report_of_use_of_the_platform,
|
||||
|
@ -139,6 +150,47 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
|||
Txt_Institution,
|
||||
Ins.FullName);
|
||||
|
||||
/***** Get figures *****/
|
||||
Prf_GetUsrFigures (Gbl.Usrs.Me.UsrDat.UsrCod,&UsrFigures);
|
||||
|
||||
/***** Time since first click *****/
|
||||
fprintf (Gbl.F.Out,"<li>%s: ",Txt_From_TIME);
|
||||
if (UsrFigures.FirstClickTimeUTC)
|
||||
{
|
||||
if ((gmtime_r (&UsrFigures.FirstClickTimeUTC,&FirstClickTime)) != NULL)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"%04d-%02d-%02d %02d:%02d:%02d UTC",
|
||||
1900 + FirstClickTime.tm_year, // year
|
||||
1 + FirstClickTime.tm_mon, // month
|
||||
FirstClickTime.tm_mday, // day of the month
|
||||
FirstClickTime.tm_hour, // hours
|
||||
FirstClickTime.tm_min, // minutes
|
||||
FirstClickTime.tm_sec); // seconds
|
||||
if (UsrFigures.NumDays > 0)
|
||||
fprintf (Gbl.F.Out," (%d %s)",
|
||||
UsrFigures.NumDays,
|
||||
(UsrFigures.NumDays == 1) ? Txt_day :
|
||||
Txt_days);
|
||||
}
|
||||
}
|
||||
else
|
||||
fprintf (Gbl.F.Out,"?");
|
||||
fprintf (Gbl.F.Out,"</li>");
|
||||
|
||||
/***** Number of files currently published *****/
|
||||
if ((NumFiles = Brw_GetNumFilesUsr (Gbl.Usrs.Me.UsrDat.UsrCod)))
|
||||
NumPublicFiles = Brw_GetNumPublicFilesUsr (Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
else
|
||||
NumPublicFiles = 0;
|
||||
fprintf (Gbl.F.Out,"<li>"
|
||||
"%s: %u %s (%u %s)"
|
||||
"</li>",
|
||||
Txt_Files_uploaded,
|
||||
NumFiles,
|
||||
(NumFiles == 1) ? Txt_file :
|
||||
Txt_files,
|
||||
NumPublicFiles,Txt_public_FILES);
|
||||
|
||||
fprintf (Gbl.F.Out,"</ul>");
|
||||
|
||||
/***** Show details of user's profile *****/
|
||||
|
|
21
swad_text.c
21
swad_text.c
|
@ -11919,6 +11919,27 @@ const char *Txt_Files_copied =
|
|||
"Arquivos copiados";
|
||||
#endif
|
||||
|
||||
const char *Txt_Files_uploaded =
|
||||
#if L==1
|
||||
"Fitxers pujats";
|
||||
#elif L==2
|
||||
"Dateien hochgeladen";
|
||||
#elif L==3
|
||||
"Files uploaded";
|
||||
#elif L==4
|
||||
"Archivos subidos";
|
||||
#elif L==5
|
||||
"Fichiers téléchargés";
|
||||
#elif L==6
|
||||
"Archivos subidos"; // Okoteve traducción
|
||||
#elif L==7
|
||||
"File caricati";
|
||||
#elif L==8
|
||||
"Pliki dodane";
|
||||
#elif L==9
|
||||
"Arquivos enviados";
|
||||
#endif
|
||||
|
||||
const char *Txt_Files_of_marks_must_contain_a_table_in_HTML_format_ =
|
||||
#if L==1
|
||||
"Los archivos de calificaciones deben contener una tabla en <strong>formato HTML</strong> sin imágenes."
|
||||
|
|
Loading…
Reference in New Issue