mirror of https://github.com/acanas/swad-core.git
Version 15.225.20
This commit is contained in:
parent
b024fa84cb
commit
310e5b1cdb
|
@ -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;
|
||||
|
|
|
@ -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) *****/
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,"<tr>"
|
||||
"<td colspan=\"2\" class=\"COLOR%u\"></td>"
|
||||
"<td colspan=\"%u\""
|
||||
" class=\"DAT LEFT_MIDDLE COLOR%u\">",
|
||||
Gbl.RowEvenOdd,
|
||||
Usr_NUM_MAIN_FIELDS_DATA_USR-2,
|
||||
Gbl.RowEvenOdd);
|
||||
|
||||
/* Write user figures */
|
||||
Dup_WriteUsrFigures (UsrDat.UsrCod);
|
||||
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
||||
/* Write all the courses this user belongs to */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"2\" class=\"COLOR%u\"></td>"
|
||||
"<td colspan=\"%u\" class=\"COLOR%u\">",
|
||||
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,"</td>"
|
||||
"</tr>");
|
||||
|
||||
/* Button to remove this user from list of duplicates */
|
||||
/* Buttons to make actions on this user */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"2\" class=\"COLOR%u\"></td>"
|
||||
"<td colspan=\"%u\" class=\"LEFT_TOP COLOR%u\""
|
||||
|
@ -359,41 +349,6 @@ void Dup_ListSimilarUsrs (void)
|
|||
Lay_EndRoundFrame ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************************** Write user figures *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Dup_WriteUsrFigures (long UsrCod)
|
||||
{
|
||||
extern const char *Txt_Files;
|
||||
extern const char *Txt_file;
|
||||
extern const char *Txt_files;
|
||||
unsigned NumFiles;
|
||||
|
||||
/***** Star list ****/
|
||||
fprintf (Gbl.F.Out,"<div>"
|
||||
"<ul class=\"PRF_FIG_UL DAT_NOBR_N\">");
|
||||
|
||||
/***** Write number of files *****/
|
||||
NumFiles = Brw_GetNumFilesUsr (UsrCod);
|
||||
fprintf (Gbl.F.Out,"<li title=\"%s\" class=\"PRF_FIG_LI\""
|
||||
" style=\"background-image:url('%s/file64x64.gif');\" />"
|
||||
"%u %s"
|
||||
"</li>",
|
||||
Txt_Files,
|
||||
Gbl.Prefs.IconsURL,
|
||||
NumFiles,
|
||||
(NumFiles == 1) ? Txt_file :
|
||||
Txt_files);
|
||||
|
||||
/***** Write number of messages *****/
|
||||
// TODO: ...
|
||||
|
||||
/***** End list *****/
|
||||
fprintf (Gbl.F.Out,"</ul>"
|
||||
"</div>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************* Remove a request for enrollment ***********************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -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,"<div id=\"prf_fig_left_container\">"
|
||||
fprintf (Gbl.F.Out,"<div class=\"PRF_FIG_LEFT_CONTAINER\">"
|
||||
"<ul class=\"PRF_FIG_UL DAT_NOBR_N\">");
|
||||
|
||||
/***** 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,"<span id=\"first_click_date\"></span>");
|
||||
/* Create unique id for new comment */
|
||||
Act_SetUniqueId (IdFirstClickTime);
|
||||
|
||||
fprintf (Gbl.F.Out,"<span id=\"%s\"></span>",IdFirstClickTime);
|
||||
if (UsrFigures.NumDays > 0)
|
||||
fprintf (Gbl.F.Out," (%d %s)",
|
||||
UsrFigures.NumDays,
|
||||
(UsrFigures.NumDays == 1) ? Txt_day :
|
||||
Txt_days);
|
||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
||||
"writeLocalDateFromUTC('first_click_date',%ld,'%s');"
|
||||
"writeLocalDateFromUTC('%s',%ld,'%s');"
|
||||
"</script>",
|
||||
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)
|
|||
"</div>");
|
||||
|
||||
/***** Start left list *****/
|
||||
fprintf (Gbl.F.Out,"<div id=\"prf_fig_right_container\">"
|
||||
fprintf (Gbl.F.Out,"<div class=\"PRF_FIG_RIGHT_CONTAINER\">"
|
||||
"<ul class=\"PRF_FIG_UL DAT_NOBR_N\">");
|
||||
|
||||
UsrIsBannedFromRanking = Usr_CheckIfUsrBanned (UsrDat->UsrCod);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue