diff --git a/css/swad15.225.11.css b/css/swad15.225.11.css
index fa02e706c..fda15b056 100644
--- a/css/swad15.225.11.css
+++ b/css/swad15.225.11.css
@@ -2412,7 +2412,7 @@ a:hover img.CENTRE_PHOTO_SHOW
}
/***************************** Public user's profile *************************/
-#prf_fig_left_container
+.PRF_FIG_LEFT_CONTAINER
{
display:inline-block;
box-sizing:border-box;
@@ -2421,7 +2421,7 @@ a:hover img.CENTRE_PHOTO_SHOW
text-align:right;
vertical-align:top;
}
-#prf_fig_right_container
+.PRF_FIG_RIGHT_CONTAINER
{
display:inline-block;
box-sizing:border-box;
diff --git a/swad_action.c b/swad_action.c
index 0ad2e6d48..fa2477a49 100644
--- a/swad_action.c
+++ b/swad_action.c
@@ -4714,8 +4714,8 @@ void Act_SetUniqueId (char UniqueId[Act_MAX_LENGTH_ID])
{
static unsigned CountForThisExecution = 0;
- /***** Create Id. The id must be unique in timeline,
- but the timeline is updated via AJAX.
+ /***** Create Id. The id must be unique,
+ the page content may be updated via AJAX.
So, Id uses:
- a name for this execution (Gbl.UniqueNameEncrypted)
- a number for each element in this execution (CountForThisExecution) *****/
diff --git a/swad_changelog.h b/swad_changelog.h
index fe228fd74..066eefbde 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -128,14 +128,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 15.225.19 (2016-06-17)"
+#define Log_PLATFORM_VERSION "SWAD 15.225.20 (2016-06-17)"
#define CSS_FILE "swad15.225.11.css"
#define JS_FILE "swad15.216.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.225.20:Jun 17, 2016 Show number of messages of a user in similar users. (? lines)
+ Version 15.225.20:Jun 17, 2016 Show details of user's profile in similar users. (202893 lines)
Version 15.225.19:Jun 17, 2016 Changed layout of listing of similar users. (202927 lines)
Version 15.225.18:Jun 17, 2016 Show number of files of a user in similar users. (202904 lines)
Version 15.225.17:Jun 17, 2016 Show similar users. Not finished. (202878 lines)
diff --git a/swad_duplicate.c b/swad_duplicate.c
index c22f37943..10fb96fb7 100644
--- a/swad_duplicate.c
+++ b/swad_duplicate.c
@@ -33,6 +33,7 @@
#include "swad_duplicate.h"
#include "swad_global.h"
#include "swad_layout.h"
+#include "swad_profile.h"
#include "swad_role.h"
#include "swad_user.h"
@@ -62,8 +63,6 @@ extern struct Globals Gbl;
/***************************** Private prototypes ****************************/
/*****************************************************************************/
-static void Dup_WriteUsrFigures (long UsrCod);
-
/*****************************************************************************/
/******************** Report a user as possible duplicate ********************/
/*****************************************************************************/
@@ -292,33 +291,24 @@ void Dup_ListSimilarUsrs (void)
/* Write data of this user */
Usr_WriteRowUsrMainData (NumUsrs - NumUsr,&UsrDat,false);
- fprintf (Gbl.F.Out,"
"
- " | "
- "",
- Gbl.RowEvenOdd,
- Usr_NUM_MAIN_FIELDS_DATA_USR-2,
- Gbl.RowEvenOdd);
-
- /* Write user figures */
- Dup_WriteUsrFigures (UsrDat.UsrCod);
-
- fprintf (Gbl.F.Out," | "
- "
");
-
- /* Write all the courses this user belongs to */
fprintf (Gbl.F.Out,""
" | "
"",
Gbl.RowEvenOdd,
Usr_NUM_MAIN_FIELDS_DATA_USR-2,
Gbl.RowEvenOdd);
+
+ /* Show details of user's profile */
+ Prf_ShowDetailsUserProfile (&UsrDat);
+
+ /* Write all the courses this user belongs to */
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_TEACHER);
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_STUDENT);
+
fprintf (Gbl.F.Out," | "
"
");
- /* Button to remove this user from list of duplicates */
+ /* Buttons to make actions on this user */
fprintf (Gbl.F.Out,""
" | "
""
- "");
-
- /***** Write number of files *****/
- NumFiles = Brw_GetNumFilesUsr (UsrCod);
- fprintf (Gbl.F.Out,""
- "%u %s"
- "",
- Txt_Files,
- Gbl.Prefs.IconsURL,
- NumFiles,
- (NumFiles == 1) ? Txt_file :
- Txt_files);
-
- /***** Write number of messages *****/
- // TODO: ...
-
- /***** End list *****/
- fprintf (Gbl.F.Out," "
- "");
- }
-
/*****************************************************************************/
/********************* Remove a request for enrollment ***********************/
/*****************************************************************************/
diff --git a/swad_profile.c b/swad_profile.c
index 030b7e402..2ffa097fd 100644
--- a/swad_profile.c
+++ b/swad_profile.c
@@ -81,7 +81,6 @@ extern struct Globals Gbl;
static void Prf_RequestUserProfileWithDefaultNickname (const char *DefaultNickname);
-static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat);
static void Prf_PutLinkToUpdateAction (Act_Action_t Action,const char *EncryptedUsrCod);
static void Prf_GetUsrFigures (long UsrCod,struct UsrFigures *UsrFigures);
@@ -350,7 +349,7 @@ void Prf_ChangeProfileVisibility (void)
/********************** Show details of user's profile ***********************/
/*****************************************************************************/
-static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
+void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
{
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
extern const char *Txt_teachers_ABBREVIATION;
@@ -381,9 +380,10 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
unsigned NumCrssUsrIsStudent;
unsigned NumFiles;
unsigned NumPublicFiles;
+ char IdFirstClickTime[Act_MAX_LENGTH_ID];
/***** Start left list *****/
- fprintf (Gbl.F.Out,""
+ fprintf (Gbl.F.Out," "
" ");
/***** Number of courses in which the user is teacher *****/
@@ -446,15 +446,19 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
Gbl.Prefs.IconsURL);
if (UsrFigures.FirstClickTimeUTC)
{
- fprintf (Gbl.F.Out,"");
+ /* Create unique id for new comment */
+ Act_SetUniqueId (IdFirstClickTime);
+
+ fprintf (Gbl.F.Out,"",IdFirstClickTime);
if (UsrFigures.NumDays > 0)
fprintf (Gbl.F.Out," (%d %s)",
UsrFigures.NumDays,
(UsrFigures.NumDays == 1) ? Txt_day :
Txt_days);
fprintf (Gbl.F.Out,"",
+ IdFirstClickTime,
(long) UsrFigures.FirstClickTimeUTC,Txt_Today);
}
else // First click time is unknown or user never logged
@@ -467,7 +471,7 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
" ");
/***** Start left list *****/
- fprintf (Gbl.F.Out," "
+ fprintf (Gbl.F.Out," "
" ");
UsrIsBannedFromRanking = Usr_CheckIfUsrBanned (UsrDat->UsrCod);
diff --git a/swad_profile.h b/swad_profile.h
index 94ee354f5..29699c64b 100644
--- a/swad_profile.h
+++ b/swad_profile.h
@@ -48,6 +48,8 @@ void Prf_GetUsrDatAndShowUserProfile (void);
bool Prf_ShowUserProfile (struct UsrData *UsrDat);
void Prf_ChangeProfileVisibility (void);
+
+void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat);
void Prf_CalculateFirstClickTime (void);
void Prf_CalculateNumClicks (void);
void Prf_CalculateNumFileViews (void);
|