mirror of https://github.com/acanas/swad-core.git
Version 15.225.14
This commit is contained in:
parent
917d519886
commit
83f5e8d658
|
@ -135,8 +135,9 @@
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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
|
// 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.14:Jun 16, 2016 Button in possible duplicate user to show similar users. (? lines)
|
Version 15.225.15:Jun 16, 2016 Button in possible duplicate user to show similar users. (? lines)
|
||||||
Version 15.225.13:Jun 16, 2016 Check if a user in listing of possible duplicate users has accepted all his/her courses. (? lines)
|
Version 15.225.14:Jun 16, 2016 Code refactoring in listing of users. (202741 lines)
|
||||||
|
Version 15.225.13:Jun 16, 2016 Check if a user in listing of possible duplicate users has accepted all his/her courses. (202790 lines)
|
||||||
Version 15.225.12:Jun 16, 2016 New module swad_duplicate for possible duplicate users. (202758 lines)
|
Version 15.225.12:Jun 16, 2016 New module swad_duplicate for possible duplicate users. (202758 lines)
|
||||||
Version 15.225.11:Jun 16, 2016 Listing possible duplicate users. (202667 lines)
|
Version 15.225.11:Jun 16, 2016 Listing possible duplicate users. (202667 lines)
|
||||||
Version 15.225.10:Jun 15, 2016 Listing possible duplicate users. (202626 lines)
|
Version 15.225.10:Jun 15, 2016 Listing possible duplicate users. (202626 lines)
|
||||||
|
|
|
@ -133,7 +133,7 @@ void Dpt_SeeDepts (void)
|
||||||
"</a>"
|
"</a>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||||
" %u "
|
"%u"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
Gbl.Dpts.Lst[NumDpt].WWW,
|
Gbl.Dpts.Lst[NumDpt].WWW,
|
||||||
|
@ -159,7 +159,7 @@ void Dpt_SeeDepts (void)
|
||||||
"%s"
|
"%s"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||||
" %u "
|
"%u"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
Txt_Other_departments,NumTchsInOtherDpts);
|
Txt_Other_departments,NumTchsInOtherDpts);
|
||||||
|
@ -171,7 +171,7 @@ void Dpt_SeeDepts (void)
|
||||||
"%s"
|
"%s"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||||
" %u "
|
"%u"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
Txt_Department_unspecified,
|
Txt_Department_unspecified,
|
||||||
|
@ -579,7 +579,7 @@ static void Dpt_ListDepartmentsForEdition (void)
|
||||||
|
|
||||||
/* Number of teachers */
|
/* Number of teachers */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||||
" %u "
|
"%u"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
Dpt->NumTchs);
|
Dpt->NumTchs);
|
||||||
|
|
|
@ -120,14 +120,12 @@ void Dup_PutLinkToListDupUsrs (void)
|
||||||
|
|
||||||
void Dup_ListDuplicateUsrs (void)
|
void Dup_ListDuplicateUsrs (void)
|
||||||
{
|
{
|
||||||
extern const char *Usr_UsrDatMainFieldNames[Usr_NUM_MAIN_FIELDS_DATA_USR];
|
|
||||||
extern const char *Txt_Possibly_duplicate_users;
|
extern const char *Txt_Possibly_duplicate_users;
|
||||||
extern const char *Txt_Informants;
|
extern const char *Txt_Informants;
|
||||||
extern const char *Txt_No_users_found[Rol_NUM_ROLES];
|
extern const char *Txt_No_users_found[Rol_NUM_ROLES];
|
||||||
char Query[1024];
|
char Query[1024];
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
unsigned NumCol;
|
|
||||||
unsigned NumUsrs;
|
unsigned NumUsrs;
|
||||||
unsigned NumUsr;
|
unsigned NumUsr;
|
||||||
struct UsrData UsrDat;
|
struct UsrData UsrDat;
|
||||||
|
@ -156,18 +154,8 @@ void Dup_ListDuplicateUsrs (void)
|
||||||
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_2\">");
|
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_2\">");
|
||||||
|
|
||||||
/***** Heading row with column names *****/
|
/***** Heading row with column names *****/
|
||||||
/* Start row */
|
Gbl.Usrs.Listing.WithPhotos = true;
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
Usr_WriteHeaderFieldsUsrDat (false); // Columns for the data
|
||||||
for (NumCol = 0;
|
|
||||||
NumCol < Usr_NUM_MAIN_FIELDS_DATA_USR;
|
|
||||||
NumCol++)
|
|
||||||
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE LIGHT_BLUE\">"
|
|
||||||
"%s "
|
|
||||||
"</th>",
|
|
||||||
Usr_UsrDatMainFieldNames[NumCol]);
|
|
||||||
|
|
||||||
/* End row */
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
|
||||||
|
|
||||||
/***** List users *****/
|
/***** List users *****/
|
||||||
for (NumUsr = 0, Gbl.RowEvenOdd = 0;
|
for (NumUsr = 0, Gbl.RowEvenOdd = 0;
|
||||||
|
|
115
swad_user.c
115
swad_user.c
|
@ -3125,8 +3125,8 @@ static void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat)
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
fprintf (Gbl.F.Out,"<tr>");
|
||||||
|
|
||||||
/***** Write number of user *****/
|
/***** Write number of user *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL_N RIGHT_MIDDLE COLOR%u\">"
|
fprintf (Gbl.F.Out,"<td class=\"USR_LIST_NUM_N CENTER_MIDDLE COLOR%u\">"
|
||||||
" %u "
|
"%u"
|
||||||
"</td>",
|
"</td>",
|
||||||
Gbl.RowEvenOdd,NumUsr);
|
Gbl.RowEvenOdd,NumUsr);
|
||||||
|
|
||||||
|
@ -5124,13 +5124,40 @@ void Usr_SetUsrDatMainFieldNames (void)
|
||||||
Usr_UsrDatMainFieldNames[8] = Txt_Institution;
|
Usr_UsrDatMainFieldNames[8] = Txt_Institution;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/************ Write header with main field names of user's data **************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Usr_WriteHeaderFieldsUsrDat (bool PutCheckBoxToSelectUsr)
|
||||||
|
{
|
||||||
|
unsigned NumCol;
|
||||||
|
|
||||||
|
fprintf (Gbl.F.Out,"<tr>");
|
||||||
|
|
||||||
|
/***** First column used for selection *****/
|
||||||
|
if (PutCheckBoxToSelectUsr)
|
||||||
|
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE LIGHT_BLUE\">"
|
||||||
|
"</th>");
|
||||||
|
|
||||||
|
/***** Columns for user's data fields *****/
|
||||||
|
for (NumCol = 0;
|
||||||
|
NumCol < Usr_NUM_MAIN_FIELDS_DATA_USR;
|
||||||
|
NumCol++)
|
||||||
|
if (NumCol != 2 || Gbl.Usrs.Listing.WithPhotos) // Skip photo column if I don't want this column
|
||||||
|
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE LIGHT_BLUE\">"
|
||||||
|
"%s "
|
||||||
|
"</th>",
|
||||||
|
Usr_UsrDatMainFieldNames[NumCol]);
|
||||||
|
|
||||||
|
fprintf (Gbl.F.Out,"</tr>");
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************************** List guests' main data ***************************/
|
/************************** List guests' main data ***************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Usr_ListMainDataGsts (bool PutCheckBoxToSelectUsr)
|
static void Usr_ListMainDataGsts (bool PutCheckBoxToSelectUsr)
|
||||||
{
|
{
|
||||||
unsigned NumCol;
|
|
||||||
unsigned NumUsr;
|
unsigned NumUsr;
|
||||||
struct UsrData UsrDat;
|
struct UsrData UsrDat;
|
||||||
|
|
||||||
|
@ -5140,27 +5167,7 @@ static void Usr_ListMainDataGsts (bool PutCheckBoxToSelectUsr)
|
||||||
if (Gbl.Usrs.LstGsts.NumUsrs)
|
if (Gbl.Usrs.LstGsts.NumUsrs)
|
||||||
{
|
{
|
||||||
/***** Heading row with column names *****/
|
/***** Heading row with column names *****/
|
||||||
/* Start row */
|
Usr_WriteHeaderFieldsUsrDat (PutCheckBoxToSelectUsr); // Columns for the data
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
|
||||||
|
|
||||||
/* First column used for selection */
|
|
||||||
if (PutCheckBoxToSelectUsr)
|
|
||||||
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE LIGHT_BLUE\">"
|
|
||||||
" "
|
|
||||||
"</th>");
|
|
||||||
|
|
||||||
/* Columns for the data */
|
|
||||||
for (NumCol = 0;
|
|
||||||
NumCol < Usr_NUM_MAIN_FIELDS_DATA_USR;
|
|
||||||
NumCol++)
|
|
||||||
if (NumCol != 2 || Gbl.Usrs.Listing.WithPhotos) // Skip photo column if I don't want this column
|
|
||||||
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE LIGHT_BLUE\">"
|
|
||||||
"%s "
|
|
||||||
"</th>",
|
|
||||||
Usr_UsrDatMainFieldNames[NumCol]);
|
|
||||||
|
|
||||||
/* End row */
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
|
||||||
|
|
||||||
/***** Initialize structure with user's data *****/
|
/***** Initialize structure with user's data *****/
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
@ -5197,7 +5204,6 @@ static void Usr_ListMainDataGsts (bool PutCheckBoxToSelectUsr)
|
||||||
|
|
||||||
static void Usr_ListMainDataStds (bool PutCheckBoxToSelectUsr)
|
static void Usr_ListMainDataStds (bool PutCheckBoxToSelectUsr)
|
||||||
{
|
{
|
||||||
unsigned NumCol;
|
|
||||||
unsigned NumUsr;
|
unsigned NumUsr;
|
||||||
char *GroupNames;
|
char *GroupNames;
|
||||||
struct UsrData UsrDat;
|
struct UsrData UsrDat;
|
||||||
|
@ -5225,27 +5231,7 @@ static void Usr_ListMainDataStds (bool PutCheckBoxToSelectUsr)
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Heading row with column names *****/
|
/***** Heading row with column names *****/
|
||||||
/* Start row */
|
Usr_WriteHeaderFieldsUsrDat (PutCheckBoxToSelectUsr); // Columns for the data
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
|
||||||
|
|
||||||
/* First column used for selection */
|
|
||||||
if (PutCheckBoxToSelectUsr)
|
|
||||||
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE LIGHT_BLUE\">"
|
|
||||||
" "
|
|
||||||
"</th>");
|
|
||||||
|
|
||||||
/* Columns for the data */
|
|
||||||
for (NumCol = 0;
|
|
||||||
NumCol < Usr_NUM_MAIN_FIELDS_DATA_USR;
|
|
||||||
NumCol++)
|
|
||||||
if (NumCol != 2 || Gbl.Usrs.Listing.WithPhotos) // Skip photo column if I don't want this column
|
|
||||||
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE LIGHT_BLUE\">"
|
|
||||||
"%s "
|
|
||||||
"</th>",
|
|
||||||
Usr_UsrDatMainFieldNames[NumCol]);
|
|
||||||
|
|
||||||
/* End row */
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
|
||||||
|
|
||||||
/***** Initialize structure with user's data *****/
|
/***** Initialize structure with user's data *****/
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
@ -5667,7 +5653,6 @@ void Usr_ListAllDataStds (void)
|
||||||
|
|
||||||
void Usr_ListUsrsForSelection (Rol_Role_t Role)
|
void Usr_ListUsrsForSelection (Rol_Role_t Role)
|
||||||
{
|
{
|
||||||
unsigned NumCol;
|
|
||||||
unsigned NumUsr;
|
unsigned NumUsr;
|
||||||
struct UsrData UsrDat;
|
struct UsrData UsrDat;
|
||||||
|
|
||||||
|
@ -5675,24 +5660,7 @@ void Usr_ListUsrsForSelection (Rol_Role_t Role)
|
||||||
Usr_SetUsrDatMainFieldNames ();
|
Usr_SetUsrDatMainFieldNames ();
|
||||||
|
|
||||||
/***** Heading row with column names *****/
|
/***** Heading row with column names *****/
|
||||||
/* Start row and first column used for selection */
|
Usr_WriteHeaderFieldsUsrDat (true); // Columns for the data
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
|
||||||
"<th class=\"LEFT_MIDDLE LIGHT_BLUE\">"
|
|
||||||
" "
|
|
||||||
"</th>");
|
|
||||||
|
|
||||||
/* Columns for the data */
|
|
||||||
for (NumCol = 0;
|
|
||||||
NumCol < Usr_NUM_MAIN_FIELDS_DATA_USR;
|
|
||||||
NumCol++)
|
|
||||||
if (NumCol != 2 || Gbl.Usrs.Listing.WithPhotos) // Skip photo column if I don't want this column
|
|
||||||
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE LIGHT_BLUE\">"
|
|
||||||
"%s "
|
|
||||||
"</th>",
|
|
||||||
Usr_UsrDatMainFieldNames[NumCol]);
|
|
||||||
|
|
||||||
/* End row */
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
|
||||||
|
|
||||||
/***** Initialize structure with user's data *****/
|
/***** Initialize structure with user's data *****/
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
@ -5855,7 +5823,6 @@ unsigned Usr_ListUsrsFound (Rol_Role_t Role,const char *UsrQuery)
|
||||||
extern const char *Txt_ROLES_PLURAL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
extern const char *Txt_ROLES_PLURAL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||||
struct ListUsers *LstUsrs;
|
struct ListUsers *LstUsrs;
|
||||||
Usr_Sex_t Sex;
|
Usr_Sex_t Sex;
|
||||||
unsigned NumCol;
|
|
||||||
unsigned NumUsr;
|
unsigned NumUsr;
|
||||||
struct UsrData UsrDat;
|
struct UsrData UsrDat;
|
||||||
unsigned NumUsrs;
|
unsigned NumUsrs;
|
||||||
|
@ -5881,18 +5848,8 @@ unsigned Usr_ListUsrsFound (Rol_Role_t Role,const char *UsrQuery)
|
||||||
Lay_StartRoundFrameTable (NULL,2,Gbl.Title);
|
Lay_StartRoundFrameTable (NULL,2,Gbl.Title);
|
||||||
|
|
||||||
/***** Heading row with column names *****/
|
/***** Heading row with column names *****/
|
||||||
/* Start row */
|
Gbl.Usrs.Listing.WithPhotos = true;
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
Usr_WriteHeaderFieldsUsrDat (false); // Columns for the data
|
||||||
for (NumCol = 0;
|
|
||||||
NumCol < Usr_NUM_MAIN_FIELDS_DATA_USR;
|
|
||||||
NumCol++)
|
|
||||||
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE LIGHT_BLUE\">"
|
|
||||||
"%s "
|
|
||||||
"</th>",
|
|
||||||
Usr_UsrDatMainFieldNames[NumCol]);
|
|
||||||
|
|
||||||
/* End row */
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
|
||||||
|
|
||||||
/***** Initialize structure with user's data *****/
|
/***** Initialize structure with user's data *****/
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
@ -6026,7 +5983,7 @@ void Usr_ListDataAdms (void)
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
|
||||||
/***** Heading row with column names *****/
|
/***** Heading row with column names *****/
|
||||||
fprintf (Gbl.F.Out,"<table style=\"margin:0 auto;\">"
|
fprintf (Gbl.F.Out,"<table>"
|
||||||
"<tr>");
|
"<tr>");
|
||||||
for (NumCol = 0;
|
for (NumCol = 0;
|
||||||
NumCol < Usr_NUM_MAIN_FIELDS_DATA_ADM;
|
NumCol < Usr_NUM_MAIN_FIELDS_DATA_ADM;
|
||||||
|
|
|
@ -320,6 +320,7 @@ void Usr_ShowFormsToSelectUsrListType (Act_Action_t NextAction);
|
||||||
void Usr_PutCheckboxToSelectAllTheUsers (Rol_Role_t Role);
|
void Usr_PutCheckboxToSelectAllTheUsers (Rol_Role_t Role);
|
||||||
unsigned Usr_GetColumnsForSelectUsrs (void);
|
unsigned Usr_GetColumnsForSelectUsrs (void);
|
||||||
void Usr_SetUsrDatMainFieldNames (void);
|
void Usr_SetUsrDatMainFieldNames (void);
|
||||||
|
void Usr_WriteHeaderFieldsUsrDat (bool PutCheckBoxToSelectUsr);
|
||||||
|
|
||||||
void Usr_PutExtraParamsUsrList (Act_Action_t NextAction);
|
void Usr_PutExtraParamsUsrList (Act_Action_t NextAction);
|
||||||
void Usr_ListUsersToSelect (Rol_Role_t Role);
|
void Usr_ListUsersToSelect (Rol_Role_t Role);
|
||||||
|
|
Loading…
Reference in New Issue